Skip to content

Commit

Permalink
[rubygems/rubygems] Remove now unused "bang helpers"
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and hsbt committed Jun 18, 2020
1 parent ea4824e commit 77df7cc
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions spec/bundler/support/helpers.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand All @@ -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)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -267,7 +256,6 @@ def install_gemfile(*args)
opts[:retry] ||= 0
bundle :install, opts
end
bang :install_gemfile

def lock_gemfile(*args)
gemfile(*args)
Expand Down

0 comments on commit 77df7cc

Please sign in to comment.