summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.rubocop_todo.yml46
-rw-r--r--Rakefile6
-rwxr-xr-xbin/rubocop2
-rw-r--r--lib/bundler/cli.rb22
-rw-r--r--lib/bundler/cli/viz.rb2
-rw-r--r--lib/bundler/resolver.rb5
-rw-r--r--lib/bundler/settings.rb3
-rw-r--r--lib/bundler/templates/newgem/spec/spec_helper.rb.tt3
-rw-r--r--spec/bundler/bundler_spec.rb2
-rw-r--r--spec/bundler/cli_spec.rb67
-rw-r--r--spec/bundler/definition_spec.rb2
-rw-r--r--spec/bundler/dsl_spec.rb2
-rw-r--r--spec/bundler/endpoint_specification_spec.rb2
-rw-r--r--spec/bundler/env_spec.rb2
-rw-r--r--spec/bundler/environment_preserver_spec.rb2
-rw-r--r--spec/bundler/fetcher/base_spec.rb2
-rw-r--r--spec/bundler/fetcher/compact_index_spec.rb2
-rw-r--r--spec/bundler/fetcher/dependency_spec.rb2
-rw-r--r--spec/bundler/fetcher/downloader_spec.rb2
-rw-r--r--spec/bundler/fetcher/index_spec.rb2
-rw-r--r--spec/bundler/fetcher_spec.rb2
-rw-r--r--spec/bundler/friendly_errors_spec.rb2
-rw-r--r--spec/bundler/gem_helper_spec.rb2
-rw-r--r--spec/bundler/gem_version_promoter_spec.rb2
-rw-r--r--spec/bundler/index_spec.rb2
-rw-r--r--spec/bundler/installer/parallel_installer_spec.rb2
-rw-r--r--spec/bundler/installer/spec_installation_spec.rb2
-rw-r--r--spec/bundler/lockfile_parser_spec.rb2
-rw-r--r--spec/bundler/mirror_spec.rb6
-rw-r--r--spec/bundler/plugin/api/source_spec.rb2
-rw-r--r--spec/bundler/plugin/api_spec.rb2
-rw-r--r--spec/bundler/plugin/dsl_spec.rb2
-rw-r--r--spec/bundler/plugin/index_spec.rb2
-rw-r--r--spec/bundler/plugin/installer_spec.rb2
-rw-r--r--spec/bundler/plugin/source_list_spec.rb2
-rw-r--r--spec/bundler/plugin_spec.rb2
-rw-r--r--spec/bundler/psyched_yaml_spec.rb2
-rw-r--r--spec/bundler/remote_specification_spec.rb2
-rw-r--r--spec/bundler/retry_spec.rb2
-rw-r--r--spec/bundler/ruby_dsl_spec.rb2
-rw-r--r--spec/bundler/ruby_version_spec.rb2
-rw-r--r--spec/bundler/rubygems_integration_spec.rb2
-rw-r--r--spec/bundler/settings_spec.rb2
-rw-r--r--spec/bundler/shared_helpers_spec.rb2
-rw-r--r--spec/bundler/source/git/git_proxy_spec.rb2
-rw-r--r--spec/bundler/source/rubygems/remote_spec.rb2
-rw-r--r--spec/bundler/source/rubygems_spec.rb2
-rw-r--r--spec/bundler/source_list_spec.rb2
-rw-r--r--spec/bundler/source_spec.rb2
-rw-r--r--spec/bundler/spec_set_spec.rb2
-rw-r--r--spec/bundler/ssl_certs/certificate_manager_spec.rb2
-rw-r--r--spec/bundler/uri_credentials_filter_spec.rb2
-rw-r--r--spec/bundler/worker_spec.rb2
-rw-r--r--spec/bundler/yaml_serializer_spec.rb2
-rw-r--r--spec/cache/cache_path_spec.rb2
-rw-r--r--spec/cache/gems_spec.rb2
-rw-r--r--spec/cache/git_spec.rb4
-rw-r--r--spec/cache/path_spec.rb2
-rw-r--r--spec/cache/platform_spec.rb2
-rw-r--r--spec/commands/binstubs_spec.rb2
-rw-r--r--spec/commands/check_spec.rb2
-rw-r--r--spec/commands/clean_spec.rb2
-rw-r--r--spec/commands/config_spec.rb4
-rw-r--r--spec/commands/console_spec.rb2
-rw-r--r--spec/commands/doctor_spec.rb2
-rw-r--r--spec/commands/exec_spec.rb2
-rw-r--r--spec/commands/help_spec.rb5
-rw-r--r--spec/commands/init_spec.rb2
-rw-r--r--spec/commands/inject_spec.rb2
-rw-r--r--spec/commands/install_spec.rb2
-rw-r--r--spec/commands/licenses_spec.rb2
-rw-r--r--spec/commands/lock_spec.rb2
-rw-r--r--spec/commands/newgem_spec.rb2
-rw-r--r--spec/commands/open_spec.rb2
-rw-r--r--spec/commands/outdated_spec.rb2
-rw-r--r--spec/commands/package_spec.rb4
-rw-r--r--spec/commands/show_spec.rb2
-rw-r--r--spec/commands/update_spec.rb14
-rw-r--r--spec/commands/viz_spec.rb2
-rw-r--r--spec/install/allow_offline_install_spec.rb2
-rw-r--r--spec/install/binstubs_spec.rb2
-rw-r--r--spec/install/bundler_spec.rb2
-rw-r--r--spec/install/deploy_spec.rb2
-rw-r--r--spec/install/force_spec.rb2
-rw-r--r--spec/install/gemfile/eval_gemfile_spec.rb2
-rw-r--r--spec/install/gemfile/gemspec_spec.rb2
-rw-r--r--spec/install/gemfile/git_spec.rb2
-rw-r--r--spec/install/gemfile/groups_spec.rb2
-rw-r--r--spec/install/gemfile/path_spec.rb2
-rw-r--r--spec/install/gemfile/platform_spec.rb6
-rw-r--r--spec/install/gemfile/ruby_spec.rb2
-rw-r--r--spec/install/gemfile/sources_spec.rb2
-rw-r--r--spec/install/gemfile/specific_platform_spec.rb2
-rw-r--r--spec/install/gemfile_spec.rb2
-rw-r--r--spec/install/gems/compact_index_spec.rb2
-rw-r--r--spec/install/gems/dependency_api_spec.rb2
-rw-r--r--spec/install/gems/env_spec.rb2
-rw-r--r--spec/install/gems/flex_spec.rb2
-rw-r--r--spec/install/gems/mirror_spec.rb2
-rw-r--r--spec/install/gems/native_extensions_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/standalone_spec.rb6
-rw-r--r--spec/install/gems/sudo_spec.rb2
-rw-r--r--spec/install/gems/win32_spec.rb2
-rw-r--r--spec/install/gemspecs_spec.rb2
-rw-r--r--spec/install/git_spec.rb2
-rw-r--r--spec/install/path_spec.rb2
-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.rb4
-rw-r--r--spec/install/yanked_spec.rb4
-rw-r--r--spec/lock/git_spec.rb2
-rw-r--r--spec/lock/lockfile_spec.rb2
-rw-r--r--spec/other/bundle_ruby_spec.rb2
-rw-r--r--spec/other/cli_dispatch_spec.rb2
-rw-r--r--spec/other/ext_spec.rb12
-rw-r--r--spec/other/major_deprecation_spec.rb2
-rw-r--r--spec/other/platform_spec.rb2
-rw-r--r--spec/other/ssl_cert_spec.rb2
-rw-r--r--spec/other/trampoline_spec.rb2
-rw-r--r--spec/plugins/command_spec.rb2
-rw-r--r--spec/plugins/hook_spec.rb2
-rw-r--r--spec/plugins/install_spec.rb2
-rw-r--r--spec/plugins/source/example_spec.rb2
-rw-r--r--spec/plugins/source_spec.rb2
-rw-r--r--spec/quality_spec.rb2
-rw-r--r--spec/realworld/dependency_api_spec.rb2
-rw-r--r--spec/realworld/edgecases_spec.rb138
-rw-r--r--spec/realworld/gemfile_source_header_spec.rb2
-rw-r--r--spec/realworld/mirror_probe_spec.rb2
-rw-r--r--spec/realworld/parallel_spec.rb2
-rw-r--r--spec/resolver/basic_spec.rb2
-rw-r--r--spec/resolver/platform_spec.rb2
-rw-r--r--spec/runtime/executable_spec.rb2
-rw-r--r--spec/runtime/gem_tasks_spec.rb2
-rw-r--r--spec/runtime/inline_spec.rb2
-rw-r--r--spec/runtime/load_spec.rb2
-rw-r--r--spec/runtime/platform_spec.rb2
-rw-r--r--spec/runtime/require_spec.rb4
-rw-r--r--spec/runtime/setup_spec.rb2
-rw-r--r--spec/runtime/with_clean_env_spec.rb2
-rw-r--r--spec/spec_helper.rb8
-rw-r--r--spec/support/hax.rb1
-rw-r--r--spec/update/gems/post_install_spec.rb2
-rw-r--r--spec/update/git_spec.rb2
-rw-r--r--spec/update/path_spec.rb2
-rw-r--r--task/release.rake81
148 files changed, 509 insertions, 194 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 8abe1e76eb..fd3dce32f2 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2016-11-19 11:43:45 -0600 using RuboCop version 0.45.0.
+# on 2017-01-15 12:02:24 -0600 using RuboCop version 0.46.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -58,13 +58,13 @@ Lint/UselessAssignment:
- 'lib/bundler/index.rb'
- 'lib/bundler/installer.rb'
-# Offense count: 7
+# Offense count: 8
# Configuration parameters: CountComments.
Metrics/BlockLength:
Max: 46
-# Offense count: 1855
-# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives.
+# Offense count: 1890
+# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 207
@@ -127,10 +127,23 @@ Style/ConditionalAssignment:
- 'lib/bundler/source/git.rb'
- 'lib/bundler/source/rubygems.rb'
-# Offense count: 148
+# Offense count: 152
Style/Documentation:
Enabled: false
+# Offense count: 17
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SupportedStyles.
+# SupportedStyles: compact, expanded
+Style/EmptyMethod:
+ Exclude:
+ - 'exe/bundle_ruby'
+ - 'lib/bundler/cli.rb'
+ - 'lib/bundler/plugin/api/source.rb'
+ - 'lib/bundler/rubygems_integration.rb'
+ - 'lib/bundler/ui/silent.rb'
+ - 'spec/support/artifice/fail.rb'
+
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
@@ -145,7 +158,7 @@ Style/GlobalVars:
- 'lib/bundler/cli.rb'
- 'spec/spec_helper.rb'
-# Offense count: 19
+# Offense count: 18
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
@@ -159,7 +172,6 @@ Style/GuardClause:
- 'lib/bundler/installer.rb'
- 'lib/bundler/lockfile_parser.rb'
- 'lib/bundler/runtime.rb'
- - 'lib/bundler/shared_helpers.rb'
- 'lib/bundler/source/path/installer.rb'
- 'lib/bundler/source_list.rb'
- 'spec/commands/newgem_spec.rb'
@@ -276,7 +288,7 @@ Style/SpaceAroundOperators:
Exclude:
- 'lib/bundler/retry.rb'
-# Offense count: 1
+# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
@@ -287,20 +299,19 @@ Style/SpaceInsideBlockBraces:
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment.
-# SupportedStyles: require_parentheses, require_no_parentheses
+# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
Style/TernaryParentheses:
Exclude:
- 'lib/bundler/cli/common.rb'
- 'lib/bundler/gem_version_promoter.rb'
-# Offense count: 10
+# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
# SupportedStyles: comma, consistent_comma, no_comma
Style/TrailingCommaInLiteral:
Exclude:
- 'lib/bundler/cli/gem.rb'
- - 'lib/bundler/dependency.rb'
- 'lib/bundler/fetcher.rb'
- 'lib/bundler/gem_helpers.rb'
- 'lib/bundler/graph.rb'
@@ -308,7 +319,7 @@ Style/TrailingCommaInLiteral:
- 'lib/bundler/similarity_detector.rb'
- 'spec/support/artifice/endpoint.rb'
-# Offense count: 18
+# Offense count: 7
# Cop supports --auto-correct.
Style/UnneededInterpolation:
Exclude:
@@ -317,14 +328,3 @@ Style/UnneededInterpolation:
- 'spec/bundler/shared_helpers_spec.rb'
- 'spec/cache/git_spec.rb'
- 'spec/commands/exec_spec.rb'
- - 'spec/support/artifice/endpoint.rb'
- - 'spec/support/artifice/endpoint_500.rb'
-
-# Offense count: 2
-# Configuration parameters: SupportedStyles.
-# SupportedStyles: snake_case, normalcase, non_integer
-Style/VariableNumber:
- EnforcedStyle: normalcase
- Exclude:
- - 'spec/commands/help_spec.rb'
- - 'spec/other/ext_spec.rb'
diff --git a/Rakefile b/Rakefile
index dba4d46eea..6952e13a1d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -39,7 +39,7 @@ namespace :spec do
deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d|
[d.name, d.requirement.to_s]
end]
- deps["rubocop"] ||= "= 0.45.0" if RUBY_VERSION >= "2.0.0" # can't go in the gemspec because of the ruby version requirement
+ deps["rubocop"] ||= "= 0.46.0" if RUBY_VERSION >= "2.0.0" # can't go in the gemspec because of the ruby version requirement
# JRuby can't build ronn or rdiscount, so we skip that
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
@@ -93,7 +93,7 @@ begin
if RUBY_VERSION >= "2.0.0"
# can't go in the gemspec because of the ruby version requirement
- gem "rubocop", "= 0.45.0"
+ gem "rubocop", "= 0.46.0"
require "rubocop/rake_task"
RuboCop::RakeTask.new
end
@@ -342,3 +342,5 @@ task :build => ["man:build"]
task :release => ["man:require", "man:build"]
task :default => :spec
+
+Dir["task/*.{rb,rake}"].each(&method(:load))
diff --git a/bin/rubocop b/bin/rubocop
index 83e8e78c08..aedb4db20c 100755
--- a/bin/rubocop
+++ b/bin/rubocop
@@ -10,7 +10,7 @@ bundler_spec.dependencies.each do |dep|
gem dep.name, dep.requirement
end
-gem "rubocop", "= 0.45.0"
+gem "rubocop", "= 0.46.0"
Gem.finish_resolve if Gem.respond_to?(:finish_resolve)
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index eb9362a500..a70d66f200 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -13,6 +13,7 @@ module Bundler
Bundler.ui = UI::Shell.new
raise e
ensure
+ warn_on_outdated_bundler
Bundler::SharedHelpers.print_major_deprecations!
end
@@ -579,5 +580,26 @@ module Bundler
command.reject!(&:empty?)
Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler::VERSION}"
end
+
+ def self.warn_on_outdated_bundler
+ return if Bundler.settings[:disable_version_check]
+
+ latest = Fetcher::CompactIndex.
+ new(nil, Source::Rubygems::Remote.new(URI("https://rubygems.org")), nil).
+ send(:compact_index_client).
+ instance_variable_get(:@cache).
+ dependencies("bundler").
+ map {|d| Gem::Version.new(d.first) }.
+ max
+ return unless latest
+
+ current = Gem::Version.new(VERSION)
+ return if current >= latest
+
+ Bundler.ui.warn "The latest bundler is #{latest}, but you are currently running #{current}.\nTo update, run `gem install bundler#{" --pre" if latest.prerelease?}`"
+ rescue
+ nil
+ end
+ private_class_method :warn_on_outdated_bundler
end
end
diff --git a/lib/bundler/cli/viz.rb b/lib/bundler/cli/viz.rb
index 75e6affff9..418c462a93 100644
--- a/lib/bundler/cli/viz.rb
+++ b/lib/bundler/cli/viz.rb
@@ -21,7 +21,7 @@ module Bundler
rescue StandardError => e
raise unless e.message =~ /GraphViz not installed or dot not in PATH/
Bundler.ui.error e.message
- Bundler.ui.warn "Please install GraphViz. On a Mac with homebrew, you can run `brew install graphviz`."
+ Bundler.ui.warn "Please install GraphViz. On a Mac with Homebrew, you can run `brew install graphviz`."
end
end
end
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index bdb8f4883c..2eff76d7ff 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -14,7 +14,7 @@ module Bundler
def message
conflicts.sort.reduce(String.new) do |o, (name, conflict)|
- o << %(Bundler could not find compatible versions for gem "#{name}":\n)
+ o << %(\nBundler could not find compatible versions for gem "#{name}":\n)
if conflict.locked_requirement
o << %( In snapshot (#{Bundler.default_lockfile.basename}):\n)
o << %( #{printable_dep(conflict.locked_requirement)}\n)
@@ -62,7 +62,7 @@ module Bundler
end
end
o
- end
+ end.strip
end
end
@@ -315,6 +315,7 @@ module Bundler
dependencies.sort_by do |dependency|
name = name_for(dependency)
[
+ @base_dg.vertex_named(name) ? 0 : 1,
activated.vertex_named(name).payload ? 0 : 1,
amount_constrained(dependency),
conflicts[name] ? 0 : 1,
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 0aa9082352..e98940721e 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -15,6 +15,8 @@ module Bundler
disable_exec_load
disable_local_branch_check
disable_shared_gems
+ disable_version_check
+ force_ruby_platform
frozen
gem.coc
gem.mit
@@ -22,7 +24,6 @@ module Bundler
major_deprecations
no_install
no_prune
- force_ruby_platform
only_update_to_newer_versions
plugins
silence_root_warning
diff --git a/lib/bundler/templates/newgem/spec/spec_helper.rb.tt b/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
index a5e7f92ffe..805cf57e01 100644
--- a/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
+++ b/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
@@ -5,6 +5,9 @@ RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = ".rspec_status"
+ # Disable RSpec exposing methods globally on `Module` and `main`
+ config.disable_monkey_patching!
+
config.expect_with :rspec do |c|
c.syntax = :expect
end
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb
index 1b72f7fd42..4458efce6a 100644
--- a/spec/bundler/bundler_spec.rb
+++ b/spec/bundler/bundler_spec.rb
@@ -3,7 +3,7 @@
require "spec_helper"
require "bundler"
-describe Bundler do
+RSpec.describe Bundler do
describe "#load_gemspec_uncached" do
let(:app_gemspec_path) { tmp("test.gemspec") }
subject { Bundler.load_gemspec_uncached(app_gemspec_path) }
diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb
index ac704fb41d..ec1d384851 100644
--- a/spec/bundler/cli_spec.rb
+++ b/spec/bundler/cli_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/cli"
-describe "bundle executable" do
+RSpec.describe "bundle executable" do
it "returns non-zero exit status when passed unrecognized options" do
bundle "--invalid_argument"
expect(exitstatus).to_not be_zero if exitstatus
@@ -61,9 +61,72 @@ describe "bundle executable" do
expect(out).to start_with("Running `bundle config --verbose` with bundler #{Bundler::VERSION}")
end
end
+
+ describe "printing the outdated warning" do
+ shared_examples_for "no warning" do
+ it "prints no warning" do
+ bundle "fail"
+ expect(err + out).to eq("Could not find command \"fail\".")
+ end
+ end
+
+ let(:bundler_version) { "1.1" }
+ let(:latest_version) { nil }
+ before do
+ simulate_bundler_version(bundler_version)
+ if latest_version
+ info_path = home(".bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/info/bundler")
+ info_path.parent.mkpath
+ info_path.open("w") {|f| f.write "#{latest_version}\n" }
+ end
+ end
+
+ context "when there is no latest version" do
+ include_examples "no warning"
+ end
+
+ context "when the latest version is equal to the current version" do
+ let(:latest_version) { bundler_version }
+ include_examples "no warning"
+ end
+
+ context "when the latest version is less than the current version" do
+ let(:latest_version) { "0.9" }
+ include_examples "no warning"
+ end
+
+ context "when the latest version is greater than the current version" do
+ let(:latest_version) { "2.0" }
+ it "prints the version warning" do
+ bundle "fail"
+ expect(err + out).to eq(<<-EOS.strip)
+The latest bundler is #{latest_version}, but you are currently running #{bundler_version}.
+To update, run `gem install bundler`
+Could not find command "fail".
+ EOS
+ end
+
+ context "and disable_version_check is set" do
+ before { bundle! "config disable_version_check true" }
+ include_examples "no warning"
+ end
+
+ context "and is a pre-release" do
+ let(:latest_version) { "2.0.0.pre.4" }
+ it "prints the version warning" do
+ bundle "fail"
+ expect(err + out).to eq(<<-EOS.strip)
+The latest bundler is #{latest_version}, but you are currently running #{bundler_version}.
+To update, run `gem install bundler --pre`
+Could not find command "fail".
+ EOS
+ end
+ end
+ end
+ end
end
-describe "bundler executable" do
+RSpec.describe "bundler executable" do
it "shows the bundler version just as the `bundle` executable does" do
bundler "--version"
expect(out).to eq("Bundler version #{Bundler::VERSION}")
diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb
index 1bd6575d8b..73d44a93ab 100644
--- a/spec/bundler/definition_spec.rb
+++ b/spec/bundler/definition_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/definition"
-describe Bundler::Definition do
+RSpec.describe Bundler::Definition do
describe "#lock" do
before do
allow(Bundler).to receive(:settings) { Bundler::Settings.new(".") }
diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb
index bd5d94318d..0561cb7ddc 100644
--- a/spec/bundler/dsl_spec.rb
+++ b/spec/bundler/dsl_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Dsl do
+RSpec.describe Bundler::Dsl do
before do
@rubygems = double("rubygems")
allow(Bundler::Source::Rubygems).to receive(:new) { @rubygems }
diff --git a/spec/bundler/endpoint_specification_spec.rb b/spec/bundler/endpoint_specification_spec.rb
index b1e71df39a..0b8da840d2 100644
--- a/spec/bundler/endpoint_specification_spec.rb
+++ b/spec/bundler/endpoint_specification_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::EndpointSpecification do
+RSpec.describe Bundler::EndpointSpecification do
let(:name) { "foo" }
let(:version) { "1.0.0" }
let(:platform) { Gem::Platform::RUBY }
diff --git a/spec/bundler/env_spec.rb b/spec/bundler/env_spec.rb
index f2cf26c4cf..269c323ac6 100644
--- a/spec/bundler/env_spec.rb
+++ b/spec/bundler/env_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/settings"
-describe Bundler::Env do
+RSpec.describe Bundler::Env do
let(:env) { described_class.new }
let(:git_proxy_stub) { Bundler::Source::Git::GitProxy.new(nil, nil, nil) }
diff --git a/spec/bundler/environment_preserver_spec.rb b/spec/bundler/environment_preserver_spec.rb
index 496646d654..41d2650055 100644
--- a/spec/bundler/environment_preserver_spec.rb
+++ b/spec/bundler/environment_preserver_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::EnvironmentPreserver do
+RSpec.describe Bundler::EnvironmentPreserver do
let(:preserver) { described_class.new(env, ["foo"]) }
describe "#backup" do
diff --git a/spec/bundler/fetcher/base_spec.rb b/spec/bundler/fetcher/base_spec.rb
index bd1c03660c..38b69429bc 100644
--- a/spec/bundler/fetcher/base_spec.rb
+++ b/spec/bundler/fetcher/base_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Fetcher::Base do
+RSpec.describe Bundler::Fetcher::Base do
let(:downloader) { double(:downloader) }
let(:remote) { double(:remote) }
let(:display_uri) { "http://sample_uri.com" }
diff --git a/spec/bundler/fetcher/compact_index_spec.rb b/spec/bundler/fetcher/compact_index_spec.rb
index 691e19f638..5e85f906ba 100644
--- a/spec/bundler/fetcher/compact_index_spec.rb
+++ b/spec/bundler/fetcher/compact_index_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Fetcher::CompactIndex do
+RSpec.describe Bundler::Fetcher::CompactIndex do
let(:downloader) { double(:downloader) }
let(:remote) { double(:remote, :cache_slug => "lsjdf") }
let(:display_uri) { URI("http://sampleuri.com") }
diff --git a/spec/bundler/fetcher/dependency_spec.rb b/spec/bundler/fetcher/dependency_spec.rb
index d021a246f7..134ca1bc57 100644
--- a/spec/bundler/fetcher/dependency_spec.rb
+++ b/spec/bundler/fetcher/dependency_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Fetcher::Dependency do
+RSpec.describe Bundler::Fetcher::Dependency do
let(:downloader) { double(:downloader) }
let(:remote) { double(:remote, :uri => URI("http://localhost:5000")) }
let(:display_uri) { "http://sample_uri.com" }
diff --git a/spec/bundler/fetcher/downloader_spec.rb b/spec/bundler/fetcher/downloader_spec.rb
index 8371bcfa6c..8b26b8e415 100644
--- a/spec/bundler/fetcher/downloader_spec.rb
+++ b/spec/bundler/fetcher/downloader_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Fetcher::Downloader do
+RSpec.describe Bundler::Fetcher::Downloader do
let(:connection) { double(:connection) }
let(:redirect_limit) { 5 }
let(:uri) { URI("http://www.uri-to-fetch.com/api/v2/endpoint") }
diff --git a/spec/bundler/fetcher/index_spec.rb b/spec/bundler/fetcher/index_spec.rb
index f81a655c24..b17e0d1727 100644
--- a/spec/bundler/fetcher/index_spec.rb
+++ b/spec/bundler/fetcher/index_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Fetcher::Index do
+RSpec.describe Bundler::Fetcher::Index do
let(:downloader) { nil }
let(:remote) { nil }
let(:display_uri) { "http://sample_uri.com" }
diff --git a/spec/bundler/fetcher_spec.rb b/spec/bundler/fetcher_spec.rb
index 015eb81fd9..5244fc2b18 100644
--- a/spec/bundler/fetcher_spec.rb
+++ b/spec/bundler/fetcher_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/fetcher"
-describe Bundler::Fetcher do
+RSpec.describe Bundler::Fetcher do
let(:uri) { URI("https://example.com") }
let(:remote) { double("remote", :uri => uri, :original_uri => nil) }
diff --git a/spec/bundler/friendly_errors_spec.rb b/spec/bundler/friendly_errors_spec.rb
index 1d88403c0e..365b2d12e9 100644
--- a/spec/bundler/friendly_errors_spec.rb
+++ b/spec/bundler/friendly_errors_spec.rb
@@ -4,7 +4,7 @@ require "bundler"
require "bundler/friendly_errors"
require "cgi"
-describe Bundler, "friendly errors" do
+RSpec.describe Bundler, "friendly errors" do
context "with invalid YAML in .gemrc" do
before do
File.open(Gem.configuration.config_file_name, "w") do |f|
diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb
index 4e1af32c11..a827568d5f 100644
--- a/spec/bundler/gem_helper_spec.rb
+++ b/spec/bundler/gem_helper_spec.rb
@@ -3,7 +3,7 @@ require "spec_helper"
require "rake"
require "bundler/gem_helper"
-describe Bundler::GemHelper do
+RSpec.describe Bundler::GemHelper do
let(:app_name) { "lorem__ipsum" }
let(:app_path) { bundled_app app_name }
let(:app_gemspec_path) { app_path.join("#{app_name}.gemspec") }
diff --git a/spec/bundler/gem_version_promoter_spec.rb b/spec/bundler/gem_version_promoter_spec.rb
index 9e5a7bb581..c7620e2620 100644
--- a/spec/bundler/gem_version_promoter_spec.rb
+++ b/spec/bundler/gem_version_promoter_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::GemVersionPromoter do
+RSpec.describe Bundler::GemVersionPromoter do
context "conservative resolver" do
def versions(result)
result.flatten.map(&:version).map(&:to_s)
diff --git a/spec/bundler/index_spec.rb b/spec/bundler/index_spec.rb
index 1ff592ca81..09b09e08fa 100644
--- a/spec/bundler/index_spec.rb
+++ b/spec/bundler/index_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Index do
+RSpec.describe Bundler::Index do
let(:specs) { [] }
subject { described_class.build {|i| i.use(specs) } }
diff --git a/spec/bundler/installer/parallel_installer_spec.rb b/spec/bundler/installer/parallel_installer_spec.rb
index 0f4e7dba9a..7d2c441399 100644
--- a/spec/bundler/installer/parallel_installer_spec.rb
+++ b/spec/bundler/installer/parallel_installer_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/installer/parallel_installer"
-describe Bundler::ParallelInstaller do
+RSpec.describe Bundler::ParallelInstaller do
let(:installer) { instance_double("Installer") }
let(:all_specs) { [] }
let(:size) { 1 }
diff --git a/spec/bundler/installer/spec_installation_spec.rb b/spec/bundler/installer/spec_installation_spec.rb
index b18695bf26..1e368ab7c5 100644
--- a/spec/bundler/installer/spec_installation_spec.rb
+++ b/spec/bundler/installer/spec_installation_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/installer/parallel_installer"
-describe Bundler::ParallelInstaller::SpecInstallation do
+RSpec.describe Bundler::ParallelInstaller::SpecInstallation do
let!(:dep) do
a_spec = Object.new
def a_spec.name
diff --git a/spec/bundler/lockfile_parser_spec.rb b/spec/bundler/lockfile_parser_spec.rb
index 98d7b68c6e..17bb447194 100644
--- a/spec/bundler/lockfile_parser_spec.rb
+++ b/spec/bundler/lockfile_parser_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/lockfile_parser"
-describe Bundler::LockfileParser do
+RSpec.describe Bundler::LockfileParser do
let(:lockfile_contents) { strip_whitespace(<<-L) }
GIT
remote: https://github.com/alloy/peiji-san.git
diff --git a/spec/bundler/mirror_spec.rb b/spec/bundler/mirror_spec.rb
index 6a81ef2af4..9051a80465 100644
--- a/spec/bundler/mirror_spec.rb
+++ b/spec/bundler/mirror_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/mirror"
-describe Bundler::Settings::Mirror do
+RSpec.describe Bundler::Settings::Mirror do
let(:mirror) { Bundler::Settings::Mirror.new }
it "returns zero when fallback_timeout is not set" do
@@ -144,7 +144,7 @@ describe Bundler::Settings::Mirror do
end
end
-describe Bundler::Settings::Mirrors do
+RSpec.describe Bundler::Settings::Mirrors do
let(:localhost_uri) { URI("http://localhost:9292") }
context "with a just created mirror" do
@@ -293,7 +293,7 @@ describe Bundler::Settings::Mirrors do
end
end
-describe Bundler::Settings::TCPSocketProbe do
+RSpec.describe Bundler::Settings::TCPSocketProbe do
let(:probe) { Bundler::Settings::TCPSocketProbe.new }
context "with a listening TCP Server" do
diff --git a/spec/bundler/plugin/api/source_spec.rb b/spec/bundler/plugin/api/source_spec.rb
index d62127a604..4dbb993b89 100644
--- a/spec/bundler/plugin/api/source_spec.rb
+++ b/spec/bundler/plugin/api/source_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Plugin::API::Source do
+RSpec.describe Bundler::Plugin::API::Source do
let(:uri) { "uri://to/test" }
let(:type) { "spec_type" }
diff --git a/spec/bundler/plugin/api_spec.rb b/spec/bundler/plugin/api_spec.rb
index 0eba52301a..e40b9adb0f 100644
--- a/spec/bundler/plugin/api_spec.rb
+++ b/spec/bundler/plugin/api_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Plugin::API do
+RSpec.describe Bundler::Plugin::API do
context "plugin declarations" do
before do
stub_const "UserPluginClass", Class.new(Bundler::Plugin::API)
diff --git a/spec/bundler/plugin/dsl_spec.rb b/spec/bundler/plugin/dsl_spec.rb
index 9a694833ff..cd15b6ea9d 100644
--- a/spec/bundler/plugin/dsl_spec.rb
+++ b/spec/bundler/plugin/dsl_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Plugin::DSL do
+RSpec.describe Bundler::Plugin::DSL do
DSL = Bundler::Plugin::DSL
subject(:dsl) { Bundler::Plugin::DSL.new }
diff --git a/spec/bundler/plugin/index_spec.rb b/spec/bundler/plugin/index_spec.rb
index 5a754f355c..23b2a89880 100644
--- a/spec/bundler/plugin/index_spec.rb
+++ b/spec/bundler/plugin/index_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Plugin::Index do
+RSpec.describe Bundler::Plugin::Index do
Index = Bundler::Plugin::Index
before do
diff --git a/spec/bundler/plugin/installer_spec.rb b/spec/bundler/plugin/installer_spec.rb
index 9d6eb1c55b..2454ef00f9 100644
--- a/spec/bundler/plugin/installer_spec.rb
+++ b/spec/bundler/plugin/installer_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Plugin::Installer do
+RSpec.describe Bundler::Plugin::Installer do
subject(:installer) { Bundler::Plugin::Installer.new }
describe "cli install" do
diff --git a/spec/bundler/plugin/source_list_spec.rb b/spec/bundler/plugin/source_list_spec.rb
index 774156b27c..86cc4ac4ed 100644
--- a/spec/bundler/plugin/source_list_spec.rb
+++ b/spec/bundler/plugin/source_list_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Plugin::SourceList do
+RSpec.describe Bundler::Plugin::SourceList do
SourceList = Bundler::Plugin::SourceList
before do
diff --git a/spec/bundler/plugin_spec.rb b/spec/bundler/plugin_spec.rb
index 540278036c..5bbb7384c8 100644
--- a/spec/bundler/plugin_spec.rb
+++ b/spec/bundler/plugin_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Plugin do
+RSpec.describe Bundler::Plugin do
Plugin = Bundler::Plugin
let(:installer) { double(:installer) }
diff --git a/spec/bundler/psyched_yaml_spec.rb b/spec/bundler/psyched_yaml_spec.rb
index 4b7715b482..18e40d6b5a 100644
--- a/spec/bundler/psyched_yaml_spec.rb
+++ b/spec/bundler/psyched_yaml_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/psyched_yaml"
-describe "Bundler::YamlLibrarySyntaxError" do
+RSpec.describe "Bundler::YamlLibrarySyntaxError" do
it "is raised on YAML parse errors" do
expect { YAML.parse "{foo" }.to raise_error(Bundler::YamlLibrarySyntaxError)
end
diff --git a/spec/bundler/remote_specification_spec.rb b/spec/bundler/remote_specification_spec.rb
index d958ca85eb..c8832d358e 100644
--- a/spec/bundler/remote_specification_spec.rb
+++ b/spec/bundler/remote_specification_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::RemoteSpecification do
+RSpec.describe Bundler::RemoteSpecification do
let(:name) { "foo" }
let(:version) { Gem::Version.new("1.0.0") }
let(:platform) { Gem::Platform::RUBY }
diff --git a/spec/bundler/retry_spec.rb b/spec/bundler/retry_spec.rb
index 7f5779a5ca..525f05d327 100644
--- a/spec/bundler/retry_spec.rb
+++ b/spec/bundler/retry_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Retry do
+RSpec.describe Bundler::Retry do
it "return successful result if no errors" do
attempts = 0
result = Bundler::Retry.new(nil, nil, 3).attempt do
diff --git a/spec/bundler/ruby_dsl_spec.rb b/spec/bundler/ruby_dsl_spec.rb
index ac73747ac7..3e0ec9d7f0 100644
--- a/spec/bundler/ruby_dsl_spec.rb
+++ b/spec/bundler/ruby_dsl_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/ruby_dsl"
-describe Bundler::RubyDsl do
+RSpec.describe Bundler::RubyDsl do
class MockDSL
include Bundler::RubyDsl
diff --git a/spec/bundler/ruby_version_spec.rb b/spec/bundler/ruby_version_spec.rb
index e983c18484..f77ec606fc 100644
--- a/spec/bundler/ruby_version_spec.rb
+++ b/spec/bundler/ruby_version_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/ruby_version"
-describe "Bundler::RubyVersion and its subclasses" do
+RSpec.describe "Bundler::RubyVersion and its subclasses" do
let(:version) { "2.0.0" }
let(:patchlevel) { "645" }
let(:engine) { "jruby" }
diff --git a/spec/bundler/rubygems_integration_spec.rb b/spec/bundler/rubygems_integration_spec.rb
index fbc49c414c..37eb499e38 100644
--- a/spec/bundler/rubygems_integration_spec.rb
+++ b/spec/bundler/rubygems_integration_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::RubygemsIntegration do
+RSpec.describe Bundler::RubygemsIntegration do
it "uses the same chdir lock as rubygems", :rubygems => "2.1" do
expect(Bundler.rubygems.ext_lock).to eq(Gem::Ext::Builder::CHDIR_MONITOR)
end
diff --git a/spec/bundler/settings_spec.rb b/spec/bundler/settings_spec.rb
index 04e221a57c..c67ae81bac 100644
--- a/spec/bundler/settings_spec.rb
+++ b/spec/bundler/settings_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/settings"
-describe Bundler::Settings do
+RSpec.describe Bundler::Settings do
subject(:settings) { described_class.new(bundled_app) }
describe "#set_local" do
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb
index fc3371acfb..8bd7215666 100644
--- a/spec/bundler/shared_helpers_spec.rb
+++ b/spec/bundler/shared_helpers_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::SharedHelpers do
+RSpec.describe Bundler::SharedHelpers do
let(:ext_lock_double) { double(:ext_lock) }
before do
diff --git a/spec/bundler/source/git/git_proxy_spec.rb b/spec/bundler/source/git/git_proxy_spec.rb
index ce6b79b2b2..34fe21e9fb 100644
--- a/spec/bundler/source/git/git_proxy_spec.rb
+++ b/spec/bundler/source/git/git_proxy_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Source::Git::GitProxy do
+RSpec.describe Bundler::Source::Git::GitProxy do
let(:uri) { "https://github.com/bundler/bundler.git" }
subject { described_class.new(Pathname("path"), uri, "HEAD") }
diff --git a/spec/bundler/source/rubygems/remote_spec.rb b/spec/bundler/source/rubygems/remote_spec.rb
index a541bf1468..54394fc0ca 100644
--- a/spec/bundler/source/rubygems/remote_spec.rb
+++ b/spec/bundler/source/rubygems/remote_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/source/rubygems/remote"
-describe Bundler::Source::Rubygems::Remote do
+RSpec.describe Bundler::Source::Rubygems::Remote do
def remote(uri)
Bundler::Source::Rubygems::Remote.new(uri)
end
diff --git a/spec/bundler/source/rubygems_spec.rb b/spec/bundler/source/rubygems_spec.rb
index 9fb4bf0ad3..b8f9f09c20 100644
--- a/spec/bundler/source/rubygems_spec.rb
+++ b/spec/bundler/source/rubygems_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Source::Rubygems do
+RSpec.describe Bundler::Source::Rubygems do
before do
allow(Bundler).to receive(:root) { Pathname.new("root") }
end
diff --git a/spec/bundler/source_list_spec.rb b/spec/bundler/source_list_spec.rb
index 3657ac0927..6a23c8bcbf 100644
--- a/spec/bundler/source_list_spec.rb
+++ b/spec/bundler/source_list_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::SourceList do
+RSpec.describe Bundler::SourceList do
before do
allow(Bundler).to receive(:root) { Pathname.new "./tmp/bundled_app" }
diff --git a/spec/bundler/source_spec.rb b/spec/bundler/source_spec.rb
index ea171d387c..d35a6916a8 100644
--- a/spec/bundler/source_spec.rb
+++ b/spec/bundler/source_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::Source do
+RSpec.describe Bundler::Source do
class ExampleSource < Bundler::Source
end
diff --git a/spec/bundler/spec_set_spec.rb b/spec/bundler/spec_set_spec.rb
index 29d81cb30c..8f7c27f065 100644
--- a/spec/bundler/spec_set_spec.rb
+++ b/spec/bundler/spec_set_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::SpecSet do
+RSpec.describe Bundler::SpecSet do
let(:specs) do
[
build_spec("a", "1.0"),
diff --git a/spec/bundler/ssl_certs/certificate_manager_spec.rb b/spec/bundler/ssl_certs/certificate_manager_spec.rb
index cc8c8a49a1..51552f7234 100644
--- a/spec/bundler/ssl_certs/certificate_manager_spec.rb
+++ b/spec/bundler/ssl_certs/certificate_manager_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/ssl_certs/certificate_manager"
-describe Bundler::SSLCerts::CertificateManager do
+RSpec.describe Bundler::SSLCerts::CertificateManager do
let(:rubygems_path) { root }
let(:stub_cert) { File.join(root.to_s, "lib", "rubygems", "ssl_certs", "rubygems.org", "ssl-cert.pem") }
let(:rubygems_certs_dir) { File.join(root.to_s, "lib", "rubygems", "ssl_certs", "rubygems.org") }
diff --git a/spec/bundler/uri_credentials_filter_spec.rb b/spec/bundler/uri_credentials_filter_spec.rb
index 70f71cecac..1dd01b4be0 100644
--- a/spec/bundler/uri_credentials_filter_spec.rb
+++ b/spec/bundler/uri_credentials_filter_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe Bundler::URICredentialsFilter do
+RSpec.describe Bundler::URICredentialsFilter do
subject { described_class }
describe "#credential_filtered_uri" do
diff --git a/spec/bundler/worker_spec.rb b/spec/bundler/worker_spec.rb
index 786778b08f..fbfe6ddab3 100644
--- a/spec/bundler/worker_spec.rb
+++ b/spec/bundler/worker_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/worker"
-describe Bundler::Worker do
+RSpec.describe Bundler::Worker do
let(:size) { 5 }
let(:name) { "Spec Worker" }
let(:function) { proc {|object, worker_number| [object, worker_number] } }
diff --git a/spec/bundler/yaml_serializer_spec.rb b/spec/bundler/yaml_serializer_spec.rb
index bf86d2a076..361159e0da 100644
--- a/spec/bundler/yaml_serializer_spec.rb
+++ b/spec/bundler/yaml_serializer_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/yaml_serializer"
-describe Bundler::YAMLSerializer do
+RSpec.describe Bundler::YAMLSerializer do
subject(:serializer) { Bundler::YAMLSerializer }
describe "#dump" do
diff --git a/spec/cache/cache_path_spec.rb b/spec/cache/cache_path_spec.rb
index 594162886a..ec6d6e312a 100644
--- a/spec/cache/cache_path_spec.rb
+++ b/spec/cache/cache_path_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle package" do
+RSpec.describe "bundle package" do
before do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/cache/gems_spec.rb b/spec/cache/gems_spec.rb
index 19dd16e4e9..7828c87fec 100644
--- a/spec/cache/gems_spec.rb
+++ b/spec/cache/gems_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle cache" do
+RSpec.describe "bundle cache" do
describe "when there are only gemsources" do
before :each do
gemfile <<-G
diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb
index c15ee26c25..b256c8d90f 100644
--- a/spec/cache/git_spec.rb
+++ b/spec/cache/git_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "git base name" do
+RSpec.describe "git base name" do
it "base_name should strip private repo uris" do
source = Bundler::Source::Git.new("uri" => "git@github.com:bundler.git")
expect(source.send(:base_name)).to eq("bundler")
@@ -14,7 +14,7 @@ describe "git base name" do
end
%w(cache package).each do |cmd|
- describe "bundle #{cmd} with git" do
+ RSpec.describe "bundle #{cmd} with git" do
it "copies repository to vendor cache and uses it" do
git = build_git "foo"
ref = git.ref_for("master", 11)
diff --git a/spec/cache/path_spec.rb b/spec/cache/path_spec.rb
index 4233b3e88b..bbce448759 100644
--- a/spec/cache/path_spec.rb
+++ b/spec/cache/path_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
%w(cache package).each do |cmd|
- describe "bundle #{cmd} with path" do
+ RSpec.describe "bundle #{cmd} with path" do
it "is no-op when the path is within the bundle" do
build_lib "foo", :path => bundled_app("lib/foo")
diff --git a/spec/cache/platform_spec.rb b/spec/cache/platform_spec.rb
index 259eff0e15..ed80c949aa 100644
--- a/spec/cache/platform_spec.rb
+++ b/spec/cache/platform_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle cache with multiple platforms" do
+RSpec.describe "bundle cache with multiple platforms" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb
index 0f8c5af391..9bb4f2a73d 100644
--- a/spec/commands/binstubs_spec.rb
+++ b/spec/commands/binstubs_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle binstubs <gem>" do
+RSpec.describe "bundle binstubs <gem>" do
context "when the gem exists in the lockfile" do
it "sets up the binstub" do
install_gemfile <<-G
diff --git a/spec/commands/check_spec.rb b/spec/commands/check_spec.rb
index 42d6459760..532be07c3f 100644
--- a/spec/commands/check_spec.rb
+++ b/spec/commands/check_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle check" do
+RSpec.describe "bundle check" do
it "returns success when the Gemfile is satisfied" do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
index acec0eef95..8fd4b6fbe8 100644
--- a/spec/commands/clean_spec.rb
+++ b/spec/commands/clean_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle clean" do
+RSpec.describe "bundle clean" do
def should_have_gems(*gems)
gems.each do |g|
expect(vendored_gems("gems/#{g}")).to exist
diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb
index fce6102c29..ea0d2a786b 100644
--- a/spec/commands/config_spec.rb
+++ b/spec/commands/config_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe ".bundle/config" do
+RSpec.describe ".bundle/config" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
@@ -276,7 +276,7 @@ E
end
end
-describe "setting gemfile via config" do
+RSpec.describe "setting gemfile via config" do
context "when only the non-default Gemfile exists" do
it "persists the gemfile location to .bundle/config" do
File.open(bundled_app("NotGemfile"), "w") do |f|
diff --git a/spec/commands/console_spec.rb b/spec/commands/console_spec.rb
index 131b47368b..de14b6db5f 100644
--- a/spec/commands/console_spec.rb
+++ b/spec/commands/console_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle console" do
+RSpec.describe "bundle console" do
before :each do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/commands/doctor_spec.rb b/spec/commands/doctor_spec.rb
index 8debeb55e4..7c6e48ce19 100644
--- a/spec/commands/doctor_spec.rb
+++ b/spec/commands/doctor_spec.rb
@@ -4,7 +4,7 @@ require "stringio"
require "bundler/cli"
require "bundler/cli/doctor"
-describe "bundle doctor" do
+RSpec.describe "bundle doctor" do
before(:each) do
@stdout = StringIO.new
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index cb4daa46bb..bf20ec7d9a 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle exec" do
+RSpec.describe "bundle exec" do
let(:system_gems_to_install) { %w(rack-1.0.0 rack-0.9.1) }
before :each do
system_gems(system_gems_to_install)
diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb
index 380e3be15e..7789fe40b9 100644
--- a/spec/commands/help_spec.rb
+++ b/spec/commands/help_spec.rb
@@ -1,10 +1,9 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle help" do
+RSpec.describe "bundle help" do
# Rubygems 1.4+ no longer load gem plugins so this test is no longer needed
- rubygems_under_14 = Gem::Requirement.new("< 1.4").satisfied_by?(Gem::Version.new(Gem::VERSION))
- it "complains if older versions of bundler are installed", :if => rubygems_under_14 do
+ it "complains if older versions of bundler are installed", :rubygems => "< 1.4" do
system_gems "bundler-0.8.1"
bundle "help"
diff --git a/spec/commands/init_spec.rb b/spec/commands/init_spec.rb
index 70d1143055..03a46a8bfa 100644
--- a/spec/commands/init_spec.rb
+++ b/spec/commands/init_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle init" do
+RSpec.describe "bundle init" do
it "generates a Gemfile" do
bundle :init
expect(bundled_app("Gemfile")).to exist
diff --git a/spec/commands/inject_spec.rb b/spec/commands/inject_spec.rb
index d0112915ca..96209bda7b 100644
--- a/spec/commands/inject_spec.rb
+++ b/spec/commands/inject_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle inject" do
+RSpec.describe "bundle inject" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb
index 0d05766eeb..49eee01910 100644
--- a/spec/commands/install_spec.rb
+++ b/spec/commands/install_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with gem sources" do
+RSpec.describe "bundle install with gem sources" do
describe "the simple case" do
it "prints output and returns if no dependencies are specified" do
gemfile <<-G
diff --git a/spec/commands/licenses_spec.rb b/spec/commands/licenses_spec.rb
index dd9f261eb3..0ee1a46945 100644
--- a/spec/commands/licenses_spec.rb
+++ b/spec/commands/licenses_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle licenses" do
+RSpec.describe "bundle licenses" do
before :each do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/commands/lock_spec.rb b/spec/commands/lock_spec.rb
index 52dfa23b3d..52c281a6ae 100644
--- a/spec/commands/lock_spec.rb
+++ b/spec/commands/lock_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle lock" do
+RSpec.describe "bundle lock" do
def strip_lockfile(lockfile)
strip_whitespace(lockfile).sub(/\n\Z/, "")
end
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb
index 766def1644..354a038cc1 100644
--- a/spec/commands/newgem_spec.rb
+++ b/spec/commands/newgem_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle gem" do
+RSpec.describe "bundle gem" do
def reset!
super
global_config "BUNDLE_GEM__MIT" => "false", "BUNDLE_GEM__TEST" => "false", "BUNDLE_GEM__COC" => "false"
diff --git a/spec/commands/open_spec.rb b/spec/commands/open_spec.rb
index 3bf2983f36..6872e859d2 100644
--- a/spec/commands/open_spec.rb
+++ b/spec/commands/open_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle open" do
+RSpec.describe "bundle open" do
before :each do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index e335ee9144..eb47557d29 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle outdated" do
+RSpec.describe "bundle outdated" do
before :each do
build_repo2 do
build_git "foo", :path => lib_path("foo")
diff --git a/spec/commands/package_spec.rb b/spec/commands/package_spec.rb
index a72b94a0b9..86c09db3ca 100644
--- a/spec/commands/package_spec.rb
+++ b/spec/commands/package_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle package" do
+RSpec.describe "bundle package" do
context "with --gemfile" do
it "finds the gemfile" do
gemfile bundled_app("NotGemfile"), <<-G
@@ -222,7 +222,7 @@ describe "bundle package" do
end
end
-describe "bundle install with gem sources" do
+RSpec.describe "bundle install with gem sources" do
describe "when cached and locked" do
it "does not hit the remote at all" do
build_repo2
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 84352c5427..240bebccbe 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle show" do
+RSpec.describe "bundle show" do
context "with a standard Gemfile" do
before :each do
install_gemfile <<-G
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index 63fe951c43..bb24c501e9 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle update" do
+RSpec.describe "bundle update" do
before :each do
build_repo2
@@ -254,7 +254,7 @@ describe "bundle update" do
end
end
-describe "bundle update in more complicated situations" do
+RSpec.describe "bundle update in more complicated situations" do
before :each do
build_repo2
end
@@ -295,7 +295,7 @@ describe "bundle update in more complicated situations" do
end
end
-describe "bundle update without a Gemfile.lock" do
+RSpec.describe "bundle update without a Gemfile.lock" do
it "should not explode" do
build_repo2
@@ -311,7 +311,7 @@ describe "bundle update without a Gemfile.lock" do
end
end
-describe "bundle update when a gem depends on a newer version of bundler" do
+RSpec.describe "bundle update when a gem depends on a newer version of bundler" do
before(:each) do
build_repo2 do
build_gem "rails", "3.0.1" do |s|
@@ -338,7 +338,7 @@ describe "bundle update when a gem depends on a newer version of bundler" do
end
end
-describe "bundle update" do
+RSpec.describe "bundle update" do
it "shows the previous version of the gem when updated from rubygems source" do
build_repo2
@@ -370,7 +370,7 @@ describe "bundle update" do
end
end
-describe "bundle update --ruby" do
+RSpec.describe "bundle update --ruby" do
before do
install_gemfile <<-G
::RUBY_VERSION = '2.1.3'
@@ -480,7 +480,7 @@ describe "bundle update --ruby" do
end
# these specs are slow and focus on integration and therefore are not exhaustive. unit specs elsewhere handle that.
-describe "bundle update conservative" do
+RSpec.describe "bundle update conservative" do
context "patch and minor options" do
before do
build_repo4 do
diff --git a/spec/commands/viz_spec.rb b/spec/commands/viz_spec.rb
index f3fab9272c..123e7bef62 100644
--- a/spec/commands/viz_spec.rb
+++ b/spec/commands/viz_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle viz", :ruby => "1.9.3", :if => Bundler.which("dot") do
+RSpec.describe "bundle viz", :ruby => "1.9.3", :if => Bundler.which("dot") do
let(:graphviz_lib) do
graphviz_glob = base_system_gems.join("gems/ruby-graphviz*/lib")
Dir[graphviz_glob].first
diff --git a/spec/install/allow_offline_install_spec.rb b/spec/install/allow_offline_install_spec.rb
index 44100ca97b..1bca055c9f 100644
--- a/spec/install/allow_offline_install_spec.rb
+++ b/spec/install/allow_offline_install_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with :allow_offline_install" do
+RSpec.describe "bundle install with :allow_offline_install" do
before do
bundle "config allow_offline_install true"
end
diff --git a/spec/install/binstubs_spec.rb b/spec/install/binstubs_spec.rb
index a7e0b847cc..a1a9ab167d 100644
--- a/spec/install/binstubs_spec.rb
+++ b/spec/install/binstubs_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
describe "when system_bindir is set" do
# On OS X, Gem.bindir defaults to /usr/bin, so system_bindir is useful if
# you want to avoid sudo installs for system gems with OS X's default ruby
diff --git a/spec/install/bundler_spec.rb b/spec/install/bundler_spec.rb
index 9f06a48086..2b16fafa38 100644
--- a/spec/install/bundler_spec.rb
+++ b/spec/install/bundler_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
describe "with bundler dependencies" do
before(:each) do
build_repo2 do
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index 02f9983cef..1d97ceb401 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "install with --deployment or --frozen" do
+RSpec.describe "install with --deployment or --frozen" do
before do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/install/force_spec.rb b/spec/install/force_spec.rb
index 2027660cba..6d852b3bf1 100644
--- a/spec/install/force_spec.rb
+++ b/spec/install/force_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
describe "with --force" do
before :each do
gemfile <<-G
diff --git a/spec/install/gemfile/eval_gemfile_spec.rb b/spec/install/gemfile/eval_gemfile_spec.rb
index 29f27550e4..4f5a109e32 100644
--- a/spec/install/gemfile/eval_gemfile_spec.rb
+++ b/spec/install/gemfile/eval_gemfile_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with gemfile that uses eval_gemfile" do
+RSpec.describe "bundle install with gemfile that uses eval_gemfile" do
before do
build_lib("gunks", :path => bundled_app.join("gems/gunks")) do |s|
s.name = "gunks"
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb
index 698756525c..3ed4d1168f 100644
--- a/spec/install/gemfile/gemspec_spec.rb
+++ b/spec/install/gemfile/gemspec_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install from an existing gemspec" do
+RSpec.describe "bundle install from an existing gemspec" do
before(:each) do
build_gem "bar", :to_system => true
build_gem "bar-dev", :to_system => true
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb
index aa5ca7cfef..ce639ee89f 100644
--- a/spec/install/gemfile/git_spec.rb
+++ b/spec/install/gemfile/git_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with git sources" do
+RSpec.describe "bundle install with git sources" do
describe "when floating on master" do
before :each do
build_git "foo" do |s|
diff --git a/spec/install/gemfile/groups_spec.rb b/spec/install/gemfile/groups_spec.rb
index cb052b6c7a..a3a5eeefdf 100644
--- a/spec/install/gemfile/groups_spec.rb
+++ b/spec/install/gemfile/groups_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with groups" do
+RSpec.describe "bundle install with groups" do
describe "installing with no options" do
before :each do
install_gemfile <<-G
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb
index 0a73335225..a1c41aebbb 100644
--- a/spec/install/gemfile/path_spec.rb
+++ b/spec/install/gemfile/path_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with explicit source paths" do
+RSpec.describe "bundle install with explicit source paths" do
it "fetches gems" do
build_lib "foo"
diff --git a/spec/install/gemfile/platform_spec.rb b/spec/install/gemfile/platform_spec.rb
index ebf69f4006..3889ad5708 100644
--- a/spec/install/gemfile/platform_spec.rb
+++ b/spec/install/gemfile/platform_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install across platforms" do
+RSpec.describe "bundle install across platforms" do
it "maintains the same lockfile if all gems are compatible across platforms" do
lockfile <<-G
GEM
@@ -105,7 +105,7 @@ describe "bundle install across platforms" do
end
end
-describe "bundle install with platform conditionals" do
+RSpec.describe "bundle install with platform conditionals" do
it "installs gems tagged w/ the current platforms" do
install_gemfile <<-G
source "file://#{gem_repo1}"
@@ -223,7 +223,7 @@ The dependency #{Gem::Dependency.new("rack", ">= 0")} will be unused by any of t
end
end
-describe "when a gem has no architecture" do
+RSpec.describe "when a gem has no architecture" do
it "still installs correctly" do
simulate_platform mswin
diff --git a/spec/install/gemfile/ruby_spec.rb b/spec/install/gemfile/ruby_spec.rb
index 1adbf10833..3f8957916b 100644
--- a/spec/install/gemfile/ruby_spec.rb
+++ b/spec/install/gemfile/ruby_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "ruby requirement" do
+RSpec.describe "ruby requirement" do
def locked_ruby_version
Bundler::RubyVersion.from_string(Bundler::LockfileParser.new(lockfile).ruby_version)
end
diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb
index e687e9af41..c5375b4abf 100644
--- a/spec/install/gemfile/sources_spec.rb
+++ b/spec/install/gemfile/sources_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with gems on multiple sources" do
+RSpec.describe "bundle install with gems on multiple sources" do
# repo1 is built automatically before all of the specs run
# it contains rack-obama 1.0.0 and rack 0.9.1 & 1.0.0 amongst other gems
diff --git a/spec/install/gemfile/specific_platform_spec.rb b/spec/install/gemfile/specific_platform_spec.rb
index 3e12f94c86..76ac976521 100644
--- a/spec/install/gemfile/specific_platform_spec.rb
+++ b/spec/install/gemfile/specific_platform_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with specific_platform enabled" do
+RSpec.describe "bundle install with specific_platform enabled" do
before do
bundle "config specific_platform true"
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb
index f6602c0560..bc49053081 100644
--- a/spec/install/gemfile_spec.rb
+++ b/spec/install/gemfile_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
context "with duplicated gems" do
it "will display a warning" do
install_gemfile <<-G
diff --git a/spec/install/gems/compact_index_spec.rb b/spec/install/gems/compact_index_spec.rb
index 04cc5d740e..12f82e9063 100644
--- a/spec/install/gems/compact_index_spec.rb
+++ b/spec/install/gems/compact_index_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "compact index api" do
+RSpec.describe "compact index api" do
let(:source_hostname) { "localgemserver.test" }
let(:source_uri) { "http://#{source_hostname}" }
diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb
index 9d5b740007..d2de0d358b 100644
--- a/spec/install/gems/dependency_api_spec.rb
+++ b/spec/install/gems/dependency_api_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "gemcutter's dependency API" do
+RSpec.describe "gemcutter's dependency API" do
let(:source_hostname) { "localgemserver.test" }
let(:source_uri) { "http://#{source_hostname}" }
diff --git a/spec/install/gems/env_spec.rb b/spec/install/gems/env_spec.rb
index d7d3a3230e..9b1d8e5424 100644
--- a/spec/install/gems/env_spec.rb
+++ b/spec/install/gems/env_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with ENV conditionals" do
+RSpec.describe "bundle install with ENV conditionals" do
describe "when just setting an ENV key as a string" do
before :each do
gemfile <<-G
diff --git a/spec/install/gems/flex_spec.rb b/spec/install/gems/flex_spec.rb
index 2f900893cd..2c2d3c16a1 100644
--- a/spec/install/gems/flex_spec.rb
+++ b/spec/install/gems/flex_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle flex_install" do
+RSpec.describe "bundle flex_install" do
it "installs the gems as expected" do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/install/gems/mirror_spec.rb b/spec/install/gems/mirror_spec.rb
index e7b4317f05..798156fb12 100644
--- a/spec/install/gems/mirror_spec.rb
+++ b/spec/install/gems/mirror_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with a mirror configured" do
+RSpec.describe "bundle install with a mirror configured" do
describe "when the mirror does not match the gem source" do
before :each do
gemfile <<-G
diff --git a/spec/install/gems/native_extensions_spec.rb b/spec/install/gems/native_extensions_spec.rb
index 6134663fcc..3b146495ed 100644
--- a/spec/install/gems/native_extensions_spec.rb
+++ b/spec/install/gems/native_extensions_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "installing a gem with native extensions" do
+RSpec.describe "installing a gem with native extensions" do
it "installs" do
build_repo2 do
build_gem "c_extension" do |s|
diff --git a/spec/install/gems/post_install_spec.rb b/spec/install/gems/post_install_spec.rb
index 596fa6412f..c3ea3e7c51 100644
--- a/spec/install/gems/post_install_spec.rb
+++ b/spec/install/gems/post_install_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
context "with gem sources" do
context "when gems include post install messages" do
it "should display the post-install messages after installing" do
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
index 0204a222f9..c227993448 100644
--- a/spec/install/gems/resolving_spec.rb
+++ b/spec/install/gems/resolving_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with install-time dependencies" do
+RSpec.describe "bundle install with install-time dependencies" do
it "installs gems with implicit rake dependencies" do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb
index 7a6749dea9..e1bc0a3d1a 100644
--- a/spec/install/gems/standalone_spec.rb
+++ b/spec/install/gems/standalone_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-shared_examples "bundle install --standalone" do
+RSpec.shared_examples "bundle install --standalone" do
shared_examples "common functionality" do
it "still makes the gems available to normal bundler" do
args = expected_gems.map {|k, v| "#{k} #{v}" }
@@ -303,11 +303,11 @@ shared_examples "bundle install --standalone" do
end
end
-describe "bundle install --standalone" do
+RSpec.describe "bundle install --standalone" do
include_examples("bundle install --standalone")
end
-describe "bundle install --standalone run in a subdirectory" do
+RSpec.describe "bundle install --standalone run in a subdirectory" do
before do
subdir = bundled_app("bob")
FileUtils.mkdir_p(subdir)
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
index 66b9901831..13abffc14e 100644
--- a/spec/install/gems/sudo_spec.rb
+++ b/spec/install/gems/sudo_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "when using sudo", :sudo => true do
+RSpec.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
diff --git a/spec/install/gems/win32_spec.rb b/spec/install/gems/win32_spec.rb
index 69ea035f5e..cdad9a8821 100644
--- a/spec/install/gems/win32_spec.rb
+++ b/spec/install/gems/win32_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install with win32-generated lockfile" do
+RSpec.describe "bundle install with win32-generated lockfile" do
it "should read lockfile" do
File.open(bundled_app("Gemfile.lock"), "wb") do |f|
f << "GEM\r\n"
diff --git a/spec/install/gemspecs_spec.rb b/spec/install/gemspecs_spec.rb
index 8f719bf601..97eaf149c1 100644
--- a/spec/install/gemspecs_spec.rb
+++ b/spec/install/gemspecs_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
describe "when a gem has a YAML gemspec" do
before :each do
build_repo2 do
diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index f35a543509..a555822012 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
context "git sources" do
it "displays the revision hash of the gem repository" do
build_git "foo", "1.0", :path => lib_path("foo")
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
index 9a8d61ea47..ad6071d29f 100644
--- a/spec/install/path_spec.rb
+++ b/spec/install/path_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
describe "with --path" do
before :each do
build_gem "rack", "1.0.0", :to_system => true do |s|
diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb
index 7e2eacfb90..69f9256c07 100644
--- a/spec/install/post_bundle_message_spec.rb
+++ b/spec/install/post_bundle_message_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "post bundle message" do
+RSpec.describe "post bundle message" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/install/prereleases_spec.rb b/spec/install/prereleases_spec.rb
index cbf99ca96f..6c32094d90 100644
--- a/spec/install/prereleases_spec.rb
+++ b/spec/install/prereleases_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle install" do
+RSpec.describe "bundle install" do
describe "when prerelease gems are available" do
it "finds prereleases" do
install_gemfile <<-G
diff --git a/spec/install/security_policy_spec.rb b/spec/install/security_policy_spec.rb
index 7e2c320b80..ab531bdad6 100644
--- a/spec/install/security_policy_spec.rb
+++ b/spec/install/security_policy_spec.rb
@@ -5,7 +5,7 @@ require "rubygems/security"
# unfortunately, testing signed gems with a provided CA is extremely difficult
# as 'gem cert' is currently the only way to add CAs to the system.
-describe "policies with unsigned gems" do
+RSpec.describe "policies with unsigned gems" do
before do
build_security_repo
gemfile <<-G
@@ -44,7 +44,7 @@ describe "policies with unsigned gems" do
end
end
-describe "policies with signed gems and no CA" do
+RSpec.describe "policies with signed gems and no CA" do
before do
build_security_repo
gemfile <<-G
diff --git a/spec/install/yanked_spec.rb b/spec/install/yanked_spec.rb
index 4c0c4e407a..d42978ce4c 100644
--- a/spec/install/yanked_spec.rb
+++ b/spec/install/yanked_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-context "when installing a bundle that includes yanked gems" do
+RSpec.context "when installing a bundle that includes yanked gems" do
before(:each) do
build_repo4 do
build_gem "foo", "9.0.0"
@@ -42,7 +42,7 @@ context "when installing a bundle that includes yanked gems" do
end
end
-context "when using gem before installing" do
+RSpec.context "when using gem before installing" do
it "does not suggest the author has yanked the gem" do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/lock/git_spec.rb b/spec/lock/git_spec.rb
index 93473db052..b36f61338d 100644
--- a/spec/lock/git_spec.rb
+++ b/spec/lock/git_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle lock with git gems" do
+RSpec.describe "bundle lock with git gems" do
before :each do
build_git "foo"
diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb
index e6810b405f..8ff6b1a76d 100644
--- a/spec/lock/lockfile_spec.rb
+++ b/spec/lock/lockfile_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "the lockfile format" do
+RSpec.describe "the lockfile format" do
include Bundler::GemHelpers
it "generates a simple lockfile for a single source, gem" do
diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb
index 4b2ebf4cfd..09fa2c223b 100644
--- a/spec/other/bundle_ruby_spec.rb
+++ b/spec/other/bundle_ruby_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle_ruby" do
+RSpec.describe "bundle_ruby" do
context "without patchlevel" do
it "returns the ruby version" do
gemfile <<-G
diff --git a/spec/other/cli_dispatch_spec.rb b/spec/other/cli_dispatch_spec.rb
index 05dac51559..8b34a457ef 100644
--- a/spec/other/cli_dispatch_spec.rb
+++ b/spec/other/cli_dispatch_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle command names" do
+RSpec.describe "bundle command names" do
it "work when given fully" do
bundle "install"
expect(err).to lack_errors
diff --git a/spec/other/ext_spec.rb b/spec/other/ext_spec.rb
index 7e2e712827..2d6ab941b8 100644
--- a/spec/other/ext_spec.rb
+++ b/spec/other/ext_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Gem::Specification#match_platform" do
+RSpec.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)
@@ -16,7 +16,7 @@ describe "Gem::Specification#match_platform" do
end
end
-describe "Bundler::GemHelpers#generic" do
+RSpec.describe "Bundler::GemHelpers#generic" do
include Bundler::GemHelpers
it "converts non-windows platforms into ruby" do
@@ -47,9 +47,7 @@ describe "Bundler::GemHelpers#generic" do
end
end
-describe "Gem::SourceIndex#refresh!" do
- rubygems_1_7 = Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.7.0")
-
+RSpec.describe "Gem::SourceIndex#refresh!" do
before do
install_gemfile <<-G
source "file://#{gem_repo1}"
@@ -57,12 +55,12 @@ describe "Gem::SourceIndex#refresh!" do
G
end
- it "does not explode when called", :if => rubygems_1_7 do
+ it "does not explode when called", :rubygems => "1.7" do
run "Gem.source_index.refresh!"
run "Gem::SourceIndex.new([]).refresh!"
end
- it "does not explode when called", :unless => rubygems_1_7 do
+ it "does not explode when called", :rubygems => "< 1.7" do
run "Gem.source_index.refresh!"
run "Gem::SourceIndex.from_gems_in([]).refresh!"
end
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index 3fc3d06d2a..1ef17bfa1a 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "major deprecations" do
+RSpec.describe "major deprecations" do
let(:warnings) { out } # change to err in 2.0
context "in a .99 version" do
diff --git a/spec/other/platform_spec.rb b/spec/other/platform_spec.rb
index 7aa0d0f8ea..6adbcef111 100644
--- a/spec/other/platform_spec.rb
+++ b/spec/other/platform_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle platform" do
+RSpec.describe "bundle platform" do
context "without flags" do
it "returns all the output" do
gemfile <<-G
diff --git a/spec/other/ssl_cert_spec.rb b/spec/other/ssl_cert_spec.rb
index e1a134c919..2de4dfdd0c 100644
--- a/spec/other/ssl_cert_spec.rb
+++ b/spec/other/ssl_cert_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "bundler/ssl_certs/certificate_manager"
-describe "SSL Certificates", :rubygems_master do
+RSpec.describe "SSL Certificates", :rubygems_master do
hosts = %w(
rubygems.org
index.rubygems.org
diff --git a/spec/other/trampoline_spec.rb b/spec/other/trampoline_spec.rb
index 88e0302f00..39de7048c7 100644
--- a/spec/other/trampoline_spec.rb
+++ b/spec/other/trampoline_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundler version trampolining" do
+RSpec.describe "bundler version trampolining" do
before do
ENV["BUNDLE_TRAMPOLINE_DISABLE"] = nil
ENV["BUNDLE_TRAMPOLINE_FORCE"] = "true"
diff --git a/spec/plugins/command_spec.rb b/spec/plugins/command_spec.rb
index 71e87a5b01..6ad782b758 100644
--- a/spec/plugins/command_spec.rb
+++ b/spec/plugins/command_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "command plugins" do
+RSpec.describe "command plugins" do
before do
build_repo2 do
build_plugin "command-mah" do |s|
diff --git a/spec/plugins/hook_spec.rb b/spec/plugins/hook_spec.rb
index bafe688d5e..9850d850ac 100644
--- a/spec/plugins/hook_spec.rb
+++ b/spec/plugins/hook_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "hook plugins" do
+RSpec.describe "hook plugins" do
before do
build_repo2 do
build_plugin "before-install-plugin" do |s|
diff --git a/spec/plugins/install_spec.rb b/spec/plugins/install_spec.rb
index a24f318156..4ce9e46bff 100644
--- a/spec/plugins/install_spec.rb
+++ b/spec/plugins/install_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundler plugin install" do
+RSpec.describe "bundler plugin install" do
before do
build_repo2 do
build_plugin "foo"
diff --git a/spec/plugins/source/example_spec.rb b/spec/plugins/source/example_spec.rb
index 520e1b9db4..2ae34caf73 100644
--- a/spec/plugins/source/example_spec.rb
+++ b/spec/plugins/source/example_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "real source plugins" do
+RSpec.describe "real source plugins" do
context "with a minimal source plugin" do
before do
build_repo2 do
diff --git a/spec/plugins/source_spec.rb b/spec/plugins/source_spec.rb
index 92e948c190..0448bc409a 100644
--- a/spec/plugins/source_spec.rb
+++ b/spec/plugins/source_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundler source plugin" do
+RSpec.describe "bundler source plugin" do
describe "plugins dsl eval for #source with :type option" do
before do
update_repo2 do
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index 1c72202102..c2a4ae536b 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -6,7 +6,7 @@ if defined?(Encoding) && Encoding.default_external.name != "UTF-8"
Encoding.default_external = Encoding.find("UTF-8")
end
-describe "The library itself" do
+RSpec.describe "The library itself" do
def check_for_spec_defs_with_single_quotes(filename)
failing_lines = []
diff --git a/spec/realworld/dependency_api_spec.rb b/spec/realworld/dependency_api_spec.rb
index ea02adfe4b..468fa3644c 100644
--- a/spec/realworld/dependency_api_spec.rb
+++ b/spec/realworld/dependency_api_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "gemcutter's dependency API", :realworld => true do
+RSpec.describe "gemcutter's dependency API", :realworld => true do
context "when Gemcutter API takes too long to respond" do
before do
require_rack
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb
index 81fe3d77b0..302fd57cf0 100644
--- a/spec/realworld/edgecases_spec.rb
+++ b/spec/realworld/edgecases_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "real world edgecases", :realworld => true, :sometimes => true do
+RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
def rubygems_version(name, requirement)
require "bundler/source/rubygems/remote"
require "bundler/fetcher"
@@ -94,6 +94,142 @@ describe "real world edgecases", :realworld => true, :sometimes => true do
expect(lockfile).to include(rubygems_version("activesupport", "~> 3.0"))
end
+ it "is able to update a top-level dependency when there is a conflict on a shared transitive child", :ruby => "2.1" do
+ # from https://github.com/bundler/bundler/issues/5031
+
+ gemfile <<-G
+ source "https://rubygems.org"
+ gem 'rails', '~> 4.2.7.1'
+ gem 'paperclip', '~> 5.1.0'
+ G
+
+ lockfile <<-L
+ GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (4.2.7.1)
+ actionpack (= 4.2.7.1)
+ actionview (= 4.2.7.1)
+ activejob (= 4.2.7.1)
+ mail (~> 2.5, >= 2.5.4)
+ rails-dom-testing (~> 1.0, >= 1.0.5)
+ actionpack (4.2.7.1)
+ actionview (= 4.2.7.1)
+ activesupport (= 4.2.7.1)
+ rack (~> 1.6)
+ rack-test (~> 0.6.2)
+ rails-dom-testing (~> 1.0, >= 1.0.5)
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
+ actionview (4.2.7.1)
+ activesupport (= 4.2.7.1)
+ builder (~> 3.1)
+ erubis (~> 2.7.0)
+ rails-dom-testing (~> 1.0, >= 1.0.5)
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
+ activejob (4.2.7.1)
+ activesupport (= 4.2.7.1)
+ globalid (>= 0.3.0)
+ activemodel (4.2.7.1)
+ activesupport (= 4.2.7.1)
+ builder (~> 3.1)
+ activerecord (4.2.7.1)
+ activemodel (= 4.2.7.1)
+ activesupport (= 4.2.7.1)
+ arel (~> 6.0)
+ activesupport (4.2.7.1)
+ i18n (~> 0.7)
+ json (~> 1.7, >= 1.7.7)
+ minitest (~> 5.1)
+ thread_safe (~> 0.3, >= 0.3.4)
+ tzinfo (~> 1.1)
+ arel (6.0.3)
+ builder (3.2.2)
+ climate_control (0.0.3)
+ activesupport (>= 3.0)
+ cocaine (0.5.8)
+ climate_control (>= 0.0.3, < 1.0)
+ concurrent-ruby (1.0.2)
+ erubis (2.7.0)
+ globalid (0.3.7)
+ activesupport (>= 4.1.0)
+ i18n (0.7.0)
+ json (1.8.3)
+ loofah (2.0.3)
+ nokogiri (>= 1.5.9)
+ mail (2.6.4)
+ mime-types (>= 1.16, < 4)
+ mime-types (3.1)
+ mime-types-data (~> 3.2015)
+ mime-types-data (3.2016.0521)
+ mimemagic (0.3.2)
+ mini_portile2 (2.1.0)
+ minitest (5.9.1)
+ nokogiri (1.6.8)
+ mini_portile2 (~> 2.1.0)
+ pkg-config (~> 1.1.7)
+ paperclip (5.1.0)
+ activemodel (>= 4.2.0)
+ activesupport (>= 4.2.0)
+ cocaine (~> 0.5.5)
+ mime-types
+ mimemagic (~> 0.3.0)
+ pkg-config (1.1.7)
+ rack (1.6.4)
+ rack-test (0.6.3)
+ rack (>= 1.0)
+ rails (4.2.7.1)
+ actionmailer (= 4.2.7.1)
+ actionpack (= 4.2.7.1)
+ actionview (= 4.2.7.1)
+ activejob (= 4.2.7.1)
+ activemodel (= 4.2.7.1)
+ activerecord (= 4.2.7.1)
+ activesupport (= 4.2.7.1)
+ bundler (>= 1.3.0, < 2.0)
+ railties (= 4.2.7.1)
+ sprockets-rails
+ rails-deprecated_sanitizer (1.0.3)
+ activesupport (>= 4.2.0.alpha)
+ rails-dom-testing (1.0.7)
+ activesupport (>= 4.2.0.beta, < 5.0)
+ nokogiri (~> 1.6.0)
+ rails-deprecated_sanitizer (>= 1.0.1)
+ rails-html-sanitizer (1.0.3)
+ loofah (~> 2.0)
+ railties (4.2.7.1)
+ actionpack (= 4.2.7.1)
+ activesupport (= 4.2.7.1)
+ rake (>= 0.8.7)
+ thor (>= 0.18.1, < 2.0)
+ rake (11.3.0)
+ sprockets (3.7.0)
+ concurrent-ruby (~> 1.0)
+ rack (> 1, < 3)
+ sprockets-rails (3.2.0)
+ actionpack (>= 4.0)
+ activesupport (>= 4.0)
+ sprockets (>= 3.0.0)
+ thor (0.19.1)
+ thread_safe (0.3.5)
+ tzinfo (1.2.2)
+ thread_safe (~> 0.1)
+
+ PLATFORMS
+ ruby
+
+ DEPENDENCIES
+ paperclip (~> 5.1.0)
+ rails (~> 4.2.7.1)
+
+ BUNDLED WITH
+ 1.13.1
+ L
+
+ bundle! "lock --update paperclip"
+
+ expect(lockfile).to include(rubygems_version("paperclip", "~> 5.1.0"))
+ end
+
# https://github.com/bundler/bundler/issues/1500
it "does not fail install because of gem plugins" do
realworld_system_gems("open_gem --version 1.4.2", "rake --version 0.9.2")
diff --git a/spec/realworld/gemfile_source_header_spec.rb b/spec/realworld/gemfile_source_header_spec.rb
index 95935f76f7..ba888d43bd 100644
--- a/spec/realworld/gemfile_source_header_spec.rb
+++ b/spec/realworld/gemfile_source_header_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "thread"
-describe "fetching dependencies with a mirrored source", :realworld => true, :rubygems => ">= 2.0" do
+RSpec.describe "fetching dependencies with a mirrored source", :realworld => true, :rubygems => ">= 2.0" do
let(:mirror) { "https://server.example.org" }
let(:original) { "http://127.0.0.1:#{@port}" }
diff --git a/spec/realworld/mirror_probe_spec.rb b/spec/realworld/mirror_probe_spec.rb
index 5a4a4a1b0a..93dca0c173 100644
--- a/spec/realworld/mirror_probe_spec.rb
+++ b/spec/realworld/mirror_probe_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
require "thread"
-describe "fetching dependencies with a not available mirror", :realworld => true do
+RSpec.describe "fetching dependencies with a not available mirror", :realworld => true do
let(:mirror) { @mirror_uri }
let(:original) { @server_uri }
let(:server_port) { @server_port }
diff --git a/spec/realworld/parallel_spec.rb b/spec/realworld/parallel_spec.rb
index 539b8ab287..6950bead19 100644
--- a/spec/realworld/parallel_spec.rb
+++ b/spec/realworld/parallel_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "parallel", :realworld => true, :sometimes => true do
+RSpec.describe "parallel", :realworld => true, :sometimes => true do
it "installs" do
gemfile <<-G
source "https://rubygems.org"
diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb
index e3187726fd..69881d1019 100644
--- a/spec/resolver/basic_spec.rb
+++ b/spec/resolver/basic_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Resolving" do
+RSpec.describe "Resolving" do
before :each do
@index = an_awesome_index
end
diff --git a/spec/resolver/platform_spec.rb b/spec/resolver/platform_spec.rb
index fa91eab9c2..90d6f637ce 100644
--- a/spec/resolver/platform_spec.rb
+++ b/spec/resolver/platform_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Resolving platform craziness" do
+RSpec.describe "Resolving platform craziness" do
describe "with cross-platform gems" do
before :each do
@index = an_awesome_index
diff --git a/spec/runtime/executable_spec.rb b/spec/runtime/executable_spec.rb
index 1ce65bd598..ff27d0b415 100644
--- a/spec/runtime/executable_spec.rb
+++ b/spec/runtime/executable_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Running bin/* commands" do
+RSpec.describe "Running bin/* commands" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/runtime/gem_tasks_spec.rb b/spec/runtime/gem_tasks_spec.rb
index c187efd681..422ec45470 100644
--- a/spec/runtime/gem_tasks_spec.rb
+++ b/spec/runtime/gem_tasks_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "require 'bundler/gem_tasks'" do
+RSpec.describe "require 'bundler/gem_tasks'" do
before :each do
bundled_app("foo.gemspec").open("w") do |f|
f.write <<-GEMSPEC
diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb
index 215b528b4d..573de4af54 100644
--- a/spec/runtime/inline_spec.rb
+++ b/spec/runtime/inline_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundler/inline#gemfile" do
+RSpec.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)
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb
index 93c8073180..d0e308ed3e 100644
--- a/spec/runtime/load_spec.rb
+++ b/spec/runtime/load_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Bundler.load" do
+RSpec.describe "Bundler.load" do
before :each do
system_gems "rack-1.0.0"
end
diff --git a/spec/runtime/platform_spec.rb b/spec/runtime/platform_spec.rb
index 4fd09cf4b7..be1005e88e 100644
--- a/spec/runtime/platform_spec.rb
+++ b/spec/runtime/platform_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Bundler.setup with multi platform stuff" do
+RSpec.describe "Bundler.setup with multi platform stuff" do
it "raises a friendly error when gems are missing locally" do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb
index ef88f91282..97248e2ce4 100644
--- a/spec/runtime/require_spec.rb
+++ b/spec/runtime/require_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Bundler.require" do
+RSpec.describe "Bundler.require" do
before :each do
build_lib "one", "1.0.0" do |s|
s.write "lib/baz.rb", "puts 'baz'"
@@ -362,7 +362,7 @@ describe "Bundler.require" do
end
end
-describe "Bundler.require with platform specific dependencies" do
+RSpec.describe "Bundler.require with platform specific dependencies" do
it "does not require the gems that are pinned to other platforms" do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 1251f25d80..09e88630ca 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Bundler.setup" do
+RSpec.describe "Bundler.setup" do
describe "with no arguments" do
it "makes all groups available" do
install_gemfile <<-G
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb
index 294233a581..b351e86c8b 100644
--- a/spec/runtime/with_clean_env_spec.rb
+++ b/spec/runtime/with_clean_env_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "Bundler.with_env helpers" do
+RSpec.describe "Bundler.with_env helpers" do
describe "Bundler.original_env" do
before do
gemfile ""
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 5574c4ae3b..53b7527545 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -65,6 +65,14 @@ RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = ".rspec_status"
+ config.disable_monkey_patching!
+
+ # Since failures cause us to keep a bunch of long strings in memory, stop
+ # once we have a large number of failures (indicative of core pieces of
+ # bundler being broken) so that running the full test suite doesn't take
+ # forever due to memory constraints
+ config.fail_fast ||= 25
+
if ENV["BUNDLER_SUDO_TESTS"] && Spec::Sudo.present?
config.filter_run :sudo => true
else
diff --git a/spec/support/hax.rb b/spec/support/hax.rb
index d00bf619a9..663d3527c5 100644
--- a/spec/support/hax.rb
+++ b/spec/support/hax.rb
@@ -10,6 +10,7 @@ end
if ENV["BUNDLER_SPEC_VERSION"]
module Bundler
+ remove_const(:VERSION) if const_defined?(:VERSION)
VERSION = ENV["BUNDLER_SPEC_VERSION"].dup
end
end
diff --git a/spec/update/gems/post_install_spec.rb b/spec/update/gems/post_install_spec.rb
index 0e3683e7cb..5a4fe7f321 100644
--- a/spec/update/gems/post_install_spec.rb
+++ b/spec/update/gems/post_install_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle update" do
+RSpec.describe "bundle update" do
let(:config) {}
before do
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb
index b67ddda202..021c8c942b 100644
--- a/spec/update/git_spec.rb
+++ b/spec/update/git_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "bundle update" do
+RSpec.describe "bundle update" do
describe "git sources" do
it "floats on a branch when :branch is used" do
build_git "foo", "1.0"
diff --git a/spec/update/path_spec.rb b/spec/update/path_spec.rb
index aa220ad60e..5ac4f7b1fe 100644
--- a/spec/update/path_spec.rb
+++ b/spec/update/path_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require "spec_helper"
-describe "path sources" do
+RSpec.describe "path sources" do
describe "bundle update --source" do
it "shows the previous version of the gem when updated from path source" do
build_lib "activesupport", "2.3.5", :path => lib_path("rails/activesupport")
diff --git a/task/release.rake b/task/release.rake
new file mode 100644
index 0000000000..c15c312994
--- /dev/null
+++ b/task/release.rake
@@ -0,0 +1,81 @@
+# frozen_string_literal: true
+namespace :release do
+ def confirm(prompt = "")
+ loop do
+ print(prompt)
+ print(": ") unless prompt.empty?
+ break if $stdin.gets.strip == "y"
+ end
+ rescue Interrupt
+ abort
+ end
+
+ desc "Make a patch release with the specified PRs from master"
+ task :patch, :version do |_t, args|
+ version = args.version
+ prs = args.extras
+
+ version ||= begin
+ version = BUNDLER_SPEC.version
+ segments = version.segments
+ if segments.last.is_a?(String)
+ segments << "1"
+ else
+ segments[-1] += 1
+ end
+ segments.join(".")
+ end
+
+ confirm "You are about to release #{version}, currently #{BUNDLER_SPEC.version}"
+
+ version_file = "lib/bundler/version.rb"
+ version_contents = File.read(version_file)
+ unless version_contents.sub!(/^(\s*VERSION = )"#{Gem::Version::VERSION_PATTERN}"/, "\\1#{version.to_s.dump}")
+ abort "failed to update #{version_file}, is it in the expected format?"
+ end
+ File.open(version_file, "w") {|f| f.write(version_contents) }
+
+ BUNDLER_SPEC.version = version
+
+ branch = version.split(".", 3)[0, 2].push("stable").join("-")
+ sh("git", "checkout", branch)
+
+ commits = `git log --oneline origin/master --`.split("\n").map {|l| l.split(/\s/, 2) }.reverse
+ commits.select! {|_sha, message| message =~ /(Auto merge of|Merge pull request) ##{Regexp.union(*prs)}/ }
+
+ unless system("git", "cherry-pick", "-x", "-m", "1", *commits.map(&:first))
+ abort unless system("zsh")
+ end
+
+ prs.each do |pr|
+ system("open", "https://github.com/bundler/bundler/pull/#{pr}")
+ confirm "Add to the changelog"
+ end
+
+ confirm "Update changelog"
+ sh("git", "commit", "-am", "Version #{version} with changelog")
+ sh("rake", "release")
+ sh("git", "checkout", "master")
+ sh("git", "pull")
+ sh("git", "merge", "v#{version}", "--no-edit")
+ sh("git", "push")
+ end
+
+ desc "Open all PRs that have not been included in a stable release"
+ task :open_unreleased_prs do
+ def prs(on = "master")
+ commits = `git log --oneline origin/#{on} --`.split("\n")
+ commits.reverse_each.map {|c| c =~ /(Auto merge of|Merge pull request) #(\d+)/ && $2 }.compact
+ end
+
+ last_stable = `git ls-remote origin`.split("\n").map {|r| r =~ %r{refs/tags/v([\d.]+)$} && $1 }.compact.map {|v| Gem::Version.create(v) }.max
+ last_stable = last_stable.segments[0, 2].<<("stable").join("-")
+
+ in_release = prs("HEAD") - prs(last_stable)
+
+ in_release.each do |pr|
+ system("open", "https://github.com/bundler/bundler/pull/#{pr}")
+ confirm
+ end
+ end
+end