aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/ledger.rb25
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'