summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-12-26 20:32:03 -0600
committerSamuel Giddins <segiddins@segiddins.me>2016-12-26 20:32:03 -0600
commitf8534729342feb1314dba9da46f457f8e5247e2f (patch)
tree1eadda03e9f3069947bdc61999e2340c0b2f1a03
parentb361db92def2ad0634f2dc43216ac62242216d9f (diff)
downloadbundler-seg-platform-docs.tar.gz
[PostitTrampoline] Rename env varsseg-platform-docs
-rw-r--r--DEVELOPMENT.md4
-rw-r--r--lib/bundler/postit_trampoline.rb6
-rw-r--r--man/bundle.ronn4
-rw-r--r--spec/other/trampoline_spec.rb8
-rw-r--r--spec/support/helpers.rb2
5 files changed, 12 insertions, 12 deletions
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 67e1527677..97e764dea9 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -36,9 +36,9 @@ Bundler doesn't use a Gemfile to list development dependencies, because when we
4. Set up a shell alias to run Bundler from your clone, e.g. a Bash alias:
- $ alias dbundle='BUNDLE_DISABLE_POSTIT=1 ruby -I /path/to/bundler/lib /path/to/bundler/exe/bundle'
+ $ alias dbundle='BUNDLE_TRAMPOLINE_DISABLE=1 ruby -I /path/to/bundler/lib /path/to/bundler/exe/bundle'
- The `BUNDLE_DISABLE_POSTIT` environment variable ensures that the version of Bundler in `/path/to/bundler/lib` will be used. Without that environment setting, Bundler will automatically download, install, and run the version of Bundler listed in `Gemfile.lock`. With that set up, you can test changes you've made to Bundler by running `dbundle`, without interfering with the regular `bundle` command.
+ The `BUNDLE_TRAMPOLINE_DISABLE` environment variable ensures that the version of Bundler in `/path/to/bundler/lib` will be used. Without that environment setting, Bundler will automatically download, install, and run the version of Bundler listed in `Gemfile.lock`. With that set up, you can test changes you've made to Bundler by running `dbundle`, without interfering with the regular `bundle` command.
To dive into the code with Pry: `RUBYOPT=-rpry dbundle` to require pry and then run commands.
diff --git a/lib/bundler/postit_trampoline.rb b/lib/bundler/postit_trampoline.rb
index 2a22489954..b62a5e7676 100644
--- a/lib/bundler/postit_trampoline.rb
+++ b/lib/bundler/postit_trampoline.rb
@@ -8,11 +8,11 @@ environment = BundlerVendoredPostIt::PostIt::Environment.new([])
version = Gem::Requirement.new(environment.bundler_version)
if version.requirements.size == 1 && version.requirements.first.first == "=" # version.exact?
if version.requirements.first.last.segments.first >= 2
- ENV["BUNDLE_ENABLE_TRAMPOLINE"] = "true"
+ ENV["BUNDLE_TRAMPOLINE_FORCE"] = "true"
end
end
-if ENV["BUNDLE_ENABLE_TRAMPOLINE"] && !ENV["BUNDLE_DISABLE_POSTIT"]
+if ENV["BUNDLE_TRAMPOLINE_FORCE"] && !ENV["BUNDLE_TRAMPOLINE_DISABLE"]
installed_version =
if defined?(Bundler::VERSION)
Bundler::VERSION
@@ -70,4 +70,4 @@ You're running Bundler #{installed_version} but this project uses #{running_vers
abort "The running bundler (#{running_version}) does not match the required `#{version}`"
end
-end # if ENV["BUNDLE_ENABLE_TRAMPOLINE"] && !ENV["BUNDLE_DISABLE_POSTIT"]
+end # if ENV["BUNDLE_TRAMPOLINE_FORCE"] && !ENV["BUNDLE_TRAMPOLINE_DISABLE"]
diff --git a/man/bundle.ronn b/man/bundle.ronn
index a009374415..59fed42304 100644
--- a/man/bundle.ronn
+++ b/man/bundle.ronn
@@ -105,8 +105,8 @@ However, if the `BUNDLER_VERSION` environment variable is set, that version will
override the lockfile inference and can be used in directories without a
lockfile.
-Until the target version is Bundler 2 or later, `BUNDLE_ENABLE_TRAMPOLINE` must
-be set for the trampoline to be used. Additionally, `BUNDLE_DISABLE_POSTIT` can
+Until the target version is Bundler 2 or later, `BUNDLE_TRAMPOLINE_FORCE` must
+be set for the trampoline to be used. Additionally, `BUNDLE_TRAMPOLINE_DISABLE` can
be set to completely disable the trampoline.
## OBSOLETE
diff --git a/spec/other/trampoline_spec.rb b/spec/other/trampoline_spec.rb
index 9a8e0a4a5d..88e0302f00 100644
--- a/spec/other/trampoline_spec.rb
+++ b/spec/other/trampoline_spec.rb
@@ -3,8 +3,8 @@ require "spec_helper"
describe "bundler version trampolining" do
before do
- ENV["BUNDLE_DISABLE_POSTIT"] = nil
- ENV["BUNDLE_ENABLE_TRAMPOLINE"] = "true"
+ ENV["BUNDLE_TRAMPOLINE_DISABLE"] = nil
+ ENV["BUNDLE_TRAMPOLINE_FORCE"] = "true"
FileUtils.rm_rf(system_gem_path)
FileUtils.cp_r(base_system_gems, system_gem_path)
end
@@ -59,8 +59,8 @@ describe "bundler version trampolining" do
end
end
- context "without BUNDLE_ENABLE_TRAMPOLINE" do
- before { ENV["BUNDLE_ENABLE_TRAMPOLINE"] = nil }
+ context "without BUNDLE_TRAMPOLINE_FORCE" do
+ before { ENV["BUNDLE_TRAMPOLINE_FORCE"] = nil }
context "when the version is >= 2" do
let(:version) { "2.7182818285" }
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 3912ad068f..738b1f7b3b 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -12,7 +12,7 @@ module Spec
end
FileUtils.mkdir_p(tmp)
FileUtils.mkdir_p(home)
- ENV["BUNDLE_DISABLE_POSTIT"] = "1"
+ ENV["BUNDLE_TRAMPOLINE_DISABLE"] = "1"
Bundler.reset!
Bundler.ui = nil
Bundler.ui # force it to initialize