2014-04-26 02:55:31 +00:00
|
|
|
require "formula"
|
2010-09-17 18:07:00 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class CsvFix < Formula
|
2014-06-27 22:17:14 +00:00
|
|
|
homepage "http://neilb.bitbucket.org/csvfix/"
|
2014-04-26 02:55:31 +00:00
|
|
|
url "https://bitbucket.org/neilb/csvfix/get/version-1.6.tar.gz"
|
|
|
|
sha1 "ca770b47f2e08a09350c4005e6ab3c524798b440"
|
|
|
|
|
|
|
|
needs :cxx11
|
2010-09-17 18:07:00 +00:00
|
|
|
|
|
|
|
def install
|
2014-04-26 02:55:31 +00:00
|
|
|
# clang on Mt. Lion will try to build against libstdc++,
|
|
|
|
# despite -std=gnu++0x
|
|
|
|
ENV.libcxx
|
|
|
|
|
2010-09-17 18:07:00 +00:00
|
|
|
system "make lin"
|
2014-04-26 02:55:31 +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
|
2014-05-04 19:12:41 +00:00
|
|
|
assert_equal %{"foo","bar"\n},
|
|
|
|
pipe_output("#{bin}/csvfix trim", "foo , bar \n")
|
2014-02-11 00:40:06 +00:00
|
|
|
end
|
2010-09-17 18:07:00 +00:00
|
|
|
end
|