summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2015-11-26 12:29:42 -0600
committerSamuel Giddins <segiddins@segiddins.me>2015-11-26 12:29:42 -0600
commit5782a9f536ba4440d74e4d4fcda25b26721982b3 (patch)
tree23816f305bcbc5b78d63f5327ac03c67f7dda5b7
parentf25e6bfc5f2beb2c1b509460c4491b3fb0f7c719 (diff)
downloadbundler-5782a9f536ba4440d74e4d4fcda25b26721982b3.tar.gz
[RuboCop] Enable Style/PercentLiteralDelimiters
-rw-r--r--.rubocop_todo.yml6
-rw-r--r--Rakefile8
-rwxr-xr-xexe/bundle2
-rwxr-xr-xexe/bundler2
-rw-r--r--lib/bundler/cli.rb2
-rw-r--r--lib/bundler/cli/gem.rb4
-rw-r--r--lib/bundler/cli/outdated.rb2
-rw-r--r--lib/bundler/dsl.rb6
-rw-r--r--lib/bundler/gem_helper.rb2
-rw-r--r--lib/bundler/injector.rb2
-rw-r--r--lib/bundler/installer/standalone.rb2
-rw-r--r--lib/bundler/rubygems_ext.rb4
-rw-r--r--lib/bundler/rubygems_integration.rb4
-rw-r--r--lib/bundler/settings.rb4
-rw-r--r--lib/bundler/shared_helpers.rb4
-rw-r--r--lib/bundler/source/git/git_proxy.rb8
-rw-r--r--lib/bundler/source/rubygems.rb2
-rw-r--r--spec/bundler/dsl_spec.rb4
-rw-r--r--spec/bundler/fetcher/index_spec.rb2
-rw-r--r--spec/bundler/fetcher_spec.rb2
-rw-r--r--spec/bundler/gem_helper_spec.rb4
-rw-r--r--spec/cache/gems_spec.rb2
-rw-r--r--spec/cache/git_spec.rb2
-rw-r--r--spec/commands/help_spec.rb4
-rw-r--r--spec/install/gemfile/git_spec.rb22
-rw-r--r--spec/install/gems/sources_spec.rb2
-rw-r--r--spec/install/gems/sudo_spec.rb2
-rw-r--r--spec/runtime/setup_spec.rb16
-rw-r--r--spec/runtime/with_clean_env_spec.rb4
-rw-r--r--spec/support/artifice/endpoint_creds_diff_host.rb2
-rw-r--r--spec/support/helpers.rb2
-rw-r--r--spec/support/indexes.rb4
-rw-r--r--spec/support/rubygems_ext.rb4
-rw-r--r--spec/update/git_spec.rb2
34 files changed, 69 insertions, 75 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 727434cee4..860bfbb461 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -183,12 +183,6 @@ Style/ParallelAssignment:
- 'spec/bundler/bundler_spec.rb'
- 'spec/support/helpers.rb'
-# Offense count: 67
-# Cop supports --auto-correct.
-# Configuration parameters: PreferredDelimiters.
-Style/PercentLiteralDelimiters:
- Enabled: false
-
# Offense count: 8
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
Style/PredicateName:
diff --git a/Rakefile b/Rakefile
index bbe10ef802..93e449ed27 100644
--- a/Rakefile
+++ b/Rakefile
@@ -42,8 +42,8 @@ namespace :spec do
end
deps.sort_by {|name, _| name }.each do |name, version|
- sh %{#{Gem.ruby} -S gem list -i "^#{name}$" -v "#{version}" || } +
- %{#{Gem.ruby} -S gem install #{name} -v "#{version}" --no-ri --no-rdoc}
+ sh %(#{Gem.ruby} -S gem list -i "^#{name}$" -v "#{version}" || ) +
+ %(#{Gem.ruby} -S gem install #{name} -v "#{version}" --no-ri --no-rdoc)
end
# Download and install gems used inside tests
@@ -99,14 +99,14 @@ begin
end
desc "Run the real-world spec suite (requires internet)"
- task :realworld => %w[set_realworld spec]
+ task :realworld => %w(set_realworld spec)
task :set_realworld do
ENV["BUNDLER_REALWORLD_TESTS"] = "1"
end
desc "Run the spec suite with the sudo tests"
- task :sudo => %w[set_sudo spec clean_sudo]
+ task :sudo => %w(set_sudo spec clean_sudo)
task :set_sudo do
ENV["BUNDLER_SUDO_TESTS"] = "1"
diff --git a/exe/bundle b/exe/bundle
index a06c6ab47e..186af6f367 100755
--- a/exe/bundle
+++ b/exe/bundle
@@ -6,7 +6,7 @@ Signal.trap("INT") { exit 1 }
require "bundler"
# Check if an older version of bundler is installed
$LOAD_PATH.each do |path|
- if path =~ %r'/bundler-0\.(\d+)' && $1.to_i < 9
+ if path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
err = "Looks like you have a version of bundler that's older than 0.9.\n"
err << "Please remove your old versions.\n"
err << "An easy way to do this is by running `gem cleanup bundler`."
diff --git a/exe/bundler b/exe/bundler
index a06c6ab47e..186af6f367 100755
--- a/exe/bundler
+++ b/exe/bundler
@@ -6,7 +6,7 @@ Signal.trap("INT") { exit 1 }
require "bundler"
# Check if an older version of bundler is installed
$LOAD_PATH.each do |path|
- if path =~ %r'/bundler-0\.(\d+)' && $1.to_i < 9
+ if path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
err = "Looks like you have a version of bundler that's older than 0.9.\n"
err << "Please remove your old versions.\n"
err << "An easy way to do this is by running `gem cleanup bundler`."
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 138ce5d7b5..25cb692436 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -4,7 +4,7 @@ require "bundler/vendored_thor"
module Bundler
class CLI < Thor
include Thor::Actions
- AUTO_INSTALL_CMDS = %w[show binstubs outdated exec open console licenses clean]
+ AUTO_INSTALL_CMDS = %w(show binstubs outdated exec open console licenses clean)
def self.start(*)
super
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 549689ff87..70e0a9341c 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -61,10 +61,10 @@ module Bundler
"bin/setup.tt" => "bin/setup"
}
- executables = %w[
+ executables = %w(
bin/console
bin/setup
- ]
+ )
if test_framework = ask_and_set_test_framework
config[:test] = test_framework
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 4c777df6e6..5381314552 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -62,7 +62,7 @@ module Bundler
spec_version = "#{active_spec.version}#{active_spec.git_version}"
current_version = "#{current_spec.version}#{current_spec.git_version}"
- dependency_version = %|, requested #{dependency.requirement}| if dependency && dependency.specific?
+ dependency_version = %(, requested #{dependency.requirement}) if dependency && dependency.specific?
if dependency
groups = dependency.groups.join(", ")
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index d601cc2635..70a1c89928 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -256,10 +256,10 @@ module Bundler
def normalize_options(name, version, opts)
if name.is_a?(Symbol)
- raise GemfileError, %{You need to specify gem names as Strings. Use 'gem "#{name}"' instead}
+ raise GemfileError, %(You need to specify gem names as Strings. Use 'gem "#{name}"' instead)
end
if name =~ /\s/
- raise GemfileError, %{'#{name}' is not a valid gem name because it contains whitespace}
+ raise GemfileError, %('#{name}' is not a valid gem name because it contains whitespace)
end
normalize_hash(opts)
@@ -298,7 +298,7 @@ module Bundler
opts["git"] = @git_sources[git_name].call(opts[git_name])
end
- %w[git path].each do |type|
+ %w(git path).each do |type|
if param = opts[type]
if version.first && version.first =~ /^\s*=?\s*(\d[^\s]*)\s*$/
options = opts.merge("name" => name, "version" => $1)
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index ecc4dc03d7..74db06696c 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -185,7 +185,7 @@ module Bundler
end
def gem_push?
- ! %w{n no nil false off 0}.include?(ENV["gem_push"].to_s.downcase)
+ ! %w(n no nil false off 0).include?(ENV["gem_push"].to_s.downcase)
end
end
end
diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb
index 04096c3f11..ef98fad888 100644
--- a/lib/bundler/injector.rb
+++ b/lib/bundler/injector.rb
@@ -47,7 +47,7 @@ module Bundler
def new_gem_lines
@new_deps.map do |d|
- %|gem '#{d.name}', '#{d.requirement}'|
+ %(gem '#{d.name}', '#{d.requirement}')
end.join("\n")
end
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb
index 6776dd6200..35ad98891e 100644
--- a/lib/bundler/installer/standalone.rb
+++ b/lib/bundler/installer/standalone.rb
@@ -15,7 +15,7 @@ module Bundler
file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
file.puts "path = File.expand_path('..', __FILE__)"
paths.each do |path|
- file.puts %{$:.unshift "\#{path}/#{path}"}
+ file.puts %($:.unshift "\#{path}/#{path}")
end
end
end
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index 9e4ce5ac17..33f6308014 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -99,9 +99,9 @@ module Gem
gemfile << "group :#{group} do\n" if group
dependencies.each do |dependency|
gemfile << " " if group
- gemfile << %|gem "#{dependency.name}"|
+ gemfile << %(gem "#{dependency.name}")
req = dependency.requirements_list.first
- gemfile << %|, "#{req}"| if req
+ gemfile << %(, "#{req}") if req
gemfile << "\n"
end
gemfile << "end\n" if group
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index a5fc32a5a5..d4aa5af5ad 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -135,7 +135,7 @@ module Bundler
end
def repository_subdirectories
- %w[cache doc gems specifications]
+ %w(cache doc gems specifications)
end
def clear_paths
@@ -251,7 +251,7 @@ module Bundler
end
def security_policy_keys
- %w{High Medium Low AlmostNo No}.map {|level| "#{level}Security" }
+ %w(High Medium Low AlmostNo No).map {|level| "#{level}Security" }
end
def security_policies
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 6660a737bc..5d9731e9f0 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -243,7 +243,7 @@ module Bundler
end
def convert_to_backward_compatible_key(key)
- key = "#{key}/" if key =~ /https?:/i && key !~ %r[/\Z]
+ key = "#{key}/" if key =~ /https?:/i && key !~ %r{/\Z}
key = key.gsub(".", "__") if key.include?(".")
key
end
@@ -252,7 +252,7 @@ module Bundler
# TODO: is this the correct place to validate mirror URIs?
def normalize_uri(uri)
uri = uri.to_s
- uri = "#{uri}/" unless uri =~ %r[/\Z]
+ uri = "#{uri}/" unless uri =~ %r{/\Z}
uri = URI(uri)
unless uri.absolute?
raise ArgumentError, "Gem sources must be absolute. You provided '#{uri}'."
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 29c9a3b5e6..2e57accb8e 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -61,7 +61,7 @@ module Bundler
end
def with_clean_git_env(&block)
- keys = %w[GIT_DIR GIT_WORK_TREE]
+ keys = %w(GIT_DIR GIT_WORK_TREE)
old_env = keys.inject({}) do |h, k|
h.update(k => ENV[k])
end
@@ -82,7 +82,7 @@ module Bundler
# Set RUBYOPT
rubyopt = [ENV["RUBYOPT"]].compact
if rubyopt.empty? || rubyopt.first !~ %r{-rbundler/setup}
- rubyopt.unshift %|-rbundler/setup|
+ rubyopt.unshift %(-rbundler/setup)
ENV["RUBYOPT"] = rubyopt.join(" ")
end
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index 40e3d205ae..d7e4ff3554 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -72,14 +72,14 @@ module Bundler
return if has_revision_cached?
Bundler.ui.info "Fetching #{uri}"
in_path do
- git_retry %|fetch --force --quiet --tags #{uri_escaped_with_configured_credentials} "refs/heads/*:refs/heads/*"|
+ git_retry %(fetch --force --quiet --tags #{uri_escaped_with_configured_credentials} "refs/heads/*:refs/heads/*")
end
else
Bundler.ui.info "Fetching #{uri}"
SharedHelpers.filesystem_access(path.dirname) do |p|
FileUtils.mkdir_p(p)
end
- git_retry %|clone #{uri_escaped_with_configured_credentials} "#{path}" --bare --no-hardlinks --quiet|
+ git_retry %(clone #{uri_escaped_with_configured_credentials} "#{path}" --bare --no-hardlinks --quiet)
end
end
@@ -93,7 +93,7 @@ module Bundler
SharedHelpers.filesystem_access(destination) do |p|
FileUtils.rm_rf(p)
end
- git_retry %|clone --no-checkout --quiet "#{path}" "#{destination}"|
+ git_retry %(clone --no-checkout --quiet "#{path}" "#{destination}")
File.chmod(((File.stat(destination).mode | 0777) & ~File.umask), destination)
rescue Errno::EEXIST => e
file_path = e.message[%r{.*?(/.*)}, 1]
@@ -104,7 +104,7 @@ module Bundler
end
# method 2
SharedHelpers.chdir(destination) do
- git_retry %|fetch --force --quiet --tags "#{path}"|
+ git_retry %(fetch --force --quiet --tags "#{path}")
git "reset --hard #{@revision}"
if submodules
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index c8588e4db3..9a850e18a5 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -264,7 +264,7 @@ module Bundler
def normalize_uri(uri)
uri = uri.to_s
- uri = "#{uri}/" unless uri =~ %r'/$'
+ uri = "#{uri}/" unless uri =~ %r{/$}
uri = URI(uri)
raise ArgumentError, "The source must be an absolute URI. For example:\n" \
"source 'https://rubygems.org'" if !uri.absolute? || (uri.is_a?(URI::HTTP) && uri.host.nil?)
diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb
index 0049839143..27f9feec95 100644
--- a/spec/bundler/dsl_spec.rb
+++ b/spec/bundler/dsl_spec.rb
@@ -153,7 +153,7 @@ describe Bundler::Dsl do
# end
describe "#git" do
it "from a single repo" do
- rails_gems = %w[railties action_pack active_model]
+ rails_gems = %w(railties action_pack active_model)
subject.git "https://github.com/rails/rails.git" do
rails_gems.each {|rails_gem| subject.send :gem, rails_gem }
end
@@ -168,7 +168,7 @@ describe Bundler::Dsl do
# end
describe "#github" do
it "from github" do
- spree_gems = %w[spree_core spree_api spree_backend]
+ spree_gems = %w(spree_core spree_api spree_backend)
subject.github "spree" do
spree_gems.each {|spree_gem| subject.send :gem, spree_gem }
end
diff --git a/spec/bundler/fetcher/index_spec.rb b/spec/bundler/fetcher/index_spec.rb
index c3aa51951b..92cad4b6c6 100644
--- a/spec/bundler/fetcher/index_spec.rb
+++ b/spec/bundler/fetcher/index_spec.rb
@@ -10,7 +10,7 @@ describe Bundler::Fetcher::Index do
allow(Bundler).to receive(:ui).and_return(double(:trace => nil))
expect do
- Bundler::Fetcher::Index.new(nil, nil, nil).specs(%w[foo bar])
+ Bundler::Fetcher::Index.new(nil, nil, nil).specs(%w(foo bar))
end.to raise_error(Bundler::HTTPError)
end
end
diff --git a/spec/bundler/fetcher_spec.rb b/spec/bundler/fetcher_spec.rb
index e21601555d..f1204e7b47 100644
--- a/spec/bundler/fetcher_spec.rb
+++ b/spec/bundler/fetcher_spec.rb
@@ -66,7 +66,7 @@ describe Bundler::Fetcher do
describe "#user_agent" do
it "builds user_agent with current ruby version and Bundler settings" do
- allow(Bundler.settings).to receive(:all).and_return(%w[foo bar])
+ allow(Bundler.settings).to receive(:all).and_return(%w(foo bar))
expect(fetcher.user_agent).to match(%r{bundler/(\d.)})
expect(fetcher.user_agent).to match(%r{rubygems/(\d.)})
expect(fetcher.user_agent).to match(%r{ruby/(\d.)})
diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb
index c4044f223c..ae15678268 100644
--- a/spec/bundler/gem_helper_spec.rb
+++ b/spec/bundler/gem_helper_spec.rb
@@ -104,8 +104,8 @@ describe Bundler::GemHelper do
context "defines Rake tasks" do
let(:task_names) do
- %w[build install release release:guard_clean
- release:source_control_push release:rubygem_push]
+ %w(build install release release:guard_clean
+ release:source_control_push release:rubygem_push)
end
context "before installation" do
diff --git a/spec/cache/gems_spec.rb b/spec/cache/gems_spec.rb
index fef6e0fce6..9ee5efb32f 100644
--- a/spec/cache/gems_spec.rb
+++ b/spec/cache/gems_spec.rb
@@ -87,7 +87,7 @@ describe "bundle cache" do
end
it "uses builtin gems" do
- install_gemfile %|gem 'builtin_gem', '1.0.2'|
+ install_gemfile %(gem 'builtin_gem', '1.0.2')
should_be_installed("builtin_gem 1.0.2")
end
diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb
index 81c10cf873..8600455c6a 100644
--- a/spec/cache/git_spec.rb
+++ b/spec/cache/git_spec.rb
@@ -100,7 +100,7 @@ end
gem "foo", :git => '#{lib_path("foo-invalid")}', :branch => :master
G
- bundle %|config local.foo #{lib_path("foo-1.0")}|
+ bundle %(config local.foo #{lib_path("foo-1.0")})
bundle "install"
bundle "#{cmd} --all"
diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb
index 80a55809d3..86e5b79719 100644
--- a/spec/commands/help_spec.rb
+++ b/spec/commands/help_spec.rb
@@ -15,14 +15,14 @@ describe "bundle help" do
fake_man!
bundle "help gemfile"
- expect(out).to eq(%|["#{root}/lib/bundler/man/gemfile.5"]|)
+ expect(out).to eq(%(["#{root}/lib/bundler/man/gemfile.5"]))
end
it "prefixes bundle commands with bundle- when finding the groff files" do
fake_man!
bundle "help install"
- expect(out).to eq(%|["#{root}/lib/bundler/man/bundle-install"]|)
+ expect(out).to eq(%(["#{root}/lib/bundler/man/bundle-install"]))
end
it "simply outputs the txt file when there is no man on the path" do
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb
index 84e437744d..717e46ec61 100644
--- a/spec/install/gemfile/git_spec.rb
+++ b/spec/install/gemfile/git_spec.rb
@@ -186,7 +186,7 @@ describe "bundle install with git sources" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
expect(out).to match(/at #{lib_path('local-rack')}/)
@@ -208,7 +208,7 @@ describe "bundle install with git sources" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
run "require 'rack'"
expect(out).to eq("LOCAL")
end
@@ -230,7 +230,7 @@ describe "bundle install with git sources" do
s.add_dependency "nokogiri", "1.4.2"
end
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
run "require 'rack'"
lockfile1 = File.read(bundled_app("Gemfile.lock"))
@@ -250,7 +250,7 @@ describe "bundle install with git sources" do
FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
update_git "rack", "0.8", :path => lib_path("local-rack")
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
lockfile1 = File.read(bundled_app("Gemfile.lock"))
@@ -265,7 +265,7 @@ describe "bundle install with git sources" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
expect(out).to match(/Cannot use local override for rack-0.8 because #{Regexp.escape(lib_path('local-rack').to_s)} does not exist/)
end
@@ -279,7 +279,7 @@ describe "bundle install with git sources" do
gem "rack", :git => "#{lib_path("rack-0.8")}"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
expect(out).to match(/cannot use local override/i)
end
@@ -293,8 +293,8 @@ describe "bundle install with git sources" do
gem "rack", :git => "#{lib_path("rack-0.8")}"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
- bundle %|config disable_local_branch_check true|
+ bundle %(config local.rack #{lib_path("local-rack")})
+ bundle %(config disable_local_branch_check true)
bundle :install
expect(out).to match(/Bundle complete!/)
end
@@ -313,7 +313,7 @@ describe "bundle install with git sources" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
expect(out).to match(/is using branch another but Gemfile specifies master/)
end
@@ -330,7 +330,7 @@ describe "bundle install with git sources" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
expect(out).to match(/The Gemfile lock is pointing to revision \w+/)
end
@@ -467,7 +467,7 @@ describe "bundle install with git sources" do
it "runs the gemspec in the context of its parent directory" do
build_lib "bar", :path => lib_path("foo/bar"), :gemspec => false do |s|
- s.write lib_path("foo/bar/lib/version.rb"), %{BAR_VERSION = '1.0'}
+ s.write lib_path("foo/bar/lib/version.rb"), %(BAR_VERSION = '1.0')
s.write "bar.gemspec", <<-G
$:.unshift Dir.pwd # For 1.9
require 'lib/version'
diff --git a/spec/install/gems/sources_spec.rb b/spec/install/gems/sources_spec.rb
index 0206dc1dbf..9ebb2c1ed8 100644
--- a/spec/install/gems/sources_spec.rb
+++ b/spec/install/gems/sources_spec.rb
@@ -329,7 +329,7 @@ describe "bundle install with gems on multiple sources" do
it "does not unlock the non-path gem after install" do
bundle :install
- bundle %{exec ruby -e 'puts "OK"'}
+ bundle %(exec ruby -e 'puts "OK"')
expect(out).to include("OK")
expect(exitstatus).to eq(0) if exitstatus
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
index ed5ac405e0..eaee6d74b2 100644
--- a/spec/install/gems/sudo_spec.rb
+++ b/spec/install/gems/sudo_spec.rb
@@ -146,7 +146,7 @@ describe "when using sudo", :sudo => true do
let(:warning) { "Don't run Bundler as root." }
before do
- gemfile %|source "file://#{gem_repo1}"|
+ gemfile %(source "file://#{gem_repo1}")
end
it "warns against that" do
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index a123aff673..4f0d395342 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -410,7 +410,7 @@ describe "Bundler.setup" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
expect(out).to match(/at #{lib_path('local-rack')}/)
@@ -429,7 +429,7 @@ describe "Bundler.setup" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
expect(out).to match(/at #{lib_path('local-rack')}/)
@@ -452,7 +452,7 @@ describe "Bundler.setup" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle :install
expect(out).to match(/at #{lib_path('local-rack')}/)
@@ -480,7 +480,7 @@ describe "Bundler.setup" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :ref => "master", :branch => "nonexistant"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
run "require 'rack'", :expect_err => true
expect(err).to match(/is using branch master but Gemfile specifies nonexistant/)
end
@@ -620,7 +620,7 @@ describe "Bundler.setup" do
G
ENV["GEM_HOME"] = ""
- bundle %{exec ruby -e "require 'set'"}
+ bundle %(exec ruby -e "require 'set'")
expect(err).to be_empty
end
@@ -630,7 +630,7 @@ describe "Bundler.setup" do
build_gem("requirepaths") do |s|
s.write("lib/rq.rb", "puts 'yay'")
s.write("src/rq.rb", "puts 'nooo'")
- s.require_paths = %w[lib src]
+ s.require_paths = %w(lib src)
end
end
@@ -834,7 +834,7 @@ describe "Bundler.setup" do
describe "with a gemspec that requires other files" do
before :each do
build_git "bar", :gemspec => false do |s|
- s.write "lib/bar/version.rb", %{BAR_VERSION = '1.0'}
+ s.write "lib/bar/version.rb", %(BAR_VERSION = '1.0')
s.write "bar.gemspec", <<-G
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)
@@ -894,7 +894,7 @@ describe "Bundler.setup" do
gem "bundler", :path => "#{File.expand_path("..", lib)}"
G
- bundle %|exec ruby -e "require 'bundler'; Bundler.setup"|
+ bundle %(exec ruby -e "require 'bundler'; Bundler.setup")
expect(err).to be_empty
end
end
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb
index eed024a398..0ceb4adf05 100644
--- a/spec/runtime/with_clean_env_spec.rb
+++ b/spec/runtime/with_clean_env_spec.rb
@@ -77,7 +77,7 @@ describe "Bundler.with_env helpers" do
describe "Bundler.clean_system" do
it "runs system inside with_clean_env" do
- Bundler.clean_system(%{echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh})
+ Bundler.clean_system(%(echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh))
expect($?.exitstatus).to eq(42)
end
end
@@ -85,7 +85,7 @@ describe "Bundler.with_env helpers" do
describe "Bundler.clean_exec" do
it "runs exec inside with_clean_env" do
pid = Kernel.fork do
- Bundler.clean_exec(%{echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh})
+ Bundler.clean_exec(%(echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh))
end
Process.wait(pid)
expect($?.exitstatus).to eq(42)
diff --git a/spec/support/artifice/endpoint_creds_diff_host.rb b/spec/support/artifice/endpoint_creds_diff_host.rb
index a0f08a0efc..0c10242daf 100644
--- a/spec/support/artifice/endpoint_creds_diff_host.rb
+++ b/spec/support/artifice/endpoint_creds_diff_host.rb
@@ -9,7 +9,7 @@ class EndpointCredsDiffHost < Endpoint
end
def authorized?
- auth.provided? && auth.basic? && auth.credentials && auth.credentials == %w[user pass]
+ auth.provided? && auth.basic? && auth.credentials && auth.credentials == %w(user pass)
end
def protected!
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index ae6df9e76d..3bf4ce56d4 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -108,7 +108,7 @@ module Spec
env = (options.delete(:env) || {}).map {|k, v| "#{k}='#{v}' " }.join
ruby.gsub!(/["`\$]/) {|m| "\\#{m}" }
lib_option = options[:no_lib] ? "" : " -I#{lib}"
- sys_exec(%{#{env}#{Gem.ruby}#{lib_option} -e "#{ruby}"}, expect_err)
+ sys_exec(%(#{env}#{Gem.ruby}#{lib_option} -e "#{ruby}"), expect_err)
end
def load_error_ruby(ruby, name, opts = {})
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb
index 387d100d36..3150b4810b 100644
--- a/spec/support/indexes.rb
+++ b/spec/support/indexes.rb
@@ -206,7 +206,7 @@ module Spec
# Issue #3459
def a_complicated_index
build_index do
- gem "foo", %w{3.0.0 3.0.5} do
+ gem "foo", %w(3.0.0 3.0.5) do
dep "qux", ["~> 3.1"]
dep "baz", ["< 9.0", ">= 5.0"]
dep "bar", ["~> 1.0"]
@@ -245,7 +245,7 @@ module Spec
dep "garply", [">= 0.3.1"]
end
- gem "grault", %w{2.6.3 3.1.1}
+ gem "grault", %w(2.6.3 3.1.1)
gem "garply", "0.5.1" do
dep "waldo", ["~> 0.1.3"]
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 1e0d3d5ee0..ca24bb547e 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -13,7 +13,7 @@ module Spec
unless File.exist?("#{Path.base_system_gems}")
FileUtils.mkdir_p(Path.base_system_gems)
puts "installing gems for the tests to use..."
- %w[fakeweb artifice rack].each {|n| install_gem(n) }
+ %w(fakeweb artifice rack).each {|n| install_gem(n) }
{
"sinatra" => "1.2.7",
# Rake version has to be consistent for tests to pass
@@ -39,7 +39,7 @@ module Spec
def gem_command(command, args = "", options = {})
if command == :exec && !options[:no_quote]
args = args.gsub(/(?=")/, "\\")
- args = %["#{args}"]
+ args = %("#{args}")
end
lib = File.join(File.dirname(__FILE__), "..", "..", "lib")
`#{Gem.ruby} -I#{lib} -rubygems -S gem --backtrace #{command} #{args}`.strip
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb
index f61e561179..465f451a58 100644
--- a/spec/update/git_spec.rb
+++ b/spec/update/git_spec.rb
@@ -203,7 +203,7 @@ describe "bundle update" do
gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
- bundle %|config local.rack #{lib_path("local-rack")}|
+ bundle %(config local.rack #{lib_path("local-rack")})
bundle "update rack"
expect(out).to include("Bundle updated!")
end