mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
ea4824ee0f
commit
77df7ccc10
Notes:
git
2020-06-18 19:15:04 +09:00
1 changed files with 0 additions and 12 deletions
|
@ -23,12 +23,6 @@ module Spec
|
||||||
Gem.clear_paths
|
Gem.clear_paths
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.bang(method)
|
|
||||||
define_method("#{method}!") do |*args, &blk|
|
|
||||||
send(method, *args, &blk)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def the_bundle(*args)
|
def the_bundle(*args)
|
||||||
TheBundle.new(*args)
|
TheBundle.new(*args)
|
||||||
end
|
end
|
||||||
|
@ -65,7 +59,6 @@ module Spec
|
||||||
setup = "require '#{lib_dir}/bundler' ; Bundler.ui.silence { Bundler.setup(#{groups}) }"
|
setup = "require '#{lib_dir}/bundler' ; Bundler.ui.silence { Bundler.setup(#{groups}) }"
|
||||||
ruby([setup, cmd].join(" ; "), opts)
|
ruby([setup, cmd].join(" ; "), opts)
|
||||||
end
|
end
|
||||||
bang :run
|
|
||||||
|
|
||||||
def load_error_run(ruby, name, *args)
|
def load_error_run(ruby, name, *args)
|
||||||
cmd = <<-RUBY
|
cmd = <<-RUBY
|
||||||
|
@ -125,7 +118,6 @@ module Spec
|
||||||
cmd = "#{ruby_cmd} #{bundle_bin} #{cmd}#{args}"
|
cmd = "#{ruby_cmd} #{bundle_bin} #{cmd}#{args}"
|
||||||
sys_exec(cmd, { :env => env, :dir => dir, :raise_on_error => raise_on_error }, &block)
|
sys_exec(cmd, { :env => env, :dir => dir, :raise_on_error => raise_on_error }, &block)
|
||||||
end
|
end
|
||||||
bang :bundle
|
|
||||||
|
|
||||||
def bundler(cmd, options = {})
|
def bundler(cmd, options = {})
|
||||||
options[:bundle_bin] = system_gem_path.join("bin/bundler")
|
options[:bundle_bin] = system_gem_path.join("bin/bundler")
|
||||||
|
@ -137,7 +129,6 @@ module Spec
|
||||||
escaped_ruby = RUBY_PLATFORM == "java" ? ruby.shellescape.dump : ruby.shellescape
|
escaped_ruby = RUBY_PLATFORM == "java" ? ruby.shellescape.dump : ruby.shellescape
|
||||||
sys_exec(%(#{ruby_cmd} -w -e #{escaped_ruby}), options)
|
sys_exec(%(#{ruby_cmd} -w -e #{escaped_ruby}), options)
|
||||||
end
|
end
|
||||||
bang :ruby
|
|
||||||
|
|
||||||
def load_error_ruby(ruby, name, opts = {})
|
def load_error_ruby(ruby, name, opts = {})
|
||||||
ruby(<<-R)
|
ruby(<<-R)
|
||||||
|
@ -173,7 +164,6 @@ module Spec
|
||||||
options[:env] = env
|
options[:env] = env
|
||||||
sys_exec("#{Path.gem_bin} #{command}", options)
|
sys_exec("#{Path.gem_bin} #{command}", options)
|
||||||
end
|
end
|
||||||
bang :gem_command
|
|
||||||
|
|
||||||
def rake
|
def rake
|
||||||
"#{Gem.ruby} -S #{ENV["GEM_PATH"]}/bin/rake"
|
"#{Gem.ruby} -S #{ENV["GEM_PATH"]}/bin/rake"
|
||||||
|
@ -210,7 +200,6 @@ module Spec
|
||||||
|
|
||||||
command_execution.stdout
|
command_execution.stdout
|
||||||
end
|
end
|
||||||
bang :sys_exec
|
|
||||||
|
|
||||||
def config(config = nil, path = bundled_app(".bundle/config"))
|
def config(config = nil, path = bundled_app(".bundle/config"))
|
||||||
return YAML.load_file(path) unless config
|
return YAML.load_file(path) unless config
|
||||||
|
@ -267,7 +256,6 @@ module Spec
|
||||||
opts[:retry] ||= 0
|
opts[:retry] ||= 0
|
||||||
bundle :install, opts
|
bundle :install, opts
|
||||||
end
|
end
|
||||||
bang :install_gemfile
|
|
||||||
|
|
||||||
def lock_gemfile(*args)
|
def lock_gemfile(*args)
|
||||||
gemfile(*args)
|
gemfile(*args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue