From 77df7ccc101432a80c7dd6f525dfc4484f6aa898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 3 Jun 2020 20:50:27 +0200 Subject: [PATCH] [rubygems/rubygems] Remove now unused "bang helpers" https://github.com/rubygems/rubygems/commit/84e4c58e83 --- spec/bundler/support/helpers.rb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb index c1ad1b24f650dc..3c036aa5feac27 100644 --- a/spec/bundler/support/helpers.rb +++ b/spec/bundler/support/helpers.rb @@ -23,12 +23,6 @@ def reset_paths! Gem.clear_paths end - def self.bang(method) - define_method("#{method}!") do |*args, &blk| - send(method, *args, &blk) - end - end - def the_bundle(*args) TheBundle.new(*args) end @@ -65,7 +59,6 @@ def run(cmd, *args) setup = "require '#{lib_dir}/bundler' ; Bundler.ui.silence { Bundler.setup(#{groups}) }" ruby([setup, cmd].join(" ; "), opts) end - bang :run def load_error_run(ruby, name, *args) cmd = <<-RUBY @@ -125,7 +118,6 @@ def bundle(cmd, options = {}, &block) cmd = "#{ruby_cmd} #{bundle_bin} #{cmd}#{args}" sys_exec(cmd, { :env => env, :dir => dir, :raise_on_error => raise_on_error }, &block) end - bang :bundle def bundler(cmd, options = {}) options[:bundle_bin] = system_gem_path.join("bin/bundler") @@ -137,7 +129,6 @@ def ruby(ruby, options = {}) escaped_ruby = RUBY_PLATFORM == "java" ? ruby.shellescape.dump : ruby.shellescape sys_exec(%(#{ruby_cmd} -w -e #{escaped_ruby}), options) end - bang :ruby def load_error_ruby(ruby, name, opts = {}) ruby(<<-R) @@ -173,7 +164,6 @@ def gem_command(command, options = {}) options[:env] = env sys_exec("#{Path.gem_bin} #{command}", options) end - bang :gem_command def rake "#{Gem.ruby} -S #{ENV["GEM_PATH"]}/bin/rake" @@ -210,7 +200,6 @@ def sys_exec(cmd, options = {}) command_execution.stdout end - bang :sys_exec def config(config = nil, path = bundled_app(".bundle/config")) return YAML.load_file(path) unless config @@ -267,7 +256,6 @@ def install_gemfile(*args) opts[:retry] ||= 0 bundle :install, opts end - bang :install_gemfile def lock_gemfile(*args) gemfile(*args)