summaryrefslogtreecommitdiff
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
parentaf694073229af89af205d24ff449f51f74316a37 (diff)
downloadbundler-a77ca278809d7f31fa51e4b821faed86324c8275.tar.gz
[RuboCop] Enable Style/StringLiterals
-rw-r--r--.rubocop.yml3
-rw-r--r--.rubocop_todo.yml12
-rw-r--r--Rakefile70
-rwxr-xr-xbin/rake2
-rwxr-xr-xbin/rspec2
-rw-r--r--bundler.gemspec24
-rwxr-xr-xexe/bundle6
-rwxr-xr-xexe/bundle_ruby6
-rwxr-xr-xexe/bundler6
-rw-r--r--lib/bundler.rb116
-rw-r--r--lib/bundler/capistrano.rb4
-rw-r--r--lib/bundler/cli.rb64
-rw-r--r--lib/bundler/cli/check.rb2
-rw-r--r--lib/bundler/cli/common.rb8
-rw-r--r--lib/bundler/cli/console.rb10
-rw-r--r--lib/bundler/cli/exec.rb2
-rw-r--r--lib/bundler/cli/gem.rb20
-rw-r--r--lib/bundler/cli/init.rb4
-rw-r--r--lib/bundler/cli/install.rb16
-rw-r--r--lib/bundler/cli/open.rb8
-rw-r--r--lib/bundler/cli/outdated.rb2
-rw-r--r--lib/bundler/cli/package.rb2
-rw-r--r--lib/bundler/cli/show.rb8
-rw-r--r--lib/bundler/cli/viz.rb2
-rw-r--r--lib/bundler/current_ruby.rb6
-rw-r--r--lib/bundler/definition.rb10
-rw-r--r--lib/bundler/dependency.rb12
-rw-r--r--lib/bundler/deployment.rb4
-rw-r--r--lib/bundler/dsl.rb24
-rw-r--r--lib/bundler/env.rb14
-rw-r--r--lib/bundler/environment.rb2
-rw-r--r--lib/bundler/fetcher.rb22
-rw-r--r--lib/bundler/fetcher/base.rb2
-rw-r--r--lib/bundler/fetcher/dependency.rb4
-rw-r--r--lib/bundler/fetcher/index.rb2
-rw-r--r--lib/bundler/friendly_errors.rb8
-rw-r--r--lib/bundler/gem_helper.rb38
-rw-r--r--lib/bundler/gem_helpers.rb14
-rw-r--r--lib/bundler/gem_installer.rb2
-rw-r--r--lib/bundler/gem_tasks.rb2
-rw-r--r--lib/bundler/graph.rb10
-rw-r--r--lib/bundler/index.rb4
-rw-r--r--lib/bundler/injector.rb2
-rw-r--r--lib/bundler/inline.rb4
-rw-r--r--lib/bundler/installer.rb30
-rw-r--r--lib/bundler/installer/parallel_installer.rb2
-rw-r--r--lib/bundler/lockfile_parser.rb4
-rw-r--r--lib/bundler/match_platform.rb2
-rw-r--r--lib/bundler/psyched_yaml.rb6
-rw-r--r--lib/bundler/resolver.rb38
-rw-r--r--lib/bundler/rubygems_ext.rb26
-rw-r--r--lib/bundler/rubygems_integration.rb48
-rw-r--r--lib/bundler/runtime.rb24
-rw-r--r--lib/bundler/settings.rb10
-rw-r--r--lib/bundler/setup.rb6
-rw-r--r--lib/bundler/shared_helpers.rb24
-rw-r--r--lib/bundler/similarity_detector.rb2
-rw-r--r--lib/bundler/source.rb6
-rw-r--r--lib/bundler/source/git.rb20
-rw-r--r--lib/bundler/source/path.rb2
-rw-r--r--lib/bundler/source/rubygems.rb16
-rw-r--r--lib/bundler/spec_set.rb12
-rw-r--r--lib/bundler/ssl_certs/certificate_manager.rb10
-rw-r--r--lib/bundler/stub_specification.rb2
-rwxr-xr-xlib/bundler/templates/Executable10
-rw-r--r--lib/bundler/ui.rb6
-rw-r--r--lib/bundler/ui/rg_proxy.rb4
-rw-r--r--lib/bundler/ui/shell.rb6
-rw-r--r--lib/bundler/vendored_molinillo.rb2
-rw-r--r--lib/bundler/vendored_persistent.rb6
-rw-r--r--lib/bundler/vendored_thor.rb4
-rw-r--r--lib/bundler/vlad.rb2
-rw-r--r--lib/bundler/worker.rb2
-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
163 files changed, 1311 insertions, 1320 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 61195f8fe0..d0b85635ba 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -28,6 +28,9 @@ Style/SignalException:
Style/StringLiterals:
EnforcedStyle: double_quotes
+Style/StringLiteralsInInterpolation:
+ EnforcedStyle: double_quotes
+
# Having these make it easier to *not* forget to add one when adding a new
# value and you can simply copy the previous line.
Style/TrailingComma:
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index c88b42da1b..f36f1340ef 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -481,18 +481,6 @@ Style/SpaceInsideHashLiteralBraces:
Style/SpaceInsideStringInterpolation:
Enabled: false
-# Offense count: 1390
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/StringLiterals:
- Enabled: false
-
-# Offense count: 106
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/StringLiteralsInInterpolation:
- Enabled: false
-
# Offense count: 14
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
diff --git a/Rakefile b/Rakefile
index 4247f87553..0e07f90f5a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
$:.unshift File.expand_path("../lib", __FILE__)
-require 'shellwords'
-require 'benchmark'
+require "shellwords"
+require "benchmark"
RUBYGEMS_REPO = File.expand_path("tmp/rubygems")
BUNDLER_SPEC = Gem::Specification.load("bundler.gemspec")
@@ -27,60 +27,60 @@ module Rake
end
end
-def clean_files(files, regex, replacement = '')
+def clean_files(files, regex, replacement = "")
files.each do |file|
contents = File.read(file)
contents.gsub!(regex, replacement)
- File.open(file, 'w') { |f| f << contents }
+ File.open(file, "w") { |f| f << contents }
end
end
namespace :molinillo do
task :namespace do
- files = Dir.glob('lib/bundler/vendor/molinillo*/**/*.rb')
- clean_files(files, 'Molinillo', 'Bundler::Molinillo')
+ files = Dir.glob("lib/bundler/vendor/molinillo*/**/*.rb")
+ clean_files(files, "Molinillo", "Bundler::Molinillo")
clean_files(files, /require (["'])molinillo/, 'require \1bundler/vendor/molinillo/lib/molinillo')
end
task :clean do
- files = Dir.glob('lib/bundler/vendor/molinillo*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
+ files = Dir.glob("lib/bundler/vendor/molinillo*/*", File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split("/").last }
rm_r files
end
task :update, [:tag] => [] do |t, args|
tag = args[:tag]
- Dir.chdir 'lib/bundler/vendor' do
- rm_rf 'molinillo'
+ Dir.chdir "lib/bundler/vendor" do
+ rm_rf "molinillo"
sh "curl -L https://github.com/CocoaPods/molinillo/archive/#{tag}.tar.gz | tar -xz"
sh "mv Molinillo-* molinillo"
end
- Rake::Task['molinillo:namespace'].invoke
- Rake::Task['molinillo:clean'].invoke
+ Rake::Task["molinillo:namespace"].invoke
+ Rake::Task["molinillo:clean"].invoke
end
end
namespace :thor do
task :namespace do
- files = Dir.glob('lib/bundler/vendor/thor*/**/*.rb')
- clean_files(files, 'Thor', 'Bundler::Thor')
+ files = Dir.glob("lib/bundler/vendor/thor*/**/*.rb")
+ clean_files(files, "Thor", "Bundler::Thor")
clean_files(files, /require (["'])thor/, 'require \1bundler/vendor/thor/lib/thor')
clean_files(files, /(autoload\s+[:\w]+,\s+["'])(thor[\w\/]+["'])/, '\1bundler/vendor/thor/lib/\2')
end
task :clean do
- files = Dir.glob('lib/bundler/vendor/thor*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
+ files = Dir.glob("lib/bundler/vendor/thor*/*", File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split("/").last }
rm_r files
end
task :update, [:tag] => [] do |t, args|
tag = args[:tag]
- Dir.chdir 'lib/bundler/vendor' do
- rm_rf 'thor'
+ Dir.chdir "lib/bundler/vendor" do
+ rm_rf "thor"
sh "curl -L https://github.com/erikhuda/thor/archive/#{tag}.tar.gz | tar -xz"
sh "mv thor-* thor"
end
- Rake::Task['thor:namespace'].invoke
- Rake::Task['thor:clean'].invoke
+ Rake::Task["thor:namespace"].invoke
+ Rake::Task["thor:clean"].invoke
end
end
@@ -92,7 +92,7 @@ namespace :spec do
end]
# JRuby can't build ronn or rdiscount, so we skip that
- if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
+ if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
deps.delete("ronn")
deps.delete("rdiscount")
end
@@ -104,7 +104,7 @@ namespace :spec do
# Download and install gems used inside tests
$LOAD_PATH.unshift("./spec")
- require 'support/rubygems_ext'
+ require "support/rubygems_ext"
Spec::Rubygems.setup
end
@@ -118,7 +118,7 @@ namespace :spec do
sh "sudo apt-get install groff -y"
# Install graphviz so that the viz specs can run
sh "sudo apt-get install graphviz -y 2>&1 | tail -n 2"
- if RUBY_VERSION < '1.9'
+ if RUBY_VERSION < "1.9"
# Downgrade Rubygems on 1.8 so Ronn can be required
# https://github.com/rubygems/rubygems/issues/784
sh "gem update --system 2.1.11"
@@ -135,8 +135,8 @@ end
begin
rspec = BUNDLER_SPEC.development_dependencies.find{|d| d.name == "rspec" }
- gem 'rspec', rspec.requirement.to_s
- require 'rspec/core/rake_task'
+ gem "rspec", rspec.requirement.to_s
+ require "rspec/core/rake_task"
desc "Run specs"
RSpec::Core::RakeTask.new
@@ -151,26 +151,26 @@ begin
namespace :spec do
task :clean do
- rm_rf 'tmp'
+ rm_rf "tmp"
end
desc "Run the real-world spec suite (requires internet)"
task :realworld => ["set_realworld", "spec"]
task :set_realworld do
- ENV['BUNDLER_REALWORLD_TESTS'] = '1'
+ ENV["BUNDLER_REALWORLD_TESTS"] = "1"
end
desc "Run the spec suite with the sudo tests"
task :sudo => ["set_sudo", "spec", "clean_sudo"]
task :set_sudo do
- ENV['BUNDLER_SUDO_TESTS'] = '1'
+ ENV["BUNDLER_SUDO_TESTS"] = "1"
end
task :clean_sudo do
puts "Cleaning up sudo test files..."
- system "sudo rm -rf #{File.expand_path('../tmp/sudo_gem_home', __FILE__)}"
+ system "sudo rm -rf #{File.expand_path("../tmp/sudo_gem_home", __FILE__)}"
end
# Rubygems specs by version
@@ -210,7 +210,7 @@ begin
puts "Checked out rubygems '#{rg}' at #{hash}"
ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
- puts "RUBYOPT=#{ENV['RUBYOPT']}"
+ puts "RUBYOPT=#{ENV["RUBYOPT"]}"
end
task rg => ["man:build", "clone_rubygems_#{rg}"]
@@ -224,7 +224,7 @@ begin
end
task "setup_co" do
- rg = File.expand_path ENV['RG']
+ rg = File.expand_path ENV["RG"]
puts "Running specs against Rubygems in #{rg}..."
ENV["RUBYOPT"] = "-I#{rg} #{rubyopt}"
end
@@ -235,7 +235,7 @@ begin
desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
task :travis do
- rg = ENV['RGV'] || raise("Rubygems version is required on Travis!")
+ rg = ENV["RGV"] || raise("Rubygems version is required on Travis!")
puts "\n\e[1;33m[Travis CI] Running bundler specs against rubygems #{rg}\e[m\n\n"
specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
@@ -245,7 +245,7 @@ begin
puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
sudos = system("sudo -E rake spec:rubygems:#{rg}:sudo")
# clean up by chowning the newly root-owned tmp directory back to the travis user
- system("sudo chown -R #{ENV['USER']} #{File.join(File.dirname(__FILE__), 'tmp')}")
+ system("sudo chown -R #{ENV["USER"]} #{File.join(File.dirname(__FILE__), "tmp")}")
Rake::Task["spec:rubygems:#{rg}"].reenable
@@ -276,7 +276,7 @@ rescue LoadError
end
begin
- require 'ronn'
+ require "ronn"
namespace :man do
directory "lib/bundler/man"
@@ -299,7 +299,7 @@ begin
task :clean do
leftovers = Dir["lib/bundler/man/*"].reject do |f|
- basename = File.basename(f).sub(/\.(txt|ronn)/, '')
+ basename = File.basename(f).sub(/\.(txt|ronn)/, "")
sources.include?(basename)
end
rm leftovers if leftovers.any?
@@ -325,11 +325,11 @@ end
desc "Update vendored SSL certs to match the certs vendored by Rubygems"
task :update_certs => "spec:rubygems:clone_rubygems_master" do
- require 'bundler/ssl_certs/certificate_manager'
+ require "bundler/ssl_certs/certificate_manager"
Bundler::SSLCerts::CertificateManager.update_from!(RUBYGEMS_REPO)
end
-require 'bundler/gem_tasks'
+require "bundler/gem_tasks"
task :build => ["man:build"]
task :release => ["man:require", "man:build"]
diff --git a/bin/rake b/bin/rake
index 4abe5efe45..b3bb77202e 100755
--- a/bin/rake
+++ b/bin/rake
@@ -5,4 +5,4 @@ bundler_spec.dependencies.each do |dep|
gem dep.name, dep.requirement.to_s
end
-load Gem.bin_path('rake', 'rake')
+load Gem.bin_path("rake", "rake")
diff --git a/bin/rspec b/bin/rspec
index 0f8def6897..97125f4e62 100755
--- a/bin/rspec
+++ b/bin/rspec
@@ -5,4 +5,4 @@ bundler_spec.dependencies.each do |dep|
gem dep.name, dep.requirement.to_s
end
-load Gem.bin_path('rspec-core', 'rspec')
+load Gem.bin_path("rspec-core", "rspec")
diff --git a/bundler.gemspec b/bundler.gemspec
index c2a6340b77..0190b3a200 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -1,31 +1,31 @@
# coding: utf-8
-lib = File.expand_path('../lib/', __FILE__)
+lib = File.expand_path("../lib/", __FILE__)
$:.unshift lib unless $:.include?(lib)
-require 'bundler/version'
+require "bundler/version"
Gem::Specification.new do |s|
- s.name = 'bundler'
+ s.name = "bundler"
s.version = Bundler::VERSION
- s.licenses = ['MIT']
+ s.licenses = ["MIT"]
s.authors = ["André Arko", "Terence Lee", "Carl Lerche", "Yehuda Katz"]
s.email = ["andre.arko+terence.lee@gmail.com"]
s.homepage = "http://bundler.io"
s.summary = %q{The best way to manage your application's dependencies}
s.description = %q{Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably}
- s.required_ruby_version = '>= 1.8.7'
- s.required_rubygems_version = '>= 1.3.6'
+ s.required_ruby_version = ">= 1.8.7"
+ s.required_rubygems_version = ">= 1.3.6"
- s.add_development_dependency 'mustache', '0.99.6'
- s.add_development_dependency 'rake', '~> 10.0'
- s.add_development_dependency 'rdiscount', '~> 1.6'
- s.add_development_dependency 'ronn', '~> 0.7.3'
- s.add_development_dependency 'rspec', '~> 3.0'
+ s.add_development_dependency "mustache", "0.99.6"
+ s.add_development_dependency "rake", "~> 10.0"
+ s.add_development_dependency "rdiscount", "~> 1.6"
+ s.add_development_dependency "ronn", "~> 0.7.3"
+ s.add_development_dependency "rspec", "~> 3.0"
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
# we don't check in man pages, but we need to ship them because
# we use them to generate the long-form help for each command.
- s.files += Dir.glob('lib/bundler/man/**/*')
+ s.files += Dir.glob("lib/bundler/man/**/*")
s.bindir = "exe"
s.executables = %w(bundle bundler)
diff --git a/exe/bundle b/exe/bundle
index 89c823eae3..a06c6ab47e 100755
--- a/exe/bundle
+++ b/exe/bundle
@@ -3,7 +3,7 @@
# Exit cleanly from an early interrupt
Signal.trap("INT") { exit 1 }
-require 'bundler'
+require "bundler"
# Check if an older version of bundler is installed
$LOAD_PATH.each do |path|
if path =~ %r'/bundler-0\.(\d+)' && $1.to_i < 9
@@ -14,8 +14,8 @@ $LOAD_PATH.each do |path|
end
end
-require 'bundler/friendly_errors'
+require "bundler/friendly_errors"
Bundler.with_friendly_errors do
- require 'bundler/cli'
+ require "bundler/cli"
Bundler::CLI.start(ARGV, :debug => true)
end
diff --git a/exe/bundle_ruby b/exe/bundle_ruby
index d0cfdc2778..734e5a7874 100755
--- a/exe/bundle_ruby
+++ b/exe/bundle_ruby
@@ -2,9 +2,9 @@
Signal.trap("INT") { exit 1 }
-require 'bundler/ruby_version'
-require 'bundler/ruby_dsl'
-require 'bundler/shared_helpers'
+require "bundler/ruby_version"
+require "bundler/ruby_dsl"
+require "bundler/shared_helpers"
module Bundler
class GemfileError < RuntimeError; end
diff --git a/exe/bundler b/exe/bundler
index 89c823eae3..a06c6ab47e 100755
--- a/exe/bundler
+++ b/exe/bundler
@@ -3,7 +3,7 @@
# Exit cleanly from an early interrupt
Signal.trap("INT") { exit 1 }
-require 'bundler'
+require "bundler"
# Check if an older version of bundler is installed
$LOAD_PATH.each do |path|
if path =~ %r'/bundler-0\.(\d+)' && $1.to_i < 9
@@ -14,8 +14,8 @@ $LOAD_PATH.each do |path|
end
end
-require 'bundler/friendly_errors'
+require "bundler/friendly_errors"
Bundler.with_friendly_errors do
- require 'bundler/cli'
+ require "bundler/cli"
Bundler::CLI.start(ARGV, :debug => true)
end
diff --git a/lib/bundler.rb b/lib/bundler.rb
index d46c4394e2..0928d1a68d 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -1,51 +1,51 @@
-require 'fileutils'
-require 'pathname'
-require 'rbconfig'
-require 'bundler/gem_path_manipulation'
-require 'bundler/rubygems_ext'
-require 'bundler/rubygems_integration'
-require 'bundler/version'
-require 'bundler/constants'
-require 'bundler/current_ruby'
+require "fileutils"
+require "pathname"
+require "rbconfig"
+require "bundler/gem_path_manipulation"
+require "bundler/rubygems_ext"
+require "bundler/rubygems_integration"
+require "bundler/version"
+require "bundler/constants"
+require "bundler/current_ruby"
module Bundler
preserve_gem_path
ORIGINAL_ENV = ENV.to_hash
- autoload :Definition, 'bundler/definition'
- autoload :Dependency, 'bundler/dependency'
- autoload :DepProxy, 'bundler/dep_proxy'
- autoload :Deprecate, 'bundler/deprecate'
- autoload :Dsl, 'bundler/dsl'
- autoload :EndpointSpecification, 'bundler/endpoint_specification'
- autoload :Environment, 'bundler/environment'
- autoload :Env, 'bundler/env'
- autoload :Fetcher, 'bundler/fetcher'
- autoload :GemHelper, 'bundler/gem_helper'
- autoload :GemHelpers, 'bundler/gem_helpers'
- autoload :GemInstaller, 'bundler/gem_installer'
- autoload :Graph, 'bundler/graph'
- autoload :Index, 'bundler/index'
- autoload :Installer, 'bundler/installer'
- autoload :Injector, 'bundler/injector'
- autoload :LazySpecification, 'bundler/lazy_specification'
- autoload :LockfileParser, 'bundler/lockfile_parser'
- autoload :MatchPlatform, 'bundler/match_platform'
- autoload :RemoteSpecification, 'bundler/remote_specification'
- autoload :Resolver, 'bundler/resolver'
- autoload :Retry, 'bundler/retry'
- autoload :RubyVersion, 'bundler/ruby_version'
- autoload :RubyDsl, 'bundler/ruby_dsl'
- autoload :Runtime, 'bundler/runtime'
- autoload :Settings, 'bundler/settings'
- autoload :SharedHelpers, 'bundler/shared_helpers'
- autoload :SpecSet, 'bundler/spec_set'
- autoload :StubSpecification, 'bundler/stub_specification'
- autoload :Source, 'bundler/source'
- autoload :SourceList, 'bundler/source_list'
- autoload :Specification, 'bundler/shared_helpers'
- autoload :SystemRubyVersion, 'bundler/ruby_version'
- autoload :UI, 'bundler/ui'
+ autoload :Definition, "bundler/definition"
+ autoload :Dependency, "bundler/dependency"
+ autoload :DepProxy, "bundler/dep_proxy"
+ autoload :Deprecate, "bundler/deprecate"
+ autoload :Dsl, "bundler/dsl"
+ autoload :EndpointSpecification, "bundler/endpoint_specification"
+ autoload :Environment, "bundler/environment"
+ autoload :Env, "bundler/env"
+ autoload :Fetcher, "bundler/fetcher"
+ autoload :GemHelper, "bundler/gem_helper"
+ autoload :GemHelpers, "bundler/gem_helpers"
+ autoload :GemInstaller, "bundler/gem_installer"
+ autoload :Graph, "bundler/graph"
+ autoload :Index, "bundler/index"
+ autoload :Installer, "bundler/installer"
+ autoload :Injector, "bundler/injector"
+ autoload :LazySpecification, "bundler/lazy_specification"
+ autoload :LockfileParser, "bundler/lockfile_parser"
+ autoload :MatchPlatform, "bundler/match_platform"
+ autoload :RemoteSpecification, "bundler/remote_specification"
+ autoload :Resolver, "bundler/resolver"
+ autoload :Retry, "bundler/retry"
+ autoload :RubyVersion, "bundler/ruby_version"
+ autoload :RubyDsl, "bundler/ruby_dsl"
+ autoload :Runtime, "bundler/runtime"
+ autoload :Settings, "bundler/settings"
+ autoload :SharedHelpers, "bundler/shared_helpers"
+ autoload :SpecSet, "bundler/spec_set"
+ autoload :StubSpecification, "bundler/stub_specification"
+ autoload :Source, "bundler/source"
+ autoload :SourceList, "bundler/source_list"
+ autoload :Specification, "bundler/shared_helpers"
+ autoload :SystemRubyVersion, "bundler/ruby_version"
+ autoload :UI, "bundler/ui"
class BundlerError < StandardError
def self.status_code(code)
@@ -215,9 +215,9 @@ module Bundler
end
def app_config_path
- ENV['BUNDLE_APP_CONFIG'] ?
- Pathname.new(ENV['BUNDLE_APP_CONFIG']).expand_path(root) :
- root.join('.bundle')
+ ENV["BUNDLE_APP_CONFIG"] ?
+ Pathname.new(ENV["BUNDLE_APP_CONFIG"]).expand_path(root) :
+ root.join(".bundle")
end
def app_cache(custom_path = nil)
@@ -250,11 +250,11 @@ module Bundler
def with_clean_env
with_original_env do
- ENV['MANPATH'] = ENV['BUNDLE_ORIG_MANPATH']
- ENV.delete_if { |k,_| k[0,7] == 'BUNDLE_' }
- if ENV.has_key? 'RUBYOPT'
- ENV['RUBYOPT'] = ENV['RUBYOPT'].sub '-rbundler/setup', ''
- ENV['RUBYOPT'] = ENV['RUBYOPT'].sub "-I#{File.expand_path('..', __FILE__)}", ''
+ ENV["MANPATH"] = ENV["BUNDLE_ORIG_MANPATH"]
+ ENV.delete_if { |k,_| k[0,7] == "BUNDLE_" }
+ if ENV.has_key? "RUBYOPT"
+ ENV["RUBYOPT"] = ENV["RUBYOPT"].sub "-rbundler/setup", ""
+ ENV["RUBYOPT"] = ENV["RUBYOPT"].sub "-I#{File.expand_path("..", __FILE__)}", ""
end
yield
end
@@ -307,7 +307,7 @@ module Bundler
bin_dir = bin_dir.parent until bin_dir.exist?
# if any directory is not writable, we need sudo
- files = [path, bin_dir] | Dir[path.join('build_info/*').to_s] | Dir[path.join('*').to_s]
+ files = [path, bin_dir] | Dir[path.join("build_info/*").to_s] | Dir[path.join("*").to_s]
sudo_needed = files.any?{|f| !File.writable?(f) }
end
@@ -326,8 +326,8 @@ module Bundler
def which(executable)
if File.file?(executable) && File.executable?(executable)
executable
- elsif ENV['PATH']
- path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|
+ elsif ENV["PATH"]
+ path = ENV["PATH"].split(File::PATH_SEPARATOR).find do |p|
abs_path = File.join(p, executable)
File.file?(abs_path) && File.executable?(abs_path)
end
@@ -336,7 +336,7 @@ module Bundler
end
def sudo(str)
- prompt = "\n\n" + <<-PROMPT.gsub(/^ {6}/, '').strip + " "
+ prompt = "\n\n" + <<-PROMPT.gsub(/^ {6}/, "").strip + " "
Your user account isn't allowed to install to the system Rubygems.
You can cancel this installation and run:
@@ -432,9 +432,9 @@ module Bundler
end
def configure_gem_home_and_path
- blank_home = ENV['GEM_HOME'].nil? || ENV['GEM_HOME'].empty?
+ blank_home = ENV["GEM_HOME"].nil? || ENV["GEM_HOME"].empty?
if settings[:disable_shared_gems]
- ENV['GEM_PATH'] = ''
+ ENV["GEM_PATH"] = ""
elsif blank_home || Bundler.rubygems.gem_dir != bundle_path.to_s
possibles = [Bundler.rubygems.gem_dir, Bundler.rubygems.gem_path]
paths = possibles.flatten.compact.uniq.reject(&:empty?)
@@ -449,7 +449,7 @@ module Bundler
# TODO: This mkdir_p is only needed for JRuby <= 1.5 and should go away (GH #602)
FileUtils.mkdir_p bundle_path.to_s rescue nil
- ENV['GEM_HOME'] = File.expand_path(bundle_path, root)
+ ENV["GEM_HOME"] = File.expand_path(bundle_path, root)
Bundler.rubygems.clear_paths
end
diff --git a/lib/bundler/capistrano.rb b/lib/bundler/capistrano.rb
index e372a1af90..12499c7bf4 100644
--- a/lib/bundler/capistrano.rb
+++ b/lib/bundler/capistrano.rb
@@ -2,8 +2,8 @@
#
# Just add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
# Bundler will be activated after each new deployment.
-require 'bundler/deployment'
-require 'capistrano/version'
+require "bundler/deployment"
+require "capistrano/version"
if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0")
raise "For Capistrano 3.x integration, please use http://github.com/capistrano/bundler"
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index cb930e6f4c..cdccdf8e3e 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -1,5 +1,5 @@
-require 'bundler'
-require 'bundler/vendored_thor'
+require "bundler"
+require "bundler/vendored_thor"
module Bundler
class CLI < Thor
@@ -17,7 +17,7 @@ module Bundler
super
custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
- ENV['BUNDLE_GEMFILE'] = File.expand_path(custom_gemfile) if custom_gemfile
+ ENV["BUNDLE_GEMFILE"] = File.expand_path(custom_gemfile) if custom_gemfile
Bundler.settings[:retry] = options[:retry] if options[:retry]
@@ -84,7 +84,7 @@ module Bundler
D
method_option "gemspec", :type => :string, :banner => "Use the specified .gemspec to create the Gemfile"
def init
- require 'bundler/cli/init'
+ require "bundler/cli/init"
Init.new(options.dup).run
end
@@ -102,7 +102,7 @@ module Bundler
"Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine"
map "c" => "check"
def check
- require 'bundler/cli/check'
+ require "bundler/cli/check"
Check.new(options).run
end
@@ -151,14 +151,14 @@ module Bundler
"Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application"
method_option "trust-policy", :alias => "P", :type => :string, :banner =>
"Gem trust policy (like gem install -P). Must be one of " +
- Bundler.rubygems.security_policy_keys.join('|')
+ Bundler.rubygems.security_policy_keys.join("|")
method_option "without", :type => :array, :banner =>
"Exclude gems that are part of the specified named group."
method_option "with", :type => :array, :banner =>
"Include gems that are part of the specified named group."
map "i" => "install"
def install
- require 'bundler/cli/install'
+ require "bundler/cli/install"
Install.new(options.dup).run
end
@@ -183,7 +183,7 @@ module Bundler
method_option "force", :type => :boolean, :banner =>
"Force downloading every gem."
def update(*gems)
- require 'bundler/cli/update'
+ require "bundler/cli/update"
Update.new(options, gems).run
end
@@ -197,7 +197,7 @@ module Bundler
method_option "outdated", :type => :boolean,
:banner => "Show verbose output including whether gems are outdated."
def show(gem_name = nil)
- require 'bundler/cli/show'
+ require "bundler/cli/show"
Show.new(options, gem_name).run
end
map %w(list) => "show"
@@ -212,7 +212,7 @@ module Bundler
method_option "path", :type => :string, :lazy_default => "bin", :banner =>
"Binstub destination directory (default bin)"
def binstubs(*gems)
- require 'bundler/cli/binstubs'
+ require "bundler/cli/binstubs"
Binstubs.new(options, gems).run
end
@@ -230,7 +230,7 @@ module Bundler
method_option "strict", :type => :boolean, :banner =>
"Only list newer versions allowed by your Gemfile requirements"
def outdated(*gems)
- require 'bundler/cli/outdated'
+ require "bundler/cli/outdated"
Outdated.new(options, gems).run
end
@@ -239,7 +239,7 @@ module Bundler
method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms, not just the current one"
method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache."
def cache
- require 'bundler/cli/cache'
+ require "bundler/cli/cache"
Cache.new(options).run
end
@@ -261,7 +261,7 @@ module Bundler
bundle without having to download any additional gems.
D
def package
- require 'bundler/cli/package'
+ require "bundler/cli/package"
Package.new(options).run
end
map %w(pack) => :package
@@ -275,7 +275,7 @@ module Bundler
D
map "e" => "exec"
def exec(*args)
- require 'bundler/cli/exec'
+ require "bundler/cli/exec"
Exec.new(options, args).run
end
@@ -292,19 +292,19 @@ module Bundler
where they were specified.
D
def config(*args)
- require 'bundler/cli/config'
+ require "bundler/cli/config"
Config.new(options, args, self).run
end
desc "open GEM", "Opens the source directory of the given bundled gem"
def open(name)
- require 'bundler/cli/open'
+ require "bundler/cli/open"
Open.new(options, name).run
end
desc "console [GROUP]", "Opens an IRB session with the bundle pre-loaded"
def console(group = nil)
- require 'bundler/cli/console'
+ require "bundler/cli/console"
Console.new(options, group).run
end
@@ -328,39 +328,39 @@ module Bundler
end
end
- desc 'viz [OPTIONS]', "Generates a visual dependency graph"
+ desc "viz [OPTIONS]", "Generates a visual dependency graph"
long_desc <<-D
Viz generates a PNG file of the current Gemfile as a dependency graph.
Viz requires the ruby-graphviz gem (and its dependencies).
The associated gems must also be installed via 'bundle install'.
D
- method_option :file, :type => :string, :default => 'gem_graph', :aliases => '-f', :banner => "The name to use for the generated file. see format option"
- method_option :format, :type => :string, :default => "png", :aliases => '-F', :banner => "This is output format option. Supported format is png, jpg, svg, dot ..."
- method_option :requirements, :type => :boolean, :default => false, :aliases => '-r', :banner => "Set to show the version of each required dependency."
- method_option :version, :type => :boolean, :default => false, :aliases => '-v', :banner => "Set to show each gem version."
+ method_option :file, :type => :string, :default => "gem_graph", :aliases => "-f", :banner => "The name to use for the generated file. see format option"
+ method_option :format, :type => :string, :default => "png", :aliases => "-F", :banner => "This is output format option. Supported format is png, jpg, svg, dot ..."
+ method_option :requirements, :type => :boolean, :default => false, :aliases => "-r", :banner => "Set to show the version of each required dependency."
+ method_option :version, :type => :boolean, :default => false, :aliases => "-v", :banner => "Set to show each gem version."
method_option :without, :type => :array, :default => [], :banner => "Exclude gems that are part of the specified named group."
def viz
- require 'bundler/cli/viz'
+ require "bundler/cli/viz"
Viz.new(options).run
end
desc "gem GEM [OPTIONS]", "Creates a skeleton for creating a rubygem"
- method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :desc => "Generate a binary for your library."
+ method_option :bin, :type => :boolean, :default => false, :aliases => "-b", :desc => "Generate a binary for your library."
method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config gem.coc true`."
method_option :edit, :type => :string, :aliases => "-e", :required => false, :banner => "EDITOR",
- :lazy_default => [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? },
+ :lazy_default => [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find{|e| !e.nil? && !e.empty? },
:desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
method_option :ext, :type => :boolean, :default => false, :desc => "Generate the boilerplate for C extension code"
method_option :mit, :type => :boolean, :desc => "Generate an MIT license file"
- method_option :test, :type => :string, :lazy_default => 'rspec', :aliases => '-t', :banner => "rspec",
+ method_option :test, :type => :string, :lazy_default => "rspec", :aliases => "-t", :banner => "rspec",
:desc => "Generate a test directory for your library, either rspec or minitest. Set a default with `bundle config gem.test rspec`."
def gem(name)
- require 'bundler/cli/gem'
+ require "bundler/cli/gem"
Gem.new(options, name, self).run
end
def self.source_root
- File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
+ File.expand_path(File.join(File.dirname(__FILE__), "templates"))
end
desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory"
@@ -369,7 +369,7 @@ module Bundler
method_option "force", :type => :boolean, :default => false, :banner =>
"Forces clean even if --path is not set"
def clean
- require 'bundler/cli/clean'
+ require "bundler/cli/clean"
Clean.new(options.dup).run
end
@@ -377,13 +377,13 @@ module Bundler
method_option "ruby", :type => :boolean, :default => false, :banner =>
"only display ruby related platform information"
def platform
- require 'bundler/cli/platform'
+ require "bundler/cli/platform"
Platform.new(options).run
end
desc "inject GEM VERSION ...", "Add the named gem(s), with version requirements, to the resolved Gemfile"
def inject(name, version, *gems)
- require 'bundler/cli/inject'
+ require "bundler/cli/inject"
Inject.new(options, name, version, gems).run
end
@@ -397,7 +397,7 @@ module Bundler
method_option "lockfile", :type => :string, :default => nil, :banner =>
"the path the lockfile should be written to"
def lock
- require 'bundler/cli/lock'
+ require "bundler/cli/lock"
Lock.new(options).run
end
diff --git a/lib/bundler/cli/check.rb b/lib/bundler/cli/check.rb
index 22fea6e4a9..da00886327 100644
--- a/lib/bundler/cli/check.rb
+++ b/lib/bundler/cli/check.rb
@@ -8,7 +8,7 @@ module Bundler
def run
if options[:path]
Bundler.settings[:path] = File.expand_path(options[:path])
- Bundler.settings[:disable_shared_gems] = '1'
+ Bundler.settings[:disable_shared_gems] = "1"
end
begin
definition = Bundler.definition
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 83315a272e..28dce524eb 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -30,21 +30,21 @@ module Bundler
end
def self.ask_for_spec_from(specs)
- if !$stdout.tty? && ENV['BUNDLE_SPEC_RUN'].nil?
+ if !$stdout.tty? && ENV["BUNDLE_SPEC_RUN"].nil?
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
end
specs.each_with_index do |spec, index|
Bundler.ui.info "#{index.succ} : #{spec.name}", true
end
- Bundler.ui.info '0 : - exit -', true
+ Bundler.ui.info "0 : - exit -", true
- num = Bundler.ui.ask('> ').to_i
+ num = Bundler.ui.ask("> ").to_i
num > 0 ? specs[num - 1] : nil
end
def self.gem_not_found_message(missing_gem_name, alternatives)
- require 'bundler/similarity_detector'
+ require "bundler/similarity_detector"
message = "Could not find gem '#{missing_gem_name}'."
alternate_names = alternatives.map { |a| a.respond_to?(:name) ? a.name : a }
suggestions = SimilarityDetector.new(alternate_names).similar_word_list(missing_gem_name)
diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb
index 92bf848b47..7c7010e7cf 100644
--- a/lib/bundler/cli/console.rb
+++ b/lib/bundler/cli/console.rb
@@ -10,7 +10,7 @@ module Bundler
group ? Bundler.require(:default, *(group.split.map!(&:to_sym))) : Bundler.require
ARGV.clear
- console = get_console(Bundler.settings[:console] || 'irb')
+ console = get_console(Bundler.settings[:console] || "irb")
console.start
end
@@ -19,14 +19,14 @@ module Bundler
get_constant(name)
rescue LoadError
Bundler.ui.error "Couldn't load console #{name}"
- get_constant('irb')
+ get_constant("irb")
end
def get_constant(name)
const_name = {
- 'pry' => :Pry,
- 'ripl' => :Ripl,
- 'irb' => :IRB,
+ "pry" => :Pry,
+ "ripl" => :Ripl,
+ "irb" => :IRB,
}[name]
Object.const_get(const_name)
rescue NameError
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index aee7960c4d..d7c3267206 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -1,4 +1,4 @@
-require 'bundler/current_ruby'
+require "bundler/current_ruby"
module Bundler
class CLI::Exec
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 4890e2f707..7918397055 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -1,4 +1,4 @@
-require 'pathname'
+require "pathname"
module Bundler
class CLI::Gem
@@ -18,11 +18,11 @@ module Bundler
def run
Bundler.ui.confirm "Creating gem '#{name}'..."
- underscored_name = name.tr('-', '_')
- namespaced_path = name.tr('-', '/')
- constant_name = name.gsub(/-[_-]*(?![_-]|$)/){ '::' }.gsub(/([_-]+|(::)|^)(.|$)/){ $2.to_s + $3.upcase }
- constant_array = constant_name.split('::')
- test_task = options[:test] == 'minitest' ? 'test' : 'spec'
+ underscored_name = name.tr("-", "_")
+ namespaced_path = name.tr("-", "/")
+ constant_name = name.gsub(/-[_-]*(?![_-]|$)/){ "::" }.gsub(/([_-]+|(::)|^)(.|$)/){ $2.to_s + $3.upcase }
+ constant_array = constant_name.split("::")
+ test_task = options[:test] == "minitest" ? "test" : "spec"
git_user_name = `git config user.name`.chomp
git_user_email = `git config user.email`.chomp
@@ -66,13 +66,13 @@ module Bundler
templates.merge!(".travis.yml.tt" => ".travis.yml")
case test_framework
- when 'rspec'
+ when "rspec"
templates.merge!(
"rspec.tt" => ".rspec",
"spec/spec_helper.rb.tt" => "spec/spec_helper.rb",
"spec/newgem_spec.rb.tt" => "spec/#{namespaced_path}_spec.rb"
)
- when 'minitest'
+ when "minitest"
templates.merge!(
"test/test_helper.rb.tt" => "test/test_helper.rb",
"test/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
@@ -150,7 +150,7 @@ module Bundler
end
def validate_ext_name
- return unless gem_name.index('-')
+ return unless gem_name.index("-")
Bundler.ui.error "You have specified a gem name which does not conform to the \n" \
"naming guidelines for C extensions. For more information, \n" \
@@ -183,7 +183,7 @@ module Bundler
def bundler_dependency_version
v = Gem::Version.new(Bundler::VERSION)
req = v.segments[0..1]
- req << 'a' if v.prerelease?
+ req << "a" if v.prerelease?
req.join(".")
end
diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb
index 31299bb21e..1d201a90f5 100644
--- a/lib/bundler/cli/init.rb
+++ b/lib/bundler/cli/init.rb
@@ -19,13 +19,13 @@ module Bundler
end
spec = Gem::Specification.load(gemspec)
puts "Writing new Gemfile to #{SharedHelpers.pwd}/Gemfile"
- File.open('Gemfile', 'wb') do |file|
+ File.open("Gemfile", "wb") do |file|
file << "# Generated from #{gemspec}\n"
file << spec.to_gemfile
end
else
puts "Writing new Gemfile to #{SharedHelpers.pwd}/Gemfile"
- FileUtils.cp(File.expand_path('../../templates/Gemfile', __FILE__), 'Gemfile')
+ FileUtils.cp(File.expand_path("../../templates/Gemfile", __FILE__), "Gemfile")
end
end
end
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 128f9d6f2a..be4ee3d171 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -39,7 +39,7 @@ module Bundler
options[:with] = with
options[:without] = without
- ENV['RB_USER_INSTALL'] = '1' if Bundler::FREEBSD
+ ENV["RB_USER_INSTALL"] = "1" if Bundler::FREEBSD
# Just disable color in deployment mode
Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment]
@@ -53,7 +53,7 @@ module Bundler
if (options["trust-policy"])
unless (Bundler.rubygems.security_policies.keys.include?(options["trust-policy"]))
Bundler.ui.error "Rubygems doesn't know about trust policy '#{options["trust-policy"]}'. " \
- "The known policies are: #{Bundler.rubygems.security_policies.keys.join(', ')}."
+ "The known policies are: #{Bundler.rubygems.security_policies.keys.join(", ")}."
exit 1
end
Bundler.settings["trust-policy"] = options["trust-policy"]
@@ -63,7 +63,7 @@ module Bundler
if options[:deployment] || options[:frozen]
unless Bundler.default_lockfile.exist?
- flag = options[:deployment] ? '--deployment' : '--frozen'
+ flag = options[:deployment] ? "--deployment" : "--frozen"
raise ProductionError, "The #{flag} flag requires a #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}. Please make " \
"sure you have checked your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} into version control " \
"before deploying."
@@ -73,7 +73,7 @@ module Bundler
options[:local] = true
end
- Bundler.settings[:frozen] = '1'
+ Bundler.settings[:frozen] = "1"
end
# When install is called with --no-deployment, disable deployment mode
@@ -96,7 +96,7 @@ module Bundler
Bundler.settings.without = options[:without]
Bundler.settings.with = options[:with]
Bundler::Fetcher.disable_endpoint = options["full-index"]
- Bundler.settings[:disable_shared_gems] = Bundler.settings[:path] ? '1' : nil
+ Bundler.settings[:disable_shared_gems] = Bundler.settings[:path] ? "1" : nil
# rubygems plugins sometimes hook into the gem install process
Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)
@@ -112,7 +112,7 @@ module Bundler
if Bundler.settings[:path]
absolute_path = File.expand_path(Bundler.settings[:path])
- relative_path = absolute_path.sub(File.expand_path('.'), '.')
+ relative_path = absolute_path.sub(File.expand_path("."), ".")
Bundler.ui.confirm "Bundled gems are installed into #{relative_path}."
else
Bundler.ui.confirm "Use `bundle show [gemname]` to see where a bundled gem is installed."
@@ -172,12 +172,12 @@ module Bundler
def dependencies_count_for(definition)
count = definition.dependencies.count
- "#{count} Gemfile #{count == 1 ? 'dependency' : 'dependencies'}"
+ "#{count} Gemfile #{count == 1 ? "dependency" : "dependencies"}"
end
def gems_installed_for(definition)
count = definition.specs.count
- "#{count} #{count == 1 ? 'gem' : 'gems'} now installed"
+ "#{count} #{count == 1 ? "gem" : "gems"} now installed"
end
def print_post_install_message(name, msg)
diff --git a/lib/bundler/cli/open.rb b/lib/bundler/cli/open.rb
index 474eec433b..b6bfda4d25 100644
--- a/lib/bundler/cli/open.rb
+++ b/lib/bundler/cli/open.rb
@@ -1,5 +1,5 @@
-require 'bundler/cli/common'
-require 'shellwords'
+require "bundler/cli/common"
+require "shellwords"
module Bundler
class CLI::Open
@@ -10,12 +10,12 @@ module Bundler
end
def run
- editor = [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? }
+ editor = [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find{|e| !e.nil? && !e.empty? }
return Bundler.ui.info("To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR") unless editor
path = Bundler::CLI::Common.select_spec(name, :regex_match).full_gem_path
Dir.chdir(path) do
command = Shellwords.split(editor) + [path]
- system(*command) || Bundler.ui.info("Could not run '#{command.join(' ')}'")
+ system(*command) || Bundler.ui.info("Could not run '#{command.join(" ")}'")
end
end
end
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 94dd032a9d..9b82079664 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -1,4 +1,4 @@
-require 'bundler/cli/common'
+require "bundler/cli/common"
module Bundler
class CLI::Outdated
diff --git a/lib/bundler/cli/package.rb b/lib/bundler/cli/package.rb
index f99678c9ec..de53cb6d8d 100644
--- a/lib/bundler/cli/package.rb
+++ b/lib/bundler/cli/package.rb
@@ -23,7 +23,7 @@ module Bundler
private
def install
- require 'bundler/cli/install'
+ require "bundler/cli/install"
options = self.options.dup
if Bundler.settings[:cache_all_platforms]
options["local"] = false
diff --git a/lib/bundler/cli/show.rb b/lib/bundler/cli/show.rb
index 161e931c72..824b3936d5 100644
--- a/lib/bundler/cli/show.rb
+++ b/lib/bundler/cli/show.rb
@@ -1,4 +1,4 @@
-require 'bundler/cli/common'
+require "bundler/cli/common"
module Bundler
class CLI::Show
@@ -40,10 +40,10 @@ module Bundler
desc = " * #{s.name} (#{s.version}#{s.git_version})"
if @verbose
latest = latest_specs.find { |l| l.name == s.name }
- Bundler.ui.info <<-END.gsub(/^ +/, '')
+ Bundler.ui.info <<-END.gsub(/^ +/, "")
#{desc}
- \tSummary: #{s.summary || 'No description available.'}
- \tHomepage: #{s.homepage || 'No website available.'}
+ \tSummary: #{s.summary || "No description available."}
+ \tHomepage: #{s.homepage || "No website available."}
\tStatus: #{outdated?(s, latest) ? "Outdated - #{s.version} < #{latest.version}" : "Up to date"}
END
else
diff --git a/lib/bundler/cli/viz.rb b/lib/bundler/cli/viz.rb
index 06f3deb245..3e1b29a513 100644
--- a/lib/bundler/cli/viz.rb
+++ b/lib/bundler/cli/viz.rb
@@ -6,7 +6,7 @@ module Bundler
end
def run
- require 'graphviz'
+ require "graphviz"
output_file = File.expand_path(options[:file])
graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], options[:format], options[:without])
graph.viz
diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb
index 532f587f28..8aef625290 100644
--- a/lib/bundler/current_ruby.rb
+++ b/lib/bundler/current_ruby.rb
@@ -128,7 +128,7 @@ module Bundler
end
def mswin64?
- Bundler::WINDOWS && Gem::Platform.local.os == "mswin64" && Gem::Platform.local.cpu == 'x64'
+ Bundler::WINDOWS && Gem::Platform.local.os == "mswin64" && Gem::Platform.local.cpu == "x64"
end
def mswin64_19?
@@ -148,7 +148,7 @@ module Bundler
end
def mingw?
- Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu != 'x64'
+ Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu != "x64"
end
def mingw_18?
@@ -172,7 +172,7 @@ module Bundler
end
def x64_mingw?
- Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu == 'x64'
+ Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu == "x64"
end
def x64_mingw_20?
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 9c84d350d2..d5b7bad79c 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -140,7 +140,7 @@ module Bundler
unless specs["bundler"].any?
local = Bundler.settings[:frozen] ? rubygems_index : index
- bundler = local.search(Gem::Dependency.new('bundler', VERSION)).last
+ bundler = local.search(Gem::Dependency.new("bundler", VERSION)).last
specs["bundler"] = bundler if bundler
end
@@ -265,7 +265,7 @@ module Bundler
return
end
- File.open(file, 'wb'){|f| f.puts(contents) }
+ File.open(file, "wb"){|f| f.puts(contents) }
rescue Errno::EACCES
raise PermissionError.new(file)
end
@@ -294,7 +294,7 @@ module Bundler
# are ordered consistently
sort_by(&:full_name).
each do |spec|
- next if spec.name == 'bundler'
+ next if spec.name == "bundler"
out << spec.to_lock
end
out << "\n"
@@ -370,8 +370,8 @@ module Bundler
both_sources.each do |name, (dep, lock_source)|
if (dep.nil? && !lock_source.nil?) || (!dep.nil? && !lock_source.nil? && !lock_source.can_lock?(dep))
- gemfile_source_name = (dep && dep.source) || 'no specified source'
- lockfile_source_name = lock_source || 'no specified source'
+ gemfile_source_name = (dep && dep.source) || "no specified source"
+ lockfile_source_name = lock_source || "no specified source"
changed << "* #{name} from `#{gemfile_source_name}` to `#{lockfile_source_name}`"
end
end
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb
index d02bbeeaaf..1956863c2d 100644
--- a/lib/bundler/dependency.rb
+++ b/lib/bundler/dependency.rb
@@ -1,6 +1,6 @@
-require 'rubygems/dependency'
-require 'bundler/shared_helpers'
-require 'bundler/rubygems_ext'
+require "rubygems/dependency"
+require "bundler/shared_helpers"
+require "bundler/rubygems_ext"
module Bundler
class Dependency < Gem::Dependency
@@ -57,8 +57,8 @@ module Bundler
@env = options["env"]
@should_include = options.fetch("should_include", true)
- if options.key?('require')
- @autorequire = Array(options['require'] || [])
+ if options.key?("require")
+ @autorequire = Array(options["require"] || [])
end
end
@@ -98,7 +98,7 @@ module Bundler
def to_lock
out = super
- out << '!' if source
+ out << "!" if source
out << "\n"
end
diff --git a/lib/bundler/deployment.rb b/lib/bundler/deployment.rb
index 072843d7a5..163f61eabb 100644
--- a/lib/bundler/deployment.rb
+++ b/lib/bundler/deployment.rb
@@ -40,7 +40,7 @@ module Bundler
send task_method, :install, opts do
bundle_cmd = context.fetch(:bundle_cmd, "bundle")
bundle_flags = context.fetch(:bundle_flags, "--deployment --quiet")
- bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), 'bundle'))
+ bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), "bundle"))
bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile")
bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact
bundle_with = [*context.fetch(:bundle_with, [])].compact
@@ -54,7 +54,7 @@ module Bundler
args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
args << "--with #{bundle_with.join(" ")}" unless bundle_with.empty?
- run "cd #{app_path} && #{bundle_cmd} install #{args.join(' ')}"
+ run "cd #{app_path} && #{bundle_cmd} install #{args.join(" ")}"
end
end
end
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 037bea44b1..750c549d94 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -1,5 +1,5 @@
-require 'bundler/dependency'
-require 'bundler/ruby_dsl'
+require "bundler/dependency"
+require "bundler/ruby_dsl"
module Bundler
class Dsl
@@ -38,9 +38,9 @@ module Bundler
end
def gemspec(opts = nil)
- path = opts && opts[:path] || '.'
+ path = opts && opts[:path] || "."
glob = opts && opts[:glob]
- name = opts && opts[:name] || '{,*}'
+ name = opts && opts[:name] || "{,*}"
development_group = opts && opts[:development_group] || :development
expanded_path = File.expand_path(path, Bundler.default_gemfile.dirname)
@@ -104,7 +104,7 @@ module Bundler
else
raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
"You specified that #{dep.name} (#{dep.requirement}) should come from " \
- "#{current.source || 'an unspecified source'} and #{dep.source}\n"
+ "#{current.source || "an unspecified source"} and #{dep.source}\n"
end
end
end
@@ -219,7 +219,7 @@ module Bundler
git_source(:gist){ |repo_name| "https://gist.github.com/#{repo_name}.git" }
git_source(:bitbucket) do |repo_name|
- user_name, repo_name = repo_name.split '/'
+ user_name, repo_name = repo_name.split "/"
repo_name ||= user_name
"https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
end
@@ -321,7 +321,7 @@ module Bundler
def validate_keys(command, opts, valid_keys)
invalid_keys = opts.keys - valid_keys
if invalid_keys.any?
- message = "You passed #{invalid_keys.map{|k| ':'+k }.join(", ")} "
+ message = "You passed #{invalid_keys.map{|k| ":"+k }.join(", ")} "
message << if invalid_keys.size > 1
"as options for #{command}, but they are invalid."
else
@@ -434,17 +434,17 @@ module Bundler
trace_line = backtrace.find { |l| l.include?(dsl_path.to_s) } || trace_line
return m unless trace_line
- line_numer = trace_line.split(':')[1].to_i - 1
+ line_numer = trace_line.split(":")[1].to_i - 1
return m unless line_numer
lines = contents.lines.to_a
- indent = ' # '
- indicator = indent.gsub('#', '>')
+ indent = " # "
+ indicator = indent.gsub("#", ">")
first_line = (line_numer.zero?)
last_line = (line_numer == (lines.count - 1))
m << "\n"
- m << "#{indent}from #{trace_line.gsub(/:in.*$/, '')}\n"
+ m << "#{indent}from #{trace_line.gsub(/:in.*$/, "")}\n"
m << "#{indent}-------------------------------------------\n"
m << "#{indent}#{ lines[line_numer - 1] }" unless first_line
m << "#{indicator}#{ lines[line_numer] }"
@@ -460,7 +460,7 @@ module Bundler
description = self.description
if dsl_path && description =~ /((#{Regexp.quote File.expand_path(dsl_path)}|#{Regexp.quote dsl_path.to_s}):\d+)/
trace_line = Regexp.last_match[1]
- description = description.sub(/#{Regexp.quote trace_line}:\s*/, '').sub("\n", ' - ')
+ description = description.sub(/#{Regexp.quote trace_line}:\s*/, "").sub("\n", " - ")
end
[trace_line, description]
end
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index f52764310b..ea82088f39 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -1,5 +1,5 @@
-require 'bundler/rubygems_integration'
-require 'bundler/source/git/git_proxy'
+require "bundler/rubygems_integration"
+require "bundler/source/git/git_proxy"
module Bundler
class Env
@@ -14,13 +14,13 @@ module Bundler
out << " Bundler #{Bundler::VERSION}\n"
out << " Rubygems #{Gem::VERSION}\n"
out << " Ruby #{ruby_version}"
- out << " GEM_HOME #{ENV['GEM_HOME']}\n" unless ENV['GEM_HOME'].nil? || ENV['GEM_HOME'].empty?
- out << " GEM_PATH #{ENV['GEM_PATH']}\n" unless ENV['GEM_PATH'] == ENV['GEM_HOME']
- out << " RVM #{ENV['rvm_version']}\n" if ENV['rvm_version']
+ out << " GEM_HOME #{ENV["GEM_HOME"]}\n" unless ENV["GEM_HOME"].nil? || ENV["GEM_HOME"].empty?
+ out << " GEM_PATH #{ENV["GEM_PATH"]}\n" unless ENV["GEM_PATH"] == ENV["GEM_HOME"]
+ out << " RVM #{ENV["rvm_version"]}\n" if ENV["rvm_version"]
out << " Git #{git_version}\n"
%w(rubygems-bundler open_gem).each do |name|
specs = Bundler.rubygems.find_name(name)
- out << " #{name} (#{specs.map(&:version).join(',')})\n" unless specs.empty?
+ out << " #{name} (#{specs.map(&:version).join(",")})\n" unless specs.empty?
end
out << "\nBundler settings\n\n" unless Bundler.settings.all.empty?
@@ -54,7 +54,7 @@ module Bundler
def ruby_version
str = "#{RUBY_VERSION}"
- if RUBY_VERSION < '1.9'
+ if RUBY_VERSION < "1.9"
str << " (#{RUBY_RELEASE_DATE}"
str << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
str << ") [#{RUBY_PLATFORM}]\n"
diff --git a/lib/bundler/environment.rb b/lib/bundler/environment.rb
index 837c4db009..0e4ed37814 100644
--- a/lib/bundler/environment.rb
+++ b/lib/bundler/environment.rb
@@ -6,7 +6,7 @@ module Bundler
@root = root
@definition = definition
- env_file = Bundler.app_config_path.join('environment.rb')
+ env_file = Bundler.app_config_path.join("environment.rb")
env_file.rmtree if env_file.exist?
end
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index d2f7551ee1..7592d1739b 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -1,14 +1,14 @@
-require 'bundler/vendored_persistent'
-require 'cgi'
-require 'securerandom'
+require "bundler/vendored_persistent"
+require "cgi"
+require "securerandom"
module Bundler
# Handles all the fetching with the rubygems server
class Fetcher
- autoload :Downloader, 'bundler/fetcher/downloader'
- autoload :Dependency, 'bundler/fetcher/dependency'
- autoload :Index, 'bundler/fetcher/index'
+ autoload :Downloader, "bundler/fetcher/downloader"
+ autoload :Dependency, "bundler/fetcher/dependency"
+ autoload :Index, "bundler/fetcher/index"
# This error is raised when it looks like the network is down
class NetworkDownError < HTTPError; end
@@ -75,11 +75,11 @@ module Bundler
# fetch a gem specification
def fetch_spec(spec)
- spec = spec - [nil, 'ruby', '']
- spec_file_name = "#{spec.join '-'}.gemspec"
+ spec = spec - [nil, "ruby", ""]
+ spec_file_name = "#{spec.join "-"}.gemspec"
uri = URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
- if uri.scheme == 'file'
+ if uri.scheme == "file"
Bundler.load_marshal Gem.inflate(Gem.read_binary(uri.path))
elsif cached_spec_path = gemspec_cached_path(spec_file_name)
Bundler.load_gemspec(cached_spec_path)
@@ -106,7 +106,7 @@ module Bundler
@use_api = false if fetchers.none?(&:api_fetcher?)
specs[remote_uri].each do |name, version, platform, dependencies|
- next if name == 'bundler'
+ next if name == "bundler"
spec = nil
if dependencies
spec = EndpointSpecification.new(name, version, platform, dependencies)
@@ -202,7 +202,7 @@ module Bundler
Bundler.settings[:ssl_client_cert]
raise SSLError if needs_ssl && !defined?(OpenSSL::SSL)
- con = Net::HTTP::Persistent.new 'bundler', :ENV
+ con = Net::HTTP::Persistent.new "bundler", :ENV
if remote_uri.scheme == "https"
con.verify_mode = (Bundler.settings[:ssl_verify_mode] ||
diff --git a/lib/bundler/fetcher/base.rb b/lib/bundler/fetcher/base.rb
index 729be04fb5..f0818e15cd 100644
--- a/lib/bundler/fetcher/base.rb
+++ b/lib/bundler/fetcher/base.rb
@@ -7,7 +7,7 @@ module Bundler
attr_reader :display_uri
def initialize(downloader, remote_uri, fetch_uri, display_uri)
- raise 'Abstract class' if self.class == Base
+ raise "Abstract class" if self.class == Base
@downloader = downloader
@remote_uri = remote_uri
@fetch_uri = fetch_uri
diff --git a/lib/bundler/fetcher/dependency.rb b/lib/bundler/fetcher/dependency.rb
index e495c7fd30..2f5d41daea 100644
--- a/lib/bundler/fetcher/dependency.rb
+++ b/lib/bundler/fetcher/dependency.rb
@@ -1,4 +1,4 @@
-require 'bundler/fetcher/base'
+require "bundler/fetcher/base"
module Bundler
class Fetcher
@@ -43,7 +43,7 @@ module Bundler
end
def dependency_specs(gem_names)
- Bundler.ui.debug "Query Gemcutter Dependency Endpoint API: #{gem_names.join(',')}"
+ Bundler.ui.debug "Query Gemcutter Dependency Endpoint API: #{gem_names.join(",")}"
gem_list = []
deps_list = []
diff --git a/lib/bundler/fetcher/index.rb b/lib/bundler/fetcher/index.rb
index f9bd279d0d..7f4cff2f09 100644
--- a/lib/bundler/fetcher/index.rb
+++ b/lib/bundler/fetcher/index.rb
@@ -1,4 +1,4 @@
-require 'bundler/fetcher/base'
+require "bundler/fetcher/base"
module Bundler
class Fetcher
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index 8838ac8467..0a90ca506e 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -43,11 +43,11 @@ module Bundler
end
def self.request_issue_report_for(e)
- Bundler.ui.info <<-EOS.gsub(/^ {6}/, '')
+ Bundler.ui.info <<-EOS.gsub(/^ {6}/, "")
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- What did you do?
- I ran the command `#{$PROGRAM_NAME} #{ARGV.join(' ')}`
+ I ran the command `#{$PROGRAM_NAME} #{ARGV.join(" ")}`
- What did you expect to happen?
@@ -70,7 +70,7 @@ module Bundler
Bundler.ui.error "Unfortunately, an unexpected error occurred, and Bundler cannot continue."
- Bundler.ui.warn <<-EOS.gsub(/^ {6}/, '')
+ Bundler.ui.warn <<-EOS.gsub(/^ {6}/, "")
First, try this link to see if there are any existing issue reports for this error:
#{issues_url(e)}
@@ -81,7 +81,7 @@ module Bundler
end
def self.issues_url(exception)
- 'https://github.com/bundler/bundler/search?q=' \
+ "https://github.com/bundler/bundler/search?q=" \
"#{CGI.escape(exception.message.lines.first.chomp)}&type=Issues"
end
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 2d8684b750..58d4b20928 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -1,5 +1,5 @@
-require 'bundler/vendored_thor' unless defined?(Thor)
-require 'bundler'
+require "bundler/vendored_thor" unless defined?(Thor)
+require "bundler"
module Bundler
class GemHelper
@@ -35,35 +35,35 @@ module Bundler
built_gem_path = nil
desc "Build #{name}-#{version}.gem into the pkg directory."
- task 'build' do
+ task "build" do
built_gem_path = build_gem
end
desc "Build and install #{name}-#{version}.gem into system gems."
- task 'install' => 'build' do
+ task "install" => "build" do
install_gem(built_gem_path)
end
desc "Build and install #{name}-#{version}.gem into system gems without network access."
- task 'install:local' => 'build' do
+ task "install:local" => "build" do
install_gem(built_gem_path, :local)
end
desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to Rubygems\n" \
"To prevent publishing in Rubygems use `gem_push=no rake release`"
- task 'release', [:remote] => ['build', 'release:guard_clean',
- 'release:source_control_push', 'release:rubygem_push'] do
+ task "release", [:remote] => ["build", "release:guard_clean",
+ "release:source_control_push", "release:rubygem_push"] do
end
- task 'release:guard_clean' do
+ task "release:guard_clean" do
guard_clean
end
- task 'release:source_control_push', [:remote] do |t, args|
+ task "release:source_control_push", [:remote] do |t, args|
tag_version { git_push(args[:remote]) } unless already_tagged?
end
- task 'release:rubygem_push' do
+ task "release:rubygem_push" do
rubygem_push(built_gem_path) if gem_push?
end
@@ -74,16 +74,16 @@ module Bundler
file_name = nil
sh("gem build -V '#{spec_path}'") { |out, code|
file_name = File.basename(built_gem_path)
- FileUtils.mkdir_p(File.join(base, 'pkg'))
- FileUtils.mv(built_gem_path, 'pkg')
+ FileUtils.mkdir_p(File.join(base, "pkg"))
+ FileUtils.mv(built_gem_path, "pkg")
Bundler.ui.confirm "#{name} #{version} built to pkg/#{file_name}."
}
- File.join(base, 'pkg', file_name)
+ File.join(base, "pkg", file_name)
end
def install_gem(built_gem_path = nil, local = false)
built_gem_path ||= build_gem
- out, _ = sh_with_code("gem install '#{built_gem_path}'#{' --local' if local}")
+ out, _ = sh_with_code("gem install '#{built_gem_path}'#{" --local" if local}")
raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output" unless out[/Successfully installed/]
Bundler.ui.confirm "#{name} (#{version}) installed."
end
@@ -103,20 +103,20 @@ module Bundler
Dir[File.join(base, "#{name}-*.gem")].sort_by{|f| File.mtime(f)}.last
end
- def git_push(remote = '')
+ def git_push(remote = "")
perform_git_push remote
perform_git_push "#{remote} --tags"
Bundler.ui.confirm "Pushed git commits and tags."
end
- def perform_git_push(options = '')
+ def perform_git_push(options = "")
cmd = "git push #{options}"
out, code = sh_with_code(cmd)
raise "Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n" unless code == 0
end
def already_tagged?
- if sh('git tag').split(/\n/).include?(version_tag)
+ if sh("git tag").split(/\n/).include?(version_tag)
Bundler.ui.confirm "Tag #{version_tag} has already been created."
true
end
@@ -163,7 +163,7 @@ module Bundler
def sh_with_code(cmd, &block)
cmd << " 2>&1"
- outbuf = ''
+ outbuf = ""
Bundler.ui.debug(cmd)
SharedHelpers.chdir(base) {
outbuf = `#{cmd}`
@@ -175,7 +175,7 @@ module Bundler
end
def gem_push?
- ! %w{n no nil false off 0}.include?(ENV['gem_push'].to_s.downcase)
+ ! %w{n no nil false off 0}.include?(ENV["gem_push"].to_s.downcase)
end
end
end
diff --git a/lib/bundler/gem_helpers.rb b/lib/bundler/gem_helpers.rb
index 2af87c94d9..fc1a341574 100644
--- a/lib/bundler/gem_helpers.rb
+++ b/lib/bundler/gem_helpers.rb
@@ -3,13 +3,13 @@ module Bundler
GENERIC_CACHE = {}
GENERICS = [
- [Gem::Platform.new('java'), Gem::Platform.new('java')],
- [Gem::Platform.new('mswin32'), Gem::Platform.new('mswin32')],
- [Gem::Platform.new('mswin64'), Gem::Platform.new('mswin64')],
- [Gem::Platform.new('universal-mingw32'), Gem::Platform.new('universal-mingw32')],
- [Gem::Platform.new('x64-mingw32'), Gem::Platform.new('x64-mingw32')],
- [Gem::Platform.new('x86_64-mingw32'), Gem::Platform.new('x64-mingw32')],
- [Gem::Platform.new('mingw32'), Gem::Platform.new('x86-mingw32')]
+ [Gem::Platform.new("java"), Gem::Platform.new("java")],
+ [Gem::Platform.new("mswin32"), Gem::Platform.new("mswin32")],
+ [Gem::Platform.new("mswin64"), Gem::Platform.new("mswin64")],
+ [Gem::Platform.new("universal-mingw32"), Gem::Platform.new("universal-mingw32")],
+ [Gem::Platform.new("x64-mingw32"), Gem::Platform.new("x64-mingw32")],
+ [Gem::Platform.new("x86_64-mingw32"), Gem::Platform.new("x64-mingw32")],
+ [Gem::Platform.new("mingw32"), Gem::Platform.new("x86-mingw32")]
]
def generic(p)
diff --git a/lib/bundler/gem_installer.rb b/lib/bundler/gem_installer.rb
index 7d84939853..8124e4bcfc 100644
--- a/lib/bundler/gem_installer.rb
+++ b/lib/bundler/gem_installer.rb
@@ -1,4 +1,4 @@
-require 'rubygems/installer'
+require "rubygems/installer"
module Bundler
class GemInstaller < Gem::Installer
diff --git a/lib/bundler/gem_tasks.rb b/lib/bundler/gem_tasks.rb
index bc7590886f..4c8f28c9d6 100644
--- a/lib/bundler/gem_tasks.rb
+++ b/lib/bundler/gem_tasks.rb
@@ -1,2 +1,2 @@
-require 'bundler/gem_helper'
+require "bundler/gem_helper"
Bundler::GemHelper.install_tasks
diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb
index 5138a1378e..a89cd1c70f 100644
--- a/lib/bundler/graph.rb
+++ b/lib/bundler/graph.rb
@@ -1,4 +1,4 @@
-require 'set'
+require "set"
module Bundler
class Graph
GRAPH_NAME = :Gemfile
@@ -126,7 +126,7 @@ module Bundler
def g
@g ||= ::GraphViz.digraph(@graph_name, {:concentrate => true, :normalize => true, :nodesep => 0.55}) do |g|
g.edge[:weight] = 2
- g.edge[:fontname] = g.node[:fontname] = 'Arial, Helvetica, SansSerif'
+ g.edge[:fontname] = g.node[:fontname] = "Arial, Helvetica, SansSerif"
g.edge[:fontsize] = 12
end
end
@@ -135,8 +135,8 @@ module Bundler
@groups.each do |group|
g.add_nodes(
group,
- {:style => 'filled',
- :fillcolor => '#B9B9D5',
+ {:style => "filled",
+ :fillcolor => "#B9B9D5",
:shape => "box3d",
:fontsize => 16}.merge(@node_options[group])
)
@@ -145,7 +145,7 @@ module Bundler
@relations.each do |parent, children|
children.each do |child|
if @groups.include?(parent)
- g.add_nodes(child, {:style => 'filled', :fillcolor => '#B9B9D5'}.merge(@node_options[child]))
+ g.add_nodes(child, {:style => "filled", :fillcolor => "#B9B9D5"}.merge(@node_options[child]))
g.add_edges(parent, child, {:constraint => false}.merge(@edge_options["#{parent}_#{child}"]))
else
g.add_nodes(child, @node_options[child])
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index 5789fd8d4f..5091d0a18d 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -68,7 +68,7 @@ module Bundler
end
end
- results.sort_by {|s| [s.version, s.platform.to_s == 'ruby' ? "\0" : s.platform.to_s] }
+ results.sort_by {|s| [s.version, s.platform.to_s == "ruby" ? "\0" : s.platform.to_s] }
end
def local_search(query, base = nil)
@@ -177,7 +177,7 @@ module Bundler
spec ? [spec] : []
end
- if RUBY_VERSION < '1.9'
+ if RUBY_VERSION < "1.9"
def same_version?(a, b)
regex = /^(.*?)(?:\.0)*$/
a.to_s[regex, 1] == b.to_s[regex, 1]
diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb
index 5bac0c8e6d..04096c3f11 100644
--- a/lib/bundler/injector.rb
+++ b/lib/bundler/injector.rb
@@ -40,7 +40,7 @@ module Bundler
# return an array of the deps that we added
return @new_deps
ensure
- Bundler.settings[:frozen] = '1' if frozen
+ Bundler.settings[:frozen] = "1" if frozen
end
private
diff --git a/lib/bundler/inline.rb b/lib/bundler/inline.rb
index 2f77603293..9df19b02ad 100644
--- a/lib/bundler/inline.rb
+++ b/lib/bundler/inline.rb
@@ -28,12 +28,12 @@
# puts Pod::VERSION # => "0.34.4"
#
def gemfile(install = false, &gemfile)
- require 'bundler'
+ require "bundler"
old_root = Bundler.method(:root)
def Bundler.root
Bundler::SharedHelpers.pwd.expand_path
end
- ENV['BUNDLE_GEMFILE'] ||= 'Gemfile'
+ ENV["BUNDLE_GEMFILE"] ||= "Gemfile"
builder = Bundler::Dsl.new
builder.instance_eval(&gemfile)
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 38869c09f1..432cdd0107 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -1,6 +1,6 @@
-require 'erb'
-require 'rubygems/dependency_installer'
-require 'bundler/worker'
+require "erb"
+require "rubygems/dependency_installer"
+require "bundler/worker"
module Bundler
class Installer < Environment
@@ -125,7 +125,7 @@ module Bundler
if options.any?
Bundler.ui.warn "#{spec.name} has no executables, but you may want " +
"one from a gem it depends on."
- options.each{|name,bins| Bundler.ui.warn " #{name} has: #{bins.join(', ')}" }
+ options.each{|name,bins| Bundler.ui.warn " #{name} has: #{bins.join(", ")}" }
else
Bundler.ui.warn "There are no executables for the gem #{spec.name}."
end
@@ -134,7 +134,7 @@ module Bundler
# double-assignment to avoid warnings about variables that will be used by ERB
bin_path = bin_path = Bundler.bin_path
- template = template = File.read(File.expand_path('../templates/Executable', __FILE__))
+ template = template = File.read(File.expand_path("../templates/Executable", __FILE__))
relative_gemfile_path = relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path)
ruby_command = ruby_command = Thor::Util.ruby_command
@@ -148,8 +148,8 @@ module Bundler
next
end
- File.open(binstub_path, 'w', 0777 & ~File.umask) do |f|
- f.puts ERB.new(template, nil, '-').result(binding)
+ File.open(binstub_path, "w", 0777 & ~File.umask) do |f|
+ f.puts ERB.new(template, nil, "-").result(binding)
end
end
@@ -158,10 +158,10 @@ module Bundler
when 1
Bundler.ui.warn "Skipped #{exists[0]} since it already exists."
when 2
- Bundler.ui.warn "Skipped #{exists.join(' and ')} since they already exist."
+ Bundler.ui.warn "Skipped #{exists.join(" and ")} since they already exist."
else
- items = exists[0...-1].empty? ? nil : exists[0...-1].join(', ')
- skipped = [items, exists[-1]].compact.join(' and ')
+ items = exists[0...-1].empty? ? nil : exists[0...-1].join(", ")
+ skipped = [items, exists[-1]].compact.join(" and ")
Bundler.ui.warn "Skipped #{skipped} since they already exist."
end
Bundler.ui.warn "If you want to overwrite skipped stubs, use --force."
@@ -178,7 +178,7 @@ module Bundler
force = options["force"]
jobs = [Bundler.settings[:jobs].to_i-1, 1].max
if jobs > 1 && can_install_in_parallel?
- require 'bundler/installer/parallel_installer'
+ require "bundler/installer/parallel_installer"
install_in_parallel jobs, options[:standalone], force
else
install_sequentially options[:standalone], force
@@ -199,15 +199,15 @@ module Bundler
def generate_standalone_bundler_executable_stubs(spec)
# double-assignment to avoid warnings about variables that will be used by ERB
bin_path = Bundler.bin_path
- template = File.read(File.expand_path('../templates/Executable.standalone', __FILE__))
+ template = File.read(File.expand_path("../templates/Executable.standalone", __FILE__))
ruby_command = ruby_command = Thor::Util.ruby_command
spec.executables.each do |executable|
next if executable == "bundle"
standalone_path = standalone_path = Pathname(Bundler.settings[:path]).expand_path.relative_path_from(bin_path)
executable_path = executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path)
- File.open "#{bin_path}/#{executable}", 'w', 0755 do |f|
- f.puts ERB.new(template, nil, '-').result(binding)
+ File.open "#{bin_path}/#{executable}", "w", 0755 do |f|
+ f.puts ERB.new(template, nil, "-").result(binding)
end
end
end
@@ -232,7 +232,7 @@ module Bundler
spec.require_paths.each do |path|
full_path = File.join(spec.full_gem_path, path)
gem_path = Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path))
- paths << gem_path.to_s.sub("#{Bundler.ruby_version.engine}/#{RbConfig::CONFIG['ruby_version']}", '#{ruby_engine}/#{ruby_version}')
+ paths << gem_path.to_s.sub("#{Bundler.ruby_version.engine}/#{RbConfig::CONFIG["ruby_version"]}", "#{ruby_engine}/#{ruby_version}")
end
end
diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb
index c0d858aad2..c152a7eaa4 100644
--- a/lib/bundler/installer/parallel_installer.rb
+++ b/lib/bundler/installer/parallel_installer.rb
@@ -1,4 +1,4 @@
-require 'bundler/worker'
+require "bundler/worker"
class ParallelInstaller
class SpecInstallation
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index c5d860c2ab..ee6b159b3e 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -142,7 +142,7 @@ module Bundler
dep = Bundler::Dependency.new(name, version)
- if pinned && dep.name != 'bundler'
+ if pinned && dep.name != "bundler"
spec = @specs.find {|k, v| v.name == dep.name }
dep.source = spec.last.source if spec
@@ -172,7 +172,7 @@ module Bundler
@specs[@current_spec.identifier] ||= @current_spec
elsif line =~ NAME_VERSION_6
name, version = $1, $2
- version = version.split(',').map(&:strip) if version
+ version = version.split(",").map(&:strip) if version
dep = Gem::Dependency.new(name, version)
@current_spec.dependencies << dep
end
diff --git a/lib/bundler/match_platform.rb b/lib/bundler/match_platform.rb
index e6a33ecbad..1dda3cadc1 100644
--- a/lib/bundler/match_platform.rb
+++ b/lib/bundler/match_platform.rb
@@ -1,4 +1,4 @@
-require 'bundler/gem_helpers'
+require "bundler/gem_helpers"
module Bundler
module MatchPlatform
diff --git a/lib/bundler/psyched_yaml.rb b/lib/bundler/psyched_yaml.rb
index 7ce3bb94af..46398057b9 100644
--- a/lib/bundler/psyched_yaml.rb
+++ b/lib/bundler/psyched_yaml.rb
@@ -1,19 +1,19 @@
# Psych could be a gem, so try to ask for it
begin
- gem 'psych'
+ gem "psych"
rescue LoadError
end if defined?(gem)
# Psych could just be in the stdlib
# but it's too late if Syck is already loaded
begin
- require 'psych' unless defined?(Syck)
+ require "psych" unless defined?(Syck)
rescue LoadError
# Apparently Psych wasn't available. Oh well.
end
# At least load the YAML stdlib, whatever that may be
-require 'yaml' unless defined?(YAML.dump)
+require "yaml" unless defined?(YAML.dump)
module Bundler
# On encountering invalid YAML,
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 78711b23f1..68eff38725 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -1,4 +1,4 @@
-require 'set'
+require "set"
# This is the latest iteration of the gem dependency resolving algorithm. As of now,
# it can resolve (as a success or failure) any set of gem dependencies we throw at it
@@ -8,19 +8,19 @@ require 'set'
module Bundler
class Resolver
- require 'bundler/vendored_molinillo'
+ require "bundler/vendored_molinillo"
class Molinillo::VersionConflict
def clean_req(req)
if req.to_s.include?(">= 0")
- req.to_s.gsub(/ \(.*?\)$/, '')
+ req.to_s.gsub(/ \(.*?\)$/, "")
else
- req.to_s.gsub(/\, (runtime|development)\)$/, ')')
+ req.to_s.gsub(/\, (runtime|development)\)$/, ")")
end
end
def message
- conflicts.values.flatten.reduce('') do |o, conflict|
+ conflicts.values.flatten.reduce("") do |o, conflict|
o << %(Bundler could not find compatible versions for gem "#{conflict.requirement.name}":\n)
if conflict.locked_requirement
o << %( In snapshot (#{Bundler.default_lockfile.basename}):\n)
@@ -29,10 +29,10 @@ module Bundler
end
o << %( In Gemfile:\n)
o << conflict.requirement_trees.map do |tree|
- t = ''
+ t = ""
depth = 2
tree.each do |req|
- t << ' ' * depth << %(#{clean_req req})
+ t << " " * depth << %(#{clean_req req})
t << %( depends on) unless tree[-1] == req
t << %(\n)
depth += 1
@@ -40,7 +40,7 @@ module Bundler
t
end.join("\n")
- if conflict.requirement.name == 'bundler'
+ if conflict.requirement.name == "bundler"
o << %(\n Current Bundler version:\n bundler (#{Bundler::VERSION}))
other_bundler_required = !conflict.requirement.requirement.satisfied_by?(Gem::Version.new Bundler::VERSION)
end
@@ -202,7 +202,7 @@ module Bundler
names = e.dependencies.sort_by(&:name).map { |d| "gem '#{d.name}'"}
raise CyclicDependencyError, "Your bundle requires gems that depend" \
" on each other, creating an infinite loop. Please remove" \
- " #{names.count > 1 ? 'either ' : '' }#{names.join(' or ')}" \
+ " #{names.count > 1 ? "either " : "" }#{names.join(" or ")}" \
" and try again."
end
@@ -216,24 +216,24 @@ module Bundler
if debug?
debug_info = yield
debug_info = debug_info.inspect unless debug_info.is_a?(String)
- STDERR.puts debug_info.split("\n").map { |s| ' ' * depth + s }
+ STDERR.puts debug_info.split("\n").map { |s| " " * depth + s }
end
end
def debug?
- ENV['DEBUG_RESOLVER'] || ENV['DEBUG_RESOLVER_TREE']
+ ENV["DEBUG_RESOLVER"] || ENV["DEBUG_RESOLVER_TREE"]
end
def before_resolution
- Bundler.ui.info 'Resolving dependencies...', false
+ Bundler.ui.info "Resolving dependencies...", false
end
def after_resolution
- Bundler.ui.info ''
+ Bundler.ui.info ""
end
def indicate_progress
- Bundler.ui.info '.', false
+ Bundler.ui.info ".", false
end
private
@@ -277,11 +277,11 @@ module Bundler
end
def name_for_explicit_dependency_source
- Bundler.default_gemfile.basename.to_s rescue 'Gemfile'
+ Bundler.default_gemfile.basename.to_s rescue "Gemfile"
end
def name_for_locking_dependency_source
- Bundler.default_lockfile.basename.to_s rescue 'Gemfile.lock'
+ Bundler.default_lockfile.basename.to_s rescue "Gemfile.lock"
end
def requirement_satisfied_by?(requirement, activated, spec)
@@ -306,7 +306,7 @@ module Bundler
if base = @base[dependency.name] and !base.empty?
dependency.requirement.satisfied_by?(base.first.version) ? 0 : 1
else
- base_dep = Dependency.new dependency.name, '>= 0.a'
+ base_dep = Dependency.new dependency.name, ">= 0.a"
all = search_for(DepProxy.new base_dep, dependency.__platform).size.to_f
if all.zero?
0
@@ -321,7 +321,7 @@ module Bundler
def verify_gemfile_dependencies_are_found!(requirements)
requirements.each do |requirement|
- next if requirement.name == 'bundler'
+ next if requirement.name == "bundler"
if search_for(requirement).empty?
if base = @base[requirement.name] and !base.empty?
version = base.first.version
@@ -334,7 +334,7 @@ module Bundler
versions = @source_requirements[name][name].map(&:version)
message = "Could not find gem '#{requirement}' in #{requirement.source}.\n"
if versions.any?
- message << "Source contains '#{name}' at: #{versions.join(', ')}"
+ message << "Source contains '#{name}' at: #{versions.join(", ")}"
else
message << "Source does not contain any versions of '#{requirement}'"
end
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index f423f4a6f6..cf3d36d925 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -1,13 +1,13 @@
-require 'pathname'
+require "pathname"
if defined?(Gem::QuickLoader)
# Gem Prelude makes me a sad panda :'(
Gem::QuickLoader.load_full_rubygems_library
end
-require 'rubygems'
-require 'rubygems/specification'
-require 'bundler/match_platform'
+require "rubygems"
+require "rubygems/specification"
+require "bundler/match_platform"
module Gem
@loaded_stacks = Hash.new { |h,k| h[k] = [] }
@@ -88,11 +88,11 @@ module Gem
private
def dependencies_to_gemfile(dependencies, group = nil)
- gemfile = ''
+ gemfile = ""
if dependencies.any?
gemfile << "group :#{group} do\n" if group
dependencies.each do |dependency|
- gemfile << ' ' if group
+ gemfile << " " if group
gemfile << %|gem "#{dependency.name}"|
req = dependency.requirements_list.first
gemfile << %|, "#{req}"| if req
@@ -111,7 +111,7 @@ module Gem
def encode_with(coder)
to_yaml_properties.each do |ivar|
- coder[ivar.to_s.sub(/^@/, '')] = instance_variable_get(ivar)
+ coder[ivar.to_s.sub(/^@/, "")] = instance_variable_get(ivar)
end
end
@@ -123,7 +123,7 @@ module Gem
out = " #{name}"
unless requirement == Gem::Requirement.default
reqs = requirement.requirements.map{|o,v| "#{o} #{v}" }.sort.reverse
- out << " (#{reqs.join(', ')})"
+ out << " (#{reqs.join(", ")})"
end
out
end
@@ -146,11 +146,11 @@ module Gem
end
class Platform
- JAVA = Gem::Platform.new('java') unless defined?(JAVA)
- MSWIN = Gem::Platform.new('mswin32') unless defined?(MSWIN)
- MSWIN64 = Gem::Platform.new('mswin64') unless defined?(MSWIN64)
- MINGW = Gem::Platform.new('x86-mingw32') unless defined?(MINGW)
- X64_MINGW = Gem::Platform.new('x64-mingw32') unless defined?(X64_MINGW)
+ JAVA = Gem::Platform.new("java") unless defined?(JAVA)
+ MSWIN = Gem::Platform.new("mswin32") unless defined?(MSWIN)
+ MSWIN64 = Gem::Platform.new("mswin64") unless defined?(MSWIN64)
+ MINGW = Gem::Platform.new("x86-mingw32") unless defined?(MINGW)
+ X64_MINGW = Gem::Platform.new("x64-mingw32") unless defined?(X64_MINGW)
undef_method :hash if method_defined? :hash
def hash
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 6cd1570cad..272276a31a 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -1,6 +1,6 @@
-require 'monitor'
-require 'rubygems'
-require 'rubygems/config_file'
+require "monitor"
+require "rubygems"
+require "rubygems/config_file"
module Bundler
class RubygemsIntegration
@@ -116,7 +116,7 @@ module Bundler
def spec_cache_dirs
@spec_cache_dirs ||= begin
- dirs = gem_path.map {|dir| File.join(dir, 'specifications')}
+ dirs = gem_path.map {|dir| File.join(dir, "specifications")}
dirs << Gem.spec_cache_dir if Gem.respond_to?(:spec_cache_dir) # Not in Rubygems 2.0.3 or earlier
dirs.uniq.select {|dir| File.directory? dir}
end
@@ -202,12 +202,12 @@ module Bundler
end
def gem_from_path(path, policy = nil)
- require 'rubygems/format'
+ require "rubygems/format"
Gem::Format.from_file_by_path(path, policy)
end
def spec_from_gem(path, policy = nil)
- require 'rubygems/security'
+ require "rubygems/security"
gem_from_path(path, security_policies[policy]).spec
rescue Gem::Package::FormatError
raise GemspecError, "Could not read gem at #{path}. It may be corrupted."
@@ -216,7 +216,7 @@ module Bundler
e.message =~ /unknown trust policy|unsigned gem/i ||
e.message =~ /couldn't verify (meta)?data signature/i
raise SecurityError,
- "The gem #{File.basename(path, '.gem')} can't be installed because " \
+ "The gem #{File.basename(path, ".gem")} can't be installed because " \
"the security policy didn't allow it, with the message: #{e.message}"
else
raise e
@@ -224,7 +224,7 @@ module Bundler
end
def build(spec, skip_validation = false)
- require 'rubygems/builder'
+ require "rubygems/builder"
Gem::Builder.new(spec).build
end
@@ -244,7 +244,7 @@ module Bundler
def security_policies
@security_policies ||= begin
- require 'rubygems/security'
+ require "rubygems/security"
Gem::Security::Policies
rescue LoadError, NameError
{}
@@ -269,7 +269,7 @@ module Bundler
executables = specs.map(&:executables).flatten
::Kernel.send(:define_method, :gem) do |dep, *reqs|
- if executables.include? File.basename(caller.first.split(':').first)
+ if executables.include? File.basename(caller.first.split(":").first)
return
end
reqs.pop if reqs.last.is_a?(Hash)
@@ -334,8 +334,8 @@ module Bundler
redefine_method(gem_class, :bin_path) do |name, *args|
exec_name = args.first
- if exec_name == 'bundle'
- return ENV['BUNDLE_BIN_PATH']
+ if exec_name == "bundle"
+ return ENV["BUNDLE_BIN_PATH"]
end
spec = nil
@@ -392,7 +392,7 @@ module Bundler
# This backport fixes the marshaling of @segments.
def backport_yaml_initialize
redefine_method(Gem::Version, :yaml_initialize) do |tag, map|
- @version = map['version']
+ @version = map["version"]
@segments = nil
@hash = nil
end
@@ -532,7 +532,7 @@ module Bundler
# Rubygems 1.8.20 and adds the skip_validation parameter, so that's
# when we start passing it through.
def build(spec, skip_validation = false)
- require 'rubygems/builder'
+ require "rubygems/builder"
Gem::Builder.new(spec).build(skip_validation)
end
end
@@ -581,7 +581,7 @@ module Bundler
end
def download_gem(spec, uri, path)
- require 'resolv'
+ require "resolv"
uri = Bundler.settings.mirror_for(uri)
proxy, dns = configuration[:http_proxy], Resolv::DNS.new
fetcher = Gem::RemoteFetcher.new(proxy, dns)
@@ -589,14 +589,14 @@ module Bundler
end
def gem_from_path(path, policy = nil)
- require 'rubygems/package'
+ require "rubygems/package"
p = Gem::Package.new(path)
p.security_policy = policy if policy
return p
end
def build(spec, skip_validation = false)
- require 'rubygems/package'
+ require "rubygems/package"
Gem::Package.build(spec, skip_validation)
end
@@ -613,14 +613,14 @@ module Bundler
end
def all_specs
- require 'bundler/remote_specification'
+ require "bundler/remote_specification"
Gem::Specification.stubs.map do |stub|
StubSpecification.from_stub(stub)
end
end
def backport_ext_builder_monitor
- require 'rubygems/ext'
+ require "rubygems/ext"
Gem::Ext::Builder.class_eval do
if !const_defined?(:CHDIR_MONITOR)
@@ -652,15 +652,15 @@ module Bundler
@rubygems = RubygemsIntegration::MoreFuture.new
elsif RubygemsIntegration.provides?(">= 1.99.99")
@rubygems = RubygemsIntegration::Future.new
- elsif RubygemsIntegration.provides?('>= 1.8.20')
+ elsif RubygemsIntegration.provides?(">= 1.8.20")
@rubygems = RubygemsIntegration::MoreModern.new
- elsif RubygemsIntegration.provides?('>= 1.8.5')
+ elsif RubygemsIntegration.provides?(">= 1.8.5")
@rubygems = RubygemsIntegration::Modern.new
- elsif RubygemsIntegration.provides?('>= 1.8.0')
+ elsif RubygemsIntegration.provides?(">= 1.8.0")
@rubygems = RubygemsIntegration::AlmostModern.new
- elsif RubygemsIntegration.provides?('>= 1.7.0')
+ elsif RubygemsIntegration.provides?(">= 1.7.0")
@rubygems = RubygemsIntegration::Transitional.new
- elsif RubygemsIntegration.provides?('>= 1.4.0')
+ elsif RubygemsIntegration.provides?(">= 1.4.0")
@rubygems = RubygemsIntegration::Legacy.new
else # Rubygems 1.3.6 and 1.3.7
@rubygems = RubygemsIntegration::Ancient.new
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 8736bba656..ee260fbc83 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -79,9 +79,9 @@ module Bundler
REQUIRE_ERRORS.find { |r| r =~ e.message }
raise if dep.autorequire || $1 != required_file
- if dep.autorequire.nil? && dep.name.include?('-')
+ if dep.autorequire.nil? && dep.name.include?("-")
begin
- namespaced_file = dep.name.gsub('-', '/')
+ namespaced_file = dep.name.gsub("-", "/")
Kernel.require namespaced_file
rescue LoadError => e
REQUIRE_ERRORS.find { |r| r =~ e.message }
@@ -108,7 +108,7 @@ module Bundler
Bundler.ui.info "Updating files in #{Bundler.settings.app_cache_path}"
specs.each do |spec|
- next if spec.name == 'bundler'
+ next if spec.name == "bundler"
spec.source.send(:fetch_gem, spec) if Bundler.settings[:cache_all_platforms] && spec.source.respond_to?(:fetch_gem, true)
spec.source.cache(spec, custom_path) if spec.source.respond_to?(:cache)
end
@@ -168,8 +168,8 @@ module Bundler
output = stale_gem_dirs.collect do |gem_dir|
full_name = Pathname.new(gem_dir).basename.to_s
- parts = full_name.split('-')
- name = parts[0..-2].join('-')
+ parts = full_name.split("-")
+ name = parts[0..-2].join("-")
version = parts.last
output = "#{name} (#{version})"
@@ -184,8 +184,8 @@ module Bundler
end + stale_git_dirs.collect do |gem_dir|
full_name = Pathname.new(gem_dir).basename.to_s
- parts = full_name.split('-')
- name = parts[0..-2].join('-')
+ parts = full_name.split("-")
+ name = parts[0..-2].join("-")
revision = parts[-1]
output = "#{name} (#{revision})"
@@ -270,17 +270,17 @@ module Bundler
def setup_manpath
# Store original MANPATH for restoration later in with_clean_env()
- ENV['BUNDLE_ORIG_MANPATH'] = ENV['MANPATH']
+ ENV["BUNDLE_ORIG_MANPATH"] = ENV["MANPATH"]
# Add man/ subdirectories from activated bundles to MANPATH for man(1)
manuals = $LOAD_PATH.map do |path|
- man_subdir = path.sub(/lib$/, 'man')
- man_subdir unless Dir[man_subdir + '/man?/'].empty?
+ man_subdir = path.sub(/lib$/, "man")
+ man_subdir unless Dir[man_subdir + "/man?/"].empty?
end.compact
unless manuals.empty?
- ENV['MANPATH'] = manuals.concat(
- ENV['MANPATH'].to_s.split(File::PATH_SEPARATOR)
+ ENV["MANPATH"] = manuals.concat(
+ ENV["MANPATH"].to_s.split(File::PATH_SEPARATOR)
).uniq.join(File::PATH_SEPARATOR)
end
end
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 1c2ef6e635..a4f2a9cf84 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -1,4 +1,4 @@
-require 'uri'
+require "uri"
module Bundler
class Settings
@@ -47,7 +47,7 @@ module Bundler
keys = @global_config.keys | @local_config.keys | env_keys
keys.map do |key|
- key.sub(/^BUNDLE_/, '').gsub(/__/, ".").downcase
+ key.sub(/^BUNDLE_/, "").gsub(/__/, ".").downcase
end
end
@@ -147,7 +147,7 @@ module Bundler
end
def ignore_config?
- ENV['BUNDLE_IGNORE_CONFIG']
+ ENV["BUNDLE_IGNORE_CONFIG"]
end
def app_cache_path
@@ -185,7 +185,7 @@ module Bundler
end
def to_bool(value)
- !(value.nil? || value == '' || value =~ /^(false|f|no|n|0)$/i || value == false)
+ !(value.nil? || value == "" || value =~ /^(false|f|no|n|0)$/i || value == false)
end
def is_num(value)
@@ -207,7 +207,7 @@ module Bundler
hash[key] = value
hash.delete(key) if value.nil?
FileUtils.mkdir_p(file.dirname)
- require 'bundler/psyched_yaml'
+ require "bundler/psyched_yaml"
File.open(file, "w") { |f| f.puts YAML.dump(hash) }
end
diff --git a/lib/bundler/setup.rb b/lib/bundler/setup.rb
index 897a1dee85..db13967bb1 100644
--- a/lib/bundler/setup.rb
+++ b/lib/bundler/setup.rb
@@ -1,9 +1,9 @@
-require 'bundler/shared_helpers'
+require "bundler/shared_helpers"
if Bundler::SharedHelpers.in_bundle?
- require 'bundler'
+ require "bundler"
- if STDOUT.tty? || ENV['BUNDLER_FORCE_TTY']
+ if STDOUT.tty? || ENV["BUNDLER_FORCE_TTY"]
begin
Bundler.setup
rescue Bundler::BundlerError => e
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 9532438c52..3368912343 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -1,9 +1,9 @@
-require 'pathname'
-require 'rubygems'
+require "pathname"
+require "rubygems"
-require 'bundler/constants'
-require 'bundler/rubygems_integration'
-require 'bundler/current_ruby'
+require "bundler/constants"
+require "bundler/rubygems_integration"
+require "bundler/current_ruby"
module Gem
class Dependency
@@ -29,7 +29,7 @@ module Bundler
gemfile = default_gemfile
case gemfile.basename.to_s
- when 'gems.rb' then Pathname.new(gemfile.sub(/.rb$/, '.locked'))
+ when "gems.rb" then Pathname.new(gemfile.sub(/.rb$/, ".locked"))
else Pathname.new("#{gemfile}.lock")
end
end
@@ -83,22 +83,22 @@ module Bundler
rubyopt = [ENV["RUBYOPT"]].compact
if rubyopt.empty? || rubyopt.first !~ /-rbundler\/setup/
rubyopt.unshift %|-rbundler/setup|
- ENV["RUBYOPT"] = rubyopt.join(' ')
+ ENV["RUBYOPT"] = rubyopt.join(" ")
end
# Set RUBYLIB
rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
- rubylib.unshift File.expand_path('../..', __FILE__)
+ rubylib.unshift File.expand_path("../..", __FILE__)
ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
end
private
def find_gemfile
- given = ENV['BUNDLE_GEMFILE']
+ given = ENV["BUNDLE_GEMFILE"]
return given if given && !given.empty?
- find_file('Gemfile', 'gems.rb')
+ find_file("Gemfile", "gems.rb")
end
def find_file(*names)
@@ -118,9 +118,9 @@ module Bundler
current = File.expand_path(SharedHelpers.pwd)
until !File.directory?(current) || current == previous
- if ENV['BUNDLE_SPEC_RUN']
+ if ENV["BUNDLE_SPEC_RUN"]
# avoid stepping above the tmp directory when testing
- return nil if File.file?(File.join(current, 'bundler.gemspec'))
+ return nil if File.file?(File.join(current, "bundler.gemspec"))
end
names.each do |name|
diff --git a/lib/bundler/similarity_detector.rb b/lib/bundler/similarity_detector.rb
index 66f1044c84..32c3d7f774 100644
--- a/lib/bundler/similarity_detector.rb
+++ b/lib/bundler/similarity_detector.rb
@@ -20,7 +20,7 @@ module Bundler
if words.length==1
words[0]
elsif words.length>1
- [words[0..-2].join(', '), words[-1]].join(' or ')
+ [words[0..-2].join(", "), words[-1]].join(" or ")
end
end
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index d715b78f93..73aab9b899 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -1,8 +1,8 @@
module Bundler
class Source
- autoload :Rubygems, 'bundler/source/rubygems'
- autoload :Path, 'bundler/source/path'
- autoload :Git, 'bundler/source/git'
+ autoload :Rubygems, "bundler/source/rubygems"
+ autoload :Path, "bundler/source/path"
+ autoload :Git, "bundler/source/git"
attr_accessor :dependency_names
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 5bc2086bf7..992a908cec 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -1,11 +1,11 @@
-require 'fileutils'
-require 'uri'
-require 'digest/sha1'
+require "fileutils"
+require "uri"
+require "digest/sha1"
module Bundler
class Source
class Git < Path
- autoload :GitProxy, 'bundler/source/git/git_proxy'
+ autoload :GitProxy, "bundler/source/git/git_proxy"
attr_reader :uri, :ref, :branch, :options, :submodules
@@ -19,9 +19,9 @@ module Bundler
# Stringify options that could be set as symbols
%w(ref branch tag revision).each{|k| options[k] = options[k].to_s if options[k] }
- @uri = options["uri"] || ''
+ @uri = options["uri"] || ""
@branch = options["branch"]
- @ref = options["ref"] || options["branch"] || options["tag"] || 'master'
+ @ref = options["ref"] || options["branch"] || options["tag"] || "master"
@submodules = options["submodules"]
@name = options["name"]
@version = options["version"]
@@ -73,7 +73,7 @@ module Bundler
end
def name
- File.basename(@uri, '.git')
+ File.basename(@uri, ".git")
end
# This is the path which is going to contain a specific
@@ -228,7 +228,7 @@ module Bundler
# The gemspecs we cache should already be evaluated.
spec = Bundler.load_gemspec(spec_path)
next unless spec
- File.open(spec_path, 'wb') {|file| file.write(spec.to_ruby) }
+ File.open(spec_path, "wb") {|file| file.write(spec.to_ruby) }
end
end
@@ -251,7 +251,7 @@ module Bundler
end
def base_name
- File.basename(uri.sub(%r{^(\w+://)?([^/:]+:)?(//\w*/)?(\w*/)*},''),".git")
+ File.basename(uri.sub(%r{^(\w+://)?([^/:]+:)?(//\w*/)?(\w*/)*},""),".git")
end
def shortref_for_display(ref)
@@ -266,7 +266,7 @@ module Bundler
if uri =~ %r{^\w+://(\w+@)?}
# Downcase the domain component of the URI
# and strip off a trailing slash, if one is present
- input = URI.parse(uri).normalize.to_s.sub(%r{/$},'')
+ input = URI.parse(uri).normalize.to_s.sub(%r{/$},"")
else
# If there is no URI scheme, assume it is an ssh/git URI
input = uri
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index a7aa989978..21e16ba60f 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -1,7 +1,7 @@
module Bundler
class Source
class Path < Source
- autoload :Installer, 'bundler/source/path/installer'
+ autoload :Installer, "bundler/source/path/installer"
attr_reader :path, :options
attr_writer :name
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 29efd68f54..ec52c918b1 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -1,6 +1,6 @@
-require 'uri'
-require 'rubygems/user_interaction'
-require 'rubygems/spec_fetcher'
+require "uri"
+require "rubygems/user_interaction"
+require "rubygems/spec_fetcher"
module Bundler
class Source
@@ -68,7 +68,7 @@ module Bundler
end
def to_s
- remote_names = self.remotes.map(&:to_s).join(', ')
+ remote_names = self.remotes.map(&:to_s).join(", ")
"rubygems repository #{remote_names}"
end
alias_method :name, :to_s
@@ -149,7 +149,7 @@ module Bundler
if name == "extensions" && Dir.glob(src).any?
src = File.join(src, "*/*")
ext_src = Dir.glob(src).first
- ext_src.gsub!(src[0..-6], '')
+ ext_src.gsub!(src[0..-6], "")
dst = File.dirname(File.join(dst, ext_src))
end
Bundler.mkdir_p dst
@@ -275,8 +275,8 @@ module Bundler
idx = Index.new
have_bundler = false
Bundler.rubygems.all_specs.reverse.each do |spec|
- next if spec.name == 'bundler' && spec.version.to_s != VERSION
- have_bundler = true if spec.name == 'bundler'
+ next if spec.name == "bundler" && spec.version.to_s != VERSION
+ have_bundler = true if spec.name == "bundler"
spec.source = self
idx << spec
end
@@ -287,7 +287,7 @@ module Bundler
# so, let's create a fake gemspec for it (it's a path)
# gemspec
bundler = Gem::Specification.new do |s|
- s.name = 'bundler'
+ s.name = "bundler"
s.version = VERSION
s.platform = Gem::Platform::RUBY
s.source = self
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 42962df259..9e9c88bb5d 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -1,5 +1,5 @@
-require 'tsort'
-require 'forwardable'
+require "tsort"
+require "forwardable"
module Bundler
class SpecSet
@@ -15,7 +15,7 @@ module Bundler
def for(dependencies, skip = [], check = false, match_current_platform = false)
handled, deps, specs = {}, dependencies.dup, []
- skip << 'bundler'
+ skip << "bundler"
until deps.empty?
dep = deps.shift
@@ -44,7 +44,7 @@ module Bundler
end
end
- if spec = lookup['bundler'].first
+ if spec = lookup["bundler"].first
specs << spec
end
@@ -108,7 +108,7 @@ module Bundler
private
def sorted
- rake = @specs.find { |s| s.name == 'rake' }
+ rake = @specs.find { |s| s.name == "rake" }
begin
@sorted ||= ([rake] + tsort).compact.uniq
rescue TSort::Cyclic => error
@@ -131,7 +131,7 @@ module Bundler
@lookup ||= begin
lookup = Hash.new { |h,k| h[k] = [] }
specs = @specs.sort_by do |s|
- s.platform.to_s == 'ruby' ? "\0" : s.platform.to_s
+ s.platform.to_s == "ruby" ? "\0" : s.platform.to_s
end
specs.reverse_each do |s|
lookup[s.name] << s
diff --git a/lib/bundler/ssl_certs/certificate_manager.rb b/lib/bundler/ssl_certs/certificate_manager.rb
index 0148736b7a..558bd9ef50 100644
--- a/lib/bundler/ssl_certs/certificate_manager.rb
+++ b/lib/bundler/ssl_certs/certificate_manager.rb
@@ -1,6 +1,6 @@
-require 'fileutils'
-require 'net/https'
-require 'openssl'
+require "fileutils"
+require "net/https"
+require "openssl"
module Bundler
module SSLCerts
@@ -13,7 +13,7 @@ module Bundler
def initialize(rubygems_path = nil)
if rubygems_path
- rubygems_cert_path = File.join(rubygems_path, 'lib/rubygems/ssl_certs')
+ rubygems_cert_path = File.join(rubygems_path, "lib/rubygems/ssl_certs")
@rubygems_certs = certificates_in(rubygems_cert_path)
end
@@ -41,7 +41,7 @@ module Bundler
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.cert_store = store
- http.head('/')
+ http.head("/")
end
private
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index a15a1adf85..ca5cbe6d9d 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -1,4 +1,4 @@
-require 'bundler/remote_specification'
+require "bundler/remote_specification"
module Bundler
class StubSpecification < RemoteSpecification
diff --git a/lib/bundler/templates/Executable b/lib/bundler/templates/Executable
index 5c60c28337..cc9e06cfec 100755
--- a/lib/bundler/templates/Executable
+++ b/lib/bundler/templates/Executable
@@ -6,11 +6,11 @@
# this file is here to facilitate running it.
#
-require 'pathname'
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../<%= relative_gemfile_path %>",
+require "pathname"
+ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../<%= relative_gemfile_path %>",
Pathname.new(__FILE__).realpath)
-require 'rubygems'
-require 'bundler/setup'
+require "rubygems"
+require "bundler/setup"
-load Gem.bin_path('<%= spec.name %>', '<%= executable %>')
+load Gem.bin_path("<%= spec.name %>", "<%= executable %>")
diff --git a/lib/bundler/ui.rb b/lib/bundler/ui.rb
index af325afba8..7400f80ab1 100644
--- a/lib/bundler/ui.rb
+++ b/lib/bundler/ui.rb
@@ -1,7 +1,7 @@
module Bundler
module UI
- autoload :RGProxy, 'bundler/ui/rg_proxy'
- autoload :Shell, 'bundler/ui/shell'
- autoload :Silent, 'bundler/ui/silent'
+ autoload :RGProxy, "bundler/ui/rg_proxy"
+ autoload :Shell, "bundler/ui/shell"
+ autoload :Silent, "bundler/ui/silent"
end
end
diff --git a/lib/bundler/ui/rg_proxy.rb b/lib/bundler/ui/rg_proxy.rb
index 6f514be87f..1c9c2deaba 100644
--- a/lib/bundler/ui/rg_proxy.rb
+++ b/lib/bundler/ui/rg_proxy.rb
@@ -1,5 +1,5 @@
-require 'bundler/ui'
-require 'rubygems/user_interaction'
+require "bundler/ui"
+require "rubygems/user_interaction"
module Bundler
module UI
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index 9a5fd1d903..92af57756c 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -1,4 +1,4 @@
-require 'bundler/vendored_thor'
+require "bundler/vendored_thor"
module Bundler
module UI
@@ -12,7 +12,7 @@ module Bundler
Thor::Base.shell = Thor::Shell::Basic
end
@shell = Thor::Base.shell.new
- @level = ENV['DEBUG'] ? "debug" : "info"
+ @level = ENV["DEBUG"] ? "debug" : "info"
@warning_history = []
end
@@ -95,7 +95,7 @@ module Bundler
def strip_leading_spaces(text)
spaces = text[/\A\s+/, 0]
- spaces ? text.gsub(/#{spaces}/, '') : text
+ spaces ? text.gsub(/#{spaces}/, "") : text
end
def word_wrap(text, line_width = @shell.terminal_width)
diff --git a/lib/bundler/vendored_molinillo.rb b/lib/bundler/vendored_molinillo.rb
index 4081f3fa92..795d63a3d3 100644
--- a/lib/bundler/vendored_molinillo.rb
+++ b/lib/bundler/vendored_molinillo.rb
@@ -1,2 +1,2 @@
module Bundler; end
-require 'bundler/vendor/molinillo/lib/molinillo'
+require "bundler/vendor/molinillo/lib/molinillo"
diff --git a/lib/bundler/vendored_persistent.rb b/lib/bundler/vendored_persistent.rb
index 8ed4ce8306..ef404f35d5 100644
--- a/lib/bundler/vendored_persistent.rb
+++ b/lib/bundler/vendored_persistent.rb
@@ -1,11 +1,11 @@
# We forcibly require OpenSSL, because net/http/persistent will only autoload
# it. On some Rubies, autoload fails but explicit require succeeds.
begin
- require 'openssl'
+ require "openssl"
rescue LoadError
# some Ruby builds don't have OpenSSL
end
-vendor = File.expand_path('../vendor', __FILE__)
+vendor = File.expand_path("../vendor", __FILE__)
$:.unshift(vendor) unless $:.include?(vendor)
-require 'net/http/persistent'
+require "net/http/persistent"
diff --git a/lib/bundler/vendored_thor.rb b/lib/bundler/vendored_thor.rb
index 1931b5f278..114483db02 100644
--- a/lib/bundler/vendored_thor.rb
+++ b/lib/bundler/vendored_thor.rb
@@ -1,3 +1,3 @@
module Bundler; end
-require 'bundler/vendor/thor/lib/thor'
-require 'bundler/vendor/thor/lib/thor/actions'
+require "bundler/vendor/thor/lib/thor"
+require "bundler/vendor/thor/lib/thor/actions"
diff --git a/lib/bundler/vlad.rb b/lib/bundler/vlad.rb
index aaf714555f..5e20ae6dac 100644
--- a/lib/bundler/vlad.rb
+++ b/lib/bundler/vlad.rb
@@ -2,7 +2,7 @@
#
# Just add "require 'bundler/vlad'" in your Vlad deploy.rb, and
# include the vlad:bundle:install task in your vlad:deploy task.
-require 'bundler/deployment'
+require "bundler/deployment"
include Rake::DSL if defined? Rake::DSL
diff --git a/lib/bundler/worker.rb b/lib/bundler/worker.rb
index 531e597915..8102328d97 100644
--- a/lib/bundler/worker.rb
+++ b/lib/bundler/worker.rb
@@ -1,4 +1,4 @@
-require 'thread'
+require "thread"
module Bundler
class Worker
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