diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-03 19:56:58 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-03 19:56:58 -0700 |
commit | f5744b90c2d68250b708f2a7e341a41012a2c478 (patch) | |
tree | 6bcdb3355e8e42bc1df7e23dc042c213b7b27c44 | |
parent | f37a24ad046bbe6627fc34d3b13718420d81a25a (diff) | |
download | chef-f5744b90c2d68250b708f2a7e341a41012a2c478.tar.gz |
also remove now-unused binstubs
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rwxr-xr-x | tasks/bin/bundle-platform | 20 | ||||
-rw-r--r-- | tasks/bin/bundle-platform.bat | 2 | ||||
-rw-r--r-- | tasks/bin/bundler_patch.rb | 27 | ||||
-rwxr-xr-x | tasks/bin/gem-version-diff | 37 |
4 files changed, 0 insertions, 86 deletions
diff --git a/tasks/bin/bundle-platform b/tasks/bin/bundle-platform deleted file mode 100755 index aaf433c98d..0000000000 --- a/tasks/bin/bundle-platform +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ruby -require_relative "bundler_patch" - -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 -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", - Pathname.new(__FILE__).realpath) - -require "rubygems" - -load Gem.bin_path("bundler", "bundle", desired_version) diff --git a/tasks/bin/bundle-platform.bat b/tasks/bin/bundle-platform.bat deleted file mode 100644 index d193eb0c05..0000000000 --- a/tasks/bin/bundle-platform.bat +++ /dev/null @@ -1,2 +0,0 @@ -@ECHO OFF -ruby "%~dpn0" %* diff --git a/tasks/bin/bundler_patch.rb b/tasks/bin/bundler_patch.rb deleted file mode 100644 index 5665e44eca..0000000000 --- a/tasks/bin/bundler_patch.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This is a temporary monkey patch to address https://github.com/bundler/bundler/issues/4896 -# the heart of the fix is line #18 with the addition of: -# && (possibility.activated - existing_node.payload.activated).empty? -# This ensures we do not mis linux platform gems in some scenarios like ffi in kitchen-test. -# There is a permanent fix to bundler (See https://github.com/bundler/bundler/pull/4836) which -# is due to ship in v1.14. Once we adopt that version, we can remove this file - -require "bundler" -require "bundler/vendor/molinillo/lib/molinillo/resolution" - -module Bundler::Molinillo - class Resolver - # A specific resolution from a given {Resolver} - class Resolution - def attempt_to_activate - debug(depth) { "Attempting to activate " + possibility.to_s } - existing_node = activated.vertex_named(name) - if existing_node.payload && (possibility.activated - existing_node.payload.activated).empty? - debug(depth) { "Found existing spec (#{existing_node.payload})" } - attempt_to_activate_existing_spec(existing_node) - else - attempt_to_activate_new_spec - end - end - end - end -end diff --git a/tasks/bin/gem-version-diff b/tasks/bin/gem-version-diff deleted file mode 100755 index 617402d4e6..0000000000 --- a/tasks/bin/gem-version-diff +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env ruby - -require_relative "../../version_policy" - -old_version, new_version = ARGV[0..1] - -require "set" -ENV["BUNDLE_WITHOUT"] = INSTALL_WITHOUT_GROUPS.join(":") -relevant_gems = Set.new -`bundle list`.each_line do |line| - next unless line =~ /^ \* (\S+)/ - relevant_gems.add($1) -end - -old_gems = {} -old_file = `git show #{old_version}:Gemfile.lock` -old_file.each_line do |line| - next unless line =~ /^ (\S+) \(([^\)]+)\)$/ - next unless relevant_gems.include?($1) - old_gems[$1] = $2 -end - -new_gems = {} -new_file = `git show #{new_version}:Gemfile.lock` -new_file.each_line do |line| - next unless line =~ /^ (\S+) \(([^\)]+)\)$/ - next unless relevant_gems.include?($1) - new_gems[$1] = $2 -end - -modified_gems = (old_gems.keys & new_gems.keys).sort.select { |name| new_gems[name] != old_gems[name] }.map { |name| "#{name} - #{new_gems[name]} (was #{old_gems[name]})" } -removed_gems = (old_gems.keys - new_gems.keys).sort.map { |name| "#{name} - #{old_gems[name]}" } -added_gems = (new_gems.keys - old_gems.keys).sort.map { |name| "#{name} - #{new_gems[name]}" } - -puts "MODIFIED:\n#{modified_gems.join("\n")}" if modified_gems.any? -puts "\nADDED:\n#{added_gems.join("\n")}" if added_gems.any? -puts "\nREMOVED:\n#{removed_gems.join("\n")}" if removed_gems.any? |