Skip to content

Commit

Permalink
s/sys_exec!/sys_exec
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 77df7cc commit 9cc7847
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions spec/bundler/commands/binstubs_spec.rb
Expand Up @@ -120,7 +120,7 @@
let(:system_bundler_version) { Bundler::VERSION }

it "runs bundler" do
sys_exec! "bin/bundle install", :env => { "DEBUG" => "1" }
sys_exec "bin/bundle install", :env => { "DEBUG" => "1" }
expect(out).to include %(Using bundler #{system_bundler_version}\n)
end

Expand Down Expand Up @@ -196,7 +196,7 @@
before { lockfile.gsub(system_bundler_version, "1.1.1") }

it "calls through to the latest bundler version" do
sys_exec! "bin/bundle update --bundler", :env => { "DEBUG" => "1" }
sys_exec "bin/bundle update --bundler", :env => { "DEBUG" => "1" }
expect(out).to include %(Using bundler #{system_bundler_version}\n)
end

Expand All @@ -211,14 +211,14 @@
context "without a lockfile" do
it "falls back to the latest installed bundler" do
FileUtils.rm bundled_app_lock
sys_exec! "bin/bundle install", :env => { "DEBUG" => "1" }
sys_exec "bin/bundle install", :env => { "DEBUG" => "1" }
expect(out).to include "Using bundler #{system_bundler_version}\n"
end
end

context "using another binstub" do
it "loads all gems" do
sys_exec! bundled_app("bin/print_loaded_gems").to_s
sys_exec bundled_app("bin/print_loaded_gems").to_s
expect(out).to eq %(["bundler-#{Bundler::VERSION}", "prints_loaded_gems-1.0", "rack-1.2"])
end

Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/commands/newgem_spec.rb
Expand Up @@ -249,7 +249,7 @@ def gem_skeleton_assertions
load_paths = [lib_dir, spec_dir]
load_path_str = "-I#{load_paths.join(File::PATH_SEPARATOR)}"

sys_exec! "#{Gem.ruby} #{load_path_str} #{bindir.join("bundle")} gem #{gem_name}", :env => { "PATH" => "" }
sys_exec "#{Gem.ruby} #{load_path_str} #{bindir.join("bundle")} gem #{gem_name}", :env => { "PATH" => "" }
end

it "creates the gem without the need for git" do
Expand Down
4 changes: 2 additions & 2 deletions spec/bundler/install/gems/standalone_spec.rb
Expand Up @@ -290,7 +290,7 @@
skip "exec format error" if Gem.win_platform?

require "tmpdir"
sys_exec!(%(#{bundled_app("bin/rails")} -v), :dir => Dir.tmpdir)
sys_exec(%(#{bundled_app("bin/rails")} -v), :dir => Dir.tmpdir)
expect(out).to eq("2.3.2")
end

Expand All @@ -302,7 +302,7 @@
symlink = File.join(symlink_dir, "rails")

File.symlink(bundled_app("bin/rails"), symlink)
sys_exec!("#{symlink} -v")
sys_exec("#{symlink} -v")
expect(out).to eq("2.3.2")
end

Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/quality_spec.rb
Expand Up @@ -235,7 +235,7 @@ def check_for_specific_pronouns(filename)
files_to_require.reject! {|f| f.start_with?("lib/bundler/vendor") }
files_to_require.map! {|f| File.expand_path(f, source_root) }
files_to_require.sort!
sys_exec!("ruby -w") do |input, _, _|
sys_exec("ruby -w") do |input, _, _|
files_to_require.each do |f|
input.puts "require '#{f}'"
end
Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/runtime/gem_tasks_spec.rb
Expand Up @@ -88,7 +88,7 @@

it "adds 'pkg' to rake/clean's CLOBBER" do
with_gem_path_as(base_system_gems.to_s) do
sys_exec! %(#{rake} -e 'load "Rakefile"; puts CLOBBER.inspect'), :env => { "GEM_HOME" => system_gem_path.to_s }
sys_exec %(#{rake} -e 'load "Rakefile"; puts CLOBBER.inspect'), :env => { "GEM_HOME" => system_gem_path.to_s }
end
expect(out).to eq '["pkg"]'
end
Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/support/path.rb
Expand Up @@ -240,7 +240,7 @@ def git_commit_sha
def git_ls_files(glob)
skip "Not running on a git context, since running tests from a tarball" if ruby_core_tarball?

sys_exec!("git ls-files -z -- #{glob}", :dir => source_root).split("\x0")
sys_exec("git ls-files -z -- #{glob}", :dir => source_root).split("\x0")
end

def tracked_files_glob
Expand Down
8 changes: 4 additions & 4 deletions spec/bundler/support/rubygems_version_manager.rb
Expand Up @@ -67,8 +67,8 @@ def reexec_if_needed
def switch_local_copy_if_needed
return unless local_copy_switch_needed?

sys_exec!("git remote update", :dir => local_copy_path)
sys_exec!("git checkout #{target_tag} --quiet", :dir => local_copy_path)
sys_exec("git remote update", :dir => local_copy_path)
sys_exec("git checkout #{target_tag} --quiet", :dir => local_copy_path)

ENV["RGV"] = local_copy_path.to_s
end
Expand All @@ -86,7 +86,7 @@ def target_tag
end

def local_copy_tag
sys_exec!("git rev-parse --abbrev-ref HEAD", :dir => local_copy_path)
sys_exec("git rev-parse --abbrev-ref HEAD", :dir => local_copy_path)
end

def local_copy_path
Expand All @@ -100,7 +100,7 @@ def resolve_local_copy_path

unless rubygems_path.directory?
rubygems_path.parent.mkpath
sys_exec!("git clone https://github.com/rubygems/rubygems.git #{rubygems_path}")
sys_exec("git clone https://github.com/rubygems/rubygems.git #{rubygems_path}")
end

rubygems_path
Expand Down

0 comments on commit 9cc7847

Please sign in to comment.