summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Piotrowski <piotrowski+github@gmail.com>2019-01-28 13:30:02 +0100
committerGitHub <noreply@github.com>2019-01-28 13:30:02 +0100
commit485bbf1e2b32ed603dbd0c790adf35607b8c9ac5 (patch)
tree80b3a0b632c1d8f1af0331e163cc3fc69d49deed
parentb51b2be11f4d53768080471b53d48d5337f617ba (diff)
parent2b8015c2aa696209526f5747d09ee41f48553d46 (diff)
downloadbundler-485bbf1e2b32ed603dbd0c790adf35607b8c9ac5.tar.gz
Merge branch 'master' into cross_platform_ci
-rw-r--r--.travis.yml3
-rw-r--r--CODE_OF_CONDUCT.md2
-rw-r--r--README.md2
-rw-r--r--Rakefile11
-rw-r--r--bundler.gemspec3
-rw-r--r--doc/README.md4
-rw-r--r--doc/TROUBLESHOOTING.md4
-rw-r--r--doc/contributing/COMMUNITY.md4
-rw-r--r--doc/contributing/GETTING_HELP.md2
-rw-r--r--doc/contributing/HOW_YOU_CAN_HELP.md4
-rw-r--r--doc/contributing/ISSUES.md4
-rw-r--r--doc/contributing/README.md2
-rw-r--r--doc/documentation/README.md4
-rw-r--r--doc/documentation/VISION.md2
-rw-r--r--doc/documentation/WRITING.md6
-rwxr-xr-xexe/bundle_ruby60
-rw-r--r--lib/bundler/cli/issue.rb4
-rw-r--r--lib/bundler/env.rb10
-rw-r--r--lib/bundler/feature_flag.rb2
-rw-r--r--lib/bundler/fetcher/downloader.rb2
-rw-r--r--lib/bundler/gem_helper.rb29
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt2
-rw-r--r--man/bundle-init.ronn2
-rw-r--r--man/bundle.ronn2
-rw-r--r--man/gemfile.5.ronn2
-rw-r--r--spec/bundler/fetcher/downloader_spec.rb12
-rw-r--r--spec/commands/lock_spec.rb6
-rw-r--r--spec/commands/newgem_spec.rb6
-rw-r--r--spec/commands/show_spec.rb4
-rw-r--r--spec/install/gemfile/gemspec_spec.rb2
-rw-r--r--spec/install/gems/compact_index_spec.rb2
-rw-r--r--spec/lock/lockfile_bundler_1_spec.rb4
-rw-r--r--spec/lock/lockfile_spec.rb4
-rw-r--r--spec/other/bundle_ruby_spec.rb155
-rw-r--r--spec/other/major_deprecation_spec.rb8
-rw-r--r--spec/resolver/basic_spec.rb2
-rw-r--r--spec/runtime/setup_spec.rb2
-rw-r--r--spec/support/builders.rb2
-rw-r--r--spec/support/helpers.rb5
-rw-r--r--spec/support/less_than_proc.rb2
-rw-r--r--spec/support/rubygems_ext.rb2
41 files changed, 72 insertions, 318 deletions
diff --git a/.travis.yml b/.travis.yml
index 02c60d693c..a1ab44d7f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -78,9 +78,6 @@ jobs:
- rvm: 2.6.0
env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98
stage: test
- - rvm: 1.8.7
- env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98
- stage: test
allow_failures:
- rvm: ruby-head
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index fc4d57388d..cca34071bf 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -61,7 +61,7 @@ Once the admins get involved, they will follow a documented series of steps and
You may get in touch with the Bundler admin team through any of the following methods:
-- Email [the Bundler maintainers](http://bundler.io/contributors.html) as a group at [team@bundler.io](mailto:team@bundler.io).
+- Email [the Bundler maintainers](https://bundler.io/contributors.html) as a group at [team@bundler.io](mailto:team@bundler.io).
- Directly message any maintainer in private (through Slack, Twitter, email, or other available option) if that is more comfortable
### Further Enforcement
diff --git a/README.md b/README.md
index c596a32064..b06d456df4 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ bundle install
bundle exec rspec
```
-See [bundler.io](http://bundler.io) for the full documentation.
+See [bundler.io](https://bundler.io) for the full documentation.
### Troubleshooting
diff --git a/Rakefile b/Rakefile
index 746d110f86..21b11b9e59 100644
--- a/Rakefile
+++ b/Rakefile
@@ -43,7 +43,6 @@ namespace :spec do
deps = Hash[bundler_spec.development_dependencies.map do |d|
[d.name, d.requirement.to_s]
end]
- deps["rubocop"] ||= "= 0.50.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"
@@ -95,13 +94,9 @@ begin
RSpec::Core::RakeTask.new
task :spec => "man:build"
- if RUBY_VERSION >= "2.0.0"
- # can't go in the gemspec because of the ruby version requirement
- gem "rubocop", "= 0.50.0"
- require "rubocop/rake_task"
- rubocop = RuboCop::RakeTask.new
- rubocop.options = ["--parallel"]
- end
+ require "rubocop/rake_task"
+ rubocop = RuboCop::RakeTask.new
+ rubocop.options = ["--parallel"]
namespace :spec do
task :clean do
diff --git a/bundler.gemspec b/bundler.gemspec
index 4cc67f51a1..9deaf34f3a 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -42,10 +42,11 @@ Gem::Specification.new do |s|
s.add_development_dependency "automatiek", "~> 0.1.0"
s.add_development_dependency "mustache", "0.99.6"
- s.add_development_dependency "rake", "~> 10.0"
+ s.add_development_dependency "rake", "~> 12.0"
s.add_development_dependency "rdiscount", "~> 2.2"
s.add_development_dependency "ronn", "~> 0.7.3"
s.add_development_dependency "rspec", "~> 3.6"
+ s.add_development_dependency "rubocop", "= 0.50.0"
s.add_development_dependency "rspec_junit_formatter", "~> 0.2.3"
base_dir = File.dirname(__FILE__).gsub(%r{([^A-Za-z0-9_\-.,:\/@\n])}, "\\\\\\1")
diff --git a/doc/README.md b/doc/README.md
index 926a34823a..5fe78d3254 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,8 +1,8 @@
# Docs: Contributing and developing Bundler
-_If you're looking for documentation on how to use Bundler: visit [bundler.io](http://bundler.io/), or run `bundle help` from the command line. You may also be interested in [troubleshooting common issues](TROUBLESHOOTING.md) found when using Bundler._
+_If you're looking for documentation on how to use Bundler: visit [bundler.io](https://bundler.io/), or run `bundle help` from the command line. You may also be interested in [troubleshooting common issues](TROUBLESHOOTING.md) found when using Bundler._
-Bundler welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](http://bundler.io/conduct.html), so that everyone can be included. Maintainers are expected to work together with the community in accordance with [our project policies](POLICIES.md).
+Bundler welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](https://bundler.io/conduct.html), so that everyone can be included. Maintainers are expected to work together with the community in accordance with [our project policies](POLICIES.md).
If you'd like to help make Bundler better, you totally rock! Thanks for helping us make Bundler better.
diff --git a/doc/TROUBLESHOOTING.md b/doc/TROUBLESHOOTING.md
index 8bdac2c43c..d5ef596d34 100644
--- a/doc/TROUBLESHOOTING.md
+++ b/doc/TROUBLESHOOTING.md
@@ -25,10 +25,10 @@ Please open a ticket with [Heroku](https://www.heroku.com) if you're having trou
## Other problems
-First, figure out exactly what it is that you're trying to do (see [XY Problem](http://xyproblem.info/)). Then, go to the [Bundler documentation website](http://bundler.io) and see if we have instructions on how to do that.
+First, figure out exactly what it is that you're trying to do (see [XY Problem](http://xyproblem.info/)). Then, go to the [Bundler documentation website](https://bundler.io) and see if we have instructions on how to do that.
Second, check [the compatibility
-list](http://bundler.io/compatibility.html), and make sure that the version of Bundler that you are using works with the versions of Ruby and RubyGems that you are using. To see your versions:
+list](https://bundler.io/compatibility.html), and make sure that the version of Bundler that you are using works with the versions of Ruby and RubyGems that you are using. To see your versions:
# Bundler version
bundle -v
diff --git a/doc/contributing/COMMUNITY.md b/doc/contributing/COMMUNITY.md
index 053938ad07..7196ae7d1c 100644
--- a/doc/contributing/COMMUNITY.md
+++ b/doc/contributing/COMMUNITY.md
@@ -4,10 +4,10 @@ Community is an important part of all we do. If you’d like to be part of the B
It would be tremendously helpful to have more people answering questions about Bundler (and often simply about [RubyGems](https://github.com/rubygems/rubygems) or Ruby itself) in our [issue tracker](https://github.com/bundler/bundler/issues) or on [Stack Overflow](http://stackoverflow.com/questions/tagged/bundler).
-Additional documentation and explanation is always helpful, too. If you have any suggestions for the Bundler website [bundler.io](http://bundler.io), we would absolutely love it if you opened an issue or pull request on the [bundler-site](https://github.com/bundler/bundler-site) repository.
+Additional documentation and explanation is always helpful, too. If you have any suggestions for the Bundler website [bundler.io](https://bundler.io), we would absolutely love it if you opened an issue or pull request on the [bundler-site](https://github.com/bundler/bundler-site) repository.
Sharing your experiences and discoveries by writing them up is a valuable way to help others who have similar problems or experiences in the future. You can write a blog post, create an example and commit it to GitHub, take screenshots, or make videos.
Publishing examples of how Bundler is used helps everyone, and we’ve discovered that people already use it in ways that we never imagined when we were writing it. If you’re still not sure what to write about, there are also several projects doing interesting things based on Bundler. They could probably use publicity too.
-Finally, all contributors to the Bundler project must agree to the contributor [code of conduct](http://bundler.io/conduct.html). By participating in this project you agree to abide by its terms.
+Finally, all contributors to the Bundler project must agree to the contributor [code of conduct](https://bundler.io/conduct.html). By participating in this project you agree to abide by its terms.
diff --git a/doc/contributing/GETTING_HELP.md b/doc/contributing/GETTING_HELP.md
index 55ccb5f5e9..11b5bf9b5e 100644
--- a/doc/contributing/GETTING_HELP.md
+++ b/doc/contributing/GETTING_HELP.md
@@ -5,7 +5,7 @@ If you have any questions after reading the documentation for contributing, plea
The best ways to get in touch are:
* [Bundler Slack](https://bundler.slack.com).
- * Not a member of the Slack? Join the Bundler team slack [here](http://slack.bundler.io/)!
+ * Not a member of the Slack? Join the Bundler team slack [here](https://slack.bundler.io/)!
* [Bundler mailing list](http://groups.google.com/group/ruby-bundler)
You may also find our guide on [filing issues](ISSUES.md) to be helpful as well!
diff --git a/doc/contributing/HOW_YOU_CAN_HELP.md b/doc/contributing/HOW_YOU_CAN_HELP.md
index 284bae07b2..68cbe85967 100644
--- a/doc/contributing/HOW_YOU_CAN_HELP.md
+++ b/doc/contributing/HOW_YOU_CAN_HELP.md
@@ -14,7 +14,7 @@ Generally, great ways to get started helping out with Bundler are:
- [reporting bugs you encounter or suggesting new features](https://github.com/bundler/bundler/issues/new)
- see our [issues guide](ISSUES.md) for help on filing issues
- see the [new features documentation](../development/NEW_FEATURES.md) for more
- - adding to or editing [the Bundler documentation website](http://bundler.io) and [Bundler man pages](http://bundler.io/man/bundle.1.html)
+ - adding to or editing [the Bundler documentation website](https://bundler.io) and [Bundler man pages](https://bundler.io/man/bundle.1.html)
- [checking issues for completeness](BUG_TRIAGE.md)
- closing issues that are not complete
- adding a failing test for reproducible [reported bugs](https://github.com/bundler/bundler/issues)
@@ -24,4 +24,4 @@ Generally, great ways to get started helping out with Bundler are:
- get started setting up your dev environment with [these instructions](../development/SETUP.md)
- backfilling [unit tests](https://github.com/bundler/bundler/tree/master/spec/bundler) for modules that lack [coverage](https://codeclimate.com/github/bundler/bundler/coverage)
-If nothing on those lists looks good, [talk to us](http://slack.bundler.io/), and we'll figure out what you can help with. We can absolutely use your help, no matter what level of programming skill you have at the moment.
+If nothing on those lists looks good, [talk to us](https://slack.bundler.io/), and we'll figure out what you can help with. We can absolutely use your help, no matter what level of programming skill you have at the moment.
diff --git a/doc/contributing/ISSUES.md b/doc/contributing/ISSUES.md
index 219a775719..361350badd 100644
--- a/doc/contributing/ISSUES.md
+++ b/doc/contributing/ISSUES.md
@@ -6,9 +6,9 @@ Before filing an issue, check our [troubleshooting guide](../TROUBLESHOOTING.md)
## Documentation
-Instructions for common Bundler uses can be found on the [Bundler documentation site](http://bundler.io/).
+Instructions for common Bundler uses can be found on the [Bundler documentation site](https://bundler.io/).
-Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://bundler.io/man/bundle.1.html) or [Bundler Command Line Reference](http://bundler.io/v1.11/commands.html).
+Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](https://bundler.io/man/bundle.1.html) or [Bundler Command Line Reference](https://bundler.io/v1.11/commands.html).
## Reporting unresolved problems
diff --git a/doc/contributing/README.md b/doc/contributing/README.md
index 624e37cb73..a068ee5cb9 100644
--- a/doc/contributing/README.md
+++ b/doc/contributing/README.md
@@ -1,6 +1,6 @@
# Bundler Contributor Guidelines
-Thank you for your interest in making Bundler better! We welcome contributions from everyone. Dozens of contributors like you have submitted feature improvements, fixed bugs, and written new documentation. [Join the Bundler Slack community](http://slack.bundler.io/) to connect with the Bundler core team and other contributors like you.
+Thank you for your interest in making Bundler better! We welcome contributions from everyone. Dozens of contributors like you have submitted feature improvements, fixed bugs, and written new documentation. [Join the Bundler Slack community](https://slack.bundler.io/) to connect with the Bundler core team and other contributors like you.
Before submitting a contribution, read through the following guidelines:
diff --git a/doc/documentation/README.md b/doc/documentation/README.md
index bc2e1ceac6..0a9eceff8c 100644
--- a/doc/documentation/README.md
+++ b/doc/documentation/README.md
@@ -5,9 +5,9 @@ Code needs explanation, and sometimes those who know the code well have trouble
Currently, Bundler has two main sources of documentation:
1. built-in `help` (including usage information and man pages)
-2. [Bundler documentation site](http://bundler.io)
+2. [Bundler documentation site](https://bundler.io)
-If you have a suggestion or proposed change for [bundler.io](http://bundler.io), please open an issue or send a pull request to the [bundler-site](https://github.com/bundler/bundler-site) repository.
+If you have a suggestion or proposed change for [bundler.io](https://bundler.io), please open an issue or send a pull request to the [bundler-site](https://github.com/bundler/bundler-site) repository.
Not sure where to write documentation? In general, follow these guidelines:
diff --git a/doc/documentation/VISION.md b/doc/documentation/VISION.md
index 3d660ee36d..d401b94e77 100644
--- a/doc/documentation/VISION.md
+++ b/doc/documentation/VISION.md
@@ -3,7 +3,7 @@
Currently, documentation for using Bundler is spread across two places:
1. built-in `help` (including usage information and man pages)
-2. [Bundler documentation site](http://bundler.io)
+2. [Bundler documentation site](https://bundler.io)
Additional documentation about using Bundler to publish gems can also be found on the [RubyGems guides](http://guides.rubygems.org/).
diff --git a/doc/documentation/WRITING.md b/doc/documentation/WRITING.md
index 2fb3292e27..3975b57043 100644
--- a/doc/documentation/WRITING.md
+++ b/doc/documentation/WRITING.md
@@ -53,11 +53,11 @@ $ bin/rspec ./spec/commands/help_spec.rb
$ bin/rspec ./spec/quality_spec.rb
```
-# Writing docs for [the Bundler documentation site](http://www.bundler.io)
+# Writing docs for [the Bundler documentation site](https://bundler.io)
-If you'd like to submit a pull request for any of the primary commands or utilities on [the Bundler documentation site](http://www.bundler.io), please follow the instructions above for writing documentation for man pages from the `bundler/bundler` repository. They are the same in each case.
+If you'd like to submit a pull request for any of the primary commands or utilities on [the Bundler documentation site](https://bundler.io), please follow the instructions above for writing documentation for man pages from the `bundler/bundler` repository. They are the same in each case.
-Note: Editing `.ronn` files from the `bundler/bundler` repository for the primary commands and utilities documentation is all you need 🎉. There is no need to manually change anything in the `bundler/bundler-site` repository, because the man pages and the docs for primary commands and utilities on [the Bundler documentation site](http://www.bundler.io) are one in the same. They are generated automatically from the `bundler/bundler` repository's `.ronn` files from the `rake man/build` command. In other words, after updating `.ronn` file and running `rake man/build` in `bundler`, `.ronn` files map to the auto-generated files in the `source/man` directory of `bundler-site`.
+Note: Editing `.ronn` files from the `bundler/bundler` repository for the primary commands and utilities documentation is all you need 🎉. There is no need to manually change anything in the `bundler/bundler-site` repository, because the man pages and the docs for primary commands and utilities on [the Bundler documentation site](https://bundler.io) are one in the same. They are generated automatically from the `bundler/bundler` repository's `.ronn` files from the `rake man/build` command. In other words, after updating `.ronn` file and running `rake man/build` in `bundler`, `.ronn` files map to the auto-generated files in the `source/man` directory of `bundler-site`.
Additionally, if you'd like to add a guide or tutorial: in the `bundler/bundler-site` repository, go to `/bundler-site/source/current_version_of_bundler/guides` and add [a new Markdown file](https://guides.github.com/features/mastering-markdown/) (with an extension ending in `.md`). Be sure to correctly format the title of your new guide, like so:
```
diff --git a/exe/bundle_ruby b/exe/bundle_ruby
deleted file mode 100755
index df6f8cc8a1..0000000000
--- a/exe/bundle_ruby
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: true
-
-require "bundler/shared_helpers"
-
-Bundler::SharedHelpers.major_deprecation(2, "the bundle_ruby executable has been removed in favor of `bundle platform --ruby`")
-
-Signal.trap("INT") { exit 1 }
-
-require "bundler/errors"
-require "bundler/ruby_version"
-require "bundler/ruby_dsl"
-
-module Bundler
- class Dsl
- include RubyDsl
-
- attr_accessor :ruby_version
-
- def initialize
- @ruby_version = nil
- end
-
- def eval_gemfile(gemfile, contents = nil)
- contents ||= File.open(gemfile, "rb", &:read)
- instance_eval(contents, gemfile.to_s, 1)
- rescue SyntaxError => e
- bt = e.message.split("\n")[1..-1]
- raise GemfileError, ["Gemfile syntax error:", *bt].join("\n")
- rescue ScriptError, RegexpError, NameError, ArgumentError => e
- e.backtrace[0] = "#{e.backtrace[0]}: #{e.message} (#{e.class})"
- STDERR.puts e.backtrace.join("\n ")
- raise GemfileError, "There was an error in your Gemfile," \
- " and Bundler cannot continue."
- end
-
- def source(source, options = {})
- end
-
- def gem(name, *args)
- end
-
- def group(*args)
- end
- end
-end
-
-dsl = Bundler::Dsl.new
-begin
- dsl.eval_gemfile(Bundler::SharedHelpers.default_gemfile)
- ruby_version = dsl.ruby_version
- if ruby_version
- puts ruby_version
- else
- puts "No ruby version specified"
- end
-rescue Bundler::GemfileError => e
- puts e.message
- exit(-1)
-end
diff --git a/lib/bundler/cli/issue.rb b/lib/bundler/cli/issue.rb
index 91f827ea99..bba1619340 100644
--- a/lib/bundler/cli/issue.rb
+++ b/lib/bundler/cli/issue.rb
@@ -13,10 +13,10 @@ module Bundler
https://github.com/bundler/bundler/blob/master/doc/TROUBLESHOOTING.md
2. Instructions for common Bundler uses can be found on the documentation
- site: http://bundler.io/
+ site: https://bundler.io/
3. Information about each Bundler command can be found in the Bundler
- man pages: http://bundler.io/man/bundle.1.html
+ man pages: https://bundler.io/man/bundle.1.html
Hopefully the troubleshooting steps above resolved your problem! If things
still aren't working the way you expect them to, please let us know so
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index 51738139fa..9cd9b8baca 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -70,14 +70,8 @@ module Bundler
def self.ruby_version
str = String.new("#{RUBY_VERSION}")
- if RUBY_VERSION < "1.9"
- str << " (#{RUBY_RELEASE_DATE}"
- str << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
- str << ") [#{RUBY_PLATFORM}]"
- else
- str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
- str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]"
- end
+ str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
+ str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]"
end
def self.git_version
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index 249170c4b2..0adbd9190f 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -19,7 +19,7 @@ module Bundler
def self.settings_method(name, key, &default)
define_method(name) do
value = Bundler.settings[key]
- value = instance_eval(&default) if value.nil? && !default.nil?
+ value = instance_eval(&default) if value.nil?
value
end
end
diff --git a/lib/bundler/fetcher/downloader.rb b/lib/bundler/fetcher/downloader.rb
index e0e0cbf1c9..87ad4140fd 100644
--- a/lib/bundler/fetcher/downloader.rb
+++ b/lib/bundler/fetcher/downloader.rb
@@ -37,7 +37,7 @@ module Bundler
when Net::HTTPUnauthorized
raise AuthenticationRequiredError, uri.host
when Net::HTTPNotFound
- raise FallbackError, "Net::HTTPNotFound"
+ raise FallbackError, "Net::HTTPNotFound: #{URICredentialsFilter.credential_filtered_uri(uri)}"
else
raise HTTPError, "#{response.class}#{": #{response.body}" unless response.body.empty?}"
end
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 8ed1af231f..ca39f122e9 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -187,28 +187,13 @@ module Bundler
out
end
- if RUBY_VERSION >= "1.9"
- def sh_with_status(cmd, &block)
- Bundler.ui.debug(cmd)
- SharedHelpers.chdir(base) do
- outbuf = IO.popen(cmd, :err => [:child, :out], &:read)
- status = $?
- block.call(outbuf) if status.success? && block
- [outbuf, status]
- end
- end
- else
- def sh_with_status(cmd, &block)
- cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin)
- cmd += " 2>&1"
- outbuf = String.new
- Bundler.ui.debug(cmd)
- SharedHelpers.chdir(base) do
- outbuf = `#{cmd}`
- status = $?
- block.call(outbuf) if status.success? && block
- [outbuf, status]
- end
+ def sh_with_status(cmd, &block)
+ Bundler.ui.debug(cmd)
+ SharedHelpers.chdir(base) do
+ outbuf = IO.popen(cmd, :err => [:child, :out], &:read)
+ status = $?
+ block.call(outbuf) if status.success? && block
+ [outbuf, status]
end
end
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index c1a50fe912..41ff8aba12 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
<%- end -%>
spec.add_development_dependency "bundler", "~> <%= config[:bundler_version] %>"
- spec.add_development_dependency "rake", "~> 10.0"
+ spec.add_development_dependency "rake", "~> 12.0"
<%- if config[:ext] -%>
spec.add_development_dependency "rake-compiler"
<%- end -%>
diff --git a/man/bundle-init.ronn b/man/bundle-init.ronn
index 7504af7bab..9d3d97deea 100644
--- a/man/bundle-init.ronn
+++ b/man/bundle-init.ronn
@@ -26,4 +26,4 @@ results in all string literals in the file being implicitly frozen.
## SEE ALSO
-[Gemfile(5)](http://bundler.io/man/gemfile.5.html)
+[Gemfile(5)](https://bundler.io/man/gemfile.5.html)
diff --git a/man/bundle.ronn b/man/bundle.ronn
index 0005692abd..b8ee4566b4 100644
--- a/man/bundle.ronn
+++ b/man/bundle.ronn
@@ -10,7 +10,7 @@ bundle(1) -- Ruby Dependency Management
Bundler manages an `application's dependencies` through its entire life
across many machines systematically and repeatably.
-See [the bundler website](http://bundler.io) for information on getting
+See [the bundler website](https://bundler.io) for information on getting
started, and Gemfile(5) for more information on the `Gemfile` format.
## OPTIONS
diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn
index c941463edc..9fe4176a30 100644
--- a/man/gemfile.5.ronn
+++ b/man/gemfile.5.ronn
@@ -176,7 +176,7 @@ are not available).
Note that on `bundle install`, bundler downloads and evaluates all gems, in order to
create a single canonical list of all of the required gems and their dependencies.
This means that you cannot list different versions of the same gems in different
-groups. For more details, see [Understanding Bundler](http://bundler.io/rationale.html).
+groups. For more details, see [Understanding Bundler](https://bundler.io/rationale.html).
### PLATFORMS
diff --git a/spec/bundler/fetcher/downloader_spec.rb b/spec/bundler/fetcher/downloader_spec.rb
index c9b4fa662a..07b507266b 100644
--- a/spec/bundler/fetcher/downloader_spec.rb
+++ b/spec/bundler/fetcher/downloader_spec.rb
@@ -88,7 +88,17 @@ RSpec.describe Bundler::Fetcher::Downloader do
let(:http_response) { Net::HTTPNotFound.new("1.1", 404, "Not Found") }
it "should raise a Bundler::Fetcher::FallbackError with Net::HTTPNotFound" do
- expect { subject.fetch(uri, options, counter) }.to raise_error(Bundler::Fetcher::FallbackError, "Net::HTTPNotFound")
+ expect { subject.fetch(uri, options, counter) }.
+ to raise_error(Bundler::Fetcher::FallbackError, "Net::HTTPNotFound: http://www.uri-to-fetch.com/api/v2/endpoint")
+ end
+
+ context "when the there are credentials provided in the request" do
+ let(:uri) { URI("http://username:password@www.uri-to-fetch.com/api/v2/endpoint") }
+
+ it "should raise a Bundler::Fetcher::FallbackError that doesn't contain the password" do
+ expect { subject.fetch(uri, options, counter) }.
+ to raise_error(Bundler::Fetcher::FallbackError, "Net::HTTPNotFound: http://username@www.uri-to-fetch.com/api/v2/endpoint")
+ end
end
end
diff --git a/spec/commands/lock_spec.rb b/spec/commands/lock_spec.rb
index d99ddaf294..38dfc563fc 100644
--- a/spec/commands/lock_spec.rb
+++ b/spec/commands/lock_spec.rb
@@ -38,8 +38,8 @@ RSpec.describe "bundle lock" do
actionpack (= 2.3.2)
activerecord (= 2.3.2)
activeresource (= 2.3.2)
- rake (= 10.0.2)
- rake (10.0.2)
+ rake (= 12.3.2)
+ rake (12.3.2)
with_license (1.0)
PLATFORMS
@@ -133,7 +133,7 @@ RSpec.describe "bundle lock" do
end
it "update specific gems using --update" do
- lockfile @lockfile.gsub("2.3.2", "2.3.1").gsub("10.0.2", "10.0.1")
+ lockfile @lockfile.gsub("2.3.2", "2.3.1").gsub("12.3.2", "10.0.1")
bundle "lock --update rails rake"
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb
index 2914ba66c5..a2f2951cf8 100644
--- a/spec/commands/newgem_spec.rb
+++ b/spec/commands/newgem_spec.rb
@@ -197,7 +197,7 @@ RSpec.describe "bundle gem" do
end
Dir.chdir(bundled_app("newgem")) do
- gems = ["rake-10.0.2", :bundler]
+ gems = ["rake-12.3.2", :bundler]
# for Ruby core repository, Ruby 2.6+ has bundler as standard library.
gems.delete(:bundler) if ruby_core?
system_gems gems, :path => :bundle_path
@@ -303,7 +303,7 @@ RSpec.describe "bundle gem" do
end
it "runs rake without problems" do
- system_gems ["rake-10.0.2"]
+ system_gems ["rake-12.3.2"]
rakefile = strip_whitespace <<-RAKEFILE
task :default do
@@ -585,7 +585,7 @@ RSpec.describe "bundle gem" do
end
it "runs rake without problems" do
- system_gems ["rake-10.0.2"]
+ system_gems ["rake-12.3.2"]
rakefile = strip_whitespace <<-RAKEFILE
task :default do
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 102b9534de..622d29d9b7 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -81,7 +81,7 @@ RSpec.describe "bundle show" do
it "prints path of all gems in bundle sorted by name", :bundler => "< 2" do
bundle "show --paths"
- expect(out).to include(default_bundle_path("gems", "rake-10.0.2").to_s)
+ expect(out).to include(default_bundle_path("gems", "rake-12.3.2").to_s)
expect(out).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
# Gem names are the last component of their path.
@@ -92,7 +92,7 @@ RSpec.describe "bundle show" do
it "prints path of all gems in bundle sorted by name", :bundler => "2" do
bundle "show --paths"
- expect(out).to include(default_bundle_path("gems", "rake-10.0.2").to_s)
+ expect(out).to include(default_bundle_path("gems", "rake-12.3.2").to_s)
expect(out).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
out_lines = out.split("\n")
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb
index 833b409801..1f4ab88f12 100644
--- a/spec/install/gemfile/gemspec_spec.rb
+++ b/spec/install/gemfile/gemspec_spec.rb
@@ -117,7 +117,7 @@ RSpec.describe "bundle install from an existing gemspec" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.write("Gemfile", "source 'file://#{gem_repo1}'\ngemspec")
s.add_dependency "actionpack", "=2.3.2"
- s.add_development_dependency "rake", "=10.0.2"
+ s.add_development_dependency "rake", "=12.3.2"
end
Dir.chdir(tmp.join("foo")) do
diff --git a/spec/install/gems/compact_index_spec.rb b/spec/install/gems/compact_index_spec.rb
index 02a37a77d5..e321156d33 100644
--- a/spec/install/gems/compact_index_spec.rb
+++ b/spec/install/gems/compact_index_spec.rb
@@ -915,7 +915,7 @@ The checksum of /versions does not match the checksum provided by the server! So
source "#{source_uri}"
gem "rails"
G
- deps = [Gem::Dependency.new("rake", "= 10.0.2"),
+ deps = [Gem::Dependency.new("rake", "= 12.3.2"),
Gem::Dependency.new("actionpack", "= 2.3.2"),
Gem::Dependency.new("activerecord", "= 2.3.2"),
Gem::Dependency.new("actionmailer", "= 2.3.2"),
diff --git a/spec/lock/lockfile_bundler_1_spec.rb b/spec/lock/lockfile_bundler_1_spec.rb
index 638b40f5f4..77c4e2c847 100644
--- a/spec/lock/lockfile_bundler_1_spec.rb
+++ b/spec/lock/lockfile_bundler_1_spec.rb
@@ -737,8 +737,8 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
actionpack (= 2.3.2)
activerecord (= 2.3.2)
activeresource (= 2.3.2)
- rake (= 10.0.2)
- rake (10.0.2)
+ rake (= 12.3.2)
+ rake (12.3.2)
PLATFORMS
#{generic_local_platform}
diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb
index 53c832445f..691bb2a6ed 100644
--- a/spec/lock/lockfile_spec.rb
+++ b/spec/lock/lockfile_spec.rb
@@ -772,8 +772,8 @@ RSpec.describe "the lockfile format", :bundler => "2" do
actionpack (= 2.3.2)
activerecord (= 2.3.2)
activeresource (= 2.3.2)
- rake (= 10.0.2)
- rake (10.0.2)
+ rake (= 12.3.2)
+ rake (12.3.2)
PLATFORMS
#{lockfile_platforms}
diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb
deleted file mode 100644
index a7da9cbec9..0000000000
--- a/spec/other/bundle_ruby_spec.rb
+++ /dev/null
@@ -1,155 +0,0 @@
-# frozen_string_literal: true
-
-RSpec.describe "bundle_ruby", :bundler => "< 2" do
- context "without patchlevel" do
- it "returns the ruby version" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.9.3", :engine => 'ruby', :engine_version => '1.9.3'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.9.3")
- end
-
- it "engine defaults to MRI" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.9.3"
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.9.3")
- end
-
- it "handles jruby" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine => 'jruby', :engine_version => '1.6.5'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.8.7 (jruby 1.6.5)")
- end
-
- it "handles rbx" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine => 'rbx', :engine_version => '1.2.4'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.8.7 (rbx 1.2.4)")
- end
-
- it "handles truffleruby", :rubygems => ">= 2.1.0" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "2.5.1", :engine => 'truffleruby', :engine_version => '1.0.0-rc6'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 2.5.1 (truffleruby 1.0.0-rc6)")
- end
-
- it "raises an error if engine is used but engine version is not" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine => 'rbx'
-
- gem "foo"
- G
-
- bundle_ruby
- expect(exitstatus).not_to eq(0) if exitstatus
-
- bundle_ruby
- expect(out).to include("Please define :engine_version")
- end
-
- it "raises an error if engine_version is used but engine is not" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine_version => '1.2.4'
-
- gem "foo"
- G
-
- bundle_ruby
- expect(exitstatus).not_to eq(0) if exitstatus
-
- bundle_ruby
- expect(out).to include("Please define :engine")
- end
-
- it "raises an error if engine version doesn't match ruby version for MRI" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine => 'ruby', :engine_version => '1.2.4'
-
- gem "foo"
- G
-
- bundle_ruby
- expect(exitstatus).not_to eq(0) if exitstatus
-
- bundle_ruby
- expect(out).to include("ruby_version must match the :engine_version for MRI")
- end
-
- it "should print if no ruby version is specified" do
- gemfile <<-G
- source "file://#{gem_repo1}"
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("No ruby version specified")
- end
- end
-
- context "when using patchlevel" do
- it "returns the ruby version" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.9.3", :patchlevel => '429', :engine => 'ruby', :engine_version => '1.9.3'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.9.3p429")
- end
-
- it "handles an engine" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.9.3", :patchlevel => '392', :engine => 'jruby', :engine_version => '1.7.4'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.9.3p392 (jruby 1.7.4)")
- end
- end
-end
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index ce2735ba94..e8de574c79 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -31,14 +31,6 @@ RSpec.describe "major deprecations", :bundler => "< 2" do
bundle! "install"
end
- describe "bundle_ruby" do
- it "prints a deprecation" do
- bundle_ruby
- warnings.gsub! "\nruby #{RUBY_VERSION}", ""
- expect(warnings).to have_major_deprecation "the bundle_ruby executable has been removed in favor of `bundle platform --ruby`"
- end
- end
-
describe "Bundler" do
describe ".clean_env" do
it "is deprecated in favor of .unbundled_env" do
diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb
index 9f92303447..57897f89b4 100644
--- a/spec/resolver/basic_spec.rb
+++ b/spec/resolver/basic_spec.rb
@@ -226,7 +226,7 @@ Bundler could not find compatible versions for gem "a":
# dependencies and since the dependency of the selected foo gem changes, the latest matching
# dependency of "bar", "~> 2.1" -- bar-2.1.1 -- is selected. This is not a bug and follows
# the long-standing documented Conservative Updating behavior of bundle install.
- # http://bundler.io/v1.12/man/bundle-install.1.html#CONSERVATIVE-UPDATING
+ # https://bundler.io/v1.12/man/bundle-install.1.html#CONSERVATIVE-UPDATING
should_conservative_resolve_and_include :patch, ["foo"], %w[foo-1.4.5 bar-2.1.1]
end
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 941c3d34e7..96eae4cae7 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -166,7 +166,7 @@ RSpec.describe "Bundler.setup" do
"/gems/actionpack-2.3.2/lib",
"/gems/actionmailer-2.3.2/lib",
"/gems/activesupport-2.3.2/lib",
- "/gems/rake-10.0.2/lib"
+ "/gems/rake-12.3.2/lib"
)
end
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index 188b1d3eb7..442623a415 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -40,7 +40,7 @@ module Spec
build_gem "rails", "2.3.2" do |s|
s.executables = "rails"
- s.add_dependency "rake", "10.0.2"
+ s.add_dependency "rake", "12.3.2"
s.add_dependency "actionpack", "2.3.2"
s.add_dependency "activerecord", "2.3.2"
s.add_dependency "actionmailer", "2.3.2"
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 9126256f8e..af6b1c556a 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -174,11 +174,6 @@ module Spec
bundle(cmd, options)
end
- def bundle_ruby(options = {})
- options["bundle_bin"] = bindir.join("bundle_ruby")
- bundle("", options)
- end
-
def ruby(ruby, options = {})
env = (options.delete(:env) || {}).map {|k, v| "#{k}='#{v}' " }.join
ruby = ruby.gsub(/["`\$]/) {|m| "\\#{m}" }
diff --git a/spec/support/less_than_proc.rb b/spec/support/less_than_proc.rb
index ddac5458b7..68d37b44c9 100644
--- a/spec/support/less_than_proc.rb
+++ b/spec/support/less_than_proc.rb
@@ -6,7 +6,7 @@ class LessThanProc < Proc
def self.with(present)
provided = Gem::Version.new(present.dup)
new do |required|
- if required =~ /[=><~]/
+ if required.is_a?(String) && required =~ /[=><~]/
!Gem::Requirement.new(required).satisfied_by?(provided)
else
provided < Gem::Version.new(required)
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 7a69d713cb..21967756ec 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -19,7 +19,7 @@ module Spec
"compact_index" => "~> 0.11.0",
"sinatra" => "~> 1.4.7",
# Rake version has to be consistent for tests to pass
- "rake" => "10.0.2",
+ "rake" => "12.3.2",
# 3.0.0 breaks 1.9.2 specs
"builder" => "2.1.2",
}