diff options
| author | Damien Pollet | 2014-06-08 18:01:35 +0200 |
|---|---|---|
| committer | Jack Nagel | 2014-06-09 11:09:44 -0500 |
| commit | 2e64fdd421f31d9d9533f83c3d5a26ee59dfbcba (patch) | |
| tree | dece90b278b882dc16e1567bb8420a89af402ab1 /Library/Formula/ledger.rb | |
| parent | b4bbee15c18def47f1a91c8235fc7f23cf8d7a45 (diff) | |
| download | homebrew-2e64fdd421f31d9d9533f83c3d5a26ee59dfbcba.tar.bz2 | |
ledger 3.0.3
- ignore user config file ~/.ledgerrc during test
- rewrite test to output to a temp file
Closes #29974.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/ledger.rb')
| -rw-r--r-- | Library/Formula/ledger.rb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Library/Formula/ledger.rb b/Library/Formula/ledger.rb index a751af608..76222a5d2 100644 --- a/Library/Formula/ledger.rb +++ b/Library/Formula/ledger.rb @@ -2,8 +2,8 @@ require 'formula' class Ledger < Formula homepage 'http://ledger-cli.org' - url 'https://github.com/ledger/ledger/archive/v3.0.2.tar.gz' - sha1 '0a204c3ec95fdaf4a0e45c4fcfd77a0ec6fd4ac4' + url 'https://github.com/ledger/ledger/archive/v3.0.3.tar.gz' + sha1 'b65c2dc78f366fc3c2db9e2b7900b727b91f4656' head 'https://github.com/ledger/ledger.git', :branch => 'master' bottle do @@ -12,9 +12,11 @@ class Ledger < Formula sha1 "4e0ec05ccbf893ea1e1d482253c972e0472267e4" => :lion end - resource 'utfcpp' do - url "http://downloads.sourceforge.net/project/utfcpp/utf8cpp_2x/Release%202.3.4/utf8_v2_3_4.zip" - sha1 "638910adb69e4336f5a69c338abeeea88e9211ca" + stable do + resource 'utfcpp' do + url "http://downloads.sourceforge.net/project/utfcpp/utf8cpp_2x/Release%202.3.4/utf8_v2_3_4.zip" + sha1 "638910adb69e4336f5a69c338abeeea88e9211ca" + end end option 'debug', 'Build with debugging symbols enabled' @@ -35,7 +37,9 @@ class Ledger < Formula def install ENV.cxx11 - (buildpath/'lib/utfcpp').install resource('utfcpp') + unless build.head? + (buildpath/'lib/utfcpp').install resource('utfcpp') + end flavor = build.include?("debug") ? "debug" : "opt" @@ -64,8 +68,13 @@ class Ledger < Formula end test do - output = `#{bin}/ledger --file #{share}/ledger/examples/sample.dat balance --collapse equity` - assert_equal ' $-2,500.00 Equity', output.split(/\n/)[0] + balance = testpath/"output" + system bin/"ledger", + "--args-only", + "--file", share/"ledger/examples/sample.dat", + "--output", balance, + "balance", "--collapse", "equity" + assert_equal " $-2,500.00 Equity", balance.read.chomp assert_equal 0, $?.exitstatus if build.with? 'python' |
