From 5d37fc2168b30d8ad51cc6b1d127528768bde3de Mon Sep 17 00:00:00 2001 From: Matt Wrock Date: Wed, 25 May 2016 16:43:58 -0700 Subject: fix bundle locking on bundler 1.12 and enforce version we want --- tasks/bin/bundle-platform | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tasks/bin/bundle-platform') diff --git a/tasks/bin/bundle-platform b/tasks/bin/bundle-platform index 7c77393cb1..10d9bb2b3d 100755 --- a/tasks/bin/bundle-platform +++ b/tasks/bin/bundle-platform @@ -1,10 +1,14 @@ #!/usr/bin/env ruby platforms = ARGV.shift +platforms = platforms.split(" ").map { |p| Gem::Platform.new(p) } +Gem::Platform.instance_eval { @local = platforms.last } old_platforms = Gem.platforms -Gem.platforms = platforms.split(" ").map { |p| Gem::Platform.new(p) } +Gem.platforms = platforms puts "bundle-platform set Gem.platforms to #{Gem.platforms.map { |p| p.to_s }} (was #{old_platforms.map { |p| p.to_s } })" +desired_version = ARGV.shift.delete("_", "") + # The rest of this is a normal bundler binstub require "pathname" ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", @@ -12,4 +16,4 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", require "rubygems" -load Gem.bin_path("bundler", "bundle") +load Gem.bin_path("bundler", "bundle", desired_version) -- cgit v1.2.1