diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-01-31 11:29:09 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-01-31 22:22:06 -0600 |
commit | 7ae072865e3fc23d9844322dde6ad0f6906e3f2c (patch) | |
tree | 2133b2f27e243af2d8beda66f19b2f1086685a0e /spec | |
parent | b1afbe3a2ff7623c9a0e8504bc85af4bd8156059 (diff) | |
download | bundler-7ae072865e3fc23d9844322dde6ad0f6906e3f2c.tar.gz |
Compatibility with frozen string literals
Diffstat (limited to 'spec')
153 files changed, 166 insertions, 14 deletions
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb index 923217da15..9d4353f718 100644 --- a/spec/bundler/bundler_spec.rb +++ b/spec/bundler/bundler_spec.rb @@ -1,4 +1,5 @@ # encoding: utf-8 +# frozen_string_literal: true require "spec_helper" require "bundler" diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb index a2f87e45fa..b48af7c81a 100644 --- a/spec/bundler/cli_spec.rb +++ b/spec/bundler/cli_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/cli" diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb index 8dc4bd28f0..443a2c9703 100644 --- a/spec/bundler/definition_spec.rb +++ b/spec/bundler/definition_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/definition" diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb index 9553c8fd43..77d663d754 100644 --- a/spec/bundler/dsl_spec.rb +++ b/spec/bundler/dsl_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Dsl do diff --git a/spec/bundler/endpoint_specification_spec.rb b/spec/bundler/endpoint_specification_spec.rb index 0340c36261..fccf1842fc 100644 --- a/spec/bundler/endpoint_specification_spec.rb +++ b/spec/bundler/endpoint_specification_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::EndpointSpecification do diff --git a/spec/bundler/env_spec.rb b/spec/bundler/env_spec.rb index 1c38ca87df..305fcce351 100644 --- a/spec/bundler/env_spec.rb +++ b/spec/bundler/env_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/settings" diff --git a/spec/bundler/fetcher/base_spec.rb b/spec/bundler/fetcher/base_spec.rb index 4ca47e4723..5a8c7647b9 100644 --- a/spec/bundler/fetcher/base_spec.rb +++ b/spec/bundler/fetcher/base_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Fetcher::Base do diff --git a/spec/bundler/fetcher/dependency_spec.rb b/spec/bundler/fetcher/dependency_spec.rb index 43c496507e..fd0d5ed9d3 100644 --- a/spec/bundler/fetcher/dependency_spec.rb +++ b/spec/bundler/fetcher/dependency_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Fetcher::Dependency do diff --git a/spec/bundler/fetcher/downloader_spec.rb b/spec/bundler/fetcher/downloader_spec.rb index eade22f441..ebfaf90534 100644 --- a/spec/bundler/fetcher/downloader_spec.rb +++ b/spec/bundler/fetcher/downloader_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Fetcher::Downloader do diff --git a/spec/bundler/fetcher/index_spec.rb b/spec/bundler/fetcher/index_spec.rb index 52acd9cebf..e22dc143ae 100644 --- a/spec/bundler/fetcher/index_spec.rb +++ b/spec/bundler/fetcher/index_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Fetcher::Index do diff --git a/spec/bundler/fetcher_spec.rb b/spec/bundler/fetcher_spec.rb index f1204e7b47..5ebffc42ff 100644 --- a/spec/bundler/fetcher_spec.rb +++ b/spec/bundler/fetcher_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/fetcher" diff --git a/spec/bundler/friendly_errors_spec.rb b/spec/bundler/friendly_errors_spec.rb index e178170967..ae197a4bab 100644 --- a/spec/bundler/friendly_errors_spec.rb +++ b/spec/bundler/friendly_errors_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler" require "bundler/friendly_errors" diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb index 7c07a9d215..def926e364 100644 --- a/spec/bundler/gem_helper_spec.rb +++ b/spec/bundler/gem_helper_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "rake" require "bundler/gem_helper" diff --git a/spec/bundler/mirror_spec.rb b/spec/bundler/mirror_spec.rb index 88436fd029..bd6d9bc636 100644 --- a/spec/bundler/mirror_spec.rb +++ b/spec/bundler/mirror_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/mirror" diff --git a/spec/bundler/psyched_yaml_spec.rb b/spec/bundler/psyched_yaml_spec.rb index 2cc7dff842..4b7715b482 100644 --- a/spec/bundler/psyched_yaml_spec.rb +++ b/spec/bundler/psyched_yaml_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/psyched_yaml" diff --git a/spec/bundler/remote_specification_spec.rb b/spec/bundler/remote_specification_spec.rb index 1ff986b9a1..527f48facc 100644 --- a/spec/bundler/remote_specification_spec.rb +++ b/spec/bundler/remote_specification_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::RemoteSpecification do diff --git a/spec/bundler/retry_spec.rb b/spec/bundler/retry_spec.rb index 280ab07d08..cafa099b51 100644 --- a/spec/bundler/retry_spec.rb +++ b/spec/bundler/retry_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Retry do diff --git a/spec/bundler/ruby_version_spec.rb b/spec/bundler/ruby_version_spec.rb index d7ab0105fd..9c9eda04dc 100644 --- a/spec/bundler/ruby_version_spec.rb +++ b/spec/bundler/ruby_version_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/ruby_version" diff --git a/spec/bundler/rubygems_integration_spec.rb b/spec/bundler/rubygems_integration_spec.rb index 84ce709913..917d673b51 100644 --- a/spec/bundler/rubygems_integration_spec.rb +++ b/spec/bundler/rubygems_integration_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::RubygemsIntegration do diff --git a/spec/bundler/settings_spec.rb b/spec/bundler/settings_spec.rb index 24c71744e1..239f5e6ade 100644 --- a/spec/bundler/settings_spec.rb +++ b/spec/bundler/settings_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/settings" diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb index a72fc34a74..d72a7f49c9 100644 --- a/spec/bundler/shared_helpers_spec.rb +++ b/spec/bundler/shared_helpers_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/shared_helpers" @@ -187,14 +188,14 @@ describe Bundler::SharedHelpers do end it "ensures bundle bin path is in ENV['PATH']" do subject.set_bundle_environment - paths = (ENV["PATH"]).split(File::PATH_SEPARATOR) - expect(paths.include? "#{Bundler.bundle_path}/bin").to eq(true) + paths = ENV["PATH"].split(File::PATH_SEPARATOR) + expect(paths).to include("#{Bundler.bundle_path}/bin") end end shared_examples_for "ENV['RUBYOPT'] gets set correctly" do it "ensures -rbundler/setup is at the beginning of ENV['RUBYOPT']" do subject.set_bundle_environment - expect(ENV["RUBYOPT"].split(" ").first.include? "-rbundler/setup").to eq(true) + expect(ENV["RUBYOPT"].split(" ").first).to include("-rbundler/setup") end end shared_examples_for "ENV['RUBYLIB'] gets set correctly" do diff --git a/spec/bundler/source/git/git_proxy_spec.rb b/spec/bundler/source/git/git_proxy_spec.rb index 7e2083d595..10741b89a7 100644 --- a/spec/bundler/source/git/git_proxy_spec.rb +++ b/spec/bundler/source/git/git_proxy_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Source::Git::GitProxy do diff --git a/spec/bundler/source/rubygems/remote_spec.rb b/spec/bundler/source/rubygems/remote_spec.rb index 599887d47a..a541bf1468 100644 --- a/spec/bundler/source/rubygems/remote_spec.rb +++ b/spec/bundler/source/rubygems/remote_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/source/rubygems/remote" diff --git a/spec/bundler/source/rubygems_spec.rb b/spec/bundler/source/rubygems_spec.rb index 33cb3672dc..9fb4bf0ad3 100644 --- a/spec/bundler/source/rubygems_spec.rb +++ b/spec/bundler/source/rubygems_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Source::Rubygems do diff --git a/spec/bundler/source_list_spec.rb b/spec/bundler/source_list_spec.rb index 3beac46f41..d7567d6e11 100644 --- a/spec/bundler/source_list_spec.rb +++ b/spec/bundler/source_list_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::SourceList do diff --git a/spec/bundler/source_spec.rb b/spec/bundler/source_spec.rb index 5033354ff6..1b4e4bdde9 100644 --- a/spec/bundler/source_spec.rb +++ b/spec/bundler/source_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe Bundler::Source do diff --git a/spec/bundler/ssl_certs/certificate_manager_spec.rb b/spec/bundler/ssl_certs/certificate_manager_spec.rb index 81423ccf90..5a1650b432 100644 --- a/spec/bundler/ssl_certs/certificate_manager_spec.rb +++ b/spec/bundler/ssl_certs/certificate_manager_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/ssl_certs/certificate_manager" diff --git a/spec/cache/cache_path_spec.rb b/spec/cache/cache_path_spec.rb index c0e73ca588..594162886a 100644 --- a/spec/cache/cache_path_spec.rb +++ b/spec/cache/cache_path_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle package" do diff --git a/spec/cache/gems_spec.rb b/spec/cache/gems_spec.rb index 9ee5efb32f..a1bb8751dd 100644 --- a/spec/cache/gems_spec.rb +++ b/spec/cache/gems_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle cache" do diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb index 001cbb4564..f94b1b3469 100644 --- a/spec/cache/git_spec.rb +++ b/spec/cache/git_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "git base name" do diff --git a/spec/cache/path_spec.rb b/spec/cache/path_spec.rb index 82dfce94ba..b81768102a 100644 --- a/spec/cache/path_spec.rb +++ b/spec/cache/path_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" %w(cache package).each do |cmd| diff --git a/spec/cache/platform_spec.rb b/spec/cache/platform_spec.rb index 6b73f90f05..e3702aaaf6 100644 --- a/spec/cache/platform_spec.rb +++ b/spec/cache/platform_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle cache with multiple platforms" do diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index df5588fcf1..ee319e016c 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle binstubs <gem>" do diff --git a/spec/commands/check_spec.rb b/spec/commands/check_spec.rb index 02e81156ab..9f2053e15b 100644 --- a/spec/commands/check_spec.rb +++ b/spec/commands/check_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle check" do @@ -305,7 +306,7 @@ describe "bundle check" do L if bundler_version - lock << "\n BUNDLED WITH\n #{bundler_version}\n" + lock += "\n BUNDLED WITH\n #{bundler_version}\n" end lock diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb index 9d4c96fc0f..95035555d4 100644 --- a/spec/commands/clean_spec.rb +++ b/spec/commands/clean_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle clean" do diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb index 33134bef0c..2c31e48940 100644 --- a/spec/commands/config_spec.rb +++ b/spec/commands/config_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe ".bundle/config" do @@ -50,8 +51,8 @@ describe ".bundle/config" do end it "can also be set explicitly" do - bundle "config --global foo global" - run "puts Bundler.settings[:foo]" + bundle! "config --global foo global" + run! "puts Bundler.settings[:foo]" expect(out).to eq("global") end diff --git a/spec/commands/console_spec.rb b/spec/commands/console_spec.rb index 4b1de42e8a..b771c6a940 100644 --- a/spec/commands/console_spec.rb +++ b/spec/commands/console_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle console" do diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 05c1109ee7..ee766cdb5f 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle exec" do diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb index 53c0c0b9a6..704b99a0e8 100644 --- a/spec/commands/help_spec.rb +++ b/spec/commands/help_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle help" do diff --git a/spec/commands/init_spec.rb b/spec/commands/init_spec.rb index ef405d121d..70d1143055 100644 --- a/spec/commands/init_spec.rb +++ b/spec/commands/init_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle init" do diff --git a/spec/commands/inject_spec.rb b/spec/commands/inject_spec.rb index 4aed64d633..d0112915ca 100644 --- a/spec/commands/inject_spec.rb +++ b/spec/commands/inject_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle inject" do diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb index fcd8b98dfb..9c81457068 100644 --- a/spec/commands/install_spec.rb +++ b/spec/commands/install_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with gem sources" do diff --git a/spec/commands/licenses_spec.rb b/spec/commands/licenses_spec.rb index 9be0d57838..dd9f261eb3 100644 --- a/spec/commands/licenses_spec.rb +++ b/spec/commands/licenses_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle licenses" do diff --git a/spec/commands/lock_spec.rb b/spec/commands/lock_spec.rb index f1379cc8ca..7f32409ea6 100644 --- a/spec/commands/lock_spec.rb +++ b/spec/commands/lock_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle lock" do diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 732097dacc..c48a1eb4a1 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle gem" do diff --git a/spec/commands/open_spec.rb b/spec/commands/open_spec.rb index f443cfe9d3..6fa219f889 100644 --- a/spec/commands/open_spec.rb +++ b/spec/commands/open_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle open" do diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb index c0b70c1f11..5db12f0269 100644 --- a/spec/commands/outdated_spec.rb +++ b/spec/commands/outdated_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle outdated" do diff --git a/spec/commands/package_spec.rb b/spec/commands/package_spec.rb index f9be542f60..5194ab8051 100644 --- a/spec/commands/package_spec.rb +++ b/spec/commands/package_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle package" do diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb index 9da787c831..7cfa02d418 100644 --- a/spec/commands/show_spec.rb +++ b/spec/commands/show_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle show" do diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb index 4eadd956f1..31d5a21975 100644 --- a/spec/commands/update_spec.rb +++ b/spec/commands/update_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle update" do diff --git a/spec/commands/viz_spec.rb b/spec/commands/viz_spec.rb index 2052fd273f..c680568899 100644 --- a/spec/commands/viz_spec.rb +++ b/spec/commands/viz_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle viz", :ruby => "1.9.3", :if => Bundler.which("dot") do diff --git a/spec/install/binstubs_spec.rb b/spec/install/binstubs_spec.rb index 1b34e62567..78865c7f4a 100644 --- a/spec/install/binstubs_spec.rb +++ b/spec/install/binstubs_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/bundler_spec.rb b/spec/install/bundler_spec.rb index a5278ef2f8..560272e5cf 100644 --- a/spec/install/bundler_spec.rb +++ b/spec/install/bundler_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb index 88832f2145..a9a072687c 100644 --- a/spec/install/deploy_spec.rb +++ b/spec/install/deploy_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "install with --deployment or --frozen" do diff --git a/spec/install/force_spec.rb b/spec/install/force_spec.rb index 2135c4d7b0..9209392d58 100644 --- a/spec/install/force_spec.rb +++ b/spec/install/force_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb index 7b38dfb961..36c7353045 100644 --- a/spec/install/gemfile/gemspec_spec.rb +++ b/spec/install/gemfile/gemspec_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install from an existing gemspec" do diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb index c01bf4019a..ecd6462540 100644 --- a/spec/install/gemfile/git_spec.rb +++ b/spec/install/gemfile/git_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with git sources" do diff --git a/spec/install/gemfile/groups_spec.rb b/spec/install/gemfile/groups_spec.rb index d64e03186d..2f3f446834 100644 --- a/spec/install/gemfile/groups_spec.rb +++ b/spec/install/gemfile/groups_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with groups" do diff --git a/spec/install/gemfile/install_if.rb b/spec/install/gemfile/install_if.rb index 32b04d1cc4..080a35b989 100644 --- a/spec/install/gemfile/install_if.rb +++ b/spec/install/gemfile/install_if.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with install_if conditionals" do diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb index ee45bf3efd..64919370be 100644 --- a/spec/install/gemfile/path_spec.rb +++ b/spec/install/gemfile/path_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with explicit source paths" do diff --git a/spec/install/gemfile/platform_spec.rb b/spec/install/gemfile/platform_spec.rb index ee7501f759..a562a3bc11 100644 --- a/spec/install/gemfile/platform_spec.rb +++ b/spec/install/gemfile/platform_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install across platforms" do diff --git a/spec/install/gemfile/ruby_spec.rb b/spec/install/gemfile/ruby_spec.rb index 9b35e3819c..d3536289eb 100644 --- a/spec/install/gemfile/ruby_spec.rb +++ b/spec/install/gemfile/ruby_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "ruby requirement" do diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index 9ebb2c1ed8..e216340fa5 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with gems on multiple sources" do diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb index b1b8a1ac24..a0a1cb9a65 100644 --- a/spec/install/gemfile_spec.rb +++ b/spec/install/gemfile_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/gems/compact_index_spec.rb b/spec/install/gems/compact_index_spec.rb index 1069027a9d..13645f0ae6 100644 --- a/spec/install/gems/compact_index_spec.rb +++ b/spec/install/gems/compact_index_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "compact index api" do diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb index 55eba01481..70190dd01b 100644 --- a/spec/install/gems/dependency_api_spec.rb +++ b/spec/install/gems/dependency_api_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "gemcutter's dependency API" do diff --git a/spec/install/gems/env_spec.rb b/spec/install/gems/env_spec.rb index ac3d19730a..072e698d8a 100644 --- a/spec/install/gems/env_spec.rb +++ b/spec/install/gems/env_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with ENV conditionals" do diff --git a/spec/install/gems/flex_spec.rb b/spec/install/gems/flex_spec.rb index fe725a5cc8..452cadf35e 100644 --- a/spec/install/gems/flex_spec.rb +++ b/spec/install/gems/flex_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle flex_install" do diff --git a/spec/install/gems/mirror_spec.rb b/spec/install/gems/mirror_spec.rb index 48b97de7bd..8540778d5c 100644 --- a/spec/install/gems/mirror_spec.rb +++ b/spec/install/gems/mirror_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with a mirror configured" do diff --git a/spec/install/gems/native_extensions_spec.rb b/spec/install/gems/native_extensions_spec.rb index 8d14acf5f3..6134663fcc 100644 --- a/spec/install/gems/native_extensions_spec.rb +++ b/spec/install/gems/native_extensions_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "installing a gem with native extensions" do diff --git a/spec/install/gems/post_install_spec.rb b/spec/install/gems/post_install_spec.rb index bea2c9b6ee..596fa6412f 100644 --- a/spec/install/gems/post_install_spec.rb +++ b/spec/install/gems/post_install_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb index 5377db233e..49d160063d 100644 --- a/spec/install/gems/resolving_spec.rb +++ b/spec/install/gems/resolving_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with gem sources" do diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb index ad1f3eda70..4ce5d92eb0 100644 --- a/spec/install/gems/standalone_spec.rb +++ b/spec/install/gems/standalone_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install --standalone" do diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb index eaee6d74b2..e102d2da96 100644 --- a/spec/install/gems/sudo_spec.rb +++ b/spec/install/gems/sudo_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "when using sudo", :sudo => true do diff --git a/spec/install/gems/win32_spec.rb b/spec/install/gems/win32_spec.rb index e75177a0ce..69ea035f5e 100644 --- a/spec/install/gems/win32_spec.rb +++ b/spec/install/gems/win32_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install with win32-generated lockfile" do diff --git a/spec/install/gemspecs_spec.rb b/spec/install/gemspecs_spec.rb index 4300a16cb2..4e2a18679a 100644 --- a/spec/install/gemspecs_spec.rb +++ b/spec/install/gemspecs_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb index 7067ec4466..f3a1983740 100644 --- a/spec/install/git_spec.rb +++ b/spec/install/git_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/parallel/spec_installation_spec.rb b/spec/install/parallel/spec_installation_spec.rb index 6e92bb4cb8..9a8e1cad31 100644 --- a/spec/install/parallel/spec_installation_spec.rb +++ b/spec/install/parallel/spec_installation_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/installer/parallel_installer" diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb index ffc53365c3..cf15021727 100644 --- a/spec/install/path_spec.rb +++ b/spec/install/path_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb index 39076461db..11fb5bb0a2 100644 --- a/spec/install/post_bundle_message_spec.rb +++ b/spec/install/post_bundle_message_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "post bundle message" do diff --git a/spec/install/prereleases_spec.rb b/spec/install/prereleases_spec.rb index ddbdea3f56..61676f5dfa 100644 --- a/spec/install/prereleases_spec.rb +++ b/spec/install/prereleases_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install" do diff --git a/spec/install/security_policy_spec.rb b/spec/install/security_policy_spec.rb index 288154ad13..08a9213e00 100644 --- a/spec/install/security_policy_spec.rb +++ b/spec/install/security_policy_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "rubygems/security" diff --git a/spec/install/upgrade_spec.rb b/spec/install/upgrade_spec.rb index a57f974bbb..852a746322 100644 --- a/spec/install/upgrade_spec.rb +++ b/spec/install/upgrade_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle install for the first time with v1.0" do diff --git a/spec/lock/git_spec.rb b/spec/lock/git_spec.rb index 8507ae20c0..69937aaba5 100644 --- a/spec/lock/git_spec.rb +++ b/spec/lock/git_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle lock with git gems" do diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb index a81eb8a606..6e0713102a 100644 --- a/spec/lock/lockfile_spec.rb +++ b/spec/lock/lockfile_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "the lockfile format" do diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb index 37db2490b2..88cd8a7e03 100644 --- a/spec/other/bundle_ruby_spec.rb +++ b/spec/other/bundle_ruby_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle_ruby" do diff --git a/spec/other/cli_dispatch_spec.rb b/spec/other/cli_dispatch_spec.rb index 0dd49c7a40..7aee482bfe 100644 --- a/spec/other/cli_dispatch_spec.rb +++ b/spec/other/cli_dispatch_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle command names" do diff --git a/spec/other/ext_spec.rb b/spec/other/ext_spec.rb index b5b6956106..5508ef8b74 100644 --- a/spec/other/ext_spec.rb +++ b/spec/other/ext_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Gem::Specification#match_platform" do diff --git a/spec/other/platform_spec.rb b/spec/other/platform_spec.rb index f36cf527ec..7942e604a5 100644 --- a/spec/other/platform_spec.rb +++ b/spec/other/platform_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle platform" do diff --git a/spec/other/ssl_cert_spec.rb b/spec/other/ssl_cert_spec.rb index 1cd22cbb8c..b1b27ebb89 100644 --- a/spec/other/ssl_cert_spec.rb +++ b/spec/other/ssl_cert_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "bundler/ssl_certs/certificate_manager" diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb index 4b7cdba1ff..c68bfa1533 100644 --- a/spec/quality_spec.rb +++ b/spec/quality_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" if defined?(Encoding) && Encoding.default_external.name != "UTF-8" diff --git a/spec/realworld/dependency_api_spec.rb b/spec/realworld/dependency_api_spec.rb index bab5986ea2..c77036fc5f 100644 --- a/spec/realworld/dependency_api_spec.rb +++ b/spec/realworld/dependency_api_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "gemcutter's dependency API", :realworld => true do diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb index fd82c506cf..8295669d19 100644 --- a/spec/realworld/edgecases_spec.rb +++ b/spec/realworld/edgecases_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "real world edgecases", :realworld => true, :sometimes => true do diff --git a/spec/realworld/gemfile_source_header_spec.rb b/spec/realworld/gemfile_source_header_spec.rb index 6c2c05eaa7..be8f45c81b 100644 --- a/spec/realworld/gemfile_source_header_spec.rb +++ b/spec/realworld/gemfile_source_header_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "thread" diff --git a/spec/realworld/mirror_probe_spec.rb b/spec/realworld/mirror_probe_spec.rb index ce64981338..981c4b8442 100644 --- a/spec/realworld/mirror_probe_spec.rb +++ b/spec/realworld/mirror_probe_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" require "thread" diff --git a/spec/realworld/parallel_spec.rb b/spec/realworld/parallel_spec.rb index 7154e26dc9..539b8ab287 100644 --- a/spec/realworld/parallel_spec.rb +++ b/spec/realworld/parallel_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "parallel", :realworld => true, :sometimes => true do diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb index 0cfaf925da..cb5bc45597 100644 --- a/spec/resolver/basic_spec.rb +++ b/spec/resolver/basic_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Resolving" do diff --git a/spec/resolver/platform_spec.rb b/spec/resolver/platform_spec.rb index 85a0042a26..d5f217684c 100644 --- a/spec/resolver/platform_spec.rb +++ b/spec/resolver/platform_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Resolving platform craziness" do diff --git a/spec/runtime/executable_spec.rb b/spec/runtime/executable_spec.rb index a0abee27f5..1ce65bd598 100644 --- a/spec/runtime/executable_spec.rb +++ b/spec/runtime/executable_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Running bin/* commands" do diff --git a/spec/runtime/gem_tasks_spec.rb b/spec/runtime/gem_tasks_spec.rb index 1cbc35f7bb..c187efd681 100644 --- a/spec/runtime/gem_tasks_spec.rb +++ b/spec/runtime/gem_tasks_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "require 'bundler/gem_tasks'" do diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb index a5142d34ed..7d74e8cd14 100644 --- a/spec/runtime/inline_spec.rb +++ b/spec/runtime/inline_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundler/inline#gemfile" do @@ -5,7 +6,7 @@ describe "bundler/inline#gemfile" do 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) + @out = ruby("#{requires}\n\n" + code, options) end before :each do diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb index b7c856ac3a..c010f8f8e9 100644 --- a/spec/runtime/load_spec.rb +++ b/spec/runtime/load_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Bundler.load" do diff --git a/spec/runtime/platform_spec.rb b/spec/runtime/platform_spec.rb index cbc12ef495..db99f3556b 100644 --- a/spec/runtime/platform_spec.rb +++ b/spec/runtime/platform_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Bundler.setup with multi platform stuff" do diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb index e227514838..fbfa398239 100644 --- a/spec/runtime/require_spec.rb +++ b/spec/runtime/require_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Bundler.require" do diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index 37c1a2d9a2..be3d1baf2b 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Bundler.setup" do @@ -915,7 +916,7 @@ describe "Bundler.setup" do L if bundler_version - lock << "\n BUNDLED WITH\n #{bundler_version}\n" + lock += "\n BUNDLED WITH\n #{bundler_version}\n" end lock diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb index 55c6ed98ed..92607efc76 100644 --- a/spec/runtime/with_clean_env_spec.rb +++ b/spec/runtime/with_clean_env_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "Bundler.with_env helpers" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index cd2dc39469..bea836aae6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $:.unshift File.expand_path("..", __FILE__) $:.unshift File.expand_path("../../lib", __FILE__) diff --git a/spec/support/artifice/compact_index.rb b/spec/support/artifice/compact_index.rb index eb17f01905..88706c3590 100644 --- a/spec/support/artifice/compact_index.rb +++ b/spec/support/artifice/compact_index.rb @@ -48,7 +48,7 @@ class CompactIndexAPI < Endpoint end def quote(string) - '"' << string << '"' + %("#{string}") end def parse_etags(value) diff --git a/spec/support/artifice/compact_index_api_missing.rb b/spec/support/artifice/compact_index_api_missing.rb index db6528b878..6d15b54b85 100644 --- a/spec/support/artifice/compact_index_api_missing.rb +++ b/spec/support/artifice/compact_index_api_missing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_basic_authentication.rb b/spec/support/artifice/compact_index_basic_authentication.rb index 5ddcdf7fa7..bffb5b9e2b 100644 --- a/spec/support/artifice/compact_index_basic_authentication.rb +++ b/spec/support/artifice/compact_index_basic_authentication.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_creds_diff_host.rb b/spec/support/artifice/compact_index_creds_diff_host.rb index 2e8cd46b5e..0c417f0580 100644 --- a/spec/support/artifice/compact_index_creds_diff_host.rb +++ b/spec/support/artifice/compact_index_creds_diff_host.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_extra.rb b/spec/support/artifice/compact_index_extra.rb index 3300b70610..8a87fc4343 100644 --- a/spec/support/artifice/compact_index_extra.rb +++ b/spec/support/artifice/compact_index_extra.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_extra_api.rb b/spec/support/artifice/compact_index_extra_api.rb index df4674396a..063e5589d4 100644 --- a/spec/support/artifice/compact_index_extra_api.rb +++ b/spec/support/artifice/compact_index_extra_api.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_extra_missing.rb b/spec/support/artifice/compact_index_extra_missing.rb index 48fffd51a8..2af5ce9c27 100644 --- a/spec/support/artifice/compact_index_extra_missing.rb +++ b/spec/support/artifice/compact_index_extra_missing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index_extra", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_forbidden.rb b/spec/support/artifice/compact_index_forbidden.rb index 09d03bc88d..b25eea94e7 100644 --- a/spec/support/artifice/compact_index_forbidden.rb +++ b/spec/support/artifice/compact_index_forbidden.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_host_redirect.rb b/spec/support/artifice/compact_index_host_redirect.rb index 2e53cc7814..6c1ab2def6 100644 --- a/spec/support/artifice/compact_index_host_redirect.rb +++ b/spec/support/artifice/compact_index_host_redirect.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_redirects.rb b/spec/support/artifice/compact_index_redirects.rb index 256e73d7f4..ff1d3e43bc 100644 --- a/spec/support/artifice/compact_index_redirects.rb +++ b/spec/support/artifice/compact_index_redirects.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/compact_index_strict_basic_authentication.rb b/spec/support/artifice/compact_index_strict_basic_authentication.rb index bb1e794b4e..49a072d2b9 100644 --- a/spec/support/artifice/compact_index_strict_basic_authentication.rb +++ b/spec/support/artifice/compact_index_strict_basic_authentication.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../compact_index", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb b/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb index 205b25885a..f1f8dc5700 100644 --- a/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb +++ b/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint_marshal_fail", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb index 847f1d4b23..b0e9bd0f26 100644 --- a/spec/support/artifice/endpoint.rb +++ b/spec/support/artifice/endpoint.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../../path.rb", __FILE__) require File.expand_path("../../../../lib/bundler/deprecate", __FILE__) include Spec::Path diff --git a/spec/support/artifice/endpoint_500.rb b/spec/support/artifice/endpoint_500.rb index 2812a0d208..9bbbd1e2f2 100644 --- a/spec/support/artifice/endpoint_500.rb +++ b/spec/support/artifice/endpoint_500.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../../path.rb", __FILE__) include Spec::Path diff --git a/spec/support/artifice/endpoint_api_forbidden.rb b/spec/support/artifice/endpoint_api_forbidden.rb index f9d28c0470..21ad9117ed 100644 --- a/spec/support/artifice/endpoint_api_forbidden.rb +++ b/spec/support/artifice/endpoint_api_forbidden.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_api_missing.rb b/spec/support/artifice/endpoint_api_missing.rb index ca5916938f..6f5b5f1323 100644 --- a/spec/support/artifice/endpoint_api_missing.rb +++ b/spec/support/artifice/endpoint_api_missing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_basic_authentication.rb b/spec/support/artifice/endpoint_basic_authentication.rb index 0cfba89184..9fafd51a3d 100644 --- a/spec/support/artifice/endpoint_basic_authentication.rb +++ b/spec/support/artifice/endpoint_basic_authentication.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_creds_diff_host.rb b/spec/support/artifice/endpoint_creds_diff_host.rb index 97a81d97d8..cd152848fe 100644 --- a/spec/support/artifice/endpoint_creds_diff_host.rb +++ b/spec/support/artifice/endpoint_creds_diff_host.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_extra.rb b/spec/support/artifice/endpoint_extra.rb index c50428fe20..ed4e87e65f 100644 --- a/spec/support/artifice/endpoint_extra.rb +++ b/spec/support/artifice/endpoint_extra.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_extra_api.rb b/spec/support/artifice/endpoint_extra_api.rb index d6d1c5a1b4..1e9e1dc60d 100644 --- a/spec/support/artifice/endpoint_extra_api.rb +++ b/spec/support/artifice/endpoint_extra_api.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_extra_missing.rb b/spec/support/artifice/endpoint_extra_missing.rb index 89c4c0c776..dc79705a26 100644 --- a/spec/support/artifice/endpoint_extra_missing.rb +++ b/spec/support/artifice/endpoint_extra_missing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint_extra", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_fallback.rb b/spec/support/artifice/endpoint_fallback.rb index db02a88758..8a85a41784 100644 --- a/spec/support/artifice/endpoint_fallback.rb +++ b/spec/support/artifice/endpoint_fallback.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_host_redirect.rb b/spec/support/artifice/endpoint_host_redirect.rb index 00c496af58..250416d8cc 100644 --- a/spec/support/artifice/endpoint_host_redirect.rb +++ b/spec/support/artifice/endpoint_host_redirect.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_marshal_fail.rb b/spec/support/artifice/endpoint_marshal_fail.rb index a0dc182e27..0fb75ebf31 100644 --- a/spec/support/artifice/endpoint_marshal_fail.rb +++ b/spec/support/artifice/endpoint_marshal_fail.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint_fallback", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_mirror_source.rb b/spec/support/artifice/endpoint_mirror_source.rb index 39cd3656fa..9fb58ecb29 100644 --- a/spec/support/artifice/endpoint_mirror_source.rb +++ b/spec/support/artifice/endpoint_mirror_source.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) class EndpointMirrorSource < Endpoint diff --git a/spec/support/artifice/endpoint_redirect.rb b/spec/support/artifice/endpoint_redirect.rb index 2b48fa5344..f80d7600c2 100644 --- a/spec/support/artifice/endpoint_redirect.rb +++ b/spec/support/artifice/endpoint_redirect.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_strict_basic_authentication.rb b/spec/support/artifice/endpoint_strict_basic_authentication.rb index e7329abdc4..4b32cbbf5b 100644 --- a/spec/support/artifice/endpoint_strict_basic_authentication.rb +++ b/spec/support/artifice/endpoint_strict_basic_authentication.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint", __FILE__) Artifice.deactivate diff --git a/spec/support/artifice/endpoint_timeout.rb b/spec/support/artifice/endpoint_timeout.rb index da682204c4..b15650f226 100644 --- a/spec/support/artifice/endpoint_timeout.rb +++ b/spec/support/artifice/endpoint_timeout.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../endpoint_fallback", __FILE__) Artifice.deactivate diff --git a/spec/support/builders.rb b/spec/support/builders.rb index 4f5dace604..3a18cbea77 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "bundler/shared_helpers" module Spec @@ -624,7 +625,7 @@ module Spec current_ref = `git rev-parse HEAD`.strip _default_files.keys.each do |path| - _default_files[path] << "\n#{Builders.constantize(name)}_PREV_REF = '#{current_ref}'" + _default_files[path] += "\n#{Builders.constantize(name)}_PREV_REF = '#{current_ref}'" end super(options.merge(:path => libpath, :gemspec => false)) `git add *` diff --git a/spec/support/code_climate.rb b/spec/support/code_climate.rb index cfcd890a40..8f1fb35bcd 100644 --- a/spec/support/code_climate.rb +++ b/spec/support/code_climate.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Spec module CodeClimate def self.setup diff --git a/spec/support/fakeweb/windows.rb b/spec/support/fakeweb/windows.rb index 6c674b31b6..f1f21eed3f 100644 --- a/spec/support/fakeweb/windows.rb +++ b/spec/support/fakeweb/windows.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../../path.rb", __FILE__) include Spec::Path diff --git a/spec/support/hax.rb b/spec/support/hax.rb index 1fd3ae9936..2cca22c6ab 100644 --- a/spec/support/hax.rb +++ b/spec/support/hax.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rubygems" class Gem::Platform diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 8aade71af9..8bcae2a45a 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Spec module Helpers def reset! @@ -122,7 +123,7 @@ module Spec def ruby(ruby, options = {}) expect_err = options.delete(:expect_err) env = (options.delete(:env) || {}).map {|k, v| "#{k}='#{v}' " }.join - ruby.gsub!(/["`\$]/) {|m| "\\#{m}" } + ruby = ruby.gsub(/["`\$]/) {|m| "\\#{m}" } lib_option = options[:no_lib] ? "" : " -I#{lib}" sys_exec(%(#{env}#{Gem.ruby}#{lib_option} -e "#{ruby}"), expect_err) end diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb index 10067197db..acace96886 100644 --- a/spec/support/indexes.rb +++ b/spec/support/indexes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Spec module Indexes def dep(name, reqs = nil) diff --git a/spec/support/less_than_proc.rb b/spec/support/less_than_proc.rb index 515470968a..27966aa6ed 100644 --- a/spec/support/less_than_proc.rb +++ b/spec/support/less_than_proc.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class LessThanProc < Proc attr_accessor :present diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 58babf2ceb..7047e1be76 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Spec module Matchers RSpec::Matchers.define :have_dep do |*args| @@ -69,7 +70,7 @@ module Spec def lockfile_should_be(expected) should_be_locked spaces = expected[/\A\s+/, 0] || "" - expected.gsub!(/^#{spaces}/, "") + expected = 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 42eb9f7364..d1f698acbe 100644 --- a/spec/support/path.rb +++ b/spec/support/path.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "pathname" module Spec diff --git a/spec/support/permissions.rb b/spec/support/permissions.rb index efdb4a5b28..f5636dd70a 100644 --- a/spec/support/permissions.rb +++ b/spec/support/permissions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Spec module Permissions def with_umask(new_umask) diff --git a/spec/support/platforms.rb b/spec/support/platforms.rb index 26753af936..b1dedb05fa 100644 --- a/spec/support/platforms.rb +++ b/spec/support/platforms.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Spec module Platforms include Bundler::GemHelpers diff --git a/spec/support/ruby_ext.rb b/spec/support/ruby_ext.rb index 9c5b08c9e5..7f1eabf4b5 100644 --- a/spec/support/ruby_ext.rb +++ b/spec/support/ruby_ext.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IO def read_available_bytes(chunk_size = 16_384, select_timeout = 0.02) buffer = [] diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb index 2889f44040..64cc41443d 100644 --- a/spec/support/rubygems_ext.rb +++ b/spec/support/rubygems_ext.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rubygems/user_interaction" require "support/path" unless defined?(Spec::Path) @@ -30,9 +31,9 @@ module Spec if !File.exist?(manifest_path) || !(manifest - File.readlines(manifest_path)).empty? FileUtils.rm_rf(Path.base_system_gems) FileUtils.mkdir_p(Path.base_system_gems) - File.open(manifest_path, "w") {|f| f << manifest.join } puts "installing gems for the tests to use..." DEPS.each {|n, v| install_gem(n, v) } + File.open(manifest_path, "w") {|f| f << manifest.join } end ENV["HOME"] = Path.home.to_s @@ -42,7 +43,7 @@ module Spec def self.install_gem(name, version = nil) cmd = "gem install #{name} --no-rdoc --no-ri" - cmd << " --version #{version}" if version + cmd += " --version #{version}" if version system(cmd) || raise("Installing gem #{name} for the tests to use failed!") end diff --git a/spec/support/sometimes.rb b/spec/support/sometimes.rb index 0ab15d974f..1ecbd36e2d 100644 --- a/spec/support/sometimes.rb +++ b/spec/support/sometimes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Sometimes def run_with_retries(example_to_run, retries) example = RSpec.current_example diff --git a/spec/support/streams.rb b/spec/support/streams.rb index f89c506c93..561b29092b 100644 --- a/spec/support/streams.rb +++ b/spec/support/streams.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "stringio" def capture(*streams) diff --git a/spec/support/sudo.rb b/spec/support/sudo.rb index 2192b09dc8..8c82bb8c0f 100644 --- a/spec/support/sudo.rb +++ b/spec/support/sudo.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Spec module Sudo def self.present? diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb index 1c69918f25..94426b68d9 100644 --- a/spec/update/git_spec.rb +++ b/spec/update/git_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "bundle update" do diff --git a/spec/update/path_spec.rb b/spec/update/path_spec.rb index 79d8caa945..aa220ad60e 100644 --- a/spec/update/path_spec.rb +++ b/spec/update/path_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "spec_helper" describe "path sources" do |