summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Sasse <esasse@gmail.com>2015-07-29 21:07:52 -0300
committerErick Sasse <esasse@gmail.com>2015-07-29 21:07:52 -0300
commit7f31d8635908e15b5a2abfce8fb9873c0c16695b (patch)
tree8ce211600790add7a14af12f1f5385bc3801c48a
parent8583433bc21a94849ece2008fff345b6b883f590 (diff)
downloadbundler-7f31d8635908e15b5a2abfce8fb9873c0c16695b.tar.gz
Use %w[] instead of %w()
-rw-r--r--Rakefile4
-rw-r--r--lib/bundler/dsl.rb2
-rw-r--r--spec/bundler/dsl_spec.rb4
-rw-r--r--spec/bundler/fetcher_spec.rb2
-rw-r--r--spec/runtime/require_spec.rb2
-rw-r--r--spec/runtime/setup_spec.rb2
-rw-r--r--spec/support/artifice/endpoint_creds_diff_host.rb2
7 files changed, 9 insertions, 9 deletions
diff --git a/Rakefile b/Rakefile
index d5f3bbdac1..8d85b171ee 100644
--- a/Rakefile
+++ b/Rakefile
@@ -156,14 +156,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/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index b618eae5aa..7d66b5e621 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -290,7 +290,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/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb
index 97fd599383..169843bbe5 100644
--- a/spec/bundler/dsl_spec.rb
+++ b/spec/bundler/dsl_spec.rb
@@ -145,7 +145,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
@@ -160,7 +160,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_spec.rb b/spec/bundler/fetcher_spec.rb
index bb0bf9d65a..1637082886 100644
--- a/spec/bundler/fetcher_spec.rb
+++ b/spec/bundler/fetcher_spec.rb
@@ -10,7 +10,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(/bundler\/(\d.)/)
expect(fetcher.user_agent).to match(/rubygems\/(\d.)/)
expect(fetcher.user_agent).to match(/ruby\/(\d.)/)
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb
index e07d1bf2e9..f68a95312c 100644
--- a/spec/runtime/require_spec.rb
+++ b/spec/runtime/require_spec.rb
@@ -39,7 +39,7 @@ describe "Bundler.require" do
gemfile <<-G
path "#{lib_path}"
- gem "one", :group => :bar, :require => %w(baz qux)
+ gem "one", :group => :bar, :require => %w[baz qux]
gem "two"
gem "three", :group => :not
gem "four", :require => false
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index e017edb169..a123aff673 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -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
diff --git a/spec/support/artifice/endpoint_creds_diff_host.rb b/spec/support/artifice/endpoint_creds_diff_host.rb
index 0c10242daf..a0f08a0efc 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!