2010-03-09 09:05:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Markdown < Formula
|
2010-03-09 09:05:41 +00:00
|
|
|
homepage 'http://daringfireball.net/projects/markdown/'
|
2013-01-29 05:38:25 +00:00
|
|
|
url 'http://daringfireball.net/projects/downloads/Markdown_1.0.1.zip'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '7e6d1d9224f16fec5631bf6bc5147f1e64715a4b'
|
2010-03-09 09:05:41 +00:00
|
|
|
|
2012-12-28 00:09:13 +00:00
|
|
|
conflicts_with 'discount',
|
|
|
|
:because => 'both markdown and discount ship a `markdown` executable.'
|
|
|
|
|
2010-03-09 09:05:41 +00:00
|
|
|
def install
|
|
|
|
bin.install 'Markdown.pl' => 'markdown'
|
|
|
|
end
|
2014-02-11 01:10:58 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
IO.popen("#{bin}/markdown", "w+") do |pipe|
|
|
|
|
pipe.write "foo *bar*\n"
|
|
|
|
pipe.close_write
|
|
|
|
assert_equal "<p>foo <em>bar</em></p>\n", pipe.read
|
|
|
|
end
|
|
|
|
end
|
2010-03-09 09:05:41 +00:00
|
|
|
end
|