aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/heroku-toolbelt.rb31
1 files changed, 29 insertions, 2 deletions
diff --git a/Library/Formula/heroku-toolbelt.rb b/Library/Formula/heroku-toolbelt.rb
index f771be2b0..91d11500c 100644
--- a/Library/Formula/heroku-toolbelt.rb
+++ b/Library/Formula/heroku-toolbelt.rb
@@ -1,9 +1,36 @@
require 'formula'
+class Ruby19 < Requirement
+ fatal true
+ default_formula 'ruby'
+
+ satisfy :build_env => false do
+ next unless which 'ruby'
+ version = /\d\.\d/.match `ruby --version 2>&1`
+
+ next unless version
+ Version.new(version.to_s) >= Version.new("1.9")
+ end
+
+ def modify_build_environment
+ ruby = which "ruby"
+ return unless ruby
+
+ ENV.prepend_path "PATH", ruby.dirname
+ end
+
+ def message; <<-EOS.undent
+ The Heroku Toolbelt requires Ruby >= 1.9
+ EOS
+ end
+end
+
class HerokuToolbelt < Formula
homepage 'https://toolbelt.heroku.com/other'
- url 'http://assets.heroku.com.s3.amazonaws.com/heroku-client/heroku-client-3.3.0.tgz'
- sha1 '5c4760414623b3e92bb0deaf5d49da695f8c7ad4'
+ url 'http://assets.heroku.com.s3.amazonaws.com/heroku-client/heroku-client-3.7.2.tgz'
+ sha1 'c8907404c959e0f23e9fd0cf2adb7e7dfe281c77'
+
+ depends_on Ruby19
def install
libexec.install Dir["*"]