summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author7rans <transfire@gmail.com>2012-06-17 04:54:46 -0300
committer7rans <transfire@gmail.com>2012-06-17 04:54:46 -0300
commit75eac2e95f269edec7e370458329db0a74f909d2 (patch)
tree0e5d62440f0b9744b8cd2ba12b269c183cda533f
parent68bdb446fc5baba8e634d9a5bb913fca8d5f1127 (diff)
downloadbundler-75eac2e95f269edec7e370458329db0a74f909d2.tar.gz
Allow optional gem push via gem_push environment variable.
-rw-r--r--lib/bundler/gem_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 74cd4f8538..11c2222968 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -75,7 +75,7 @@ module Bundler
built_gem_path = build_gem
tag_version {
git_push
- rubygem_push(built_gem_path)
+ rubygem_push(built_gem_path) if gem_push?
}
end
@@ -158,5 +158,9 @@ module Bundler
}
[outbuf, $?]
end
+
+ def gem_push?
+ ! %w{n no nil false off 0}.include?(ENV['gem_push'].to_s.downcase)
+ end
end
end