2010-09-17 18:07:00 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class CsvFix < Formula
|
2010-09-17 18:07:00 +00:00
|
|
|
homepage 'http://code.google.com/p/csvfix/'
|
2013-09-17 20:54:02 +00:00
|
|
|
url 'https://bitbucket.org/neilb/csvfix/get/version-1.3.zip'
|
2014-02-11 00:40:06 +00:00
|
|
|
sha1 '2bca2d461434e7bd799e6c886d8eda769e7d3937'
|
2010-09-17 18:07:00 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "make lin"
|
2011-08-17 02:27:40 +00:00
|
|
|
bin.install 'csvfix/bin/csvfix'
|
2010-09-17 18:07:00 +00:00
|
|
|
end
|
2014-02-11 00:40:06 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
IO.popen("#{bin}/csvfix trim", "w+") do |pipe|
|
|
|
|
pipe.write "foo , bar \n"
|
|
|
|
pipe.close_write
|
|
|
|
assert_equal %{"foo","bar"\n}, pipe.read
|
|
|
|
end
|
|
|
|
end
|
2010-09-17 18:07:00 +00:00
|
|
|
end
|