summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSamuel E. Giddins <segiddins@segiddins.me>2015-07-15 20:52:48 -0700
committerSamuel E. Giddins <segiddins@segiddins.me>2015-07-15 20:52:48 -0700
commita77ca278809d7f31fa51e4b821faed86324c8275 (patch)
treeda1c6c68b24fdcab9acfc07b6a352a39af1c6f4e /spec
parentaf694073229af89af205d24ff449f51f74316a37 (diff)
downloadbundler-a77ca278809d7f31fa51e4b821faed86324c8275.tar.gz
[RuboCop] Enable Style/StringLiterals
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/bundler_spec.rb10
-rw-r--r--spec/bundler/cli_spec.rb14
-rw-r--r--spec/bundler/definition_spec.rb4
-rw-r--r--spec/bundler/dsl_spec.rb2
-rw-r--r--spec/bundler/fetcher_spec.rb8
-rw-r--r--spec/bundler/gem_helper_spec.rb4
-rw-r--r--spec/bundler/psyched_yaml_spec.rb4
-rw-r--r--spec/bundler/retry_spec.rb2
-rw-r--r--spec/bundler/rubygems_integration_spec.rb2
-rw-r--r--spec/bundler/settings_spec.rb6
-rw-r--r--spec/bundler/source/rubygems_spec.rb2
-rw-r--r--spec/bundler/source_list_spec.rb264
-rw-r--r--spec/cache/gems_spec.rb16
-rw-r--r--spec/cache/git_spec.rb8
-rw-r--r--spec/commands/binstubs_spec.rb20
-rw-r--r--spec/commands/check_spec.rb2
-rw-r--r--spec/commands/clean_spec.rb70
-rw-r--r--spec/commands/config_spec.rb22
-rw-r--r--spec/commands/exec_spec.rb28
-rw-r--r--spec/commands/init_spec.rb4
-rw-r--r--spec/commands/inject_spec.rb2
-rw-r--r--spec/commands/install_spec.rb14
-rw-r--r--spec/commands/lock_spec.rb4
-rw-r--r--spec/commands/newgem_spec.rb32
-rw-r--r--spec/commands/open_spec.rb10
-rw-r--r--spec/commands/outdated_spec.rb4
-rw-r--r--spec/commands/package_spec.rb6
-rw-r--r--spec/commands/show_spec.rb28
-rw-r--r--spec/commands/update_spec.rb2
-rw-r--r--spec/install/binstubs_spec.rb4
-rw-r--r--spec/install/bundler_spec.rb8
-rw-r--r--spec/install/deploy_spec.rb6
-rw-r--r--spec/install/force_spec.rb2
-rw-r--r--spec/install/gemfile/gemspec_spec.rb12
-rw-r--r--spec/install/gemfile/git_spec.rb206
-rw-r--r--spec/install/gemfile/path_spec.rb76
-rw-r--r--spec/install/gemfile_spec.rb2
-rw-r--r--spec/install/gems/dependency_api_spec.rb14
-rw-r--r--spec/install/gems/env_spec.rb12
-rw-r--r--spec/install/gems/flex_spec.rb18
-rw-r--r--spec/install/gems/groups_spec.rb16
-rw-r--r--spec/install/gems/platform_spec.rb2
-rw-r--r--spec/install/gems/post_install_spec.rb2
-rw-r--r--spec/install/gems/resolving_spec.rb2
-rw-r--r--spec/install/gems/sources_spec.rb2
-rw-r--r--spec/install/gems/standalone_spec.rb10
-rw-r--r--spec/install/gems/sudo_spec.rb16
-rw-r--r--spec/install/gems/win32_spec.rb4
-rw-r--r--spec/install/gemspecs_spec.rb16
-rw-r--r--spec/install/parallel/spec_installation_spec.rb4
-rw-r--r--spec/install/path_spec.rb18
-rw-r--r--spec/install/post_bundle_message_spec.rb2
-rw-r--r--spec/install/prereleases_spec.rb2
-rw-r--r--spec/install/security_policy_spec.rb2
-rw-r--r--spec/lock/git_spec.rb2
-rw-r--r--spec/lock/lockfile_spec.rb54
-rw-r--r--spec/other/ext_spec.rb32
-rw-r--r--spec/other/platform_spec.rb36
-rw-r--r--spec/other/ssl_cert_spec.rb4
-rw-r--r--spec/quality_spec.rb8
-rw-r--r--spec/realworld/dependency_api_spec.rb16
-rw-r--r--spec/realworld/edgecases_spec.rb2
-rw-r--r--spec/realworld/parallel_spec.rb2
-rw-r--r--spec/resolver/platform_spec.rb2
-rw-r--r--spec/runtime/executable_spec.rb14
-rw-r--r--spec/runtime/gem_tasks_spec.rb2
-rw-r--r--spec/runtime/inline_spec.rb6
-rw-r--r--spec/runtime/load_spec.rb4
-rw-r--r--spec/runtime/require_spec.rb14
-rw-r--r--spec/runtime/setup_spec.rb68
-rw-r--r--spec/runtime/with_clean_env_spec.rb20
-rw-r--r--spec/spec_helper.rb66
-rw-r--r--spec/support/artifice/endpoint.rb8
-rw-r--r--spec/support/artifice/endpoint_500.rb4
-rw-r--r--spec/support/artifice/endpoint_api_missing.rb2
-rw-r--r--spec/support/artifice/endpoint_creds_diff_host.rb4
-rw-r--r--spec/support/artifice/endpoint_extra_missing.rb2
-rw-r--r--spec/support/artifice/endpoint_host_redirect.rb2
-rw-r--r--spec/support/builders.rb24
-rw-r--r--spec/support/fakeweb/windows.rb10
-rw-r--r--spec/support/hax.rb12
-rw-r--r--spec/support/helpers.rb76
-rw-r--r--spec/support/indexes.rb76
-rw-r--r--spec/support/matchers.rb4
-rw-r--r--spec/support/path.rb4
-rw-r--r--spec/support/platforms.rb10
-rw-r--r--spec/support/rubygems_ext.rb14
-rw-r--r--spec/support/streams.rb2
-rw-r--r--spec/update/git_spec.rb52
-rw-r--r--spec/update/path_spec.rb4
90 files changed, 857 insertions, 857 deletions
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb
index 5f3515da00..1cdfc6d30f 100644
--- a/spec/bundler/bundler_spec.rb
+++ b/spec/bundler/bundler_spec.rb
@@ -1,6 +1,6 @@
# encoding: utf-8
-require 'spec_helper'
-require 'bundler'
+require "spec_helper"
+require "bundler"
describe Bundler do
describe "#load_gemspec_uncached" do
@@ -24,7 +24,7 @@ describe Bundler do
context "on Rubies with a settable YAML engine", :if => defined?(YAML::ENGINE) do
context "with Syck as YAML::Engine" do
it "raises a GemspecError after YAML load throws ArgumentError" do
- orig_yamler, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'syck'
+ orig_yamler, YAML::ENGINE.yamler = YAML::ENGINE.yamler, "syck"
expect { subject }.to raise_error(Bundler::GemspecError)
@@ -34,7 +34,7 @@ describe Bundler do
context "with Psych as YAML::Engine" do
it "raises a GemspecError after YAML load throws Psych::SyntaxError" do
- orig_yamler, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'psych'
+ orig_yamler, YAML::ENGINE.yamler = YAML::ENGINE.yamler, "psych"
expect { subject }.to raise_error(Bundler::GemspecError)
@@ -53,7 +53,7 @@ describe Bundler do
$VERBOSE = verbose
File.open(app_gemspec_path, "wb") do |file|
- file.puts <<-GEMSPEC.gsub(/^\s+/, '')
+ file.puts <<-GEMSPEC.gsub(/^\s+/, "")
# -*- encoding: utf-8 -*-
Gem::Specification.new do |gem|
gem.author = "André the Giant"
diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb
index 2ebe69d26b..32eecbc49d 100644
--- a/spec/bundler/cli_spec.rb
+++ b/spec/bundler/cli_spec.rb
@@ -1,27 +1,27 @@
-require 'spec_helper'
-require 'bundler/cli'
+require "spec_helper"
+require "bundler/cli"
describe "bundle executable" do
it "returns non-zero exit status when passed unrecognized options" do
- bundle '--invalid_argument'
+ bundle "--invalid_argument"
expect(exitstatus).to_not be_zero if exitstatus
end
it "returns non-zero exit status when passed unrecognized task" do
- bundle 'unrecognized-tast'
+ bundle "unrecognized-tast"
expect(exitstatus).to_not be_zero if exitstatus
end
it "looks for a binary and executes it if it's named bundler-<task>" do
- File.open(tmp('bundler-testtasks'), 'w', 0755) do |f|
+ File.open(tmp("bundler-testtasks"), "w", 0755) do |f|
f.puts "#!/usr/bin/env ruby\nputs 'Hello, world'\n"
end
with_path_as(tmp) do
- bundle 'testtasks'
+ bundle "testtasks"
end
expect(exitstatus).to be_zero if exitstatus
- expect(out).to eq('Hello, world')
+ expect(out).to eq("Hello, world")
end
end
diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb
index f5865da8ef..481c355bd1 100644
--- a/spec/bundler/definition_spec.rb
+++ b/spec/bundler/definition_spec.rb
@@ -1,5 +1,5 @@
-require 'spec_helper'
-require 'bundler/definition'
+require "spec_helper"
+require "bundler/definition"
describe Bundler::Definition do
before do
diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb
index 182df4ea7c..686e1f9449 100644
--- a/spec/bundler/dsl_spec.rb
+++ b/spec/bundler/dsl_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe Bundler::Dsl do
before do
diff --git a/spec/bundler/fetcher_spec.rb b/spec/bundler/fetcher_spec.rb
index 3c7bef39f2..4df9018d66 100644
--- a/spec/bundler/fetcher_spec.rb
+++ b/spec/bundler/fetcher_spec.rb
@@ -1,5 +1,5 @@
-require 'spec_helper'
-require 'bundler/fetcher'
+require "spec_helper"
+require "bundler/fetcher"
describe Bundler::Fetcher do
subject(:fetcher) { Bundler::Fetcher.new(double("remote", :uri => URI("https://example.com"))) }
@@ -20,14 +20,14 @@ describe Bundler::Fetcher do
describe "include CI information" do
it "from one CI" do
with_env_vars({"JENKINS_URL" => "foo"}) do
- ci_part = fetcher.user_agent.split(' ').find{|x| x.match(/\Aci\//)}
+ ci_part = fetcher.user_agent.split(" ").find{|x| x.match(/\Aci\//)}
expect(ci_part).to match("jenkins")
end
end
it "from many CI" do
with_env_vars({"TRAVIS" => "foo", "CI_NAME" => "my_ci"}) do
- ci_part = fetcher.user_agent.split(' ').find{|x| x.match(/\Aci\//)}
+ ci_part = fetcher.user_agent.split(" ").find{|x| x.match(/\Aci\//)}
expect(ci_part).to match("travis")
expect(ci_part).to match("my_ci")
end
diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb
index 8cfacbac01..f46b0f0423 100644
--- a/spec/bundler/gem_helper_spec.rb
+++ b/spec/bundler/gem_helper_spec.rb
@@ -1,6 +1,6 @@
require "spec_helper"
-require 'rake'
-require 'bundler/gem_helper'
+require "rake"
+require "bundler/gem_helper"
describe Bundler::GemHelper do
let(:app_name) { "lorem__ipsum" }
diff --git a/spec/bundler/psyched_yaml_spec.rb b/spec/bundler/psyched_yaml_spec.rb
index 5f3c47bafd..76b57604f5 100644
--- a/spec/bundler/psyched_yaml_spec.rb
+++ b/spec/bundler/psyched_yaml_spec.rb
@@ -1,5 +1,5 @@
-require 'spec_helper'
-require 'bundler/psyched_yaml'
+require "spec_helper"
+require "bundler/psyched_yaml"
describe Bundler::YamlSyntaxError do
it "is raised on YAML parse errors" do
diff --git a/spec/bundler/retry_spec.rb b/spec/bundler/retry_spec.rb
index aa4e5e42ad..8a5623058a 100644
--- a/spec/bundler/retry_spec.rb
+++ b/spec/bundler/retry_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe Bundler::Retry do
it "return successful result if no errors" do
diff --git a/spec/bundler/rubygems_integration_spec.rb b/spec/bundler/rubygems_integration_spec.rb
index 0c69c3b161..decc3d6fa1 100644
--- a/spec/bundler/rubygems_integration_spec.rb
+++ b/spec/bundler/rubygems_integration_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe Bundler::RubygemsIntegration do
it "uses the same chdir lock as rubygems", :rubygems => "2.1" do
diff --git a/spec/bundler/settings_spec.rb b/spec/bundler/settings_spec.rb
index 746b87732c..3578155265 100644
--- a/spec/bundler/settings_spec.rb
+++ b/spec/bundler/settings_spec.rb
@@ -1,5 +1,5 @@
-require 'spec_helper'
-require 'bundler/settings'
+require "spec_helper"
+require "bundler/settings"
describe Bundler::Settings do
subject(:settings) { described_class.new(bundled_app) }
@@ -163,7 +163,7 @@ describe Bundler::Settings do
end
describe "BUNDLE_ keys format" do
- let(:settings) { described_class.new(bundled_app('.bundle')) }
+ let(:settings) { described_class.new(bundled_app(".bundle")) }
it "converts older keys without double dashes" do
config("BUNDLE_MY__PERSONAL.RACK" => "~/Work/git/rack")
diff --git a/spec/bundler/source/rubygems_spec.rb b/spec/bundler/source/rubygems_spec.rb
index 68fc6c6ed4..fea680657f 100644
--- a/spec/bundler/source/rubygems_spec.rb
+++ b/spec/bundler/source/rubygems_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe Bundler::Source::Rubygems do
before do
diff --git a/spec/bundler/source_list_spec.rb b/spec/bundler/source_list_spec.rb
index 2ce41832ca..3beac46f41 100644
--- a/spec/bundler/source_list_spec.rb
+++ b/spec/bundler/source_list_spec.rb
@@ -1,8 +1,8 @@
-require 'spec_helper'
+require "spec_helper"
describe Bundler::SourceList do
before do
- allow(Bundler).to receive(:root) { Pathname.new '/' }
+ allow(Bundler).to receive(:root) { Pathname.new "/" }
end
subject(:source_list) { Bundler::SourceList.new }
@@ -11,15 +11,15 @@ describe Bundler::SourceList do
describe "adding sources" do
before do
- source_list.add_path_source('path' => '/existing/path/to/gem')
- source_list.add_git_source('uri' => 'git://existing-git.org/path.git')
- source_list.add_rubygems_source('remotes' => ['https://existing-rubygems.org'])
+ source_list.add_path_source("path" => "/existing/path/to/gem")
+ source_list.add_git_source("uri" => "git://existing-git.org/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://existing-rubygems.org"])
end
describe "#add_path_source" do
before do
- @duplicate = source_list.add_path_source('path' => '/path/to/gem')
- @new_source = source_list.add_path_source('path' => '/path/to/gem')
+ @duplicate = source_list.add_path_source("path" => "/path/to/gem")
+ @new_source = source_list.add_path_source("path" => "/path/to/gem")
end
it "returns the new path source" do
@@ -27,7 +27,7 @@ describe Bundler::SourceList do
end
it "passes the provided options to the new source" do
- expect(@new_source.options).to eq('path' => '/path/to/gem')
+ expect(@new_source.options).to eq("path" => "/path/to/gem")
end
it "adds the source to the beginning of path_sources" do
@@ -41,8 +41,8 @@ describe Bundler::SourceList do
describe "#add_git_source" do
before do
- @duplicate = source_list.add_git_source('uri' => 'git://host/path.git')
- @new_source = source_list.add_git_source('uri' => 'git://host/path.git')
+ @duplicate = source_list.add_git_source("uri" => "git://host/path.git")
+ @new_source = source_list.add_git_source("uri" => "git://host/path.git")
end
it "returns the new git source" do
@@ -50,7 +50,7 @@ describe Bundler::SourceList do
end
it "passes the provided options to the new source" do
- expect(@new_source.options).to eq('uri' => 'git://host/path.git')
+ expect(@new_source.options).to eq("uri" => "git://host/path.git")
end
it "adds the source to the beginning of git_sources" do
@@ -64,8 +64,8 @@ describe Bundler::SourceList do
describe "#add_rubygems_source" do
before do
- @duplicate = source_list.add_rubygems_source('remotes' => ['https://rubygems.org/'])
- @new_source = source_list.add_rubygems_source('remotes' => ['https://rubygems.org/'])
+ @duplicate = source_list.add_rubygems_source("remotes" => ["https://rubygems.org/"])
+ @new_source = source_list.add_rubygems_source("remotes" => ["https://rubygems.org/"])
end
it "returns the new rubygems source" do
@@ -73,7 +73,7 @@ describe Bundler::SourceList do
end
it "passes the provided options to the new source" do
- expect(@new_source.options).to eq('remotes' => ['https://rubygems.org/'])
+ expect(@new_source.options).to eq("remotes" => ["https://rubygems.org/"])
end
it "adds the source to the beginning of rubygems_sources" do
@@ -87,7 +87,7 @@ describe Bundler::SourceList do
describe "#add_rubygems_remote" do
before do
- @returned_source = source_list.add_rubygems_remote('https://rubygems.org/')
+ @returned_source = source_list.add_rubygems_remote("https://rubygems.org/")
end
it "returns the aggregate rubygems source" do
@@ -95,53 +95,53 @@ describe Bundler::SourceList do
end
it "adds the provided remote to the beginning of the aggregate source" do
- source_list.add_rubygems_remote('https://othersource.org')
- expect(@returned_source.remotes.first).to eq(URI('https://othersource.org/'))
+ source_list.add_rubygems_remote("https://othersource.org")
+ expect(@returned_source.remotes.first).to eq(URI("https://othersource.org/"))
end
end
end
describe "#all_sources" do
it "includes the aggregate rubygems source when rubygems sources have been added" do
- source_list.add_git_source('uri' => 'git://host/path.git')
- source_list.add_rubygems_source('remotes' => ['https://rubygems.org'])
- source_list.add_path_source('path' => '/path/to/gem')
+ source_list.add_git_source("uri" => "git://host/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://rubygems.org"])
+ source_list.add_path_source("path" => "/path/to/gem")
expect(source_list.all_sources).to include rubygems_aggregate
end
it "includes the aggregate rubygems source when no rubygems sources have been added" do
- source_list.add_git_source('uri' => 'git://host/path.git')
- source_list.add_path_source('path' => '/path/to/gem')
+ source_list.add_git_source("uri" => "git://host/path.git")
+ source_list.add_path_source("path" => "/path/to/gem")
expect(source_list.all_sources).to include rubygems_aggregate
end
it "returns sources of the same type in the reverse order that they were added" do
- source_list.add_git_source('uri' => 'git://third-git.org/path.git')
- source_list.add_rubygems_source('remotes' => ['https://fifth-rubygems.org'])
- source_list.add_path_source('path' => '/third/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://fourth-rubygems.org'])
- source_list.add_path_source('path' => '/second/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://third-rubygems.org'])
- source_list.add_git_source('uri' => 'git://second-git.org/path.git')
- source_list.add_rubygems_source('remotes' => ['https://second-rubygems.org'])
- source_list.add_path_source('path' => '/first/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://first-rubygems.org'])
- source_list.add_git_source('uri' => 'git://first-git.org/path.git')
+ source_list.add_git_source("uri" => "git://third-git.org/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://fifth-rubygems.org"])
+ source_list.add_path_source("path" => "/third/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://fourth-rubygems.org"])
+ source_list.add_path_source("path" => "/second/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://third-rubygems.org"])
+ source_list.add_git_source("uri" => "git://second-git.org/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://second-rubygems.org"])
+ source_list.add_path_source("path" => "/first/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://first-rubygems.org"])
+ source_list.add_git_source("uri" => "git://first-git.org/path.git")
expect(source_list.all_sources).to eq [
- Bundler::Source::Path.new('path' => '/first/path/to/gem'),
- Bundler::Source::Path.new('path' => '/second/path/to/gem'),
- Bundler::Source::Path.new('path' => '/third/path/to/gem'),
- Bundler::Source::Git.new('uri' => 'git://first-git.org/path.git'),
- Bundler::Source::Git.new('uri' => 'git://second-git.org/path.git'),
- Bundler::Source::Git.new('uri' => 'git://third-git.org/path.git'),
- Bundler::Source::Rubygems.new('remotes' => ['https://first-rubygems.org']),
- Bundler::Source::Rubygems.new('remotes' => ['https://second-rubygems.org']),
- Bundler::Source::Rubygems.new('remotes' => ['https://third-rubygems.org']),
- Bundler::Source::Rubygems.new('remotes' => ['https://fourth-rubygems.org']),
- Bundler::Source::Rubygems.new('remotes' => ['https://fifth-rubygems.org']),
+ Bundler::Source::Path.new("path" => "/first/path/to/gem"),
+ Bundler::Source::Path.new("path" => "/second/path/to/gem"),
+ Bundler::Source::Path.new("path" => "/third/path/to/gem"),
+ Bundler::Source::Git.new("uri" => "git://first-git.org/path.git"),
+ Bundler::Source::Git.new("uri" => "git://second-git.org/path.git"),
+ Bundler::Source::Git.new("uri" => "git://third-git.org/path.git"),
+ Bundler::Source::Rubygems.new("remotes" => ["https://first-rubygems.org"]),
+ Bundler::Source::Rubygems.new("remotes" => ["https://second-rubygems.org"]),
+ Bundler::Source::Rubygems.new("remotes" => ["https://third-rubygems.org"]),
+ Bundler::Source::Rubygems.new("remotes" => ["https://fourth-rubygems.org"]),
+ Bundler::Source::Rubygems.new("remotes" => ["https://fifth-rubygems.org"]),
rubygems_aggregate,
]
end
@@ -149,96 +149,96 @@ describe Bundler::SourceList do
describe "#path_sources" do
it "returns an empty array when no path sources have been added" do
- source_list.add_rubygems_remote('https://rubygems.org')
- source_list.add_git_source('uri' => 'git://host/path.git')
+ source_list.add_rubygems_remote("https://rubygems.org")
+ source_list.add_git_source("uri" => "git://host/path.git")
expect(source_list.path_sources).to be_empty
end
it "returns path sources in the reverse order that they were added" do
- source_list.add_git_source('uri' => 'git://third-git.org/path.git')
- source_list.add_rubygems_remote('https://fifth-rubygems.org')
- source_list.add_path_source('path' => '/third/path/to/gem')
- source_list.add_rubygems_remote('https://fourth-rubygems.org')
- source_list.add_path_source('path' => '/second/path/to/gem')
- source_list.add_rubygems_remote('https://third-rubygems.org')
- source_list.add_git_source('uri' => 'git://second-git.org/path.git')
- source_list.add_rubygems_remote('https://second-rubygems.org')
- source_list.add_path_source('path' => '/first/path/to/gem')
- source_list.add_rubygems_remote('https://first-rubygems.org')
- source_list.add_git_source('uri' => 'git://first-git.org/path.git')
+ source_list.add_git_source("uri" => "git://third-git.org/path.git")
+ source_list.add_rubygems_remote("https://fifth-rubygems.org")
+ source_list.add_path_source("path" => "/third/path/to/gem")
+ source_list.add_rubygems_remote("https://fourth-rubygems.org")
+ source_list.add_path_source("path" => "/second/path/to/gem")
+ source_list.add_rubygems_remote("https://third-rubygems.org")
+ source_list.add_git_source("uri" => "git://second-git.org/path.git")
+ source_list.add_rubygems_remote("https://second-rubygems.org")
+ source_list.add_path_source("path" => "/first/path/to/gem")
+ source_list.add_rubygems_remote("https://first-rubygems.org")
+ source_list.add_git_source("uri" => "git://first-git.org/path.git")
expect(source_list.path_sources).to eq [
- Bundler::Source::Path.new('path' => '/first/path/to/gem'),
- Bundler::Source::Path.new('path' => '/second/path/to/gem'),
- Bundler::Source::Path.new('path' => '/third/path/to/gem'),
+ Bundler::Source::Path.new("path" => "/first/path/to/gem"),
+ Bundler::Source::Path.new("path" => "/second/path/to/gem"),
+ Bundler::Source::Path.new("path" => "/third/path/to/gem"),
]
end
end
describe "#git_sources" do
it "returns an empty array when no git sources have been added" do
- source_list.add_rubygems_remote('https://rubygems.org')
- source_list.add_path_source('path' => '/path/to/gem')
+ source_list.add_rubygems_remote("https://rubygems.org")
+ source_list.add_path_source("path" => "/path/to/gem")
expect(source_list.git_sources).to be_empty
end
it "returns git sources in the reverse order that they were added" do
- source_list.add_git_source('uri' => 'git://third-git.org/path.git')
- source_list.add_rubygems_remote('https://fifth-rubygems.org')
- source_list.add_path_source('path' => '/third/path/to/gem')
- source_list.add_rubygems_remote('https://fourth-rubygems.org')
- source_list.add_path_source('path' => '/second/path/to/gem')
- source_list.add_rubygems_remote('https://third-rubygems.org')
- source_list.add_git_source('uri' => 'git://second-git.org/path.git')
- source_list.add_rubygems_remote('https://second-rubygems.org')
- source_list.add_path_source('path' => '/first/path/to/gem')
- source_list.add_rubygems_remote('https://first-rubygems.org')
- source_list.add_git_source('uri' => 'git://first-git.org/path.git')
+ source_list.add_git_source("uri" => "git://third-git.org/path.git")
+ source_list.add_rubygems_remote("https://fifth-rubygems.org")
+ source_list.add_path_source("path" => "/third/path/to/gem")
+ source_list.add_rubygems_remote("https://fourth-rubygems.org")
+ source_list.add_path_source("path" => "/second/path/to/gem")
+ source_list.add_rubygems_remote("https://third-rubygems.org")
+ source_list.add_git_source("uri" => "git://second-git.org/path.git")
+ source_list.add_rubygems_remote("https://second-rubygems.org")
+ source_list.add_path_source("path" => "/first/path/to/gem")
+ source_list.add_rubygems_remote("https://first-rubygems.org")
+ source_list.add_git_source("uri" => "git://first-git.org/path.git")
expect(source_list.git_sources).to eq [
- Bundler::Source::Git.new('uri' => 'git://first-git.org/path.git'),
- Bundler::Source::Git.new('uri' => 'git://second-git.org/path.git'),
- Bundler::Source::Git.new('uri' => 'git://third-git.org/path.git'),
+ Bundler::Source::Git.new("uri" => "git://first-git.org/path.git"),
+ Bundler::Source::Git.new("uri" => "git://second-git.org/path.git"),
+ Bundler::Source::Git.new("uri" => "git://third-git.org/path.git"),
]
end
end
describe "#rubygems_sources" do
it "includes the aggregate rubygems source when rubygems sources have been added" do
- source_list.add_git_source('uri' => 'git://host/path.git')
- source_list.add_rubygems_source('remotes' => ['https://rubygems.org'])
- source_list.add_path_source('path' => '/path/to/gem')
+ source_list.add_git_source("uri" => "git://host/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://rubygems.org"])
+ source_list.add_path_source("path" => "/path/to/gem")
expect(source_list.rubygems_sources).to include rubygems_aggregate
end
it "returns only the aggregate rubygems source when no rubygems sources have been added" do
- source_list.add_git_source('uri' => 'git://host/path.git')
- source_list.add_path_source('path' => '/path/to/gem')
+ source_list.add_git_source("uri" => "git://host/path.git")
+ source_list.add_path_source("path" => "/path/to/gem")
expect(source_list.rubygems_sources).to eq [rubygems_aggregate]
end
it "returns rubygems sources in the reverse order that they were added" do
- source_list.add_git_source('uri' => 'git://third-git.org/path.git')
- source_list.add_rubygems_source('remotes' => ['https://fifth-rubygems.org'])
- source_list.add_path_source('path' => '/third/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://fourth-rubygems.org'])
- source_list.add_path_source('path' => '/second/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://third-rubygems.org'])
- source_list.add_git_source('uri' => 'git://second-git.org/path.git')
- source_list.add_rubygems_source('remotes' => ['https://second-rubygems.org'])
- source_list.add_path_source('path' => '/first/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://first-rubygems.org'])
- source_list.add_git_source('uri' => 'git://first-git.org/path.git')
+ source_list.add_git_source("uri" => "git://third-git.org/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://fifth-rubygems.org"])
+ source_list.add_path_source("path" => "/third/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://fourth-rubygems.org"])
+ source_list.add_path_source("path" => "/second/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://third-rubygems.org"])
+ source_list.add_git_source("uri" => "git://second-git.org/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://second-rubygems.org"])
+ source_list.add_path_source("path" => "/first/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://first-rubygems.org"])
+ source_list.add_git_source("uri" => "git://first-git.org/path.git")
expect(source_list.rubygems_sources).to eq [
- Bundler::Source::Rubygems.new('remotes' => ['https://first-rubygems.org']),
- Bundler::Source::Rubygems.new('remotes' => ['https://second-rubygems.org']),
- Bundler::Source::Rubygems.new('remotes' => ['https://third-rubygems.org']),
- Bundler::Source::Rubygems.new('remotes' => ['https://fourth-rubygems.org']),
- Bundler::Source::Rubygems.new('remotes' => ['https://fifth-rubygems.org']),
+ Bundler::Source::Rubygems.new("remotes" => ["https://first-rubygems.org"]),
+ Bundler::Source::Rubygems.new("remotes" => ["https://second-rubygems.org"]),
+ Bundler::Source::Rubygems.new("remotes" => ["https://third-rubygems.org"]),
+ Bundler::Source::Rubygems.new("remotes" => ["https://fourth-rubygems.org"]),
+ Bundler::Source::Rubygems.new("remotes" => ["https://fifth-rubygems.org"]),
rubygems_aggregate,
]
end
@@ -246,8 +246,8 @@ describe Bundler::SourceList do
describe "#get" do
context "when it includes an equal source" do
- let(:rubygems_source) { Bundler::Source::Rubygems.new('remotes' => ['https://rubygems.org']) }
- before { @equal_source = source_list.add_rubygems_remote('https://rubygems.org') }
+ let(:rubygems_source) { Bundler::Source::Rubygems.new("remotes" => ["https://rubygems.org"]) }
+ before { @equal_source = source_list.add_rubygems_remote("https://rubygems.org") }
it "returns the equal source" do
expect(source_list.get(rubygems_source)).to be @equal_source
@@ -255,7 +255,7 @@ describe Bundler::SourceList do
end
context "when it does not include an equal source" do
- let(:path_source) { Bundler::Source::Path.new('path' => '/path/to/gem') }
+ let(:path_source) { Bundler::Source::Path.new("path" => "/path/to/gem") }
it "returns nil" do
expect(source_list.get(path_source)).to be_nil
@@ -265,44 +265,44 @@ describe Bundler::SourceList do
describe "#lock_sources" do
it "combines the rubygems sources into a single instance, removing duplicate remotes from the end" do
- source_list.add_git_source('uri' => 'git://third-git.org/path.git')
- source_list.add_rubygems_source('remotes' => ['https://duplicate-rubygems.org'])
- source_list.add_path_source('path' => '/third/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://third-rubygems.org'])
- source_list.add_path_source('path' => '/second/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://second-rubygems.org'])
- source_list.add_git_source('uri' => 'git://second-git.org/path.git')
- source_list.add_rubygems_source('remotes' => ['https://first-rubygems.org'])
- source_list.add_path_source('path' => '/first/path/to/gem')
- source_list.add_rubygems_source('remotes' => ['https://duplicate-rubygems.org'])
- source_list.add_git_source('uri' => 'git://first-git.org/path.git')
+ source_list.add_git_source("uri" => "git://third-git.org/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://duplicate-rubygems.org"])
+ source_list.add_path_source("path" => "/third/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://third-rubygems.org"])
+ source_list.add_path_source("path" => "/second/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://second-rubygems.org"])
+ source_list.add_git_source("uri" => "git://second-git.org/path.git")
+ source_list.add_rubygems_source("remotes" => ["https://first-rubygems.org"])
+ source_list.add_path_source("path" => "/first/path/to/gem")
+ source_list.add_rubygems_source("remotes" => ["https://duplicate-rubygems.org"])
+ source_list.add_git_source("uri" => "git://first-git.org/path.git")
expect(source_list.lock_sources).to eq [
- Bundler::Source::Git.new('uri' => 'git://first-git.org/path.git'),
- Bundler::Source::Git.new('uri' => 'git://second-git.org/path.git'),
- Bundler::Source::Git.new('uri' => 'git://third-git.org/path.git'),
- Bundler::Source::Path.new('path' => '/first/path/to/gem'),
- Bundler::Source::Path.new('path' => '/second/path/to/gem'),
- Bundler::Source::Path.new('path' => '/third/path/to/gem'),
- Bundler::Source::Rubygems.new('remotes' => [
- 'https://duplicate-rubygems.org',
- 'https://first-rubygems.org',
- 'https://second-rubygems.org',
- 'https://third-rubygems.org',
+ Bundler::Source::Git.new("uri" => "git://first-git.org/path.git"),
+ Bundler::Source::Git.new("uri" => "git://second-git.org/path.git"),
+ Bundler::Source::Git.new("uri" => "git://third-git.org/path.git"),
+ Bundler::Source::Path.new("path" => "/first/path/to/gem"),
+ Bundler::Source::Path.new("path" => "/second/path/to/gem"),
+ Bundler::Source::Path.new("path" => "/third/path/to/gem"),
+ Bundler::Source::Rubygems.new("remotes" => [
+ "https://duplicate-rubygems.org",
+ "https://first-rubygems.org",
+ "https://second-rubygems.org",
+ "https://third-rubygems.org",
]),
]
end
end
describe "replace_sources!" do
- let(:existing_locked_source) { Bundler::Source::Path.new('path' => '/existing/path') }
- let(:removed_locked_source) { Bundler::Source::Path.new('path' => '/removed/path') }
+ let(:existing_locked_source) { Bundler::Source::Path.new("path" => "/existing/path") }
+ let(:removed_locked_source) { Bundler::Source::Path.new("path" => "/removed/path") }
let(:locked_sources) { [existing_locked_source, removed_locked_source] }
before do
- @existing_source = source_list.add_path_source('path' => '/existing/path')
- @new_source = source_list.add_path_source('path' => '/new/path')
+ @existing_source = source_list.add_path_source("path" => "/existing/path")
+ @new_source = source_list.add_path_source("path" => "/new/path")
source_list.replace_sources!(locked_sources)
end
@@ -320,9 +320,9 @@ describe Bundler::SourceList do
end
describe "#cached!" do
- let(:rubygems_source) { source_list.add_rubygems_remote('https://rubygems.org') }
- let(:git_source) { source_list.add_git_source('uri' => 'git://host/path.git') }
- let(:path_source) { source_list.add_path_source('path' => '/path/to/gem') }
+ let(:rubygems_source) { source_list.add_rubygems_remote("https://rubygems.org") }
+ let(:git_source) { source_list.add_git_source("uri" => "git://host/path.git") }
+ let(:path_source) { source_list.add_path_source("path" => "/path/to/gem") }
it "calls #cached! on all the sources" do
expect(rubygems_source).to receive(:cached!)
@@ -333,9 +333,9 @@ describe Bundler::SourceList do
end
describe "#remote!" do
- let(:rubygems_source) { source_list.add_rubygems_remote('https://rubygems.org') }
- let(:git_source) { source_list.add_git_source('uri' => 'git://host/path.git') }
- let(:path_source) { source_list.add_path_source('path' => '/path/to/gem') }
+ let(:rubygems_source) { source_list.add_rubygems_remote("https://rubygems.org") }
+ let(:git_source) { source_list.add_git_source("uri" => "git://host/path.git") }
+ let(:path_source) { source_list.add_path_source("path" => "/path/to/gem") }
it "calls #remote! on all the sources" do
expect(rubygems_source).to receive(:remote!)
diff --git a/spec/cache/gems_spec.rb b/spec/cache/gems_spec.rb
index dd7d9c0e5f..3d9651bf20 100644
--- a/spec/cache/gems_spec.rb
+++ b/spec/cache/gems_spec.rb
@@ -16,7 +16,7 @@ describe "bundle cache" do
end
it "uses the cache as a source when installing gems" do
- build_gem "omg", :path => bundled_app('vendor/cache')
+ build_gem "omg", :path => bundled_app("vendor/cache")
install_gemfile <<-G
source "file://#{gem_repo1}"
@@ -34,7 +34,7 @@ describe "bundle cache" do
end
it "does not reinstall gems from the cache if they exist on the system" do
- build_gem "rack", "1.0.0", :path => bundled_app('vendor/cache') do |s|
+ build_gem "rack", "1.0.0", :path => bundled_app("vendor/cache") do |s|
s.write "lib/rack.rb", "RACK = 'FAIL'"
end
@@ -52,7 +52,7 @@ describe "bundle cache" do
gem "rack"
G
- build_gem "rack", "1.0.0", :path => bundled_app('vendor/cache') do |s|
+ build_gem "rack", "1.0.0", :path => bundled_app("vendor/cache") do |s|
s.write "lib/rack.rb", "RACK = 'FAIL'"
end
@@ -104,7 +104,7 @@ describe "bundle cache" do
end
it "doesn't make remote request after caching the gem" do
- build_gem "builtin_gem_2", "1.0.2", :path => bundled_app('vendor/cache') do |s|
+ build_gem "builtin_gem_2", "1.0.2", :path => bundled_app("vendor/cache") do |s|
s.summary = "This builtin_gem is bundled with Ruby"
end
@@ -173,7 +173,7 @@ describe "bundle cache" do
it "adds and removes when gems are updated" do
update_repo2
- bundle 'update'
+ bundle "update"
expect(cached_gem("rack-1.2")).to exist
expect(cached_gem("rack-1.0.0")).not_to exist
end
@@ -234,7 +234,7 @@ describe "bundle cache" do
it "doesn't remove gems with mismatched :rubygems_version or :date" do
cached_gem("rack-1.0.0").rmtree
build_gem "rack", "1.0.0",
- :path => bundled_app('vendor/cache'),
+ :path => bundled_app("vendor/cache"),
:rubygems_version => "1.3.2"
simulate_new_machine
@@ -244,7 +244,7 @@ describe "bundle cache" do
it "handles directories and non .gem files in the cache" do
bundled_app("vendor/cache/foo").mkdir
- File.open(bundled_app("vendor/cache/bar"), 'w'){|f| f.write("not a gem") }
+ File.open(bundled_app("vendor/cache/bar"), "w"){|f| f.write("not a gem") }
bundle :cache
end
@@ -269,7 +269,7 @@ describe "bundle cache" do
it "should install gems with the name bundler in them (that aren't bundler)" do
build_gem "foo-bundler", "1.0",
- :path => bundled_app('vendor/cache')
+ :path => bundled_app("vendor/cache")
install_gemfile <<-G
gem "foo-bundler"
diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb
index 45061e6ea9..3ac19f6bc5 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"
@@ -122,13 +122,13 @@ end
s.add_dependency "submodule"
end
- Dir.chdir(lib_path('has_submodule-1.0')) do
- `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
+ Dir.chdir(lib_path("has_submodule-1.0")) do
+ `git submodule add #{lib_path("submodule-1.0")} submodule-1.0`
`git commit -m "submodulator"`
end
install_gemfile <<-G
- git "#{lib_path('has_submodule-1.0')}", :submodules => true do
+ git "#{lib_path("has_submodule-1.0")}", :submodules => true do
gem "has_submodule"
end
G
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb
index 284913a354..422297e3ae 100644
--- a/spec/commands/binstubs_spec.rb
+++ b/spec/commands/binstubs_spec.rb
@@ -68,7 +68,7 @@ describe "bundle binstubs <gem>" do
s.executables = %w(foo)
end
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
G
bundle "binstubs foo"
@@ -83,7 +83,7 @@ describe "bundle binstubs <gem>" do
s.executables = %w(foo)
end
install_gemfile <<-G
- gem "foo", :path => "#{lib_path('foo')}"
+ gem "foo", :path => "#{lib_path("foo")}"
G
bundle "binstubs foo"
@@ -147,7 +147,7 @@ describe "bundle binstubs <gem>" do
context "when the bin already exists" do
it "doesn't overwrite and warns" do
FileUtils.mkdir_p(bundled_app("bin"))
- File.open(bundled_app("bin/rackup"), 'wb') do |file|
+ File.open(bundled_app("bin/rackup"), "wb") do |file|
file.print "OMG"
end
@@ -167,7 +167,7 @@ describe "bundle binstubs <gem>" do
context "when using --force" do
it "overwrites the binstub" do
FileUtils.mkdir_p(bundled_app("bin"))
- File.open(bundled_app("bin/rackup"), 'wb') do |file|
+ File.open(bundled_app("bin/rackup"), "wb") do |file|
file.print "OMG"
end
@@ -192,8 +192,8 @@ describe "bundle binstubs <gem>" do
G
bundle "binstubs rack-obama"
- expect(out).to include('rack-obama has no executables')
- expect(out).to include('rack has: rackup')
+ expect(out).to include("rack-obama has no executables")
+ expect(out).to include("rack has: rackup")
end
it "works if child gems don't have bins" do
@@ -203,7 +203,7 @@ describe "bundle binstubs <gem>" do
G
bundle "binstubs actionpack"
- expect(out).to include('no executables for the gem actionpack')
+ expect(out).to include("no executables for the gem actionpack")
end
it "works if the gem has development dependencies" do
@@ -213,7 +213,7 @@ describe "bundle binstubs <gem>" do
G
bundle "binstubs with_development_dependency"
- expect(out).to include('no executables for the gem with_development_dependency')
+ expect(out).to include("no executables for the gem with_development_dependency")
end
end
@@ -226,7 +226,7 @@ describe "bundle binstubs <gem>" do
bundle "config auto_install 1"
bundle "binstubs rack"
- expect(out).to include('Installing rack 1.0.0')
+ expect(out).to include("Installing rack 1.0.0")
should_be_installed "rack 1.0.0"
end
@@ -238,7 +238,7 @@ describe "bundle binstubs <gem>" do
bundle "config auto_install 1"
bundle "binstubs rack", :env => { "BUNDLE_INSTALL" => 1 }
- expect(out).not_to include('Installing rack 1.0.0')
+ expect(out).not_to include("Installing rack 1.0.0")
end
end
end
diff --git a/spec/commands/check_spec.rb b/spec/commands/check_spec.rb
index 6cd2160641..1bd697f8aa 100644
--- a/spec/commands/check_spec.rb
+++ b/spec/commands/check_spec.rb
@@ -259,7 +259,7 @@ describe "bundle check" do
gem "rails"
G
- bundle 'check --path vendor/bundle'
+ bundle "check --path vendor/bundle"
expect(exitstatus).to eq(1) if exitstatus
expect(out).to match(/The following gems are missing/)
end
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
index 529c245912..f3f1bbee3a 100644
--- a/spec/commands/clean_spec.rb
+++ b/spec/commands/clean_spec.rb
@@ -38,8 +38,8 @@ describe "bundle clean" do
expect(out).to eq("Removing foo (1.0)")
- should_have_gems 'thin-1.0', 'rack-1.0.0'
- should_not_have_gems 'foo-1.0'
+ should_have_gems "thin-1.0", "rack-1.0.0"
+ should_not_have_gems "foo-1.0"
expect(vendored_gems("bin/rackup")).to exist
end
@@ -66,8 +66,8 @@ describe "bundle clean" do
expect(out).to eq("Removing rack (0.9.1)")
- should_have_gems 'foo-1.0', 'rack-1.0.0'
- should_not_have_gems 'rack-0.9.1'
+ should_have_gems "foo-1.0", "rack-1.0.0"
+ should_not_have_gems "rack-0.9.1"
expect(vendored_gems("bin/rackup")).to exist
end
@@ -94,8 +94,8 @@ describe "bundle clean" do
expect(out).to eq("Removing rack (1.0.0)")
- should_have_gems 'foo-1.0', 'rack-0.9.1'
- should_not_have_gems 'rack-1.0.0'
+ should_have_gems "foo-1.0", "rack-0.9.1"
+ should_not_have_gems "rack-1.0.0"
expect(vendored_gems("bin/rackup")).to exist
end
@@ -117,8 +117,8 @@ describe "bundle clean" do
expect(out).to eq("Removing rack (1.0.0)")
- should_have_gems 'foo-1.0'
- should_not_have_gems 'rack-1.0.0'
+ should_have_gems "foo-1.0"
+ should_not_have_gems "rack-1.0.0"
expect(vendored_gems("bin/rackup")).to_not exist
end
@@ -126,7 +126,7 @@ describe "bundle clean" do
it "does not remove cached git dir if it's being used" do
build_git "foo"
revision = revision_for(lib_path("foo-1.0"))
- git_path = lib_path('foo-1.0')
+ git_path = lib_path("foo-1.0")
gemfile <<-G
source "file://#{gem_repo1}"
@@ -147,7 +147,7 @@ describe "bundle clean" do
it "removes unused git gems" do
build_git "foo", :path => lib_path("foo")
- git_path = lib_path('foo')
+ git_path = lib_path("foo")
revision = revision_for(git_path)
gemfile <<-G
@@ -190,7 +190,7 @@ describe "bundle clean" do
source "file://#{gem_repo1}"
gem "rack", "1.0.0"
- git "#{lib_path('foo-bar')}" do
+ git "#{lib_path("foo-bar")}" do
gem "foo-bar"
end
G
@@ -222,7 +222,7 @@ describe "bundle clean" do
revision = revision_for(lib_path("rails"))
gemfile <<-G
- gem "activesupport", :git => "#{lib_path('rails')}", :ref => '#{revision}'
+ gem "activesupport", :git => "#{lib_path("rails")}", :ref => '#{revision}'
G
bundle "install --path vendor/bundle"
@@ -234,7 +234,7 @@ describe "bundle clean" do
it "does not remove git sources that are in without groups" do
build_git "foo", :path => lib_path("foo")
- git_path = lib_path('foo')
+ git_path = lib_path("foo")
revision = revision_for(git_path)
gemfile <<-G
@@ -311,8 +311,8 @@ describe "bundle clean" do
bundle :clean
- should_not_have_gems 'thin-1.0', 'rack-1.0'
- should_have_gems 'foo-1.0'
+ should_not_have_gems "thin-1.0", "rack-1.0"
+ should_have_gems "foo-1.0"
expect(vendored_gems("bin/rackup")).not_to exist
end
@@ -354,8 +354,8 @@ describe "bundle clean" do
G
bundle "install"
- should_have_gems 'rack-1.0.0'
- should_not_have_gems 'thin-1.0'
+ should_have_gems "rack-1.0.0"
+ should_not_have_gems "thin-1.0"
end
it "--clean should override the bundle setting on update" do
@@ -369,13 +369,13 @@ describe "bundle clean" do
bundle "install --path vendor/bundle --clean"
update_repo2 do
- build_gem 'foo', '1.0.1'
+ build_gem "foo", "1.0.1"
end
bundle "update"
- should_have_gems 'foo-1.0.1'
- should_not_have_gems 'foo-1.0'
+ should_have_gems "foo-1.0.1"
+ should_not_have_gems "foo-1.0"
end
it "does not clean automatically on --path" do
@@ -394,7 +394,7 @@ describe "bundle clean" do
G
bundle "install"
- should_have_gems 'rack-1.0.0', 'thin-1.0'
+ should_have_gems "rack-1.0.0", "thin-1.0"
end
it "does not clean on bundle update with --path" do
@@ -408,11 +408,11 @@ describe "bundle clean" do
bundle "install --path vendor/bundle"
update_repo2 do
- build_gem 'foo', '1.0.1'
+ build_gem "foo", "1.0.1"
end
bundle :update
- should_have_gems 'foo-1.0', 'foo-1.0.1'
+ should_have_gems "foo-1.0", "foo-1.0.1"
end
it "does not clean on bundle update when using --system" do
@@ -426,7 +426,7 @@ describe "bundle clean" do
bundle "install"
update_repo2 do
- build_gem 'foo', '1.0.1'
+ build_gem "foo", "1.0.1"
end
bundle :update
@@ -464,17 +464,17 @@ describe "bundle clean" do
gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
bundle "install --path vendor/bundle"
# mimic 7 length git revisions in Gemfile.lock
- gemfile_lock = File.read(bundled_app('Gemfile.lock')).split("\n")
+ gemfile_lock = File.read(bundled_app("Gemfile.lock")).split("\n")
gemfile_lock.each_with_index do |line, index|
gemfile_lock[index] = line[0..(11 + 7)] if line.include?(" revision:")
end
- File.open(bundled_app('Gemfile.lock'), 'w') do |file|
+ File.open(bundled_app("Gemfile.lock"), "w") do |file|
file.print gemfile_lock.join("\n")
end
@@ -490,7 +490,7 @@ describe "bundle clean" do
it "when using --force on system gems, it doesn't remove binaries" do
build_repo2
update_repo2 do
- build_gem 'bindir' do |s|
+ build_gem "bindir" do |s|
s.bindir = "exe"
s.executables = "foo"
end
@@ -515,7 +515,7 @@ describe "bundle clean" do
relative_path = "vendor/private_gems/bar-1.0"
absolute_path = bundled_app(relative_path)
FileUtils.mkdir_p("#{absolute_path}/lib/bar")
- File.open("#{absolute_path}/lib/bar/bar.rb", 'wb') do |file|
+ File.open("#{absolute_path}/lib/bar/bar.rb", "wb") do |file|
file.puts "module Bar; end"
end
@@ -555,7 +555,7 @@ describe "bundle clean" do
expect(out).not_to eq("Removing foo (1.0)")
expect(out).to eq("Would have removed foo (1.0)")
- should_have_gems 'thin-1.0', 'rack-1.0.0', 'foo-1.0'
+ should_have_gems "thin-1.0", "rack-1.0.0", "foo-1.0"
expect(vendored_gems("bin/rackup")).to exist
end
@@ -584,8 +584,8 @@ describe "bundle clean" do
expect(out).to eq("Removing foo (1.0)")
expect(out).not_to eq("Would have removed foo (1.0)")
- should_have_gems 'thin-1.0', 'rack-1.0.0'
- should_not_have_gems 'foo-1.0'
+ should_have_gems "thin-1.0", "rack-1.0.0"
+ should_not_have_gems "foo-1.0"
expect(vendored_gems("bin/rackup")).to exist
end
@@ -609,8 +609,8 @@ describe "bundle clean" do
bundle "config auto_install 1"
bundle :clean
- expect(out).to include('Installing weakling 0.0.3')
- should_have_gems 'thin-1.0', 'rack-1.0.0', 'weakling-0.0.3'
- should_not_have_gems 'foo-1.0'
+ expect(out).to include("Installing weakling 0.0.3")
+ should_have_gems "thin-1.0", "rack-1.0.0", "weakling-0.0.3"
+ should_not_have_gems "foo-1.0"
end
end
diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb
index 2d762ff998..33134bef0c 100644
--- a/spec/commands/config_spec.rb
+++ b/spec/commands/config_spec.rb
@@ -10,19 +10,19 @@ describe ".bundle/config" do
describe "BUNDLE_APP_CONFIG" do
it "can be moved with an environment variable" do
- ENV['BUNDLE_APP_CONFIG'] = tmp('foo/bar').to_s
+ ENV["BUNDLE_APP_CONFIG"] = tmp("foo/bar").to_s
bundle "install --path vendor/bundle"
- expect(bundled_app('.bundle')).not_to exist
- expect(tmp('foo/bar/config')).to exist
+ expect(bundled_app(".bundle")).not_to exist
+ expect(tmp("foo/bar/config")).to exist
should_be_installed "rack 1.0.0"
end
it "can provide a relative path with the environment variable" do
- FileUtils.mkdir_p bundled_app('omg')
- Dir.chdir bundled_app('omg')
+ FileUtils.mkdir_p bundled_app("omg")
+ Dir.chdir bundled_app("omg")
- ENV['BUNDLE_APP_CONFIG'] = "../foo"
+ ENV["BUNDLE_APP_CONFIG"] = "../foo"
bundle "install --path vendor/bundle"
expect(bundled_app(".bundle")).not_to exist
@@ -31,12 +31,12 @@ describe ".bundle/config" do
end
it "removes environment.rb from BUNDLE_APP_CONFIG's path" do
- FileUtils.mkdir_p(tmp('foo/bar'))
- ENV['BUNDLE_APP_CONFIG'] = tmp('foo/bar').to_s
+ FileUtils.mkdir_p(tmp("foo/bar"))
+ ENV["BUNDLE_APP_CONFIG"] = tmp("foo/bar").to_s
bundle "install"
- FileUtils.touch tmp('foo/bar/environment.rb')
+ FileUtils.touch tmp("foo/bar/environment.rb")
should_be_installed "rack 1.0.0"
- expect(tmp('foo/bar/environment.rb')).not_to exist
+ expect(tmp("foo/bar/environment.rb")).not_to exist
end
end
@@ -232,7 +232,7 @@ E
it "doesn't duplicate quotes around values", :if => (RUBY_VERSION >= "2.1") do
bundled_app(".bundle").mkpath
- File.open(bundled_app(".bundle/config"), 'w') do |f|
+ File.open(bundled_app(".bundle/config"), "w") do |f|
f.write 'BUNDLE_FOO: "$BUILD_DIR"'
end
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index d613851843..dbaed9bcf7 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -28,7 +28,7 @@ describe "bundle exec" do
gem "rack"
G
- bundle "exec 'cd #{tmp('gems')} && rackup'"
+ bundle "exec 'cd #{tmp("gems")} && rackup'"
expect(out).to eq("1.0.0")
end
@@ -58,9 +58,9 @@ describe "bundle exec" do
end
it "handles --keep-file-descriptors" do
- require 'tempfile'
+ require "tempfile"
- bundle_bin = File.expand_path('../../../exe/bundle', __FILE__)
+ bundle_bin = File.expand_path("../../../exe/bundle", __FILE__)
command = Tempfile.new("io-test")
command.sync = true
@@ -76,7 +76,7 @@ describe "bundle exec" do
end
G
- install_gemfile ''
+ install_gemfile ""
sys_exec("#{Gem.ruby} #{command.path}")
if Bundler.current_ruby.ruby_2?
@@ -89,7 +89,7 @@ describe "bundle exec" do
end
it "accepts --keep-file-descriptors" do
- install_gemfile ''
+ install_gemfile ""
bundle "exec --keep-file-descriptors echo foobar"
expect(err).to eq("")
@@ -97,12 +97,12 @@ describe "bundle exec" do
it "can run a command named --verbose" do
install_gemfile 'gem "rack"'
- File.open("--verbose", 'w') do |f|
+ File.open("--verbose", "w") do |f|
f.puts "#!/bin/sh"
f.puts "echo foobar"
end
File.chmod(0744, "--verbose")
- ENV['PATH'] = "."
+ ENV["PATH"] = "."
bundle "exec -- --verbose"
expect(out).to eq("foobar")
end
@@ -120,7 +120,7 @@ describe "bundle exec" do
G
Dir.chdir bundled_app2 do
- install_gemfile bundled_app2('Gemfile'), <<-G
+ install_gemfile bundled_app2("Gemfile"), <<-G
source "file://#{gem_repo2}"
gem "rack_two", "1.0.0"
G
@@ -158,7 +158,7 @@ describe "bundle exec" do
gem "rack"
G
- rubyopt = ENV['RUBYOPT']
+ rubyopt = ENV["RUBYOPT"]
rubyopt = "-rbundler/setup #{rubyopt}"
bundle "exec 'echo $RUBYOPT'"
@@ -173,7 +173,7 @@ describe "bundle exec" do
gem "rack"
G
- rubylib = ENV['RUBYLIB']
+ rubylib = ENV["RUBYLIB"]
rubylib = "#{rubylib}".split(File::PATH_SEPARATOR).unshift "#{bundler_path}"
rubylib = rubylib.uniq.join(File::PATH_SEPARATOR)
@@ -225,13 +225,13 @@ describe "bundle exec" do
end
it "works when unlocked" do
- bundle "exec 'cd #{tmp('gems')} && rackup'"
+ bundle "exec 'cd #{tmp("gems")} && rackup'"
expect(out).to eq("1.0.0")
end
it "works when locked" do
should_be_locked
- bundle "exec 'cd #{tmp('gems')} && rackup'"
+ bundle "exec 'cd #{tmp("gems")} && rackup'"
expect(out).to eq("1.0.0")
end
end
@@ -267,7 +267,7 @@ describe "bundle exec" do
end
install_gemfile <<-G
- gem "fizz_git", :git => "#{lib_path('fizz_git-1.0')}"
+ gem "fizz_git", :git => "#{lib_path("fizz_git-1.0")}"
G
end
@@ -290,7 +290,7 @@ describe "bundle exec" do
end
install_gemfile <<-G
- gem "fizz_no_gemspec", "1.0", :git => "#{lib_path('fizz_no_gemspec-1.0')}"
+ gem "fizz_no_gemspec", "1.0", :git => "#{lib_path("fizz_no_gemspec-1.0")}"
G
end
diff --git a/spec/commands/init_spec.rb b/spec/commands/init_spec.rb
index 696709ca12..33b21a3630 100644
--- a/spec/commands/init_spec.rb
+++ b/spec/commands/init_spec.rb
@@ -17,8 +17,8 @@ describe "bundle init" do
end
it "should generate from an existing gemspec" do
- spec_file = tmp.join('test.gemspec')
- File.open(spec_file, 'w') do |file|
+ spec_file = tmp.join("test.gemspec")
+ File.open(spec_file, "w") do |file|
file << <<-S
Gem::Specification.new do |s|
s.name = 'test'
diff --git a/spec/commands/inject_spec.rb b/spec/commands/inject_spec.rb
index 2737b1a4c7..4aed64d633 100644
--- a/spec/commands/inject_spec.rb
+++ b/spec/commands/inject_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "bundle inject" do
before :each do
diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb
index ec5df3dad3..2e1a206f21 100644
--- a/spec/commands/install_spec.rb
+++ b/spec/commands/install_spec.rb
@@ -27,16 +27,16 @@ describe "bundle install with gem sources" do
gem "rack"
G
- expect(bundled_app('Gemfile.lock')).to exist
+ expect(bundled_app("Gemfile.lock")).to exist
end
it "creates lock files based on the Gemfile name" do
- gemfile bundled_app('OmgFile'), <<-G
+ gemfile bundled_app("OmgFile"), <<-G
source "file://#{gem_repo1}"
gem "rack", "1.0"
G
- bundle 'install --gemfile OmgFile'
+ bundle "install --gemfile OmgFile"
expect(bundled_app("OmgFile.lock")).to exist
end
@@ -62,7 +62,7 @@ describe "bundle install with gem sources" do
gem "rack"
G
- expect { run '1' }.not_to change { File.mtime(bundled_app('Gemfile.lock')) }
+ expect { run "1" }.not_to change { File.mtime(bundled_app("Gemfile.lock")) }
end
it "fetches gems" do
@@ -185,7 +185,7 @@ describe "bundle install with gem sources" do
end
it "prioritizes local gems over remote gems" do
- build_gem 'rack', '1.0.0', :to_system => true do |s|
+ build_gem "rack", "1.0.0", :to_system => true do |s|
s.add_dependency "activesupport", "2.3.5"
end
@@ -351,9 +351,9 @@ describe "bundle install with gem sources" do
it "doesn't blow up" do
build_lib "foo"
gemfile = <<-G
- gem 'foo', :path => "#{lib_path('foo-1.0')}"
+ gem 'foo', :path => "#{lib_path("foo-1.0")}"
G
- File.open('Gemfile', 'w') do |file|
+ File.open("Gemfile", "w") do |file|
file.puts gemfile
end
diff --git a/spec/commands/lock_spec.rb b/spec/commands/lock_spec.rb
index 86290c40b6..0e916cdd1a 100644
--- a/spec/commands/lock_spec.rb
+++ b/spec/commands/lock_spec.rb
@@ -2,7 +2,7 @@ require "spec_helper"
describe "bundle lock" do
def strip_lockfile(lockfile)
- strip_whitespace(lockfile).sub(/\n\Z/, '')
+ strip_whitespace(lockfile).sub(/\n\Z/, "")
end
def read_lockfile(file = "Gemfile.lock")
@@ -74,7 +74,7 @@ describe "bundle lock" do
end
it "writes a lockfile when there is an outdated lockfile using --update" do
- lockfile @lockfile.gsub('2.3.2', '2.3.1')
+ lockfile @lockfile.gsub("2.3.2", "2.3.1")
bundle "lock --update"
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb
index a35c7ffcf7..e648366614 100644
--- a/spec/commands/newgem_spec.rb
+++ b/spec/commands/newgem_spec.rb
@@ -55,7 +55,7 @@ describe "bundle gem" do
in_app_root
bundle "gem newgem --bin"
- process_file(bundled_app('newgem', "newgem.gemspec")) do |line|
+ process_file(bundled_app("newgem", "newgem.gemspec")) do |line|
# Simulate replacing TODOs with real values
case line
when /spec\.metadata\['allowed_push_host'\]/, /spec\.homepage/
@@ -66,13 +66,13 @@ describe "bundle gem" do
line.gsub(/\=.*$/, "= %q{A longer description of my new gem.}")
# Remove exception that prevents public pushes on older RubyGems versions
when /raise "RubyGems 2.0 or newer/
- line.gsub(/.*/, '') if Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.0")
+ line.gsub(/.*/, "") if Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.0")
else
line
end
end
- Dir.chdir(bundled_app('newgem')) do
+ Dir.chdir(bundled_app("newgem")) do
bundle "exec rake build"
end
@@ -88,25 +88,25 @@ describe "bundle gem" do
end
it "resolves ." do
- create_temporary_dir('tmp')
+ create_temporary_dir("tmp")
- bundle 'gem .'
+ bundle "gem ."
expect(bundled_app("tmp/lib/tmp.rb")).to exist
end
it "resolves .." do
- create_temporary_dir('temp/empty_dir')
+ create_temporary_dir("temp/empty_dir")
- bundle 'gem ..'
+ bundle "gem .."
expect(bundled_app("temp/lib/temp.rb")).to exist
end
it "resolves relative directory" do
- create_temporary_dir('tmp/empty/tmp')
+ create_temporary_dir("tmp/empty/tmp")
- bundle 'gem ../../empty'
+ bundle "gem ../../empty"
expect(bundled_app("tmp/empty/lib/empty.rb")).to exist
end
@@ -118,7 +118,7 @@ describe "bundle gem" do
end
context "gem naming with underscore" do
- let(:gem_name) { 'test_gem' }
+ let(:gem_name) { "test_gem" }
before do
bundle "gem #{gem_name}"
@@ -168,7 +168,7 @@ describe "bundle gem" do
end
it "sets gemspec metadata['allowed_push_host']", :rubygems => "2.0" do
- expect(generated_gem.gemspec.metadata['allowed_push_host']).
+ expect(generated_gem.gemspec.metadata["allowed_push_host"]).
to match(/mygemserver\.com/)
end
@@ -184,7 +184,7 @@ describe "bundle gem" do
puts 'SUCCESS'
end
RAKEFILE
- File.open(bundled_app("test_gem/Rakefile"), 'w') do |file|
+ File.open(bundled_app("test_gem/Rakefile"), "w") do |file|
file.puts rakefile
end
@@ -331,7 +331,7 @@ describe "bundle gem" do
end
context "with --mit option" do
- let(:gem_name) { 'test-gem' }
+ let(:gem_name) { "test-gem" }
before do
bundle "gem #{gem_name} --mit"
@@ -354,7 +354,7 @@ describe "bundle gem" do
end
context "with --coc option" do
- let(:gem_name) { 'test-gem' }
+ let(:gem_name) { "test-gem" }
before do
bundle "gem #{gem_name} --coc"
@@ -373,7 +373,7 @@ describe "bundle gem" do
end
context "gem naming with dashed" do
- let(:gem_name) { 'test-gem' }
+ let(:gem_name) { "test-gem" }
before do
bundle "gem #{gem_name}"
@@ -429,7 +429,7 @@ describe "bundle gem" do
puts 'SUCCESS'
end
RAKEFILE
- File.open(bundled_app("test-gem/Rakefile"), 'w') do |file|
+ File.open(bundled_app("test-gem/Rakefile"), "w") do |file|
file.puts rakefile
end
diff --git a/spec/commands/open_spec.rb b/spec/commands/open_spec.rb
index 67ee40cfe5..1880ae3063 100644
--- a/spec/commands/open_spec.rb
+++ b/spec/commands/open_spec.rb
@@ -10,17 +10,17 @@ describe "bundle open" do
it "opens the gem with BUNDLER_EDITOR as highest priority" do
bundle "open rails", :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => "echo bundler_editor"}
- expect(out).to eq("bundler_editor #{default_bundle_path('gems', 'rails-2.3.2')}")
+ expect(out).to eq("bundler_editor #{default_bundle_path("gems", "rails-2.3.2")}")
end
it "opens the gem with VISUAL as 2nd highest priority" do
bundle "open rails", :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => ""}
- expect(out).to eq("visual #{default_bundle_path('gems', 'rails-2.3.2')}")
+ expect(out).to eq("visual #{default_bundle_path("gems", "rails-2.3.2")}")
end
it "opens the gem with EDITOR as 3rd highest priority" do
bundle "open rails", :env => {"EDITOR" => "echo editor", "VISUAL" => "", "BUNDLER_EDITOR" => ""}
- expect(out).to eq("editor #{default_bundle_path('gems', 'rails-2.3.2')}")
+ expect(out).to eq("editor #{default_bundle_path("gems", "rails-2.3.2")}")
end
it "complains if no EDITOR is set" do
@@ -54,13 +54,13 @@ describe "bundle open" do
it "opens the gem with short words" do
bundle "open rec" , :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => "echo bundler_editor"}
- expect(out).to eq("bundler_editor #{default_bundle_path('gems', 'activerecord-2.3.2')}")
+ expect(out).to eq("bundler_editor #{default_bundle_path("gems", "activerecord-2.3.2")}")
end
it "select the gem from many match gems" do
env = {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => "echo bundler_editor"}
bundle "open active" , :env => env do |input|
- input.puts '2'
+ input.puts "2"
end
expect(out).to match(/bundler_editor #{default_bundle_path('gems', 'activerecord-2.3.2')}\z/)
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index fe3508ad70..0b47cba1a7 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -9,8 +9,8 @@ describe "bundle outdated" do
install_gemfile <<-G
source "file://#{gem_repo2}"
- gem "zebra", :git => "#{lib_path('zebra')}"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "zebra", :git => "#{lib_path("zebra")}"
+ gem "foo", :git => "#{lib_path("foo")}"
gem "activesupport", "2.3.5"
gem "weakling", "~> 0.0.1"
G
diff --git a/spec/commands/package_spec.rb b/spec/commands/package_spec.rb
index d87ebc56bf..d890afc995 100644
--- a/spec/commands/package_spec.rb
+++ b/spec/commands/package_spec.rb
@@ -10,7 +10,7 @@ describe "bundle package" do
bundle "package --gemfile=NotGemfile"
- ENV['BUNDLE_GEMFILE'] = "NotGemfile"
+ ENV["BUNDLE_GEMFILE"] = "NotGemfile"
should_be_installed "rack 1.0.0"
end
end
@@ -22,7 +22,7 @@ describe "bundle package" do
gem 'rack'
D
- bundle "package --path=#{bundled_app('test')}"
+ bundle "package --path=#{bundled_app("test")}"
should_be_installed "rack 1.0.0"
expect(bundled_app("test/vendor/cache/")).to exist
@@ -95,7 +95,7 @@ describe "bundle install with gem sources" do
G
bundle :pack
- build_gem "rack", "1.0.0", :path => bundled_app('vendor/cache') do |s|
+ build_gem "rack", "1.0.0", :path => bundled_app("vendor/cache") do |s|
s.write "lib/rack.rb", "raise 'omg'"
end
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 18105541c7..1e24f11347 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -27,7 +27,7 @@ describe "bundle show" do
it "prints path if gem exists in bundle" do
bundle "show rails"
- expect(out).to eq(default_bundle_path('gems', 'rails-2.3.2').to_s)
+ expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
end
it "warns if path no longer exists on disk" do
@@ -36,12 +36,12 @@ describe "bundle show" do
bundle "show rails"
expect(out).to match(/has been deleted/i)
- expect(out).to include(default_bundle_path('gems', 'rails-2.3.2').to_s)
+ expect(out).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
end
it "prints the path to the running bundler" do
bundle "show bundler"
- expect(out).to eq(File.expand_path('../../../', __FILE__))
+ expect(out).to eq(File.expand_path("../../../", __FILE__))
end
it "complains if gem not in bundle" do
@@ -52,11 +52,11 @@ describe "bundle show" do
it "prints path of all gems in bundle sorted by name" do
bundle "show --paths"
- expect(out).to include(default_bundle_path('gems', 'rake-10.0.2').to_s)
- expect(out).to include(default_bundle_path('gems', 'rails-2.3.2').to_s)
+ expect(out).to include(default_bundle_path("gems", "rake-10.0.2").to_s)
+ expect(out).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
# Gem names are the last component of their path.
- gem_list = out.split.map { |p| p.split('/').last }
+ gem_list = out.split.map { |p| p.split("/").last }
expect(gem_list).to eq(gem_list.sort)
end
@@ -77,12 +77,12 @@ describe "bundle show" do
it "prints out git info" do
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
should_be_installed "foo 1.0"
bundle :show
- expect(out).to include("foo (1.0 #{@git.ref_for('master', 6)}")
+ expect(out).to include("foo (1.0 #{@git.ref_for("master", 6)}")
end
it "prints out branch names other than master" do
@@ -92,18 +92,18 @@ describe "bundle show" do
@revision = revision_for(lib_path("foo-1.0"))[0...6]
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}", :branch => "omg"
+ gem "foo", :git => "#{lib_path("foo-1.0")}", :branch => "omg"
G
should_be_installed "foo 1.0.omg"
bundle :show
- expect(out).to include("foo (1.0 #{@git.ref_for('omg', 6)}")
+ expect(out).to include("foo (1.0 #{@git.ref_for("omg", 6)}")
end
it "doesn't print the branch when tied to a ref" do
sha = revision_for(lib_path("foo-1.0"))
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}", :ref => "#{sha}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}", :ref => "#{sha}"
G
bundle :show
@@ -115,8 +115,8 @@ describe "bundle show" do
before :each do
build_git "foo", :path => lib_path("foo")
in_app_root_custom lib_path("foo")
- File.open('Gemfile', 'w') {|f| f.puts "gemspec" }
- sys_exec 'rm -rf .git && git init'
+ File.open("Gemfile", "w") {|f| f.puts "gemspec" }
+ sys_exec "rm -rf .git && git init"
end
it "does not output git errors" do
@@ -143,7 +143,7 @@ describe "bundle show" do
gem "rails"
G
- invalid_regexp = '[]'
+ invalid_regexp = "[]"
bundle "show #{invalid_regexp}"
expect(out).to include("Could not find gem '#{invalid_regexp}'.")
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index 4989bcfd5f..2f3e41b67e 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -125,7 +125,7 @@ describe "bundle update in more complicated situations" do
G
update_repo2 do
- build_gem "thin" , '2.0' do |s|
+ build_gem "thin" , "2.0" do |s|
s.add_dependency "rack"
end
end
diff --git a/spec/install/binstubs_spec.rb b/spec/install/binstubs_spec.rb
index e35611696c..6442ad74cb 100644
--- a/spec/install/binstubs_spec.rb
+++ b/spec/install/binstubs_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "bundle install" do
describe "when system_bindir is set" do
@@ -13,7 +13,7 @@ describe "bundle install" do
gem "rack"
G
- config "BUNDLE_SYSTEM_BINDIR" => system_gem_path('altbin').to_s
+ config "BUNDLE_SYSTEM_BINDIR" => system_gem_path("altbin").to_s
bundle :install
should_be_installed "rack 1.0.0"
expect(system_gem_path("altbin/rackup")).to exist
diff --git a/spec/install/bundler_spec.rb b/spec/install/bundler_spec.rb
index 71bb1c165f..930d7095fc 100644
--- a/spec/install/bundler_spec.rb
+++ b/spec/install/bundler_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "bundle install" do
describe "with bundler dependencies" do
@@ -36,7 +36,7 @@ describe "bundle install" do
gem "bundler", "0.9.2"
G
- nice_error = <<-E.strip.gsub(/^ {8}/, '')
+ nice_error = <<-E.strip.gsub(/^ {8}/, "")
Fetching source index from file:#{gem_repo2}/
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
@@ -93,7 +93,7 @@ describe "bundle install" do
gem "rails_fail"
G
- nice_error = <<-E.strip.gsub(/^ {8}/, '')
+ nice_error = <<-E.strip.gsub(/^ {8}/, "")
Fetching source index from file:#{gem_repo2}/
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
@@ -114,7 +114,7 @@ describe "bundle install" do
gem "activesupport", "2.3.5"
G
- nice_error = <<-E.strip.gsub(/^ {8}/, '')
+ nice_error = <<-E.strip.gsub(/^ {8}/, "")
Fetching source index from file:#{gem_repo2}/
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index 26d8abe295..ea85229eb8 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -38,7 +38,7 @@ describe "install with --deployment or --frozen" do
build_git "foo"
gemfile <<-G
group :test do
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
end
G
bundle :install
@@ -129,7 +129,7 @@ describe "install with --deployment or --frozen" do
gem "rack-obama"
G
- ENV['BUNDLE_FROZEN'] = '1'
+ ENV["BUNDLE_FROZEN"] = "1"
bundle "install"
expect(out).to include("deployment mode")
expect(out).to include("You have added to the Gemfile")
@@ -145,7 +145,7 @@ describe "install with --deployment or --frozen" do
gem "rack-obama"
G
- ENV['BUNDLE_FROZEN'] = "false"
+ ENV["BUNDLE_FROZEN"] = "false"
bundle "install"
expect(out).not_to include("deployment mode")
expect(out).not_to include("You have added to the Gemfile")
diff --git a/spec/install/force_spec.rb b/spec/install/force_spec.rb
index 4991e84e89..0211b077cf 100644
--- a/spec/install/force_spec.rb
+++ b/spec/install/force_spec.rb
@@ -13,7 +13,7 @@ describe "bundle install" do
rack_lib = default_bundle_path("gems/rack-1.0.0/lib/rack.rb")
bundle "install"
- rack_lib.open('w'){|f| f.write("blah blah blah") }
+ rack_lib.open("w"){|f| f.write("blah blah blah") }
bundle "install --force"
expect(exitstatus).to eq(0) if exitstatus
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb
index d0d982a438..c98d30cde2 100644
--- a/spec/install/gemfile/gemspec_spec.rb
+++ b/spec/install/gemfile/gemspec_spec.rb
@@ -10,7 +10,7 @@ describe "bundle install from an existing gemspec" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.write("Gemfile", "source :rubygems\ngemspec")
s.add_dependency "bar", "=1.0.0"
- s.add_development_dependency "bar-dev", '=1.0.0'
+ s.add_development_dependency "bar-dev", "=1.0.0"
end
install_gemfile <<-G
source "file://#{gem_repo2}"
@@ -25,9 +25,9 @@ describe "bundle install from an existing gemspec" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.write("Gemfile", "source :rubygems\ngemspec")
s.add_dependency "bar", "=1.0.0"
- s.add_development_dependency "bar-dev", '=1.0.0'
+ s.add_development_dependency "bar-dev", "=1.0.0"
end
- FileUtils.mv tmp.join('foo', 'foo.gemspec'), tmp.join('foo', '.gemspec')
+ FileUtils.mv tmp.join("foo", "foo.gemspec"), tmp.join("foo", ".gemspec")
install_gemfile <<-G
source "file://#{gem_repo2}"
@@ -80,7 +80,7 @@ describe "bundle install from an existing gemspec" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.write("foo2.gemspec", "")
s.add_dependency "bar", "=1.0.0"
- s.add_development_dependency "bar-dev", '=1.0.0'
+ s.add_development_dependency "bar-dev", "=1.0.0"
end
install_gemfile(<<-G, :expect_err => true)
@@ -96,7 +96,7 @@ describe "bundle install from an existing gemspec" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.write("foo2.gemspec", "")
s.add_dependency "bar", "=1.0.0"
- s.add_development_dependency "bar-dev", '=1.0.0'
+ s.add_development_dependency "bar-dev", "=1.0.0"
end
install_gemfile(<<-G, :expect_err => true)
@@ -113,7 +113,7 @@ describe "bundle install from an existing gemspec" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.write("Gemfile", "source 'file://#{gem_repo1}'\ngemspec")
s.add_dependency "actionpack", "=2.3.2"
- s.add_development_dependency "rake", '=10.0.2'
+ s.add_development_dependency "rake", "=10.0.2"
end
Dir.chdir(tmp.join("foo")) do
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb
index 708f6f787e..6baaf5f301 100644
--- a/spec/install/gemfile/git_spec.rb
+++ b/spec/install/gemfile/git_spec.rb
@@ -9,7 +9,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- git "#{lib_path('foo-1.0')}" do
+ git "#{lib_path("foo-1.0")}" do
gem 'foo'
end
G
@@ -52,7 +52,7 @@ describe "bundle install with git sources" do
in_app_root2 do
install_gemfile bundled_app2("Gemfile"), <<-G
- git "#{lib_path('foo-1.0')}" do
+ git "#{lib_path("foo-1.0")}" do
gem 'foo'
end
G
@@ -78,7 +78,7 @@ describe "bundle install with git sources" do
build_git "foo"
install_gemfile <<-G
- gem "foo", "1.1", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", "1.1", :git => "#{lib_path("foo-1.0")}"
G
expect(out).to include("Source contains 'foo' at: 1.0")
@@ -86,22 +86,22 @@ describe "bundle install with git sources" do
it "still works after moving the application directory" do
bundle "install --path vendor/bundle"
- FileUtils.mv bundled_app, tmp('bundled_app.bck')
+ FileUtils.mv bundled_app, tmp("bundled_app.bck")
- Dir.chdir tmp('bundled_app.bck')
+ Dir.chdir tmp("bundled_app.bck")
should_be_installed "foo 1.0"
end
it "can still install after moving the application directory" do
bundle "install --path vendor/bundle"
- FileUtils.mv bundled_app, tmp('bundled_app.bck')
+ FileUtils.mv bundled_app, tmp("bundled_app.bck")
update_git "foo", "1.1", :path => lib_path("foo-1.0")
- Dir.chdir tmp('bundled_app.bck')
- gemfile tmp('bundled_app.bck/Gemfile'), <<-G
+ Dir.chdir tmp("bundled_app.bck")
+ gemfile tmp("bundled_app.bck/Gemfile"), <<-G
source "file://#{gem_repo1}"
- git "#{lib_path('foo-1.0')}" do
+ git "#{lib_path("foo-1.0")}" do
gem 'foo'
end
@@ -142,7 +142,7 @@ describe "bundle install with git sources" do
it "works" do
install_gemfile <<-G
- git "#{lib_path('foo-1.0')}", :ref => "#{@revision}" do
+ git "#{lib_path("foo-1.0")}", :ref => "#{@revision}" do
gem "foo"
end
G
@@ -157,7 +157,7 @@ describe "bundle install with git sources" do
it "works when the revision is a symbol" do
install_gemfile <<-G
- git "#{lib_path('foo-1.0')}", :ref => #{@revision.to_sym.inspect} do
+ git "#{lib_path("foo-1.0")}", :ref => #{@revision.to_sym.inspect} do
gem "foo"
end
G
@@ -177,16 +177,16 @@ describe "bundle install with git sources" do
# We don't generate it because we actually don't need it
# build_git "rack", "0.8"
- build_git "rack", "0.8", :path => lib_path('local-rack') do |s|
+ build_git "rack", "0.8", :path => lib_path("local-rack") do |s|
s.write "lib/rack.rb", "puts :LOCAL"
end
gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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')}/)
@@ -197,18 +197,18 @@ describe "bundle install with git sources" do
it "chooses the local repository on runtime" do
build_git "rack", "0.8"
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
- update_git "rack", "0.8", :path => lib_path('local-rack') do |s|
+ update_git "rack", "0.8", :path => lib_path("local-rack") do |s|
s.write "lib/rack.rb", "puts :LOCAL"
end
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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
@@ -220,17 +220,17 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
lockfile0 = File.read(bundled_app("Gemfile.lock"))
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
- update_git "rack", "0.8", :path => lib_path('local-rack') do |s|
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
+ update_git "rack", "0.8", :path => lib_path("local-rack") do |s|
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"))
@@ -242,15 +242,15 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master"
G
lockfile0 = File.read(bundled_app("Gemfile.lock"))
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
- update_git "rack", "0.8", :path => lib_path('local-rack')
+ 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"))
@@ -262,38 +262,38 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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
it "explodes if branch is not given on install" do
build_git "rack", "0.8"
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}"
+ 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
it "does not explode if disable_local_branch_check is given" do
build_git "rack", "0.8"
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}"
+ 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 %|config disable_local_branch_check true|
bundle :install
expect(out).to match(/Bundle complete!/)
@@ -302,18 +302,18 @@ describe "bundle install with git sources" do
it "explodes on different branches on install" do
build_git "rack", "0.8"
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
- update_git "rack", "0.8", :path => lib_path('local-rack'), :branch => "another" do |s|
+ update_git "rack", "0.8", :path => lib_path("local-rack"), :branch => "another" do |s|
s.write "lib/rack.rb", "puts :LOCAL"
end
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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
@@ -321,16 +321,16 @@ describe "bundle install with git sources" do
it "explodes on invalid revision on install" do
build_git "rack", "0.8"
- build_git "rack", "0.8", :path => lib_path('local-rack') do |s|
+ build_git "rack", "0.8", :path => lib_path("local-rack") do |s|
s.write "lib/rack.rb", "puts :LOCAL"
end
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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
@@ -358,7 +358,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}"
+ gem "rack", :git => "#{lib_path("rack-0.8")}"
G
should_be_installed "rack 0.8"
@@ -367,21 +367,21 @@ describe "bundle install with git sources" do
it "installs dependencies from git even if a newer gem is available elsewhere" do
system_gems "rack-1.0.0"
- build_lib "rack", "1.0", :path => lib_path('nested/bar') do |s|
+ build_lib "rack", "1.0", :path => lib_path("nested/bar") do |s|
s.write "lib/rack.rb", "puts 'WIN OVERRIDE'"
end
- build_git "foo", :path => lib_path('nested') do |s|
+ build_git "foo", :path => lib_path("nested") do |s|
s.add_dependency "rack", "= 1.0"
end
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", :git => "#{lib_path('nested')}"
+ gem "foo", :git => "#{lib_path("nested")}"
G
run "require 'rack'"
- expect(out).to eq('WIN OVERRIDE')
+ expect(out).to eq("WIN OVERRIDE")
end
it "correctly unlocks when changing to a git source" do
@@ -394,7 +394,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", "1.0.0", :git => "#{lib_path('rack')}"
+ gem "rack", "1.0.0", :git => "#{lib_path("rack")}"
G
should_be_installed "rack 1.0.0"
@@ -410,7 +410,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack')}"
+ gem "rack", :git => "#{lib_path("rack")}"
G
should_be_installed "rack 1.2"
@@ -419,11 +419,11 @@ describe "bundle install with git sources" do
describe "block syntax" do
it "pulls all gems from a git block" do
- build_lib "omg", :path => lib_path('hi2u/omg')
- build_lib "hi2u", :path => lib_path('hi2u')
+ build_lib "omg", :path => lib_path("hi2u/omg")
+ build_lib "hi2u", :path => lib_path("hi2u")
install_gemfile <<-G
- path "#{lib_path('hi2u')}" do
+ path "#{lib_path("hi2u")}" do
gem "omg"
gem "hi2u"
end
@@ -439,7 +439,7 @@ describe "bundle install with git sources" do
update_git "foo"
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}", :ref => "#{@revision}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}", :ref => "#{@revision}"
G
run <<-RUBY
@@ -457,7 +457,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
gem "rails", "2.3.2"
G
@@ -496,14 +496,14 @@ describe "bundle install with git sources" do
end
it "installs from git even if a rubygems gem is present" do
- build_gem "foo", "1.0", :path => lib_path('fake_foo'), :to_system => true do |s|
+ build_gem "foo", "1.0", :path => lib_path("fake_foo"), :to_system => true do |s|
s.write "lib/foo.rb", "raise 'FAIL'"
end
build_git "foo", "1.0"
install_gemfile <<-G
- gem "foo", "1.0", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", "1.0", :git => "#{lib_path("foo-1.0")}"
G
should_be_installed "foo 1.0"
@@ -514,7 +514,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", "1.0", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", "1.0", :git => "#{lib_path("foo-1.0")}"
gem "rails", "2.3.2"
G
@@ -535,10 +535,10 @@ describe "bundle install with git sources" do
end
it "works when the gem path has spaces in it" do
- build_git "foo", :path => lib_path('foo space-1.0')
+ build_git "foo", :path => lib_path("foo space-1.0")
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo space-1.0')}"
+ gem "foo", :git => "#{lib_path("foo space-1.0")}"
G
should_be_installed "foo 1.0"
@@ -548,7 +548,7 @@ describe "bundle install with git sources" do
build_git "forced", "1.0"
install_gemfile <<-G
- git "#{lib_path('forced-1.0')}" do
+ git "#{lib_path("forced-1.0")}" do
gem 'forced'
end
G
@@ -561,7 +561,7 @@ describe "bundle install with git sources" do
bundle "update"
should_be_installed "forced 1.1"
- Dir.chdir(lib_path('forced-1.0')) do
+ Dir.chdir(lib_path("forced-1.0")) do
`git reset --hard HEAD^`
end
@@ -574,13 +574,13 @@ describe "bundle install with git sources" do
build_git "has_submodule", "1.0" do |s|
s.add_dependency "submodule"
end
- Dir.chdir(lib_path('has_submodule-1.0')) do
- `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
+ Dir.chdir(lib_path("has_submodule-1.0")) do
+ `git submodule add #{lib_path("submodule-1.0")} submodule-1.0`
`git commit -m "submodulator"`
end
install_gemfile <<-G, :expect_err => true
- git "#{lib_path('has_submodule-1.0')}" do
+ git "#{lib_path("has_submodule-1.0")}" do
gem "has_submodule"
end
G
@@ -594,13 +594,13 @@ describe "bundle install with git sources" do
build_git "has_submodule", "1.0" do |s|
s.add_dependency "submodule"
end
- Dir.chdir(lib_path('has_submodule-1.0')) do
- `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
+ Dir.chdir(lib_path("has_submodule-1.0")) do
+ `git submodule add #{lib_path("submodule-1.0")} submodule-1.0`
`git commit -m "submodulator"`
end
install_gemfile <<-G
- git "#{lib_path('has_submodule-1.0')}", :submodules => true do
+ git "#{lib_path("has_submodule-1.0")}", :submodules => true do
gem "has_submodule"
end
G
@@ -612,7 +612,7 @@ describe "bundle install with git sources" do
git = build_git "foo"
install_gemfile <<-G
- git "#{lib_path('foo-1.0')}" do
+ git "#{lib_path("foo-1.0")}" do
gem "foo"
end
G
@@ -621,7 +621,7 @@ describe "bundle install with git sources" do
update_git "foo"
install_gemfile <<-G
- git "#{lib_path('foo-1.0')}", :ref => "#{git.ref_for('HEAD^')}" do
+ git "#{lib_path("foo-1.0")}", :ref => "#{git.ref_for("HEAD^")}" do
gem "foo"
end
G
@@ -638,10 +638,10 @@ describe "bundle install with git sources" do
build_git "foo"
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
- FileUtils.rm_rf(lib_path('foo-1.0'))
+ FileUtils.rm_rf(lib_path("foo-1.0"))
bundle "install"
expect(out).not_to match(/updating/i)
@@ -651,7 +651,7 @@ describe "bundle install with git sources" do
build_git "foo"
gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
bundle "install"
@@ -665,29 +665,29 @@ describe "bundle install with git sources" do
FileUtils.touch(default_bundle_path("bundler"))
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
expect(exitstatus).to_not eq(0) if exitstatus
expect(out).to include("Bundler could not install a gem because it " \
"needs to create a directory, but a file exists " \
- "- #{default_bundle_path('bundler')}")
+ "- #{default_bundle_path("bundler")}")
end
it "does not duplicate git gem sources" do
- build_lib "foo", :path => lib_path('nested/foo')
- build_lib "bar", :path => lib_path('nested/bar')
+ build_lib "foo", :path => lib_path("nested/foo")
+ build_lib "bar", :path => lib_path("nested/bar")
- build_git "foo", :path => lib_path('nested')
- build_git "bar", :path => lib_path('nested')
+ build_git "foo", :path => lib_path("nested")
+ build_git "bar", :path => lib_path("nested")
gemfile <<-G
- gem "foo", :git => "#{lib_path('nested')}"
- gem "bar", :git => "#{lib_path('nested')}"
+ gem "foo", :git => "#{lib_path("nested")}"
+ gem "bar", :git => "#{lib_path("nested")}"
G
bundle "install"
- expect(File.read(bundled_app("Gemfile.lock")).scan('GIT').size).to eq(1)
+ expect(File.read(bundled_app("Gemfile.lock")).scan("GIT").size).to eq(1)
end
describe "switching sources" do
@@ -695,19 +695,19 @@ describe "bundle install with git sources" do
build_gem "foo", "1.0", :to_system => true do |s|
s.write "lib/foo.rb", "raise 'fail'"
end
- build_lib "foo", "1.0", :path => lib_path('bar/foo')
- build_git "bar", "1.0", :path => lib_path('bar') do |s|
- s.add_dependency 'foo'
+ build_lib "foo", "1.0", :path => lib_path("bar/foo")
+ build_git "bar", "1.0", :path => lib_path("bar") do |s|
+ s.add_dependency "foo"
end
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "bar", :path => "#{lib_path('bar')}"
+ gem "bar", :path => "#{lib_path("bar")}"
G
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "bar", :git => "#{lib_path('bar')}"
+ gem "bar", :git => "#{lib_path("bar")}"
G
should_be_installed "foo 1.0", "bar 1.0"
@@ -765,11 +765,11 @@ describe "bundle install with git sources" do
describe "bundle install --deployment with git sources" do
it "works" do
- build_git "valim", :path => lib_path('valim')
+ build_git "valim", :path => lib_path("valim")
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "valim", "= 1.0", :git => "#{lib_path('valim')}"
+ gem "valim", "= 1.0", :git => "#{lib_path("valim")}"
G
simulate_new_machine
@@ -783,7 +783,7 @@ describe "bundle install with git sources" do
it "runs pre-install hooks" do
build_git "foo"
gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
File.open(lib_path("install_hooks.rb"), "w") do |h|
@@ -796,14 +796,14 @@ describe "bundle install with git sources" do
end
bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
+ :requires => [lib_path("install_hooks.rb")]
expect(err).to eq("Ran pre-install hook: foo-1.0")
end
it "runs post-install hooks" do
build_git "foo"
gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
File.open(lib_path("install_hooks.rb"), "w") do |h|
@@ -816,14 +816,14 @@ describe "bundle install with git sources" do
end
bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
+ :requires => [lib_path("install_hooks.rb")]
expect(err).to eq("Ran post-install hook: foo-1.0")
end
it "complains if the install hook fails" do
build_git "foo"
gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
File.open(lib_path("install_hooks.rb"), "w") do |h|
@@ -836,7 +836,7 @@ describe "bundle install with git sources" do
end
bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
+ :requires => [lib_path("install_hooks.rb")]
expect(out).to include("failed for foo-1.0")
end
end
@@ -859,7 +859,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
run <<-R
@@ -894,7 +894,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", :git => "#{lib_path('foo-1.0')}", :ref => "#{git_sha}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}", :ref => "#{git_sha}"
G
run <<-R
@@ -919,7 +919,7 @@ describe "bundle install with git sources" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
expect(out).to include("An error occurred while installing foo (1.0)")
@@ -933,19 +933,19 @@ describe "bundle install with git sources" do
end
Bundler::SharedHelpers.with_clean_git_env do
- ENV['GIT_DIR'] = 'bar'
- ENV['GIT_WORK_TREE'] = 'bar'
+ ENV["GIT_DIR"] = "bar"
+ ENV["GIT_WORK_TREE"] = "bar"
install_gemfile <<-G
source "file://#{gem_repo1}"
- git "#{lib_path('xxxxxx-1.0')}" do
+ git "#{lib_path("xxxxxx-1.0")}" do
gem 'xxxxxx'
end
G
expect(exitstatus).to eq(0) if exitstatus
- expect(ENV['GIT_DIR']).to eq('bar')
- expect(ENV['GIT_WORK_TREE']).to eq('bar')
+ expect(ENV["GIT_DIR"]).to eq("bar")
+ expect(ENV["GIT_WORK_TREE"]).to eq("bar")
end
end
@@ -954,7 +954,7 @@ describe "bundle install with git sources" do
build_git "foo"
install_gemfile <<-G
- git "#{lib_path('foo-1.0')}" do
+ git "#{lib_path("foo-1.0")}" do
gem 'foo'
end
G
@@ -967,7 +967,7 @@ describe "bundle install with git sources" do
build_git "foo"
install_gemfile <<-G
- git "#{lib_path('foo-1.0')}" do
+ git "#{lib_path("foo-1.0")}" do
gem 'foo'
end
G
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb
index a6a5c1991a..837a3d4744 100644
--- a/spec/install/gemfile/path_spec.rb
+++ b/spec/install/gemfile/path_spec.rb
@@ -5,7 +5,7 @@ describe "bundle install with explicit source paths" do
build_lib "foo"
install_gemfile <<-G
- path "#{lib_path('foo-1.0')}"
+ path "#{lib_path("foo-1.0")}"
gem 'foo'
G
@@ -16,7 +16,7 @@ describe "bundle install with explicit source paths" do
build_lib "foo"
install_gemfile <<-G
- gem 'foo', :path => "#{lib_path('foo-1.0')}"
+ gem 'foo', :path => "#{lib_path("foo-1.0")}"
G
should_be_installed("foo 1.0")
@@ -25,7 +25,7 @@ describe "bundle install with explicit source paths" do
it "supports relative paths" do
build_lib "foo"
- relative_path = lib_path('foo-1.0').relative_path_from(Pathname.new(Dir.pwd))
+ relative_path = lib_path("foo-1.0").relative_path_from(Pathname.new(Dir.pwd))
install_gemfile <<-G
gem 'foo', :path => "#{relative_path}"
@@ -37,7 +37,7 @@ describe "bundle install with explicit source paths" do
it "expands paths" do
build_lib "foo"
- relative_path = lib_path('foo-1.0').relative_path_from(Pathname.new('~').expand_path)
+ relative_path = lib_path("foo-1.0").relative_path_from(Pathname.new("~").expand_path)
install_gemfile <<-G
gem 'foo', :path => "~/#{relative_path}"
@@ -48,8 +48,8 @@ describe "bundle install with explicit source paths" do
it "expands paths raise error with not existing user's home dir" do
build_lib "foo"
- username = 'some_unexisting_user'
- relative_path = lib_path('foo-1.0').relative_path_from(Pathname.new("/home/#{username}").expand_path)
+ username = "some_unexisting_user"
+ relative_path = lib_path("foo-1.0").relative_path_from(Pathname.new("/home/#{username}").expand_path)
install_gemfile <<-G
gem 'foo', :path => "~#{username}/#{relative_path}"
@@ -85,21 +85,21 @@ describe "bundle install with explicit source paths" do
it "installs dependencies from the path even if a newer gem is available elsewhere" do
system_gems "rack-1.0.0"
- build_lib "rack", "1.0", :path => lib_path('nested/bar') do |s|
+ build_lib "rack", "1.0", :path => lib_path("nested/bar") do |s|
s.write "lib/rack.rb", "puts 'WIN OVERRIDE'"
end
- build_lib "foo", :path => lib_path('nested') do |s|
+ build_lib "foo", :path => lib_path("nested") do |s|
s.add_dependency "rack", "= 1.0"
end
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", :path => "#{lib_path('nested')}"
+ gem "foo", :path => "#{lib_path("nested")}"
G
run "require 'rack'"
- expect(out).to eq('WIN OVERRIDE')
+ expect(out).to eq("WIN OVERRIDE")
end
it "works" do
@@ -114,7 +114,7 @@ describe "bundle install with explicit source paths" do
build_lib "foo", "1.0.0", :path => lib_path("omg/foo")
install_gemfile <<-G
- gem "omg", :path => "#{lib_path('omg')}"
+ gem "omg", :path => "#{lib_path("omg")}"
G
should_be_installed "foo 1.0"
@@ -268,7 +268,7 @@ describe "bundle install with explicit source paths" do
end
install_gemfile <<-G
- path "#{lib_path('foo-1.0')}"
+ path "#{lib_path("foo-1.0")}"
gem 'foo'
G
should_be_installed "foo 1.0"
@@ -283,7 +283,7 @@ describe "bundle install with explicit source paths" do
lib_path("foo-1.0").join("bin/performance").mkpath
install_gemfile <<-G
- gem 'foo', '1.0', :path => "#{lib_path('foo-1.0')}"
+ gem 'foo', '1.0', :path => "#{lib_path("foo-1.0")}"
G
expect(err).to eq("")
end
@@ -292,10 +292,10 @@ describe "bundle install with explicit source paths" do
build_lib "foo"
install_gemfile <<-G
- gem 'foo', :path => "#{lib_path('foo-1.0')}"
+ gem 'foo', :path => "#{lib_path("foo-1.0")}"
G
- expect(lib_path('foo-1.0').join('foo-1.0.gem')).not_to exist
+ expect(lib_path("foo-1.0").join("foo-1.0.gem")).not_to exist
end
describe "block syntax" do
@@ -315,15 +315,15 @@ describe "bundle install with explicit source paths" do
end
it "keeps source pinning" do
- build_lib "foo", "1.0", :path => lib_path('foo')
- build_lib "omg", "1.0", :path => lib_path('omg')
- build_lib "foo", "1.0", :path => lib_path('omg/foo') do |s|
+ build_lib "foo", "1.0", :path => lib_path("foo")
+ build_lib "omg", "1.0", :path => lib_path("omg")
+ build_lib "foo", "1.0", :path => lib_path("omg/foo") do |s|
s.write "lib/foo.rb", "puts 'FAIL'"
end
install_gemfile <<-G
- gem "foo", :path => "#{lib_path('foo')}"
- gem "omg", :path => "#{lib_path('omg')}"
+ gem "foo", :path => "#{lib_path("foo")}"
+ gem "omg", :path => "#{lib_path("omg")}"
G
should_be_installed "foo 1.0"
@@ -333,7 +333,7 @@ describe "bundle install with explicit source paths" do
build_lib "foo", :gemspec => false
gemfile <<-G
- gem "foo", "1.0", :path => "#{lib_path('foo-1.0')}"
+ gem "foo", "1.0", :path => "#{lib_path("foo-1.0")}"
G
should_be_installed "foo 1.0"
@@ -343,11 +343,11 @@ describe "bundle install with explicit source paths" do
it "installs executable stubs" do
build_lib "foo" do |s|
- s.executables = ['foo']
+ s.executables = ["foo"]
end
install_gemfile <<-G
- gem "foo", :path => "#{lib_path('foo-1.0')}"
+ gem "foo", :path => "#{lib_path("foo-1.0")}"
G
bundle "exec foo"
@@ -362,7 +362,7 @@ describe "bundle install with explicit source paths" do
build_lib "bar", "1.0", :path => lib_path("foo/bar")
install_gemfile <<-G
- gem "foo", :path => "#{lib_path('foo')}"
+ gem "foo", :path => "#{lib_path("foo")}"
G
end
@@ -391,7 +391,7 @@ describe "bundle install with explicit source paths" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "foo", :path => "#{lib_path('foo')}"
+ gem "foo", :path => "#{lib_path("foo")}"
G
end
@@ -411,19 +411,19 @@ describe "bundle install with explicit source paths" do
build_gem "foo", "1.0", :to_system => true do |s|
s.write "lib/foo.rb", "raise 'fail'"
end
- build_lib "foo", "1.0", :path => lib_path('bar/foo')
- build_git "bar", "1.0", :path => lib_path('bar') do |s|
- s.add_dependency 'foo'
+ build_lib "foo", "1.0", :path => lib_path("bar/foo")
+ build_git "bar", "1.0", :path => lib_path("bar") do |s|
+ s.add_dependency "foo"
end
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "bar", :git => "#{lib_path('bar')}"
+ gem "bar", :git => "#{lib_path("bar")}"
G
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "bar", :path => "#{lib_path('bar')}"
+ gem "bar", :path => "#{lib_path("bar")}"
G
should_be_installed "foo 1.0", "bar 1.0"
@@ -438,7 +438,7 @@ describe "bundle install with explicit source paths" do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "bar"
- path "#{lib_path('foo')}" do
+ path "#{lib_path("foo")}" do
gem "foo"
end
G
@@ -447,7 +447,7 @@ describe "bundle install with explicit source paths" do
install_gemfile <<-G
source "file://#{gem_repo1}"
- path "#{lib_path('foo')}" do
+ path "#{lib_path("foo")}" do
gem "foo"
gem "bar"
end
@@ -481,7 +481,7 @@ describe "bundle install with explicit source paths" do
it "runs pre-install hooks" do
build_git "foo"
gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
File.open(lib_path("install_hooks.rb"), "w") do |h|
@@ -494,14 +494,14 @@ describe "bundle install with explicit source paths" do
end
bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
+ :requires => [lib_path("install_hooks.rb")]
expect(err).to eq("Ran pre-install hook: foo-1.0")
end
it "runs post-install hooks" do
build_git "foo"
gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
File.open(lib_path("install_hooks.rb"), "w") do |h|
@@ -514,14 +514,14 @@ describe "bundle install with explicit source paths" do
end
bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
+ :requires => [lib_path("install_hooks.rb")]
expect(err).to eq("Ran post-install hook: foo-1.0")
end
it "complains if the install hook fails" do
build_git "foo"
gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
File.open(lib_path("install_hooks.rb"), "w") do |h|
@@ -534,7 +534,7 @@ describe "bundle install with explicit source paths" do
end
bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
+ :requires => [lib_path("install_hooks.rb")]
expect(out).to include("failed for foo-1.0")
end
end
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb
index e9a7de349d..b1b8a1ac24 100644
--- a/spec/install/gemfile_spec.rb
+++ b/spec/install/gemfile_spec.rb
@@ -20,7 +20,7 @@ describe "bundle install" do
bundle :install, :gemfile => bundled_app("NotGemfile")
- ENV['BUNDLE_GEMFILE'] = "NotGemfile"
+ ENV["BUNDLE_GEMFILE"] = "NotGemfile"
should_be_installed "rack 1.0.0"
end
end
diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb
index 40cf8ada35..3074641678 100644
--- a/spec/install/gems/dependency_api_spec.rb
+++ b/spec/install/gems/dependency_api_spec.rb
@@ -72,7 +72,7 @@ describe "gemcutter's dependency API" do
gemfile <<-G
source "#{source_uri}"
- git "file:///#{lib_path('foo-1.0')}" do
+ git "file:///#{lib_path("foo-1.0")}" do
gem 'foo'
end
G
@@ -90,7 +90,7 @@ describe "gemcutter's dependency API" do
gemfile <<-G
source "#{source_uri}"
- gem 'foo', :git => "file:///#{lib_path('foo-1.0')}"
+ gem 'foo', :git => "file:///#{lib_path("foo-1.0")}"
G
bundle :install, :artifice => "endpoint"
@@ -104,7 +104,7 @@ describe "gemcutter's dependency API" do
build_git "foo"
gemfile <<-G
source "#{source_uri}"
- gem 'foo', :git => "file:///#{lib_path('foo-1.0')}"
+ gem 'foo', :git => "file:///#{lib_path("foo-1.0")}"
G
bundle "install", :artifice => "endpoint"
@@ -614,7 +614,7 @@ describe "gemcutter's dependency API" do
it "explains what to do to get it" do
gemfile <<-G
- source "#{source_uri.gsub(/http/, 'https')}"
+ source "#{source_uri.gsub(/http/, "https")}"
gem "rack"
G
@@ -634,7 +634,7 @@ describe "gemcutter's dependency API" do
end
end
- source "#{source_uri.gsub(/http/, 'https')}"
+ source "#{source_uri.gsub(/http/, "https")}"
gem "rack"
G
@@ -645,13 +645,13 @@ describe "gemcutter's dependency API" do
context ".gemrc with sources is present" do
before do
- File.open(home('.gemrc'), 'w') do |file|
+ File.open(home(".gemrc"), "w") do |file|
file.puts({:sources => ["https://rubygems.org"]}.to_yaml)
end
end
after do
- home('.gemrc').rmtree
+ home(".gemrc").rmtree
end
it "uses other sources declared in the Gemfile" do
diff --git a/spec/install/gems/env_spec.rb b/spec/install/gems/env_spec.rb
index 235a1ced32..ac3d19730a 100644
--- a/spec/install/gems/env_spec.rb
+++ b/spec/install/gems/env_spec.rb
@@ -18,7 +18,7 @@ describe "bundle install with ENV conditionals" do
end
it "includes the gems when the ENV variable is set" do
- ENV['BUNDLER_TEST'] = '1'
+ ENV["BUNDLER_TEST"] = "1"
bundle :install
should_be_installed "rack 1.0"
end
@@ -41,7 +41,7 @@ describe "bundle install with ENV conditionals" do
end
it "includes the gems when the ENV variable is set" do
- ENV['BUNDLER_TEST'] = '1'
+ ENV["BUNDLER_TEST"] = "1"
bundle :install
should_be_installed "rack 1.0"
end
@@ -64,13 +64,13 @@ describe "bundle install with ENV conditionals" do
end
it "excludes the gems when the ENV variable is set but does not match the condition" do
- ENV['BUNDLER_TEST'] = '1'
+ ENV["BUNDLER_TEST"] = "1"
bundle :install
should_not_be_installed "rack"
end
it "includes the gems when the ENV variable is set and matches the condition" do
- ENV['BUNDLER_TEST'] = 'foo'
+ ENV["BUNDLER_TEST"] = "foo"
bundle :install
should_be_installed "rack 1.0"
end
@@ -93,13 +93,13 @@ describe "bundle install with ENV conditionals" do
end
it "excludes the gems when the ENV variable is set but does not match the condition" do
- ENV['BUNDLER_TEST'] = 'fo'
+ ENV["BUNDLER_TEST"] = "fo"
bundle :install
should_not_be_installed "rack"
end
it "includes the gems when the ENV variable is set and matches the condition" do
- ENV['BUNDLER_TEST'] = 'foobar'
+ ENV["BUNDLER_TEST"] = "foobar"
bundle :install
should_be_installed "rack 1.0"
end
diff --git a/spec/install/gems/flex_spec.rb b/spec/install/gems/flex_spec.rb
index 43cc1776d8..d6ff15bf08 100644
--- a/spec/install/gems/flex_spec.rb
+++ b/spec/install/gems/flex_spec.rb
@@ -66,7 +66,7 @@ describe "bundle flex_install" do
gem 'activesupport', '2.3.5'
G
- should_be_installed "rack 1.0.0", 'activesupport 2.3.5'
+ should_be_installed "rack 1.0.0", "activesupport 2.3.5"
end
it "keeps child dependencies pinned" do
@@ -85,7 +85,7 @@ describe "bundle flex_install" do
gem "thin"
G
- should_be_installed "rack 1.0.0", 'rack-obama 1.0', 'thin 1.0'
+ should_be_installed "rack 1.0.0", "rack-obama 1.0", "thin 1.0"
end
end
@@ -114,7 +114,7 @@ describe "bundle flex_install" do
gem 'activesupport', '2.3.2'
G
- should_be_installed "rack 1.0.0", 'activesupport 2.3.2'
+ should_be_installed "rack 1.0.0", "activesupport 2.3.2"
end
it "removes top level dependencies when removed from the Gemfile while leaving other dependencies intact" do
@@ -151,7 +151,7 @@ describe "bundle flex_install" do
gem 'activesupport'
G
- should_be_installed 'activesupport 2.3.5'
+ should_be_installed "activesupport 2.3.5"
should_not_be_installed "rack-obama", "rack"
end
end
@@ -192,7 +192,7 @@ describe "bundle flex_install" do
end
it "suggests bundle update when the Gemfile requires different versions than the lock" do
- nice_error = <<-E.strip.gsub(/^ {8}/, '')
+ nice_error = <<-E.strip.gsub(/^ {8}/, "")
Fetching source index from file:#{gem_repo2}/
Resolving dependencies...
Bundler could not find compatible versions for gem "rack":
@@ -233,11 +233,11 @@ describe "bundle flex_install" do
it "does something" do
expect {
bundle "install"
- }.not_to change { File.read(bundled_app('Gemfile.lock')) }
+ }.not_to change { File.read(bundled_app("Gemfile.lock")) }
- expect(out).to include('rack = 0.9.1')
- expect(out).to include('locked at 1.0.0')
- expect(out).to include('bundle update rack')
+ expect(out).to include("rack = 0.9.1")
+ expect(out).to include("locked at 1.0.0")
+ expect(out).to include("bundle update rack")
end
it "should work when you update" do
diff --git a/spec/install/gems/groups_spec.rb b/spec/install/gems/groups_spec.rb
index 7490858526..d64e03186d 100644
--- a/spec/install/gems/groups_spec.rb
+++ b/spec/install/gems/groups_spec.rb
@@ -20,7 +20,7 @@ describe "bundle install with groups" do
it "installs gems in a group block into that group" do
should_be_installed "activesupport 2.3.5"
- load_error_run <<-R, 'activesupport', :default
+ load_error_run <<-R, "activesupport", :default
require 'activesupport'
puts ACTIVESUPPORT
R
@@ -31,7 +31,7 @@ describe "bundle install with groups" do
it "installs gems with inline :groups into those groups" do
should_be_installed "thin 1.0"
- load_error_run <<-R, 'thin', :default
+ load_error_run <<-R, "thin", :default
require 'thin'
puts THIN
R
@@ -41,17 +41,17 @@ describe "bundle install with groups" do
it "sets up everything if Bundler.setup is used with no groups" do
output = run("require 'rack'; puts RACK")
- expect(output).to eq('1.0.0')
+ expect(output).to eq("1.0.0")
output = run("require 'activesupport'; puts ACTIVESUPPORT")
- expect(output).to eq('2.3.5')
+ expect(output).to eq("2.3.5")
output = run("require 'thin'; puts THIN")
- expect(output).to eq('1.0')
+ expect(output).to eq("1.0")
end
it "removes old groups when new groups are set up" do
- load_error_run <<-RUBY, 'thin', :emo
+ load_error_run <<-RUBY, "thin", :emo
Bundler.setup(:default)
require 'thin'
puts THIN
@@ -66,7 +66,7 @@ describe "bundle install with groups" do
Bundler.setup(:default, :emo)
require 'thin'; puts THIN
RUBY
- expect(output).to eq('1.0')
+ expect(output).to eq("1.0")
end
end
@@ -110,7 +110,7 @@ describe "bundle install with groups" do
it "allows Bundler.setup for specific groups" do
bundle :install, :without => "emo"
run("require 'rack'; puts RACK", :default)
- expect(out).to eq('1.0.0')
+ expect(out).to eq("1.0.0")
end
it "does not effect the resolve" do
diff --git a/spec/install/gems/platform_spec.rb b/spec/install/gems/platform_spec.rb
index 1d52858011..b25cff0c88 100644
--- a/spec/install/gems/platform_spec.rb
+++ b/spec/install/gems/platform_spec.rb
@@ -169,7 +169,7 @@ describe "bundle install with platform conditionals" do
install_gemfile <<-G
platform :#{not_local_tag} do
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
end
G
diff --git a/spec/install/gems/post_install_spec.rb b/spec/install/gems/post_install_spec.rb
index 76a3a6ca0d..bea2c9b6ee 100644
--- a/spec/install/gems/post_install_spec.rb
+++ b/spec/install/gems/post_install_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "bundle install" do
context "with gem sources" do
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
index 7bc4de971f..d458fc9a85 100644
--- a/spec/install/gems/resolving_spec.rb
+++ b/spec/install/gems/resolving_spec.rb
@@ -27,7 +27,7 @@ describe "bundle install with gem sources" do
spec.dependencies.each do |d|
d.instance_variable_set(:@type, :fail)
end
- File.open(path, 'w') do |f|
+ File.open(path, "w") do |f|
f.write Gem.deflate(Marshal.dump(spec))
end
diff --git a/spec/install/gems/sources_spec.rb b/spec/install/gems/sources_spec.rb
index 4d88c9f8c2..bf302d8d9e 100644
--- a/spec/install/gems/sources_spec.rb
+++ b/spec/install/gems/sources_spec.rb
@@ -322,7 +322,7 @@ describe "bundle install with gems on multiple sources" do
gemfile <<-G
gem "rack", :source => "file://#{gem_repo1}"
- gem "foo", :path => "#{lib_path('foo-1.0')}"
+ gem "foo", :path => "#{lib_path("foo-1.0")}"
G
end
diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb
index 08a20a2a23..452b4663ae 100644
--- a/spec/install/gems/standalone_spec.rb
+++ b/spec/install/gems/standalone_spec.rb
@@ -52,7 +52,7 @@ describe "bundle install --standalone" do
install_gemfile <<-G, :standalone => true
source "file://#{gem_repo1}"
gem "rails"
- gem "devise", :git => "#{lib_path('devise-1.0')}"
+ gem "devise", :git => "#{lib_path("devise-1.0")}"
G
end
@@ -113,7 +113,7 @@ describe "bundle install --standalone" do
it "allows creating a standalone file with limited groups" do
bundle "install --standalone default"
- load_error_ruby <<-RUBY, 'spec', :no_lib => true
+ load_error_ruby <<-RUBY, "spec", :no_lib => true
$:.unshift File.expand_path("bundle")
require "bundler/setup"
@@ -129,7 +129,7 @@ describe "bundle install --standalone" do
it "allows --without to limit the groups used in a standalone" do
bundle "install --standalone --without test"
- load_error_ruby <<-RUBY, 'spec', :no_lib => true
+ load_error_ruby <<-RUBY, "spec", :no_lib => true
$:.unshift File.expand_path("bundle")
require "bundler/setup"
@@ -160,7 +160,7 @@ describe "bundle install --standalone" do
bundle "install --without test"
bundle "install --standalone"
- load_error_ruby <<-RUBY, 'spec', :no_lib => true
+ load_error_ruby <<-RUBY, "spec", :no_lib => true
$:.unshift File.expand_path("bundle")
require "bundler/setup"
@@ -251,7 +251,7 @@ describe "bundle install --standalone" do
end
it "creates stubs that can be executed from anywhere" do
- require 'tmpdir'
+ require "tmpdir"
Dir.chdir(Dir.tmpdir) do
expect(`#{bundled_app}/bin/rails -v`.chomp).to eql "2.3.2"
end
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
index 48bb813577..009b63b4ed 100644
--- a/spec/install/gems/sudo_spec.rb
+++ b/spec/install/gems/sudo_spec.rb
@@ -4,7 +4,7 @@ describe "when using sudo", :sudo => true do
describe "and BUNDLE_PATH is writable" do
context "but BUNDLE_PATH/build_info is not writable" do
before do
- subdir = system_gem_path('cache')
+ subdir = system_gem_path("cache")
subdir.mkpath
sudo "chmod u-w #{subdir}"
end
@@ -54,7 +54,7 @@ describe "when using sudo", :sudo => true do
FileUtils.mkdir_p bundle_path
sudo "chown -R root #{bundle_path}"
- ENV['BUNDLE_PATH'] = bundle_path.to_s
+ ENV["BUNDLE_PATH"] = bundle_path.to_s
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rack", '1.0'
@@ -71,7 +71,7 @@ describe "when using sudo", :sudo => true do
sudo "chown -R root #{root_path}"
bundle_path = root_path.join("does_not_exist")
- ENV['BUNDLE_PATH'] = bundle_path.to_s
+ ENV["BUNDLE_PATH"] = bundle_path.to_s
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rack", '1.0'
@@ -110,7 +110,7 @@ describe "when using sudo", :sudo => true do
end
it "cleans up the tmpdirs generated" do
- require 'tmpdir'
+ require "tmpdir"
Dir.glob("#{Dir.tmpdir}/bundler*").each do |tmpdir|
FileUtils.remove_entry_secure(tmpdir)
end
@@ -127,7 +127,7 @@ describe "when using sudo", :sudo => true do
describe "and GEM_HOME is not writable" do
it "installs" do
- gem_home = tmp('sudo_gem_home')
+ gem_home = tmp("sudo_gem_home")
sudo "mkdir -p #{gem_home}"
sudo "chmod ugo-w #{gem_home}"
@@ -136,9 +136,9 @@ describe "when using sudo", :sudo => true do
gem "rack", '1.0'
G
- bundle :install, :env => {'GEM_HOME' => gem_home.to_s, 'GEM_PATH' => nil}
- expect(gem_home.join('bin/rackup')).to exist
- should_be_installed "rack 1.0", :env => {'GEM_HOME' => gem_home.to_s, 'GEM_PATH' => nil}
+ bundle :install, :env => {"GEM_HOME" => gem_home.to_s, "GEM_PATH" => nil}
+ expect(gem_home.join("bin/rackup")).to exist
+ should_be_installed "rack 1.0", :env => {"GEM_HOME" => gem_home.to_s, "GEM_PATH" => nil}
end
end
diff --git a/spec/install/gems/win32_spec.rb b/spec/install/gems/win32_spec.rb
index 6d1ac85675..e75177a0ce 100644
--- a/spec/install/gems/win32_spec.rb
+++ b/spec/install/gems/win32_spec.rb
@@ -1,8 +1,8 @@
-require 'spec_helper'
+require "spec_helper"
describe "bundle install with win32-generated lockfile" do
it "should read lockfile" do
- File.open(bundled_app('Gemfile.lock'), 'wb') do |f|
+ File.open(bundled_app("Gemfile.lock"), "wb") do |f|
f << "GEM\r\n"
f << " remote: file:#{gem_repo1}/\r\n"
f << " specs:\r\n"
diff --git a/spec/install/gemspecs_spec.rb b/spec/install/gemspecs_spec.rb
index 524c1651c0..4300a16cb2 100644
--- a/spec/install/gemspecs_spec.rb
+++ b/spec/install/gemspecs_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "bundle install" do
describe "when a gem has a YAML gemspec" do
@@ -18,10 +18,10 @@ describe "bundle install" do
end
it "still installs correctly when using path" do
- build_lib 'yaml_spec', :gemspec => :yaml
+ build_lib "yaml_spec", :gemspec => :yaml
install_gemfile <<-G
- gem 'yaml_spec', :path => "#{lib_path('yaml_spec-1.0')}"
+ gem 'yaml_spec', :path => "#{lib_path("yaml_spec-1.0")}"
G
expect(err).to eq("")
end
@@ -34,15 +34,15 @@ describe "bundle install" do
G
FileUtils.mkdir_p "#{tmp}/gems/system/specifications"
- File.open("#{tmp}/gems/system/specifications/rack-1.0.0.gemspec", 'w+') do |f|
+ File.open("#{tmp}/gems/system/specifications/rack-1.0.0.gemspec", "w+") do |f|
spec = Gem::Specification.new do |s|
- s.name = 'rack'
- s.version = '1.0.0'
- s.add_runtime_dependency 'activesupport', '2.3.2'
+ s.name = "rack"
+ s.version = "1.0.0"
+ s.add_runtime_dependency "activesupport", "2.3.2"
end
f.write spec.to_ruby
end
- bundle :install, :artifice => 'endpoint_marshal_fail' # force gemspec load
+ bundle :install, :artifice => "endpoint_marshal_fail" # force gemspec load
should_be_installed "activesupport 2.3.2"
end
end
diff --git a/spec/install/parallel/spec_installation_spec.rb b/spec/install/parallel/spec_installation_spec.rb
index 407b176a90..2d741a15ff 100644
--- a/spec/install/parallel/spec_installation_spec.rb
+++ b/spec/install/parallel/spec_installation_spec.rb
@@ -1,5 +1,5 @@
-require 'spec_helper'
-require 'bundler/installer/parallel_installer'
+require "spec_helper"
+require "bundler/installer/parallel_installer"
describe ParallelInstaller::SpecInstallation do
let!(:dep) do
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
index e350a44d17..ffc53365c3 100644
--- a/spec/install/path_spec.rb
+++ b/spec/install/path_spec.rb
@@ -42,10 +42,10 @@ describe "bundle install" do
it "remembers to disable system gems after the first time with bundle --path vendor/bundle" do
bundle "install --path vendor/bundle"
- FileUtils.rm_rf bundled_app('vendor')
+ FileUtils.rm_rf bundled_app("vendor")
bundle "install"
- expect(vendored_gems('gems/rack-1.0.0')).to be_directory
+ expect(vendored_gems("gems/rack-1.0.0")).to be_directory
should_be_installed "rack 1.0.0"
end
end
@@ -85,19 +85,19 @@ describe "bundle install" do
bundle :install
- expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
+ expect(bundled_app("vendor/gems/rack-1.0.0")).to be_directory
should_be_installed "rack 1.0.0"
end
it "installs gems to BUNDLE_PATH relative to root when relative" do
set_bundle_path(type, "vendor")
- FileUtils.mkdir_p bundled_app('lol')
- Dir.chdir(bundled_app('lol')) do
+ FileUtils.mkdir_p bundled_app("lol")
+ Dir.chdir(bundled_app("lol")) do
bundle :install
end
- expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
+ expect(bundled_app("vendor/gems/rack-1.0.0")).to be_directory
should_be_installed "rack 1.0.0"
end
end
@@ -107,14 +107,14 @@ describe "bundle install" do
bundle :install
- expect(vendored_gems('gems/rack-1.0.0')).to be_directory
+ expect(vendored_gems("gems/rack-1.0.0")).to be_directory
should_be_installed "rack 1.0.0"
end
it "sets BUNDLE_PATH as the first argument to bundle install" do
bundle "install --path ./vendor/bundle"
- expect(vendored_gems('gems/rack-1.0.0')).to be_directory
+ expect(vendored_gems("gems/rack-1.0.0")).to be_directory
should_be_installed "rack 1.0.0"
end
@@ -123,7 +123,7 @@ describe "bundle install" do
build_gem "rack", "1.1.0", :to_system => true
bundle "install --path ./vendor/bundle"
- expect(vendored_gems('gems/rack-1.0.0')).to be_directory
+ expect(vendored_gems("gems/rack-1.0.0")).to be_directory
should_be_installed "rack 1.0.0"
end
end
diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb
index ef7f6f53d4..640d44baf9 100644
--- a/spec/install/post_bundle_message_spec.rb
+++ b/spec/install/post_bundle_message_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "post bundle message" do
before :each do
diff --git a/spec/install/prereleases_spec.rb b/spec/install/prereleases_spec.rb
index 202b1650e5..ddbdea3f56 100644
--- a/spec/install/prereleases_spec.rb
+++ b/spec/install/prereleases_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "bundle install" do
describe "when prerelease gems are available" do
diff --git a/spec/install/security_policy_spec.rb b/spec/install/security_policy_spec.rb
index 09e9507336..288154ad13 100644
--- a/spec/install/security_policy_spec.rb
+++ b/spec/install/security_policy_spec.rb
@@ -32,7 +32,7 @@ describe "policies with unsigned gems" do
end
# This spec will fail on Rubygems 2 rc1 due to a bug in policy.rb. the bug is fixed in rc3.
- it "will fail with Medium Security setting due to presence of unsigned gem", :unless => ENV['RGV'] == "v2.0.0.rc.1" do
+ it "will fail with Medium Security setting due to presence of unsigned gem", :unless => ENV["RGV"] == "v2.0.0.rc.1" do
bundle "install --trust-policy=MediumSecurity"
expect(out).to include("security policy didn't allow")
end
diff --git a/spec/lock/git_spec.rb b/spec/lock/git_spec.rb
index 9d4ecf9bc7..8507ae20c0 100644
--- a/spec/lock/git_spec.rb
+++ b/spec/lock/git_spec.rb
@@ -5,7 +5,7 @@ describe "bundle lock with git gems" do
build_git "foo"
install_gemfile <<-G
- gem 'foo', :git => "#{lib_path('foo-1.0')}"
+ gem 'foo', :git => "#{lib_path("foo-1.0")}"
G
end
diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb
index c901957e86..fa5d7e9dad 100644
--- a/spec/lock/lockfile_spec.rb
+++ b/spec/lock/lockfile_spec.rb
@@ -425,7 +425,7 @@ describe "the lockfile format" do
lockfile_should_be <<-G
GIT
remote: #{lib_path("foo-1.0")}
- revision: #{git.ref_for('master')}
+ revision: #{git.ref_for("master")}
specs:
foo (1.0)
@@ -444,13 +444,13 @@ describe "the lockfile format" do
end
it "does not asplode when a platform specific dependency is present and the Gemfile has not been resolved on that platform" do
- build_lib "omg", :path => lib_path('omg')
+ build_lib "omg", :path => lib_path("omg")
gemfile <<-G
source "file://#{gem_repo1}"
platforms :#{not_local_tag} do
- gem "omg", :path => "#{lib_path('omg')}"
+ gem "omg", :path => "#{lib_path("omg")}"
end
gem "rack"
@@ -486,15 +486,15 @@ describe "the lockfile format" do
git = build_git "foo"
install_gemfile <<-G
- git "#{lib_path('foo-1.0')}" do
+ git "#{lib_path("foo-1.0")}" do
gem "foo"
end
G
lockfile_should_be <<-G
GIT
- remote: #{lib_path('foo-1.0')}
- revision: #{git.ref_for('master')}
+ remote: #{lib_path("foo-1.0")}
+ revision: #{git.ref_for("master")}
specs:
foo (1.0)
@@ -523,7 +523,7 @@ describe "the lockfile format" do
lockfile_should_be <<-G
GIT
remote: #{lib_path("foo-1.0")}
- revision: #{git.ref_for('omg')}
+ revision: #{git.ref_for("omg")}
branch: omg
specs:
foo (1.0)
@@ -553,7 +553,7 @@ describe "the lockfile format" do
lockfile_should_be <<-G
GIT
remote: #{lib_path("foo-1.0")}
- revision: #{git.ref_for('omg')}
+ revision: #{git.ref_for("omg")}
tag: omg
specs:
foo (1.0)
@@ -614,7 +614,7 @@ describe "the lockfile format" do
lockfile_should_be <<-G
GIT
remote: #{lib_path("bar-1.0")}
- revision: #{bar.ref_for('master')}
+ revision: #{bar.ref_for("master")}
specs:
bar (1.0)
@@ -794,7 +794,7 @@ describe "the lockfile format" do
end
it "stores relative paths when the path is provided in a relative fashion and in Gemfile dir" do
- build_lib "foo", :path => bundled_app('foo')
+ build_lib "foo", :path => bundled_app("foo")
install_gemfile <<-G
path "foo"
@@ -822,7 +822,7 @@ describe "the lockfile format" do
end
it "stores relative paths when the path is provided in a relative fashion and is above Gemfile dir" do
- build_lib "foo", :path => bundled_app(File.join('..', 'foo'))
+ build_lib "foo", :path => bundled_app(File.join("..", "foo"))
install_gemfile <<-G
path "../foo"
@@ -850,7 +850,7 @@ describe "the lockfile format" do
end
it "stores relative paths when the path is provided in an absolute fashion but is relative" do
- build_lib "foo", :path => bundled_app('foo')
+ build_lib "foo", :path => bundled_app("foo")
install_gemfile <<-G
path File.expand_path("../foo", __FILE__)
@@ -927,7 +927,7 @@ describe "the lockfile format" do
gem "rack"
G
- platforms = ['java', generic(Gem::Platform.local).to_s].sort
+ platforms = ["java", generic(Gem::Platform.local).to_s].sort
lockfile_should_be <<-G
GEM
@@ -949,7 +949,7 @@ describe "the lockfile format" do
it "persists the spec's platform to the lockfile" do
build_gem "platform_specific", "1.0.0", :to_system => true do |s|
- s.platform = Gem::Platform.new('universal-java-16')
+ s.platform = Gem::Platform.new("universal-java-16")
end
simulate_platform "universal-java-16"
@@ -1131,12 +1131,12 @@ describe "the lockfile format" do
# * when this happened, those sections got multiple copies of gems
# in those sections.
it "fixes corrupted lockfiles" do
- build_git "omg", :path => lib_path('omg')
- revision = revision_for(lib_path('omg'))
+ build_git "omg", :path => lib_path("omg")
+ revision = revision_for(lib_path("omg"))
gemfile <<-G
source "file://#{gem_repo1}"
- gem "omg", :git => "#{lib_path('omg')}", :branch => 'master'
+ gem "omg", :git => "#{lib_path("omg")}", :branch => 'master'
G
bundle "install --path vendor"
@@ -1145,14 +1145,14 @@ describe "the lockfile format" do
# Create a Gemfile.lock that has duplicate GIT sections
lockfile <<-L
GIT
- remote: #{lib_path('omg')}
+ remote: #{lib_path("omg")}
revision: #{revision}
branch: master
specs:
omg (1.0)
GIT
- remote: #{lib_path('omg')}
+ remote: #{lib_path("omg")}
revision: #{revision}
branch: master
specs:
@@ -1172,14 +1172,14 @@ describe "the lockfile format" do
#{Bundler::VERSION}
L
- FileUtils.rm_rf(bundled_app('vendor'))
+ FileUtils.rm_rf(bundled_app("vendor"))
bundle "install"
should_be_installed "omg 1.0"
# Confirm that duplicate specs do not appear
- expect(File.read(bundled_app('Gemfile.lock'))).to eq(strip_whitespace(<<-L))
+ expect(File.read(bundled_app("Gemfile.lock"))).to eq(strip_whitespace(<<-L))
GIT
- remote: #{lib_path('omg')}
+ remote: #{lib_path("omg")}
revision: #{revision}
branch: master
specs:
@@ -1203,7 +1203,7 @@ describe "the lockfile format" do
describe "a line ending" do
def set_lockfile_mtime_to_known_value
time = Time.local(2000, 1, 1, 0, 0, 0)
- File.utime(time, time, bundled_app('Gemfile.lock'))
+ File.utime(time, time, bundled_app("Gemfile.lock"))
end
before(:each) do
build_repo2
@@ -1224,7 +1224,7 @@ describe "the lockfile format" do
it "preserves Gemfile.lock \\n line endings" do
update_repo2
- expect { bundle "update" }.to change { File.mtime(bundled_app('Gemfile.lock')) }
+ expect { bundle "update" }.to change { File.mtime(bundled_app("Gemfile.lock")) }
expect(File.read(bundled_app("Gemfile.lock"))).not_to match("\r\n")
should_be_installed "rack 1.2"
end
@@ -1235,7 +1235,7 @@ describe "the lockfile format" do
File.open(bundled_app("Gemfile.lock"), "wb"){|f| f.puts(win_lock) }
set_lockfile_mtime_to_known_value
- expect { bundle "update" }.to change { File.mtime(bundled_app('Gemfile.lock')) }
+ expect { bundle "update" }.to change { File.mtime(bundled_app("Gemfile.lock")) }
expect(File.read(bundled_app("Gemfile.lock"))).to match("\r\n")
should_be_installed "rack 1.2"
end
@@ -1248,7 +1248,7 @@ describe "the lockfile format" do
require 'bundler'
Bundler.setup
RUBY
- }.not_to change { File.mtime(bundled_app('Gemfile.lock')) }
+ }.not_to change { File.mtime(bundled_app("Gemfile.lock")) }
end
it "preserves Gemfile.lock \\n\\r line endings" do
@@ -1261,7 +1261,7 @@ describe "the lockfile format" do
require 'bundler'
Bundler.setup
RUBY
- }.not_to change { File.mtime(bundled_app('Gemfile.lock')) }
+ }.not_to change { File.mtime(bundled_app("Gemfile.lock")) }
end
end
end
diff --git a/spec/other/ext_spec.rb b/spec/other/ext_spec.rb
index dca6c80a59..b5b6956106 100644
--- a/spec/other/ext_spec.rb
+++ b/spec/other/ext_spec.rb
@@ -1,16 +1,16 @@
-require 'spec_helper'
+require "spec_helper"
describe "Gem::Specification#match_platform" do
it "does not match platforms other than the gem platform" do
darwin = gem "lol", "1.0", "platform_specific-1.0-x86-darwin-10"
- expect(darwin.match_platform(pl('java'))).to eq(false)
+ expect(darwin.match_platform(pl("java"))).to eq(false)
end
context "when platform is a string" do
it "matches when platform is a string" do
lazy_spec = Bundler::LazySpecification.new("lol", "1.0", "universal-mingw32")
- expect(lazy_spec.match_platform(pl('x86-mingw32'))).to eq(true)
- expect(lazy_spec.match_platform(pl('x64-mingw32'))).to eq(true)
+ expect(lazy_spec.match_platform(pl("x86-mingw32"))).to eq(true)
+ expect(lazy_spec.match_platform(pl("x64-mingw32"))).to eq(true)
end
end
end
@@ -19,30 +19,30 @@ describe "Bundler::GemHelpers#generic" do
include Bundler::GemHelpers
it "converts non-windows platforms into ruby" do
- expect(generic(pl('x86-darwin-10'))).to eq(pl('ruby'))
- expect(generic(pl('ruby'))).to eq(pl('ruby'))
+ expect(generic(pl("x86-darwin-10"))).to eq(pl("ruby"))
+ expect(generic(pl("ruby"))).to eq(pl("ruby"))
end
it "converts java platform variants into java" do
- expect(generic(pl('universal-java-17'))).to eq(pl('java'))
- expect(generic(pl('java'))).to eq(pl('java'))
+ expect(generic(pl("universal-java-17"))).to eq(pl("java"))
+ expect(generic(pl("java"))).to eq(pl("java"))
end
it "converts mswin platform variants into x86-mswin32" do
- expect(generic(pl('mswin32'))).to eq(pl('x86-mswin32'))
- expect(generic(pl('i386-mswin32'))).to eq(pl('x86-mswin32'))
- expect(generic(pl('x86-mswin32'))).to eq(pl('x86-mswin32'))
+ expect(generic(pl("mswin32"))).to eq(pl("x86-mswin32"))
+ expect(generic(pl("i386-mswin32"))).to eq(pl("x86-mswin32"))
+ expect(generic(pl("x86-mswin32"))).to eq(pl("x86-mswin32"))
end
it "converts 32-bit mingw platform variants into x86-mingw32" do
- expect(generic(pl('mingw32'))).to eq(pl('x86-mingw32'))
- expect(generic(pl('i386-mingw32'))).to eq(pl('x86-mingw32'))
- expect(generic(pl('x86-mingw32'))).to eq(pl('x86-mingw32'))
+ expect(generic(pl("mingw32"))).to eq(pl("x86-mingw32"))
+ expect(generic(pl("i386-mingw32"))).to eq(pl("x86-mingw32"))
+ expect(generic(pl("x86-mingw32"))).to eq(pl("x86-mingw32"))
end
it "converts 64-bit mingw platform variants into x64-mingw32" do
- expect(generic(pl('x64-mingw32'))).to eq(pl('x64-mingw32'))
- expect(generic(pl('x86_64-mingw32'))).to eq(pl('x64-mingw32'))
+ expect(generic(pl("x64-mingw32"))).to eq(pl("x64-mingw32"))
+ expect(generic(pl("x86_64-mingw32"))).to eq(pl("x64-mingw32"))
end
end
diff --git a/spec/other/platform_spec.rb b/spec/other/platform_spec.rb
index ad9390cfa8..f36cf527ec 100644
--- a/spec/other/platform_spec.rb
+++ b/spec/other/platform_spec.rb
@@ -239,7 +239,7 @@ G
#{ruby_version_correct}
G
- expect(bundled_app('Gemfile.lock')).to exist
+ expect(bundled_app("Gemfile.lock")).to exist
end
it "installs fine with any engine" do
@@ -251,7 +251,7 @@ G
#{ruby_version_correct_engineless}
G
- expect(bundled_app('Gemfile.lock')).to exist
+ expect(bundled_app("Gemfile.lock")).to exist
end
end
@@ -263,7 +263,7 @@ G
#{ruby_version_correct_patchlevel}
G
- expect(bundled_app('Gemfile.lock')).to exist
+ expect(bundled_app("Gemfile.lock")).to exist
end
it "doesn't install when the ruby version doesn't match" do
@@ -274,7 +274,7 @@ G
#{ruby_version_incorrect}
G
- expect(bundled_app('Gemfile.lock')).not_to exist
+ expect(bundled_app("Gemfile.lock")).not_to exist
should_be_ruby_version_incorrect
end
@@ -286,7 +286,7 @@ G
#{engine_incorrect}
G
- expect(bundled_app('Gemfile.lock')).not_to exist
+ expect(bundled_app("Gemfile.lock")).not_to exist
should_be_engine_incorrect
end
@@ -299,7 +299,7 @@ G
#{engine_version_incorrect}
G
- expect(bundled_app('Gemfile.lock')).not_to exist
+ expect(bundled_app("Gemfile.lock")).not_to exist
should_be_engine_version_incorrect
end
end
@@ -312,7 +312,7 @@ G
#{patchlevel_incorrect}
G
- expect(bundled_app('Gemfile.lock')).not_to exist
+ expect(bundled_app("Gemfile.lock")).not_to exist
should_be_patchlevel_incorrect
end
end
@@ -555,7 +555,7 @@ G
G
bundle "show rails"
- expect(out).to eq(default_bundle_path('gems', 'rails-2.3.2').to_s)
+ expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
end
it "prints path if ruby version is correct for any engine" do
@@ -568,7 +568,7 @@ G
G
bundle "show rails"
- expect(out).to eq(default_bundle_path('gems', 'rails-2.3.2').to_s)
+ expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
end
end
@@ -979,7 +979,7 @@ G
gem "rack", :group => :test
G
- ENV['BUNDLER_FORCE_TTY'] = "true"
+ ENV["BUNDLER_FORCE_TTY"] = "true"
end
it "makes a Gemfile.lock if setup succeeds" do
@@ -1106,7 +1106,7 @@ G
install_gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.5"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
G
end
@@ -1119,7 +1119,7 @@ G
gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.5"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
#{ruby_version_correct}
G
@@ -1139,7 +1139,7 @@ G
gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.5"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
#{ruby_version_correct_engineless}
G
@@ -1159,7 +1159,7 @@ G
gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.5"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
#{ruby_version_incorrect}
G
@@ -1177,7 +1177,7 @@ G
gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.5"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
#{engine_incorrect}
G
@@ -1196,7 +1196,7 @@ G
gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.5"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
#{engine_version_incorrect}
G
@@ -1216,7 +1216,7 @@ G
gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.5"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
#{patchlevel_incorrect}
G
@@ -1236,7 +1236,7 @@ G
gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.5"
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
#{patchlevel_fixnum}
G
diff --git a/spec/other/ssl_cert_spec.rb b/spec/other/ssl_cert_spec.rb
index 04f7a1f25f..6e3d15d65f 100644
--- a/spec/other/ssl_cert_spec.rb
+++ b/spec/other/ssl_cert_spec.rb
@@ -1,5 +1,5 @@
-require 'spec_helper'
-require 'bundler/ssl_certs/certificate_manager'
+require "spec_helper"
+require "bundler/ssl_certs/certificate_manager"
describe "SSL Certificates", :rubygems_master do
it "are up to date with Rubygems" do
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index d136844543..05715a6867 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -14,7 +14,7 @@ describe "The library itself" do
end
unless failing_lines.empty?
- "#{filename} uses inconsistent single quotes on lines #{failing_lines.join(', ')}"
+ "#{filename} uses inconsistent single quotes on lines #{failing_lines.join(", ")}"
end
end
@@ -25,7 +25,7 @@ describe "The library itself" do
end
unless failing_lines.empty?
- "#{filename} has tab characters on lines #{failing_lines.join(', ')}"
+ "#{filename} has tab characters on lines #{failing_lines.join(", ")}"
end
end
@@ -38,7 +38,7 @@ describe "The library itself" do
end
unless failing_lines.empty?
- "#{filename} has spaces on the EOL on lines #{failing_lines.join(', ')}"
+ "#{filename} has spaces on the EOL on lines #{failing_lines.join(", ")}"
end
end
@@ -91,7 +91,7 @@ describe "The library itself" do
lib_files = `git ls-files -z -- **/*.rb`.split("\x0").reject{|f| f =~ exclusions }
sys_exec("ruby -w -I. ", :expect_err) do |input|
lib_files.each do |f|
- input.puts "require '#{f.gsub(/\.rb$/, '')}'"
+ input.puts "require '#{f.gsub(/\.rb$/, "")}'"
end
end
diff --git a/spec/realworld/dependency_api_spec.rb b/spec/realworld/dependency_api_spec.rb
index 5d32947223..dd03907093 100644
--- a/spec/realworld/dependency_api_spec.rb
+++ b/spec/realworld/dependency_api_spec.rb
@@ -14,22 +14,22 @@ describe "gemcutter's dependency API", :realworld => true do
context "when Gemcutter API takes too long to respond" do
before do
# need to hack, so we can require rack
- old_gem_home = ENV['GEM_HOME']
- ENV['GEM_HOME'] = Spec::Path.base_system_gems.to_s
- require 'rack'
- ENV['GEM_HOME'] = old_gem_home
+ old_gem_home = ENV["GEM_HOME"]
+ ENV["GEM_HOME"] = Spec::Path.base_system_gems.to_s
+ require "rack"
+ ENV["GEM_HOME"] = old_gem_home
port = 21453
port += 1 while TCPSocket.new("127.0.0.1", port) rescue false
@server_uri = "http://127.0.0.1:#{port}"
- require File.expand_path('../../support/artifice/endpoint_timeout', __FILE__)
- require 'thread'
+ require File.expand_path("../../support/artifice/endpoint_timeout", __FILE__)
+ require "thread"
@t = Thread.new {
server = Rack::Server.start(:app => EndpointTimeout,
- :Host => '0.0.0.0',
+ :Host => "0.0.0.0",
:Port => port,
- :server => 'webrick',
+ :server => "webrick",
:AccessLog => [])
server.start
}
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb
index 3e58b47738..028c30c293 100644
--- a/spec/realworld/edgecases_spec.rb
+++ b/spec/realworld/edgecases_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "real world edgecases", :realworld => true do
# there is no rbx-relative-require gem that will install on 1.9
diff --git a/spec/realworld/parallel_spec.rb b/spec/realworld/parallel_spec.rb
index cd9c77acb4..8631225053 100644
--- a/spec/realworld/parallel_spec.rb
+++ b/spec/realworld/parallel_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe "parallel", :realworld => true do
it "installs" do
diff --git a/spec/resolver/platform_spec.rb b/spec/resolver/platform_spec.rb
index 47756008fe..85a0042a26 100644
--- a/spec/resolver/platform_spec.rb
+++ b/spec/resolver/platform_spec.rb
@@ -78,7 +78,7 @@ describe "Resolving platform craziness" do
dep "bar", ">= 0"
end
- gem 'bar', "1.0.0" do
+ gem "bar", "1.0.0" do
dep "baz", "~> 1.0.0"
end
diff --git a/spec/runtime/executable_spec.rb b/spec/runtime/executable_spec.rb
index ad43c05929..4ddb330ae0 100644
--- a/spec/runtime/executable_spec.rb
+++ b/spec/runtime/executable_spec.rb
@@ -38,7 +38,7 @@ describe "Running bin/* commands" do
it "uses the default ruby install name when shebang is not specified" do
bundle "install --binstubs"
- expect(File.open("bin/rackup").gets).to eq("#!/usr/bin/env #{RbConfig::CONFIG['ruby_install_name']}\n")
+ expect(File.open("bin/rackup").gets).to eq("#!/usr/bin/env #{RbConfig::CONFIG["ruby_install_name"]}\n")
end
it "allows the name of the shebang executable to be specified" do
@@ -61,21 +61,21 @@ describe "Running bin/* commands" do
it "works with gems in path" do
build_lib "rack", :path => lib_path("rack") do |s|
- s.executables = 'rackup'
+ s.executables = "rackup"
end
gemfile <<-G
- gem "rack", :path => "#{lib_path('rack')}"
+ gem "rack", :path => "#{lib_path("rack")}"
G
bundle "install --binstubs"
- build_gem 'rack', '2.0', :to_system => true do |s|
- s.executables = 'rackup'
+ build_gem "rack", "2.0", :to_system => true do |s|
+ s.executables = "rackup"
end
gembin "rackup"
- expect(out).to eq('1.0')
+ expect(out).to eq("1.0")
end
it "don't bundle da bundla" do
@@ -138,7 +138,7 @@ describe "Running bin/* commands" do
bundle "install --binstubs bin/"
- File.open(bundled_app("bin/rackup"), 'wb') do |file|
+ File.open(bundled_app("bin/rackup"), "wb") do |file|
file.print "OMG"
end
diff --git a/spec/runtime/gem_tasks_spec.rb b/spec/runtime/gem_tasks_spec.rb
index 6e64e187ad..da88310b3b 100644
--- a/spec/runtime/gem_tasks_spec.rb
+++ b/spec/runtime/gem_tasks_spec.rb
@@ -28,7 +28,7 @@ describe "require 'bundler/gem_tasks'" do
"rake install",
"rake release[remote]",
]
- tasks = out.lines.to_a.map { |s| s.split('#').first.strip }
+ tasks = out.lines.to_a.map { |s| s.split("#").first.strip }
expect(tasks & expected_tasks).to eq(expected_tasks)
expect(exitstatus).to eq(0) if exitstatus
end
diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb
index ec465b5ae8..accbf7ce2c 100644
--- a/spec/runtime/inline_spec.rb
+++ b/spec/runtime/inline_spec.rb
@@ -2,8 +2,8 @@ require "spec_helper"
describe "bundler/inline#gemfile" do
def script(code, options = {})
- requires = ['bundler/inline']
- requires.unshift File.expand_path('../../support/artifice/'+options.delete(:artifice)+'.rb', __FILE__) if options.key?(:artifice)
+ requires = ["bundler/inline"]
+ requires.unshift File.expand_path("../../support/artifice/"+options.delete(:artifice)+".rb", __FILE__) if options.key?(:artifice)
requires = requires.map { |r| "require '#{r}'" }.join("\n")
@out = ruby("#{requires}\n\n" << code, options)
end
@@ -82,7 +82,7 @@ describe "bundler/inline#gemfile" do
expect(out).to include("Rack's post install message")
expect(exitstatus).to be_zero if exitstatus
- script <<-RUBY, :artifice => 'endpoint'
+ script <<-RUBY, :artifice => "endpoint"
gemfile(true) do
source "https://rubygems.org"
gem "activesupport", :require => true
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb
index de4bd926e1..1ba79adc85 100644
--- a/spec/runtime/load_spec.rb
+++ b/spec/runtime/load_spec.rb
@@ -30,7 +30,7 @@ describe "Bundler.load" do
it "ignores blank BUNDLE_GEMFILEs" do
expect {
- ENV['BUNDLE_GEMFILE'] = ""
+ ENV["BUNDLE_GEMFILE"] = ""
Bundler.load
}.not_to raise_error()
end
@@ -62,7 +62,7 @@ describe "Bundler.load" do
it "raises an exception if a specified gemfile is not found" do
expect {
- ENV['BUNDLE_GEMFILE'] = "omg.rb"
+ ENV["BUNDLE_GEMFILE"] = "omg.rb"
Bundler.load
}.to raise_error(Bundler::GemfileNotFound, /omg\.rb/)
end
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb
index 5e5e9db22f..cf75fe08d3 100644
--- a/spec/runtime/require_spec.rb
+++ b/spec/runtime/require_spec.rb
@@ -73,7 +73,7 @@ describe "Bundler.require" do
# required in resolver order instead of gemfile order
run("Bundler.require(:not)")
- expect(out.split("\n").sort).to eq(['seven', 'three'])
+ expect(out.split("\n").sort).to eq(["seven", "three"])
# test require: true
run "Bundler.require(:require_true)"
@@ -91,7 +91,7 @@ describe "Bundler.require" do
gem "two", :require => 'fail'
G
- load_error_run <<-R, 'fail'
+ load_error_run <<-R, "fail"
Bundler.require
R
@@ -125,7 +125,7 @@ describe "Bundler.require" do
build_lib "jquery-rails", "1.0.0" do |s|
s.write "lib/jquery/rails.rb", "puts 'jquery/rails'"
end
- lib_path('jquery-rails-1.0.0/lib/jquery-rails.rb').rmtree
+ lib_path("jquery-rails-1.0.0/lib/jquery-rails.rb").rmtree
end
it "requires gem names that are namespaced" do
@@ -162,7 +162,7 @@ describe "Bundler.require" do
gem 'jquery-rails', :require => 'jquery-rails'
G
- load_error_run <<-R, 'jquery-rails'
+ load_error_run <<-R, "jquery-rails"
Bundler.require
R
expect(err).to eq("ZOMG LOAD ERROR")
@@ -194,7 +194,7 @@ describe "Bundler.require" do
build_lib "load-fuuu", "1.0.0" do |s|
s.write "lib/load/fuuu.rb", "raise LoadError.new(\"cannot load such file -- load-bar\")"
end
- lib_path('load-fuuu-1.0.0/lib/load-fuuu.rb').rmtree
+ lib_path("load-fuuu-1.0.0/lib/load-fuuu.rb").rmtree
gemfile <<-G
path "#{lib_path}"
@@ -313,10 +313,10 @@ describe "Bundler.require" do
gem "busted_require"
G
- load_error_run <<-R, 'no_such_file_omg'
+ load_error_run <<-R, "no_such_file_omg"
Bundler.require
R
- expect(err).to eq('ZOMG LOAD ERROR')
+ expect(err).to eq("ZOMG LOAD ERROR")
end
end
end
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 6a36e6bd4e..9bee4fabb7 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -188,19 +188,19 @@ describe "Bundler.setup" do
gem "rack"
G
- gemfile bundled_app('4realz'), <<-G
+ gemfile bundled_app("4realz"), <<-G
source "file://#{gem_repo1}"
gem "activesupport", "2.3.5"
G
- ENV['BUNDLE_GEMFILE'] = bundled_app('4realz').to_s
+ ENV["BUNDLE_GEMFILE"] = bundled_app("4realz").to_s
bundle :install
should_be_installed "activesupport 2.3.5"
end
it "prioritizes gems in BUNDLE_PATH over gems in GEM_HOME" do
- ENV['BUNDLE_PATH'] = bundled_app('.bundle').to_s
+ ENV["BUNDLE_PATH"] = bundled_app(".bundle").to_s
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rack", "1.0.0"
@@ -308,7 +308,7 @@ describe "Bundler.setup" do
end
gemfile <<-G
- path "#{lib_path('rack-1.0.0')}"
+ path "#{lib_path("rack-1.0.0")}"
source "file://#{gem_repo1}"
gem "rack"
G
@@ -323,7 +323,7 @@ describe "Bundler.setup" do
build_git "rack", "1.0.0"
gemfile <<-G
- gem "rack", :git => "#{lib_path('rack-1.0.0')}"
+ gem "rack", :git => "#{lib_path("rack-1.0.0")}"
G
end
@@ -378,7 +378,7 @@ describe "Bundler.setup" do
it "works even when the cache directory has been deleted" do
bundle "install --path vendor/bundle"
- FileUtils.rm_rf vendored_gems('cache')
+ FileUtils.rm_rf vendored_gems("cache")
should_be_installed "rack 1.0.0"
end
@@ -403,18 +403,18 @@ describe "Bundler.setup" do
it "explodes if given path does not exist on runtime" do
build_git "rack", "0.8"
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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')}/)
- FileUtils.rm_rf(lib_path('local-rack'))
+ FileUtils.rm_rf(lib_path("local-rack"))
run "require 'rack'", :expect_err => true
expect(err).to match(/Cannot use local override for rack-0.8 because #{Regexp.escape(lib_path('local-rack').to_s)} does not exist/)
end
@@ -422,20 +422,20 @@ describe "Bundler.setup" do
it "explodes if branch is not given on runtime" do
build_git "rack", "0.8"
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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')}/)
gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}"
+ gem "rack", :git => "#{lib_path("rack-0.8")}"
G
run "require 'rack'", :expect_err => true
@@ -445,20 +445,20 @@ describe "Bundler.setup" do
it "explodes on different branches on runtime" do
build_git "rack", "0.8"
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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')}/)
gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "changed"
+ gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "changed"
G
run "require 'rack'", :expect_err => true
@@ -468,19 +468,19 @@ describe "Bundler.setup" do
it "explodes on refs with different branches on runtime" do
build_git "rack", "0.8"
- FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
+ FileUtils.cp_r("#{lib_path("rack-0.8")}/.", lib_path("local-rack"))
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :ref => "master", :branch => "master"
+ gem "rack", :git => "#{lib_path("rack-0.8")}", :ref => "master", :branch => "master"
G
gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :ref => "master", :branch => "nonexistant"
+ 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
@@ -600,8 +600,8 @@ describe "Bundler.setup" do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
- gem "foo", :git => "#{lib_path('foo-1.0')}"
- gem "no-gemspec", "1.0", :git => "#{lib_path('no-gemspec-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
+ gem "no-gemspec", "1.0", :git => "#{lib_path("no-gemspec-1.0")}"
G
run <<-R
@@ -644,8 +644,8 @@ describe "Bundler.setup" do
end
it "should clean $LOAD_PATH properly" do
- gem_name = 'very_simple_binary'
- full_gem_name = gem_name + '-1.0'
+ gem_name = "very_simple_binary"
+ full_gem_name = gem_name + "-1.0"
ext_dir = File.join(tmp "extenstions", full_gem_name)
install_gem full_gem_name
@@ -695,19 +695,19 @@ describe "Bundler.setup" do
describe "when a vendored gem specification uses the :path option" do
it "should resolve paths relative to the Gemfile" do
- path = bundled_app(File.join('vendor', 'foo'))
+ path = bundled_app(File.join("vendor", "foo"))
build_lib "foo", :path => path
# If the .gemspec exists, then Bundler handles the path differently.
# See Source::Path.load_spec_files for details.
- FileUtils.rm(File.join(path, 'foo.gemspec'))
+ FileUtils.rm(File.join(path, "foo.gemspec"))
install_gemfile <<-G
gem 'foo', '1.2.3', :path => 'vendor/foo'
G
Dir.chdir(bundled_app.parent) do
- run <<-R, :env => {"BUNDLE_GEMFILE" => bundled_app('Gemfile')}
+ run <<-R, :env => {"BUNDLE_GEMFILE" => bundled_app("Gemfile")}
require 'foo'
R
end
@@ -715,14 +715,14 @@ describe "Bundler.setup" do
end
it "should make sure the Bundler.root is really included in the path relative to the Gemfile" do
- relative_path = File.join('vendor', Dir.pwd[1..-1], 'foo')
+ relative_path = File.join("vendor", Dir.pwd[1..-1], "foo")
absolute_path = bundled_app(relative_path)
FileUtils.mkdir_p(absolute_path)
build_lib "foo", :path => absolute_path
# If the .gemspec exists, then Bundler handles the path differently.
# See Source::Path.load_spec_files for details.
- FileUtils.rm(File.join(absolute_path, 'foo.gemspec'))
+ FileUtils.rm(File.join(absolute_path, "foo.gemspec"))
gemfile <<-G
gem 'foo', '1.2.3', :path => '#{relative_path}'
@@ -731,7 +731,7 @@ describe "Bundler.setup" do
bundle :install
Dir.chdir(bundled_app.parent) do
- run <<-R, :env => {"BUNDLE_GEMFILE" => bundled_app('Gemfile')}
+ run <<-R, :env => {"BUNDLE_GEMFILE" => bundled_app("Gemfile")}
require 'foo'
R
end
@@ -745,7 +745,7 @@ describe "Bundler.setup" do
build_git "no-gemspec", :gemspec => false
install_gemfile <<-G
- gem "no-gemspec", "1.0", :git => "#{lib_path('no-gemspec-1.0')}"
+ gem "no-gemspec", "1.0", :git => "#{lib_path("no-gemspec-1.0")}"
G
end
@@ -851,7 +851,7 @@ describe "Bundler.setup" do
end
gemfile <<-G
- gem "bar", :git => "#{lib_path('bar-1.0')}"
+ gem "bar", :git => "#{lib_path("bar-1.0")}"
G
end
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb
index d00e2c701f..1c6114c033 100644
--- a/spec/runtime/with_clean_env_spec.rb
+++ b/spec/runtime/with_clean_env_spec.rb
@@ -3,19 +3,19 @@ require "spec_helper"
describe "Bundler.with_env helpers" do
shared_examples_for "Bundler.with_*_env" do
it "should reset and restore the environment" do
- gem_path = ENV['GEM_PATH']
+ gem_path = ENV["GEM_PATH"]
Bundler.with_clean_env do
expect(`echo $GEM_PATH`.strip).not_to eq(gem_path)
end
- expect(ENV['GEM_PATH']).to eq(gem_path)
+ expect(ENV["GEM_PATH"]).to eq(gem_path)
end
end
around do |example|
env = Bundler::ORIGINAL_ENV.dup
- Bundler::ORIGINAL_ENV['BUNDLE_PATH'] = "./Gemfile"
+ Bundler::ORIGINAL_ENV["BUNDLE_PATH"] = "./Gemfile"
example.run
Bundler::ORIGINAL_ENV.replace env
end
@@ -37,24 +37,24 @@ describe "Bundler.with_env helpers" do
it "should not pass any bundler environment variables" do
Bundler.with_clean_env do
- expect(`echo $BUNDLE_PATH`.strip).not_to eq('./Gemfile')
+ expect(`echo $BUNDLE_PATH`.strip).not_to eq("./Gemfile")
end
end
it "should not pass RUBYOPT changes" do
- lib_path = File.expand_path('../../../lib', __FILE__)
- Bundler::ORIGINAL_ENV['RUBYOPT'] = " -I#{lib_path} -rbundler/setup"
+ lib_path = File.expand_path("../../../lib", __FILE__)
+ Bundler::ORIGINAL_ENV["RUBYOPT"] = " -I#{lib_path} -rbundler/setup"
Bundler.with_clean_env do
- expect(`echo $RUBYOPT`.strip).not_to include '-rbundler/setup'
+ expect(`echo $RUBYOPT`.strip).not_to include "-rbundler/setup"
expect(`echo $RUBYOPT`.strip).not_to include "-I#{lib_path}"
end
- expect(Bundler::ORIGINAL_ENV['RUBYOPT']).to eq(" -I#{lib_path} -rbundler/setup")
+ expect(Bundler::ORIGINAL_ENV["RUBYOPT"]).to eq(" -I#{lib_path} -rbundler/setup")
end
it "should not change ORIGINAL_ENV" do
- expect(Bundler::ORIGINAL_ENV['BUNDLE_PATH']).to eq('./Gemfile')
+ expect(Bundler::ORIGINAL_ENV["BUNDLE_PATH"]).to eq("./Gemfile")
end
end
@@ -63,7 +63,7 @@ describe "Bundler.with_env helpers" do
it "should pass bundler environment variables set before Bundler was run" do
Bundler.with_original_env do
- expect(`echo $BUNDLE_PATH`.strip).to eq('./Gemfile')
+ expect(`echo $BUNDLE_PATH`.strip).to eq("./Gemfile")
end
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 91fe3d1bad..abd70545f0 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,35 +1,35 @@
-$:.unshift File.expand_path('..', __FILE__)
-$:.unshift File.expand_path('../../lib', __FILE__)
+$:.unshift File.expand_path("..", __FILE__)
+$:.unshift File.expand_path("../../lib", __FILE__)
-require 'bundler/psyched_yaml'
-require 'fileutils'
-require 'uri'
-require 'digest/sha1'
+require "bundler/psyched_yaml"
+require "fileutils"
+require "uri"
+require "digest/sha1"
begin
- require 'rubygems'
+ require "rubygems"
spec = Gem::Specification.load("bundler.gemspec")
rspec = spec.dependencies.find { |d| d.name == "rspec" }
- gem 'rspec', rspec.requirement.to_s
- require 'rspec'
+ gem "rspec", rspec.requirement.to_s
+ require "rspec"
rescue LoadError
abort "Run rake spec:deps to install development dependencies"
end
-require 'bundler'
+require "bundler"
# Require the correct version of popen for the current platform
-if RbConfig::CONFIG['host_os'] =~ /mingw|mswin/
+if RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
begin
- require 'win32/open3'
+ require "win32/open3"
rescue LoadError
abort "Run `gem install win32-open3` to be able to run specs"
end
else
- require 'open3'
+ require "open3"
end
-Dir["#{File.expand_path('../support', __FILE__)}/*.rb"].each do |file|
+Dir["#{File.expand_path("../support", __FILE__)}/*.rb"].each do |file|
require file unless file =~ /fakeweb\/.*\.rb/
end
@@ -38,11 +38,11 @@ $show_err = true
Spec::Rubygems.setup
FileUtils.rm_rf(Spec::Path.gem_repo1)
-ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -r#{Spec::Path.root}/spec/support/hax.rb"
-ENV['BUNDLE_SPEC_RUN'] = "true"
+ENV["RUBYOPT"] = "#{ENV["RUBYOPT"]} -r#{Spec::Path.root}/spec/support/hax.rb"
+ENV["BUNDLE_SPEC_RUN"] = "true"
# Don't wrap output in tests
-ENV['THOR_COLUMNS'] = '10000'
+ENV["THOR_COLUMNS"] = "10000"
RSpec.configure do |config|
config.include Spec::Builders
@@ -55,13 +55,13 @@ RSpec.configure do |config|
config.include Spec::Sudo
config.include Spec::Permissions
- if ENV['BUNDLER_SUDO_TESTS'] && Spec::Sudo.present?
+ if ENV["BUNDLER_SUDO_TESTS"] && Spec::Sudo.present?
config.filter_run :sudo => true
else
config.filter_run_excluding :sudo => true
end
- if ENV['BUNDLER_REALWORLD_TESTS']
+ if ENV["BUNDLER_REALWORLD_TESTS"]
config.filter_run :realworld => true
else
config.filter_run_excluding :realworld => true
@@ -69,14 +69,14 @@ RSpec.configure do |config|
config.filter_run_excluding :ruby => LessThanProc.with(RUBY_VERSION)
config.filter_run_excluding :rubygems => LessThanProc.with(Gem::VERSION)
- config.filter_run_excluding :rubygems_master => (ENV['RGV'] != "master")
+ config.filter_run_excluding :rubygems_master => (ENV["RGV"] != "master")
- config.filter_run :focused => true unless ENV['CI']
+ config.filter_run :focused => true unless ENV["CI"]
config.run_all_when_everything_filtered = true
original_wd = Dir.pwd
- original_path = ENV['PATH']
- original_gem_home = ENV['GEM_HOME']
+ original_path = ENV["PATH"]
+ original_gem_home = ENV["GEM_HOME"]
def pending_jruby_shebang_fix
pending "JRuby executables do not have a proper shebang" if RUBY_PLATFORM == "java"
@@ -101,15 +101,15 @@ RSpec.configure do |config|
Dir.chdir(original_wd)
# Reset ENV
- ENV['PATH'] = original_path
- ENV['GEM_HOME'] = original_gem_home
- ENV['GEM_PATH'] = original_gem_home
- ENV['BUNDLE_PATH'] = nil
- ENV['BUNDLE_GEMFILE'] = nil
- ENV['BUNDLE_FROZEN'] = nil
- ENV['BUNDLE_APP_CONFIG'] = nil
- ENV['BUNDLER_TEST'] = nil
- ENV['BUNDLER_SPEC_PLATFORM'] = nil
- ENV['BUNDLER_SPEC_VERSION'] = nil
+ ENV["PATH"] = original_path
+ ENV["GEM_HOME"] = original_gem_home
+ ENV["GEM_PATH"] = original_gem_home
+ ENV["BUNDLE_PATH"] = nil
+ ENV["BUNDLE_GEMFILE"] = nil
+ ENV["BUNDLE_FROZEN"] = nil
+ ENV["BUNDLE_APP_CONFIG"] = nil
+ ENV["BUNDLER_TEST"] = nil
+ ENV["BUNDLER_SPEC_PLATFORM"] = nil
+ ENV["BUNDLER_SPEC_VERSION"] = nil
end
end
diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb
index 59e80bb8f2..2ac0483ac6 100644
--- a/spec/support/artifice/endpoint.rb
+++ b/spec/support/artifice/endpoint.rb
@@ -8,16 +8,16 @@ $LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].first}"
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].last}"
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/tilt*/lib")].first}"
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/sinatra*/lib")].first}"
-require 'artifice'
-require 'sinatra/base'
+require "artifice"
+require "sinatra/base"
class Endpoint < Sinatra::Base
helpers do
def dependencies_for(gem_names, gem_repo = gem_repo1)
return [] if gem_names.nil? || gem_names.empty?
- require 'rubygems'
- require 'bundler'
+ require "rubygems"
+ require "bundler"
Bundler::Deprecate.skip_during do
Marshal.load(File.open(gem_repo.join("specs.4.8")).read).map do |name, version, platform|
spec = load_spec(name, version, platform, gem_repo)
diff --git a/spec/support/artifice/endpoint_500.rb b/spec/support/artifice/endpoint_500.rb
index 84997db45c..41076bf2c7 100644
--- a/spec/support/artifice/endpoint_500.rb
+++ b/spec/support/artifice/endpoint_500.rb
@@ -7,8 +7,8 @@ $LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].last}"
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/tilt*/lib")].first}"
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/sinatra*/lib")].first}"
-require 'artifice'
-require 'sinatra/base'
+require "artifice"
+require "sinatra/base"
Artifice.deactivate
diff --git a/spec/support/artifice/endpoint_api_missing.rb b/spec/support/artifice/endpoint_api_missing.rb
index bc89db3608..ca5916938f 100644
--- a/spec/support/artifice/endpoint_api_missing.rb
+++ b/spec/support/artifice/endpoint_api_missing.rb
@@ -5,7 +5,7 @@ Artifice.deactivate
class EndpointApiMissing < Endpoint
get "/fetch/actual/gem/:id" do
$stderr.puts params[:id]
- if params[:id] == 'rack-1.0.gemspec.rz'
+ if params[:id] == "rack-1.0.gemspec.rz"
halt 404
else
File.read("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}")
diff --git a/spec/support/artifice/endpoint_creds_diff_host.rb b/spec/support/artifice/endpoint_creds_diff_host.rb
index 21cce22955..b97a19435d 100644
--- a/spec/support/artifice/endpoint_creds_diff_host.rb
+++ b/spec/support/artifice/endpoint_creds_diff_host.rb
@@ -9,12 +9,12 @@ class EndpointCredsDiffHost < Endpoint
end
def authorized?
- auth.provided? && auth.basic? && auth.credentials && auth.credentials == ['user', 'pass']
+ auth.provided? && auth.basic? && auth.credentials && auth.credentials == ["user", "pass"]
end
def protected!
unless authorized?
- response['WWW-Authenticate'] = %(Basic realm="Testing HTTP Auth")
+ response["WWW-Authenticate"] = %(Basic realm="Testing HTTP Auth")
throw(:halt, [401, "Not authorized\n"])
end
end
diff --git a/spec/support/artifice/endpoint_extra_missing.rb b/spec/support/artifice/endpoint_extra_missing.rb
index 29322ad221..89c4c0c776 100644
--- a/spec/support/artifice/endpoint_extra_missing.rb
+++ b/spec/support/artifice/endpoint_extra_missing.rb
@@ -4,7 +4,7 @@ Artifice.deactivate
class EndpointExtraMissing < EndpointExtra
get "/extra/fetch/actual/gem/:id" do
- if params[:id] == 'missing-1.0.gemspec.rz'
+ if params[:id] == "missing-1.0.gemspec.rz"
halt 404
else
File.read("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}")
diff --git a/spec/support/artifice/endpoint_host_redirect.rb b/spec/support/artifice/endpoint_host_redirect.rb
index e44d63e2a6..00c496af58 100644
--- a/spec/support/artifice/endpoint_host_redirect.rb
+++ b/spec/support/artifice/endpoint_host_redirect.rb
@@ -3,7 +3,7 @@ require File.expand_path("../endpoint", __FILE__)
Artifice.deactivate
class EndpointHostRedirect < Endpoint
- get "/fetch/actual/gem/:id", :host_name => 'localgemserver.test' do
+ get "/fetch/actual/gem/:id", :host_name => "localgemserver.test" do
redirect "http://bundler.localgemserver.test#{request.path_info}"
end
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index a76cbc21a5..4d7ad44418 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -1,9 +1,9 @@
-require 'bundler/shared_helpers'
+require "bundler/shared_helpers"
module Spec
module Builders
def self.constantize(name)
- name.gsub('-', '').upcase
+ name.gsub("-", "").upcase
end
def v(version)
@@ -285,8 +285,8 @@ module Spec
build_gem "rack"
build_gem "signed_gem" do |s|
- cert = 'signing-cert.pem'
- pkey = 'signing-pkey.pem'
+ cert = "signing-cert.pem"
+ pkey = "signing-pkey.pem"
s.write cert, TEST_CERT
s.write pkey, TEST_PKEY
s.signing_key = pkey
@@ -446,8 +446,8 @@ module Spec
s.description = "This is a completely fake gem, for testing purposes."
s.author = "no one"
s.email = "foo@bar.baz"
- s.homepage = 'http://example.com'
- s.license = 'MIT'
+ s.homepage = "http://example.com"
+ s.license = "MIT"
end
@files = {}
end
@@ -470,7 +470,7 @@ module Spec
end
def add_c_extension
- require_paths << 'ext'
+ require_paths << "ext"
extensions << "ext/extconf.rb"
write "ext/extconf.rb", <<-RUBY
require "mkmf"
@@ -517,7 +517,7 @@ module Spec
@files.each do |file, source|
file = Pathname.new(path).join(file)
FileUtils.mkdir_p(file.dirname)
- File.open(file, 'w') { |f| f.puts source }
+ File.open(file, "w") { |f| f.puts source }
end
@spec.files = @files.keys
path
@@ -528,7 +528,7 @@ module Spec
end
def _default_path
- @context.tmp('libs', @spec.full_name)
+ @context.tmp("libs", @spec.full_name)
end
end
@@ -637,11 +637,11 @@ module Spec
end
def _default_path
- @context.gem_repo1('gems')
+ @context.gem_repo1("gems")
end
end
- TEST_CERT = <<-CERT.gsub(/^\s*/, '')
+ TEST_CERT = <<-CERT.gsub(/^\s*/, "")
-----BEGIN CERTIFICATE-----
MIIDMjCCAhqgAwIBAgIBATANBgkqhkiG9w0BAQUFADAnMQwwCgYDVQQDDAN5b3Ux
FzAVBgoJkiaJk/IsZAEZFgdleGFtcGxlMB4XDTE1MDIwODAwMTIyM1oXDTQyMDYy
@@ -664,7 +664,7 @@ module Spec
-----END CERTIFICATE-----
CERT
- TEST_PKEY = <<-PKEY.gsub(/^\s*/, '')
+ TEST_PKEY = <<-PKEY.gsub(/^\s*/, "")
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA2W8V2k3jdzgMxL0mjTqbRruTdtDcdZDXKtiFkyLvsXUXvc2k
GSdgcjMOS1CkafqGz/hAUlPibjM0QEXjtQuMdTmdMrmuORLeeIZhSO+HdkTNV6j3
diff --git a/spec/support/fakeweb/windows.rb b/spec/support/fakeweb/windows.rb
index 0a5dfcb459..02be5d6cc3 100644
--- a/spec/support/fakeweb/windows.rb
+++ b/spec/support/fakeweb/windows.rb
@@ -1,14 +1,14 @@
require File.expand_path("../../path.rb", __FILE__)
include Spec::Path
-files = [ 'specs.4.8.gz',
- 'prerelease_specs.4.8.gz',
- 'quick/Marshal.4.8/rcov-1.0-mswin32.gemspec.rz',
- 'gems/rcov-1.0-mswin32.gem' ]
+files = [ "specs.4.8.gz",
+ "prerelease_specs.4.8.gz",
+ "quick/Marshal.4.8/rcov-1.0-mswin32.gemspec.rz",
+ "gems/rcov-1.0-mswin32.gem" ]
# Set up pretend http gem server with FakeWeb
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/fakeweb*/lib")].first}"
-require 'fakeweb'
+require "fakeweb"
FakeWeb.allow_net_connect = false
diff --git a/spec/support/hax.rb b/spec/support/hax.rb
index a473768531..4c456f6fbb 100644
--- a/spec/support/hax.rb
+++ b/spec/support/hax.rb
@@ -1,19 +1,19 @@
-require 'rubygems'
+require "rubygems"
class Gem::Platform
- @local = new(ENV['BUNDLER_SPEC_PLATFORM']) if ENV['BUNDLER_SPEC_PLATFORM']
+ @local = new(ENV["BUNDLER_SPEC_PLATFORM"]) if ENV["BUNDLER_SPEC_PLATFORM"]
end
-if ENV['BUNDLER_SPEC_VERSION']
+if ENV["BUNDLER_SPEC_VERSION"]
module Bundler
- VERSION = ENV['BUNDLER_SPEC_VERSION'].dup
+ VERSION = ENV["BUNDLER_SPEC_VERSION"].dup
end
end
class Object
- if ENV['BUNDLER_SPEC_RUBY_ENGINE']
+ if ENV["BUNDLER_SPEC_RUBY_ENGINE"]
remove_const :RUBY_ENGINE if defined?(RUBY_ENGINE)
- RUBY_ENGINE = ENV['BUNDLER_SPEC_RUBY_ENGINE']
+ RUBY_ENGINE = ENV["BUNDLER_SPEC_RUBY_ENGINE"]
if RUBY_ENGINE == "jruby"
JRUBY_VERSION = ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"]
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index d074a5e0bb..d179ea3ba0 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -4,7 +4,7 @@ module Spec
@in_p, @out_p, @err_p = nil, nil, nil
Dir["#{tmp}/{gems/*,*}"].each do |dir|
next if %(base remote1 gems rubygems).include?(File.basename(dir))
- if ENV['BUNDLER_SUDO_TESTS']
+ if ENV["BUNDLER_SUDO_TESTS"]
`sudo rm -rf #{dir}`
else
FileUtils.rm_rf(dir)
@@ -53,7 +53,7 @@ module Spec
end
def lib
- File.expand_path('../../../lib', __FILE__)
+ File.expand_path("../../../lib", __FILE__)
end
def bundle(cmd, options = {})
@@ -61,11 +61,11 @@ module Spec
sudo = "sudo" if options.delete(:sudo)
options["no-color"] = true unless options.key?("no-color") || %w(exec conf).include?(cmd.to_s[0..3])
- bundle_bin = File.expand_path('../../../exe/bundle', __FILE__)
+ bundle_bin = File.expand_path("../../../exe/bundle", __FILE__)
requires = options.delete(:requires) || []
- requires << File.expand_path('../fakeweb/'+options.delete(:fakeweb)+'.rb', __FILE__) if options.key?(:fakeweb)
- requires << File.expand_path('../artifice/'+options.delete(:artifice)+'.rb', __FILE__) if options.key?(:artifice)
+ requires << File.expand_path("../fakeweb/"+options.delete(:fakeweb)+".rb", __FILE__) if options.key?(:fakeweb)
+ requires << File.expand_path("../artifice/"+options.delete(:artifice)+".rb", __FILE__) if options.key?(:artifice)
requires_str = requires.map{|r| "-r#{r}"}.join(" ")
env = (options.delete(:env) || {}).map{|k, v| "#{k}='#{v}'"}.join(" ")
@@ -81,11 +81,11 @@ module Spec
expect_err = options.delete(:expect_err)
options["no-color"] = true unless options.key?("no-color")
- bundle_bin = File.expand_path('../../../exe/bundle_ruby', __FILE__)
+ bundle_bin = File.expand_path("../../../exe/bundle_ruby", __FILE__)
requires = options.delete(:requires) || []
- requires << File.expand_path('../fakeweb/'+options.delete(:fakeweb)+'.rb', __FILE__) if options.key?(:fakeweb)
- requires << File.expand_path('../artifice/'+options.delete(:artifice)+'.rb', __FILE__) if options.key?(:artifice)
+ requires << File.expand_path("../fakeweb/"+options.delete(:fakeweb)+".rb", __FILE__) if options.key?(:fakeweb)
+ requires << File.expand_path("../artifice/"+options.delete(:artifice)+".rb", __FILE__) if options.key?(:artifice)
requires_str = requires.map{|r| "-r#{r}"}.join(" ")
env = (options.delete(:env) || {}).map{|k, v| "#{k}='#{v}' "}.join
@@ -115,11 +115,11 @@ module Spec
def gembin(cmd)
lib = File.expand_path("../../../lib", __FILE__)
- old, ENV['RUBYOPT'] = ENV['RUBYOPT'], "#{ENV['RUBYOPT']} -I#{lib}"
+ old, ENV["RUBYOPT"] = ENV["RUBYOPT"], "#{ENV["RUBYOPT"]} -I#{lib}"
cmd = bundled_app("bin/#{cmd}") unless cmd.to_s.include?("/")
sys_exec(cmd.to_s)
ensure
- ENV['RUBYOPT'] = old
+ ENV["RUBYOPT"] = old
end
def sys_exec(cmd, expect_err = false)
@@ -138,10 +138,10 @@ module Spec
@out
end
- 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
FileUtils.mkdir_p(File.dirname(path))
- File.open(path, 'w') do |f|
+ File.open(path, "w") do |f|
f.puts config.to_yaml
end
config
@@ -156,7 +156,7 @@ module Spec
path = args.shift if args.first.is_a?(Pathname)
str = args.shift || ""
path.dirname.mkpath
- File.open(path.to_s, 'w') do |f|
+ File.open(path.to_s, "w") do |f|
f.puts strip_whitespace(str)
end
end
@@ -172,7 +172,7 @@ module Spec
def strip_whitespace(str)
# Trim the leading spaces
spaces = str[/\A\s+/, 0] || ""
- str.gsub(/^#{spaces}/, '')
+ str.gsub(/^#{spaces}/, "")
end
def install_gemfile(*args)
@@ -195,19 +195,19 @@ module Spec
alias install_gem install_gems
def with_gem_path_as(path)
- gem_home, gem_path = ENV['GEM_HOME'], ENV['GEM_PATH']
- ENV['GEM_HOME'], ENV['GEM_PATH'] = path.to_s, path.to_s
+ gem_home, gem_path = ENV["GEM_HOME"], ENV["GEM_PATH"]
+ ENV["GEM_HOME"], ENV["GEM_PATH"] = path.to_s, path.to_s
yield
ensure
- ENV['GEM_HOME'], ENV['GEM_PATH'] = gem_home, gem_path
+ ENV["GEM_HOME"], ENV["GEM_PATH"] = gem_home, gem_path
end
def with_path_as(path)
- old_path = ENV['PATH']
- ENV['PATH'] = "#{path}:#{ENV['PATH']}"
+ old_path = ENV["PATH"]
+ ENV["PATH"] = "#{path}:#{ENV["PATH"]}"
yield
ensure
- ENV['PATH'] = old_path
+ ENV["PATH"] = old_path
end
def break_git!
@@ -240,16 +240,16 @@ module Spec
Gem.clear_paths
- gem_home, gem_path, path = ENV['GEM_HOME'], ENV['GEM_PATH'], ENV['PATH']
- ENV['GEM_HOME'], ENV['GEM_PATH'] = system_gem_path.to_s, system_gem_path.to_s
+ gem_home, gem_path, path = ENV["GEM_HOME"], ENV["GEM_PATH"], ENV["PATH"]
+ ENV["GEM_HOME"], ENV["GEM_PATH"] = system_gem_path.to_s, system_gem_path.to_s
install_gems(*gems)
if block_given?
begin
yield
ensure
- ENV['GEM_HOME'], ENV['GEM_PATH'] = gem_home, gem_path
- ENV['PATH'] = path
+ ENV["GEM_HOME"], ENV["GEM_PATH"] = gem_home, gem_path
+ ENV["PATH"] = path
end
end
end
@@ -262,8 +262,8 @@ module Spec
Gem.clear_paths
- gem_home, gem_path, path = ENV['GEM_HOME'], ENV['GEM_PATH'], ENV['PATH']
- ENV['GEM_HOME'], ENV['GEM_PATH'] = system_gem_path.to_s, system_gem_path.to_s
+ gem_home, gem_path, path = ENV["GEM_HOME"], ENV["GEM_PATH"], ENV["PATH"]
+ ENV["GEM_HOME"], ENV["GEM_PATH"] = system_gem_path.to_s, system_gem_path.to_s
gems.each do |gem|
gem_command :install, "--no-rdoc --no-ri #{gem}"
@@ -272,8 +272,8 @@ module Spec
begin
yield
ensure
- ENV['GEM_HOME'], ENV['GEM_PATH'] = gem_home, gem_path
- ENV['PATH'] = path
+ ENV["GEM_HOME"], ENV["GEM_PATH"] = gem_home, gem_path
+ ENV["PATH"] = path
end
end
end
@@ -294,32 +294,32 @@ module Spec
def simulate_new_machine
system_gems []
FileUtils.rm_rf default_bundle_path
- FileUtils.rm_rf bundled_app('.bundle')
+ FileUtils.rm_rf bundled_app(".bundle")
end
def simulate_platform(platform)
- old, ENV['BUNDLER_SPEC_PLATFORM'] = ENV['BUNDLER_SPEC_PLATFORM'], platform.to_s
+ old, ENV["BUNDLER_SPEC_PLATFORM"] = ENV["BUNDLER_SPEC_PLATFORM"], platform.to_s
yield if block_given?
ensure
- ENV['BUNDLER_SPEC_PLATFORM'] = old if block_given?
+ ENV["BUNDLER_SPEC_PLATFORM"] = old if block_given?
end
def simulate_ruby_engine(engine, version = "1.6.0")
return if engine == local_ruby_engine
- old, ENV['BUNDLER_SPEC_RUBY_ENGINE'] = ENV['BUNDLER_SPEC_RUBY_ENGINE'], engine
- old_version, ENV['BUNDLER_SPEC_RUBY_ENGINE_VERSION'] = ENV['BUNDLER_SPEC_RUBY_ENGINE_VERSION'], version
+ old, ENV["BUNDLER_SPEC_RUBY_ENGINE"] = ENV["BUNDLER_SPEC_RUBY_ENGINE"], engine
+ old_version, ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"] = ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"], version
yield if block_given?
ensure
- ENV['BUNDLER_SPEC_RUBY_ENGINE'] = old if block_given?
- ENV['BUNDLER_SPEC_RUBY_ENGINE_VERSION'] = old_version if block_given?
+ ENV["BUNDLER_SPEC_RUBY_ENGINE"] = old if block_given?
+ ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"] = old_version if block_given?
end
def simulate_bundler_version(version)
- old, ENV['BUNDLER_SPEC_VERSION'] = ENV['BUNDLER_SPEC_VERSION'], version.to_s
+ old, ENV["BUNDLER_SPEC_VERSION"] = ENV["BUNDLER_SPEC_VERSION"], version.to_s
yield if block_given?
ensure
- ENV['BUNDLER_SPEC_VERSION'] = old if block_given?
+ ENV["BUNDLER_SPEC_VERSION"] = old if block_given?
end
def revision_for(path)
@@ -355,7 +355,7 @@ module Spec
changed_lines = pathname.readlines.map do |line|
yield line
end
- File.open(pathname, 'w') { |file| file.puts(changed_lines.join) }
+ File.open(pathname, "w") { |file| file.puts(changed_lines.join) }
end
def with_env_vars(env_hash, &block)
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb
index ea549aaccb..9761a2cbba 100644
--- a/spec/support/indexes.rb
+++ b/spec/support/indexes.rb
@@ -13,7 +13,7 @@ module Spec
alias platforms platform
def resolve
- @platforms ||= ['ruby']
+ @platforms ||= ["ruby"]
deps = []
@deps.each do |d|
@platforms.each do |p|
@@ -60,22 +60,22 @@ module Spec
gem "activesupport", version
gem "actionpack", version do
dep "activesupport", version
- if version >= v('3.0.0.beta')
- dep "rack", '~> 1.1'
+ if version >= v("3.0.0.beta")
+ dep "rack", "~> 1.1"
dep "rack-mount", ">= 0.5"
- elsif version > v('2.3') then dep "rack", '~> 1.0.0'
- elsif version > v('2.0.0') then dep "rack", '~> 0.9.0'
+ elsif version > v("2.3") then dep "rack", "~> 1.0.0"
+ elsif version > v("2.0.0") then dep "rack", "~> 0.9.0"
end
end
gem "activerecord", version do
dep "activesupport", version
- dep "arel", ">= 0.2" if version >= v('3.0.0.beta')
+ dep "arel", ">= 0.2" if version >= v("3.0.0.beta")
end
gem "actionmailer", version do
dep "activesupport", version
dep "actionmailer", version
end
- if version < v('3.0.0.beta')
+ if version < v("3.0.0.beta")
gem "railties", version do
dep "activerecord", version
dep "actionpack", version
@@ -94,22 +94,22 @@ module Spec
end
end
- versions '1.0 1.2 1.2.1 1.2.2 1.3 1.3.0.1 1.3.5 1.4.0 1.4.2 1.4.2.1' do |version|
+ versions "1.0 1.2 1.2.1 1.2.2 1.3 1.3.0.1 1.3.5 1.4.0 1.4.2 1.4.2.1" do |version|
platforms "ruby java mswin32 mingw32 x64-mingw32" do |platform|
- next if version == v('1.4.2.1') && platform != pl('x86-mswin32')
- next if version == v('1.4.2') && platform == pl('x86-mswin32')
+ next if version == v("1.4.2.1") && platform != pl("x86-mswin32")
+ next if version == v("1.4.2") && platform == pl("x86-mswin32")
gem "nokogiri", version, platform do
- dep "weakling", ">= 0.0.3" if platform =~ pl('java')
+ dep "weakling", ">= 0.0.3" if platform =~ pl("java")
end
end
end
- versions '0.0.1 0.0.2 0.0.3' do |version|
+ versions "0.0.1 0.0.2 0.0.3" do |version|
gem "weakling", version
end
# --- Rails related
- versions '1.2.3 2.2.3 2.3.5' do |version|
+ versions "1.2.3 2.2.3 2.3.5" do |version|
gem "activemerchant", version do
dep "activesupport", ">= #{version}"
end
@@ -122,17 +122,17 @@ module Spec
def a_conflict_index
build_index do
gem "builder", %w(3.0.4 3.1.4)
- gem("grape", '0.2.6') do
+ gem("grape", "0.2.6") do
dep "builder", ">= 0"
end
- versions '3.2.8 3.2.9 3.2.10 3.2.11' do |version|
+ versions "3.2.8 3.2.9 3.2.10 3.2.11" do |version|
gem("activemodel", version) do
dep "builder", "~> 3.0.0"
end
end
- gem("my_app", '1.0.0') do
+ gem("my_app", "1.0.0") do
dep "activemodel", ">= 0"
dep "grape", ">= 0"
end
@@ -151,35 +151,35 @@ module Spec
gem "d", "0.9.8"
- gem("b", '0.3.4') do
+ gem("b", "0.3.4") do
dep "a", ">= 1.5.0"
end
- gem("b", '0.3.5') do
+ gem("b", "0.3.5") do
dep "a", ">= 1.2"
end
- gem("b", '0.3.3') do
+ gem("b", "0.3.3") do
dep "a", "> 1.0"
end
- versions '3.2 3.3' do |version|
+ versions "3.2 3.3" do |version|
gem("c", version) do
dep "a", "~> 1.0"
end
end
- gem("my_app", '1.3.0') do
+ gem("my_app", "1.3.0") do
dep "c", ">= 4.0"
dep "b", ">= 0"
end
- gem("my_app", '1.2.0') do
+ gem("my_app", "1.2.0") do
dep "c", "~> 3.3.0"
dep "b", "0.3.4"
end
- gem("my_app", '1.1.0') do
+ gem("my_app", "1.1.0") do
dep "c", "~> 3.2.0"
dep "b", "0.3.5"
end
@@ -190,7 +190,7 @@ module Spec
build_index do
gem "json", %w(1.6.5 1.7.7 1.8.0)
- gem("chef", '10.26') do
+ gem("chef", "10.26") do
dep "json", [">= 1.4.4", "<= 1.7.7"]
end
@@ -198,7 +198,7 @@ module Spec
dep "json", ">= 1.7.7"
end
- gem("chef_app", '1.0.0') do
+ gem("chef_app", "1.0.0") do
dep "berkshelf", "~> 2.0"
dep "chef", "~> 10.26"
end
@@ -272,7 +272,7 @@ module Spec
build_index do
gem "json", %w(1.8.0)
- gem("chef", '10.26') do
+ gem("chef", "10.26") do
dep "json", [">= 1.4.4", "<= 1.7.7"]
end
@@ -280,7 +280,7 @@ module Spec
dep "json", ">= 1.7.7"
end
- gem("chef_app_error", '1.0.0') do
+ gem("chef_app_error", "1.0.0") do
dep "berkshelf", "~> 2.0"
dep "chef", "~> 10.26"
end
@@ -294,35 +294,35 @@ module Spec
gem "activesupport", %w(3.0.0 3.0.1 3.0.5 3.1.7)
- gem("activemodel", '3.0.5') do
+ gem("activemodel", "3.0.5") do
dep "activesupport", "= 3.0.5"
dep "builder", "~> 2.1.2"
- dep 'i18n', '~> 0.4'
+ dep "i18n", "~> 0.4"
end
- gem("activemodel", '3.0.0') do
+ gem("activemodel", "3.0.0") do
dep "activesupport", "= 3.0.0"
dep "builder", "~> 2.1.2"
- dep 'i18n', '~> 0.4.1'
+ dep "i18n", "~> 0.4.1"
end
- gem("activemodel", '3.1.3') do
+ gem("activemodel", "3.1.3") do
dep "activesupport", "= 3.1.3"
dep "builder", "~> 2.1.2"
- dep 'i18n', '~> 0.5'
+ dep "i18n", "~> 0.5"
end
- gem("activerecord", '3.0.0') do
+ gem("activerecord", "3.0.0") do
dep "activesupport", "= 3.0.0"
dep "activemodel", "= 3.0.0"
end
- gem("activerecord", '3.0.5') do
+ gem("activerecord", "3.0.5") do
dep "activesupport", "= 3.0.5"
dep "activemodel", "= 3.0.5"
end
- gem("activerecord", '3.0.9') do
+ gem("activerecord", "3.0.9") do
dep "activesupport", "= 3.1.5"
dep "activemodel", "= 3.1.5"
end
@@ -332,7 +332,7 @@ module Spec
def a_circular_index
build_index do
gem "rack", "1.0.1"
- gem("foo", '0.2.6') do
+ gem("foo", "0.2.6") do
dep "bar", ">= 0"
end
@@ -340,7 +340,7 @@ module Spec
dep "foo", ">= 0"
end
- gem("circular_app", '1.0.0') do
+ gem("circular_app", "1.0.0") do
dep "foo", ">= 0"
dep "bar", ">= 0"
end
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index e42c67be57..b4b18e7839 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -32,7 +32,7 @@ module Spec
groups << opts
names.each do |name|
name, version, platform = name.split(/\s+/)
- version_const = name == 'bundler' ? 'Bundler::VERSION' : Spec::Builders.constantize(name)
+ version_const = name == "bundler" ? "Bundler::VERSION" : Spec::Builders.constantize(name)
run "require '#{name}.rb'; puts #{version_const}", *groups
actual_version, actual_platform = out.split(/\s+/)
expect(Gem::Version.new(actual_version)).to eq(Gem::Version.new(version))
@@ -70,7 +70,7 @@ module Spec
def lockfile_should_be(expected)
should_be_locked
spaces = expected[/\A\s+/, 0] || ""
- expected.gsub!(/^#{spaces}/, '')
+ expected.gsub!(/^#{spaces}/, "")
expect(bundled_app("Gemfile.lock").read).to eq(expected)
end
end
diff --git a/spec/support/path.rb b/spec/support/path.rb
index 56e8dd8b41..21d95a6064 100644
--- a/spec/support/path.rb
+++ b/spec/support/path.rb
@@ -1,4 +1,4 @@
-require 'pathname'
+require "pathname"
module Spec
module Path
@@ -77,7 +77,7 @@ module Spec
end
def bundler_path
- Pathname.new(File.expand_path('../../../lib', __FILE__))
+ Pathname.new(File.expand_path("../../../lib", __FILE__))
end
extend self
diff --git a/spec/support/platforms.rb b/spec/support/platforms.rb
index b574d63ccb..4e73ff82aa 100644
--- a/spec/support/platforms.rb
+++ b/spec/support/platforms.rb
@@ -7,7 +7,7 @@ module Spec
end
def mac
- Gem::Platform.new('x86-darwin-10')
+ Gem::Platform.new("x86-darwin-10")
end
def java
@@ -15,19 +15,19 @@ module Spec
end
def linux
- Gem::Platform.new(['x86', 'linux', nil])
+ Gem::Platform.new(["x86", "linux", nil])
end
def mswin
- Gem::Platform.new(['x86', 'mswin32', nil])
+ Gem::Platform.new(["x86", "mswin32", nil])
end
def mingw
- Gem::Platform.new(['x86', 'mingw32', nil])
+ Gem::Platform.new(["x86", "mingw32", nil])
end
def x64_mingw
- Gem::Platform.new(['x64', 'mingw32', nil])
+ Gem::Platform.new(["x64", "mingw32", nil])
end
def all_platforms
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 0d0e35c452..5456ad2e90 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -1,14 +1,14 @@
-require 'rubygems/user_interaction'
-require 'support/path' unless defined?(Spec::Path)
+require "rubygems/user_interaction"
+require "support/path" unless defined?(Spec::Path)
module Spec
module Rubygems
def self.setup
Gem.clear_paths
- ENV['BUNDLE_PATH'] = nil
- ENV['GEM_HOME'] = ENV['GEM_PATH'] = Path.base_system_gems.to_s
- ENV['PATH'] = ["#{Path.root}/exe", "#{Path.system_gem_path}/bin", ENV['PATH']].join(File::PATH_SEPARATOR)
+ ENV["BUNDLE_PATH"] = nil
+ ENV["GEM_HOME"] = ENV["GEM_PATH"] = Path.base_system_gems.to_s
+ ENV["PATH"] = ["#{Path.root}/exe", "#{Path.system_gem_path}/bin", ENV["PATH"]].join(File::PATH_SEPARATOR)
unless File.exist?("#{Path.base_system_gems}")
FileUtils.mkdir_p(Path.base_system_gems)
@@ -24,7 +24,7 @@ module Spec
`gem install ruby-graphviz --no-rdoc --no-ri` if RUBY_VERSION >= "1.9.3"
end
- ENV['HOME'] = Path.home.to_s
+ ENV["HOME"] = Path.home.to_s
Gem::DefaultUserInteraction.ui = Gem::SilentUI.new
end
@@ -34,7 +34,7 @@ module Spec
args = args.gsub(/(?=")/, "\\")
args = %["#{args}"]
end
- lib = File.join(File.dirname(__FILE__), '..', '..', 'lib')
+ lib = File.join(File.dirname(__FILE__), "..", "..", "lib")
%x{#{Gem.ruby} -I#{lib} -rubygems -S gem --backtrace #{command} #{args}}.strip
end
end
diff --git a/spec/support/streams.rb b/spec/support/streams.rb
index 10e1d44cf5..6a0995133f 100644
--- a/spec/support/streams.rb
+++ b/spec/support/streams.rb
@@ -1,4 +1,4 @@
-require 'stringio'
+require "stringio"
def capture(*streams)
streams.map!(&:to_s)
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb
index bc122e2907..5743501032 100644
--- a/spec/update/git_spec.rb
+++ b/spec/update/git_spec.rb
@@ -7,7 +7,7 @@ describe "bundle update" do
update_git "foo", :branch => "omg"
install_gemfile <<-G
- git "#{lib_path('foo-1.0')}", :branch => "omg" do
+ git "#{lib_path("foo-1.0")}", :branch => "omg" do
gem 'foo'
end
G
@@ -28,11 +28,11 @@ describe "bundle update" do
end
install_gemfile <<-G
- gem "rails", :git => "#{lib_path('rails')}"
+ gem "rails", :git => "#{lib_path("rails")}"
G
bundle "update rails"
- expect(out).to include("Using activesupport 3.0 from #{lib_path('rails')} (at master)")
+ expect(out).to include("Using activesupport 3.0 from #{lib_path("rails")} (at master)")
should_be_installed "rails 3.0", "activesupport 3.0"
end
@@ -41,7 +41,7 @@ describe "bundle update" do
update_git "foo", :branch => "omg", :path => lib_path("foo")
install_gemfile <<-G
- git "#{lib_path('foo')}", :branch => "omg" do
+ git "#{lib_path("foo")}", :branch => "omg" do
gem 'foo'
end
G
@@ -56,17 +56,17 @@ describe "bundle update" do
end
it "floats on master when updating all gems that are pinned to the source even if you have child dependencies" do
- build_git "foo", :path => lib_path('foo')
+ build_git "foo", :path => lib_path("foo")
build_gem "bar", :to_system => true do |s|
s.add_dependency "foo"
end
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo')}"
+ gem "foo", :git => "#{lib_path("foo")}"
gem "bar"
G
- update_git "foo", :path => lib_path('foo') do |s|
+ update_git "foo", :path => lib_path("foo") do |s|
s.write "lib/foo.rb", "FOO = '1.1'"
end
@@ -80,13 +80,13 @@ describe "bundle update" do
build_git "foo", :path => lib_path("foo_two")
install_gemfile <<-G
- gem "foo", "1.0", :git => "#{lib_path('foo_one')}"
+ gem "foo", "1.0", :git => "#{lib_path("foo_one")}"
G
FileUtils.rm_rf lib_path("foo_one")
install_gemfile <<-G
- gem "foo", "1.0", :git => "#{lib_path('foo_two')}"
+ gem "foo", "1.0", :git => "#{lib_path("foo_two")}"
G
expect(err).to be_empty
@@ -130,51 +130,51 @@ describe "bundle update" do
s.add_dependency "submodule"
end
- Dir.chdir(lib_path('has_submodule-1.0')) do
- `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
+ Dir.chdir(lib_path("has_submodule-1.0")) do
+ `git submodule add #{lib_path("submodule-1.0")} submodule-1.0`
`git commit -m "submodulator"`
end
end
it "it unlocks the source when submodules are added to a git source" do
install_gemfile <<-G
- git "#{lib_path('has_submodule-1.0')}" do
+ git "#{lib_path("has_submodule-1.0")}" do
gem "has_submodule"
end
G
run "require 'submodule'"
- expect(out).to eq('GEM')
+ expect(out).to eq("GEM")
install_gemfile <<-G
- git "#{lib_path('has_submodule-1.0')}", :submodules => true do
+ git "#{lib_path("has_submodule-1.0")}", :submodules => true do
gem "has_submodule"
end
G
run "require 'submodule'"
- expect(out).to eq('GIT')
+ expect(out).to eq("GIT")
end
it "it unlocks the source when submodules are removed from git source" do
pending "This would require actually removing the submodule from the clone"
install_gemfile <<-G
- git "#{lib_path('has_submodule-1.0')}", :submodules => true do
+ git "#{lib_path("has_submodule-1.0")}", :submodules => true do
gem "has_submodule"
end
G
run "require 'submodule'"
- expect(out).to eq('GIT')
+ expect(out).to eq("GIT")
install_gemfile <<-G
- git "#{lib_path('has_submodule-1.0')}" do
+ git "#{lib_path("has_submodule-1.0")}" do
gem "has_submodule"
end
G
run "require 'submodule'"
- expect(out).to eq('GEM')
+ expect(out).to eq("GEM")
end
end
@@ -182,7 +182,7 @@ describe "bundle update" do
build_git "foo", "1.0"
install_gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ gem "foo", :git => "#{lib_path("foo-1.0")}"
G
lib_path("foo-1.0").join(".git").rmtree
@@ -194,16 +194,16 @@ describe "bundle update" do
it "should not explode on invalid revision on update of gem by name" do
build_git "rack", "0.8"
- build_git "rack", "0.8", :path => lib_path('local-rack') do |s|
+ build_git "rack", "0.8", :path => lib_path("local-rack") do |s|
s.write "lib/rack.rb", "puts :LOCAL"
end
install_gemfile <<-G
source "file://#{gem_repo1}"
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
+ 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
@@ -212,7 +212,7 @@ describe "bundle update" do
build_git "rails", "3.0", :path => lib_path("rails")
install_gemfile <<-G
- gem "rails", :git => "#{lib_path('rails')}"
+ gem "rails", :git => "#{lib_path("rails")}"
G
lockfile <<-G
@@ -229,7 +229,7 @@ describe "bundle update" do
G
bundle "update"
- expect(out).to include("Using rails 3.0 (was 2.3.2) from #{lib_path('rails')} (at master)")
+ expect(out).to include("Using rails 3.0 (was 2.3.2) from #{lib_path("rails")} (at master)")
end
end
@@ -242,7 +242,7 @@ describe "bundle update" do
install_gemfile <<-G
source "file://#{gem_repo2}"
- git "#{lib_path('foo')}" do
+ git "#{lib_path("foo")}" do
gem 'foo'
end
gem 'rack'
diff --git a/spec/update/path_spec.rb b/spec/update/path_spec.rb
index fdc4615b8a..ff09cd7fa6 100644
--- a/spec/update/path_spec.rb
+++ b/spec/update/path_spec.rb
@@ -6,13 +6,13 @@ describe "path sources" do
build_lib "activesupport", "2.3.5", :path => lib_path("rails/activesupport")
install_gemfile <<-G
- gem "activesupport", :path => "#{lib_path('rails/activesupport')}"
+ gem "activesupport", :path => "#{lib_path("rails/activesupport")}"
G
build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport")
bundle "update --source activesupport"
- expect(out).to include("Using activesupport 3.0 (was 2.3.5) from source at #{lib_path('rails/activesupport')}")
+ expect(out).to include("Using activesupport 3.0 (was 2.3.5) from source at #{lib_path("rails/activesupport")}")
end
end
end