summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.rubocop_todo.yml20
-rw-r--r--CHANGELOG.md1
-rw-r--r--CONTRIBUTING.md11
-rw-r--r--DEVELOPMENT.md28
-rw-r--r--ISSUES.md44
-rw-r--r--Rakefile4
-rwxr-xr-xbin/rubocop2
-rw-r--r--lib/bundler.rb2
-rw-r--r--lib/bundler/capistrano.rb2
-rw-r--r--lib/bundler/cli.rb8
-rw-r--r--lib/bundler/cli/exec.rb5
-rw-r--r--lib/bundler/cli/install.rb2
-rw-r--r--lib/bundler/cli/outdated.rb6
-rw-r--r--lib/bundler/cli/update.rb2
-rw-r--r--lib/bundler/definition.rb8
-rw-r--r--lib/bundler/dsl.rb2
-rw-r--r--lib/bundler/fetcher.rb2
-rw-r--r--lib/bundler/fetcher/base.rb2
-rw-r--r--lib/bundler/fetcher/compact_index.rb2
-rw-r--r--lib/bundler/fetcher/dependency.rb2
-rw-r--r--lib/bundler/friendly_errors.rb2
-rw-r--r--lib/bundler/installer.rb6
-rw-r--r--lib/bundler/installer/gem_installer.rb2
-rw-r--r--lib/bundler/mirror.rb8
-rw-r--r--lib/bundler/psyched_yaml.rb2
-rw-r--r--lib/bundler/rubygems_integration.rb36
-rw-r--r--lib/bundler/source.rb2
-rw-r--r--lib/bundler/source/git.rb2
-rw-r--r--lib/bundler/source/rubygems.rb2
-rw-r--r--lib/bundler/spec_set.rb2
-rw-r--r--lib/bundler/ssl_certs/AddTrustExternalCARoot.pem32
-rw-r--r--lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem14
-rw-r--r--lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem28
-rw-r--r--lib/bundler/ssl_certs/GeoTrustGlobalCA.pem20
-rw-r--r--lib/bundler/ssl_certs/certificate_manager.rb2
-rw-r--r--lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRoot.pem18
-rw-r--r--lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem (renamed from lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem)0
-rw-r--r--lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot-2048.pem (renamed from lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem)0
-rw-r--r--lib/bundler/ui/shell.rb4
-rw-r--r--lib/bundler/ui/silent.rb3
-rw-r--r--lib/bundler/vlad.rb2
-rw-r--r--man/bundle-install.ronn10
-rw-r--r--man/bundle-package.ronn13
-rw-r--r--man/bundle-platform.ronn2
-rw-r--r--man/bundle-update.ronn4
-rw-r--r--man/bundle.ronn10
-rw-r--r--man/gemfile.5.ronn18
-rw-r--r--spec/bundler/fetcher/base_spec.rb4
-rw-r--r--spec/bundler/fetcher/downloader_spec.rb2
-rw-r--r--spec/bundler/source_spec.rb2
-rw-r--r--spec/bundler/spec_set_spec.rb43
-rw-r--r--spec/bundler/ssl_certs/certificate_manager_spec.rb12
-rw-r--r--spec/commands/exec_spec.rb4
-rw-r--r--spec/install/gems/standalone_spec.rb22
-rw-r--r--spec/install/git_spec.rb26
-rw-r--r--spec/other/ssl_cert_spec.rb9
-rw-r--r--spec/quality_spec.rb50
-rw-r--r--spec/realworld/edgecases_spec.rb9
58 files changed, 341 insertions, 241 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index cec50c1b88..539f92a538 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2016-02-09 10:53:24 -0600 using RuboCop version 0.37.1.
+# on 2016-03-09 11:11:00 -0600 using RuboCop version 0.38.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
@@ -52,7 +52,7 @@ Lint/UselessAssignment:
- 'lib/bundler/index.rb'
- 'lib/bundler/installer.rb'
-# Offense count: 1295
+# Offense count: 1327
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
# URISchemes: http, https
Metrics/LineLength:
@@ -63,9 +63,9 @@ Metrics/LineLength:
Metrics/ParameterLists:
Max: 6
-# Offense count: 52
+# Offense count: 55
Metrics/PerceivedComplexity:
- Max: 54
+ Max: 51
# Offense count: 6
# Cop supports --auto-correct.
@@ -110,26 +110,23 @@ Style/CaseEquality:
Style/ClassAndModuleChildren:
Enabled: false
-# Offense count: 14
+# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: SingleLineConditionsOnly.
Style/ConditionalAssignment:
Exclude:
- - 'lib/bundler.rb'
- 'lib/bundler/cli.rb'
- 'lib/bundler/cli/gem.rb'
- 'lib/bundler/cli/lock.rb'
- - 'lib/bundler/cli/outdated.rb'
- 'lib/bundler/cli/platform.rb'
- 'lib/bundler/dsl.rb'
- 'lib/bundler/lazy_specification.rb'
- - 'lib/bundler/mirror.rb'
- 'lib/bundler/psyched_yaml.rb'
- 'lib/bundler/rubygems_integration.rb'
- 'lib/bundler/source/git.rb'
- 'lib/bundler/source/rubygems.rb'
-# Offense count: 118
+# Offense count: 119
Style/Documentation:
Enabled: false
@@ -173,11 +170,10 @@ Style/ModuleFunction:
Style/MultilineMethodCallIndentation:
Enabled: false
-# Offense count: 5
+# Offense count: 4
Style/NestedParenthesizedCalls:
Exclude:
- 'lib/bundler/resolver.rb'
- - 'spec/bundler/shared_helpers_spec.rb'
- 'spec/commands/lock_spec.rb'
- 'spec/runtime/setup_spec.rb'
@@ -195,7 +191,7 @@ Style/PredicateName:
- 'lib/bundler/source/git/git_proxy.rb'
- 'lib/bundler/source/path.rb'
-# Offense count: 23
+# Offense count: 25
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbeb624023..466e423815 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -230,6 +230,7 @@ Bugfixes:
- allow `viz` to work with prereleases (#3621, #3217, @aprescott)
- validate gemspecs used in path and git gems (#3639, @segiddins, @indirect)
- stop printing config warnings when config is unchanged (#3649, @fotanus, @indirect)
+ - Without groups saved via `config` are no longer ignored when the `--without` flag is used
## 1.10.0.pre.2 (2015-05-07)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 24e0cdaa26..dce97cd6ce 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,20 +12,25 @@ If you'd like to help make Bundler better, you totally rock! Here are some ways
- by closing issues that are not complete
- by adding a failing test for reproducible [reported bugs](https://github.com/bundler/bundler/issues)
- by reviewing [pull requests](https://github.com/bundler/bundler/pulls) and suggesting improvements
- - by improving existing code, including [suggestions from PullReview](https://www.pullreview.com/github/bundler/bundler/reviews/master)
+ - by improving existing code, including suggestions from [PullReview](https://www.pullreview.com/github/bundler/bundler/reviews/master) or [CodeClimate](https://codeclimate.com/github/bundler/bundler)
- by [writing code](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md) (no patch is too small! fix typos or bad whitespace)
+ - by 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 you need help getting started, check out the [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md) file for steps that will get you up and running.
+If you need help getting started, check out the [DEVELOPMENT.md](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md) file for steps that will get you up and running.
Thanks for helping us make Bundler better.
+# Roadmap
+
+If you're interested in reading some of the potential ideas or plans for Bundler, see the official Bundler [Trello Board](https://trello.com/b/DioUaKgx/bundler).
+
# Troubleshooting
If you're having a problem, please see [ISSUES](https://github.com/bundler/bundler/blob/master/ISSUES.md) for troubleshooting steps and a guide for how to submit a ticket that will help us solve the problem you are having as quickly as possible.
# Requesting Features
-Head on over to the [Bundler features](https://github.com/bundler/bundler-features) project, or any of the lists or channels listed below. Feature-wise we consider Bundler stable, so the core team does not tend to work on feature suggestions. Pull requests welcome though!
+Head on over to the [Bundler features](https://github.com/bundler/bundler-features) project, or any of the lists or channels listed below. Feature-wise, we consider Bundler stable, so the core team does not tend to work on feature suggestions. Pull requests are welcome though!
# Discussing Bundler
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 0061fe6d80..35ca2ada32 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -19,15 +19,23 @@ bugs](https://github.com/bundler/bundler/issues?labels=small&state=open) and [sm
Bundler doesn't use a Gemfile to list development dependencies, because when we tried it we couldn't tell if we were awake or it was just another level of dreams. To work on Bundler, you'll probably want to do a couple of things.
- 1. Install Bundler's development dependencies
+ 1. Install `groff-base` and `graphviz` packages using your package manager, e.g for ubuntu
- $ rake spec:deps
+ $ sudo apt-get install graphviz groff-base -y
- 2. Run the test suite, to make sure things are working
+ and for OS X (with brew installed)
- $ rake spec
+ $ brew install graphviz homebrew/dupes/groff
- 3. Set up a shell alias to run Bundler from your clone, e.g. a Bash alias:
+ 2. Install Bundler's development dependencies
+
+ $ bin/rake spec:deps
+
+ 3. Run the test suite, to make sure things are working
+
+ $ bin/rake spec
+
+ 4. Set up a shell alias to run Bundler from your clone, e.g. a Bash alias:
$ alias dbundle='ruby -I /path/to/bundler/lib /path/to/bundler/exe/bundle'
@@ -114,7 +122,7 @@ Code needs explanation, and sometimes those who know the code well have trouble
Bundler has two main sources of documentation: the built-in help (including usage information and man pages) and the [Bundler documentation site](http://bundler.io).
-If you’d like to submit a patch to the man pages, follow the steps for adding a feature above. All of the man pages are located in the `man` directory. Just use the “Documentation” heading when you describe what you did in the changelog.
+If you’d like to submit a patch to the man pages, follow the steps for submitting a pull request above. All of the man pages are located in the `man` directory. Just use the “Documentation” heading when you describe what you did in the changelog.
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.
@@ -123,14 +131,12 @@ If you have a suggestion or proposed change for [bundler.io](http://bundler.io),
Community is an important part of all we do. If you’d like to be part of the Bundler community, you can jump right in and start helping make Bundler better for everyone who uses it.
-It would be tremendously helpful to have more people answering questions about Bundler (and often simply about Rubygems or Ruby itself) in our [issue tracker](https://github.com/bundler/bundler/issues) or on [Stack Overflow](http://stackoverflow.com/questions/tagged/bundler).
+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.
Finally, 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.
-Examples of how Bundler is used help 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.
-
-If you let someone on the core team know you wrote about Bundler, we will add your post to the list of Bundler resources on the Github project wiki.
+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, participate carefully in the 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](http://bundler.io/conduct.html). By participating in this project you agree to abide by its terms.
diff --git a/ISSUES.md b/ISSUES.md
index 221d04d282..e6278df515 100644
--- a/ISSUES.md
+++ b/ISSUES.md
@@ -10,44 +10,53 @@ discuss features. The bundler issue tracker is only for bugs.**
Instructions for common Bundler uses can be found on the [Bundler documentation site](http://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).
+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).
## Troubleshooting
### Heroku errors
-Please open a ticket with Heroku if you're having trouble deploying. They have a professional support team who can help you resolve Heroku issues far better than the Bundler team can. If the problem that you are having turns out to be a bug in Bundler itself, Heroku support can get the exact details to us.
+Please open a ticket with [Heroku](https://www.heroku.com) if you're having trouble deploying. They have a professional support team who can help you resolve Heroku issues far better than the Bundler team can. If the problem that you are having turns out to be a bug in Bundler itself, [Heroku support](https://www.heroku.com/support) can get the exact details to us.
### Other problems
-First, figure out exactly what it is that you're trying to do. 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](http://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.
+using works with the versions of Ruby and Rubygems that you are using. To see your versions:
-If the instructions don't work, or you can't find any instructions, you can try these troubleshooting steps:
+ # Bundler version
+ bundle -v
- # remove user-specific gems and git repos
+ # Ruby version
+ ruby -v
+
+ # Rubygems version
+ gem -v
+
+If these instructions don't work, or you can't find any appropriate instructions, you can try these troubleshooting steps:
+
+ # Remove user-specific gems and git repos
rm -rf ~/.bundle/ ~/.gem/bundler/ ~/.gems/cache/bundler/
- # remove system-wide git repos and git checkouts
+ # Remove system-wide git repos and git checkouts
rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
- # remove project-specific settings
+ # Remove project-specific settings
rm -rf .bundle/
- # remove project-specific cached gems and repos
+ # Remove project-specific cached gems and repos
rm -rf vendor/cache/
- # remove the saved resolve of the Gemfile
+ # Remove the saved resolve of the Gemfile
rm -rf Gemfile.lock
- # uninstall the rubygems-bundler and open_gem gems
+ # Uninstall the rubygems-bundler and open_gem gems
rvm gemset use global # if using rvm
gem uninstall rubygems-bundler open_gem
- # try to install one more time
+ # Try to install one more time
bundle install
## Reporting unresolved problems
@@ -72,8 +81,8 @@ If you are unable to do that, please include the following information in your r
If your version of Bundler does not have the `bundle env` command, then please include:
- - Your Gemfile
- - Your Gemfile.lock
+ - Your `Gemfile`
+ - Your `Gemfile.lock`
- Your Bundler configuration settings (run `bundle config`)
- What version of bundler you are using (run `bundle -v`)
- What version of Ruby you are using (run `ruby -v`)
@@ -84,10 +93,9 @@ If your version of Bundler does not have the `bundle env` command, then please i
If you are using Rails 2.3, please also include:
- - Your boot.rb file
- - Your preinitializer.rb file
- - Your environment.rb file
-
+ - Your `boot.rb` file
+ - Your `preinitializer.rb` file
+ - Your `environment.rb` file
If you have either `rubygems-bundler` or `open_gem` installed, please try removing them and then following the troubleshooting steps above before opening a new ticket.
diff --git a/Rakefile b/Rakefile
index 647885265a..6cdcfcb904 100644
--- a/Rakefile
+++ b/Rakefile
@@ -34,7 +34,7 @@ namespace :spec do
deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d|
[d.name, d.requirement.to_s]
end]
- deps["rubocop"] ||= "= 0.37.1" if RUBY_VERSION >= "1.9.3" # can't go in the gemspec because of the ruby version requirement
+ deps["rubocop"] ||= "= 0.38.0" if RUBY_VERSION >= "1.9.3" # 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"
@@ -88,7 +88,7 @@ begin
if RUBY_VERSION >= "1.9.3"
# can't go in the gemspec because of the ruby version requirement
- gem "rubocop", "= 0.37.1"
+ gem "rubocop", "= 0.38.0"
require "rubocop/rake_task"
RuboCop::RakeTask.new
end
diff --git a/bin/rubocop b/bin/rubocop
index 01840861cc..bc620424a3 100755
--- a/bin/rubocop
+++ b/bin/rubocop
@@ -10,7 +10,7 @@ bundler_spec.dependencies.each do |dep|
gem dep.name, dep.requirement.to_s
end
-gem "rubocop", "= 0.37.1"
+gem "rubocop", "= 0.38.0"
Gem.finish_resolve if Gem.respond_to?(:finish_resolve)
diff --git a/lib/bundler.rb b/lib/bundler.rb
index dcb151b058..8288f839e1 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -85,7 +85,7 @@ module Bundler
end
def setup(*groups)
- # Just return if all groups are already loaded
+ # Return if all groups are already loaded
return @setup if defined?(@setup)
definition.validate_ruby!
diff --git a/lib/bundler/capistrano.rb b/lib/bundler/capistrano.rb
index 2a4954d964..7b0bbbd6d2 100644
--- a/lib/bundler/capistrano.rb
+++ b/lib/bundler/capistrano.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
# Capistrano task for Bundler.
#
-# Just add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
+# Add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
# Bundler will be activated after each new deployment.
require "bundler/deployment"
require "capistrano/version"
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index e652bfd6e1..9834277cd8 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -259,7 +259,7 @@ module Bundler
desc "cache [OPTIONS]", "Cache all the gems to vendor/cache", :hide => true
method_option "all", :type => :boolean, :banner => "Include all sources (including path and git)."
- method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms, not just the current one"
+ method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one"
method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache."
def cache
require "bundler/cli/cache"
@@ -268,11 +268,11 @@ module Bundler
desc "package [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
method_option "all", :type => :boolean, :banner => "Include all sources (including path and git)."
- method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms, not just the current one"
+ method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one"
method_option "cache-path", :type => :string, :banner =>
"Specify a different cache path than the default (vendor/cache)."
method_option "gemfile", :type => :string, :banner => "Use the specified gemfile instead of Gemfile"
- method_option "no-install", :type => :boolean, :banner => "Don't actually install the gems, just package."
+ method_option "no-install", :type => :boolean, :banner => "Don't install the gems, only the package."
method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache."
method_option "path", :type => :string, :banner =>
"Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine"
@@ -390,7 +390,7 @@ module Bundler
desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory"
method_option "dry-run", :type => :boolean, :default => false, :banner =>
- "Only print out changes, do not actually clean gems"
+ "Only print out changes, do not clean gems"
method_option "force", :type => :boolean, :default => false, :banner =>
"Forces clean even if --path is not set"
def clean
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index 865ac20248..3ef2492c2f 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -21,11 +21,11 @@ module Bundler
validate_cmd!
SharedHelpers.set_bundle_environment
if bin_path = Bundler.which(cmd)
- kernel_load(bin_path, *args) && return if ruby_shebang?(bin_path)
+ kernel_load(bin_path, *args) if ruby_shebang?(bin_path)
# First, try to exec directly to something in PATH
kernel_exec([bin_path, cmd], *args)
else
- # Just exec using the given command
+ # exec using the given command
kernel_exec(cmd, *args)
end
end
@@ -61,6 +61,7 @@ module Bundler
Bundler.ui = nil
require "bundler/setup"
Kernel.load(file)
+ exit
rescue SystemExit
raise
rescue Exception => e # rubocop:disable Lint/RescueException
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 8f27f7cfcc..da201ec5d9 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -42,7 +42,7 @@ module Bundler
ENV["RB_USER_INSTALL"] = "1" if Bundler::FREEBSD
- # Just disable color in deployment mode
+ # Disable color in deployment mode
Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment]
check_for_options_conflicts
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 4296ec630d..111ccadbd3 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -23,11 +23,11 @@ module Bundler
current_dependencies = {}
Bundler.ui.silence { Bundler.load.dependencies.each {|dep| current_dependencies[dep.name] = dep } }
- if gems.empty? && sources.empty?
+ definition = if gems.empty? && sources.empty?
# We're doing a full update
- definition = Bundler.definition(true)
+ Bundler.definition(true)
else
- definition = Bundler.definition(:gems => gems, :sources => sources)
+ Bundler.definition(:gems => gems, :sources => sources)
end
definition_resolution = proc { options["local"] ? definition.resolve_with_cache! : definition.resolve_remotely! }
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index 1a76a88c3d..037da2915e 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -21,7 +21,7 @@ module Bundler
raise GemfileLockNotFound, "This Bundle hasn't been installed yet. " \
"Run `bundle install` to update and install the bundled gems."
end
- # cycle through the requested gems, just to make sure they exist
+ # cycle through the requested gems, to make sure they exist
names = Bundler.locked_gems.specs.map(&:name)
gems.each do |g|
next if names.include?(g)
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 944b8089c1..0ee27b3ae7 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -167,6 +167,12 @@ module Bundler
missing
end
+ def missing_dependencies
+ missing = []
+ resolve.materialize(current_dependencies, missing)
+ missing
+ end
+
def requested_specs
@requested_specs ||= begin
groups = requested_groups
@@ -572,7 +578,7 @@ module Bundler
next if s.source.nil? || @unlock[:sources].include?(s.name)
# If the spec is from a path source and it doesn't exist anymore
- # then we just unlock it.
+ # then we unlock it.
# Path sources have special logic
if s.source.instance_of?(Source::Path)
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index b3b6bfdcce..224e642bd4 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -103,7 +103,7 @@ module Bundler
else
Bundler.ui.warn "Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once.\n" \
"You should probably keep only one of them.\n" \
- "While it's not a problem now, it could cause errors if you change the version of just one of them later."
+ "While it's not a problem now, it could cause errors if you change the version of one of them later."
end
if current.source != dep.source
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index b9c4cc7893..7da22f8ed1 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -282,7 +282,7 @@ module Bundler
end
else
store.set_default_paths
- certs = File.expand_path("../ssl_certs/*.pem", __FILE__)
+ certs = File.expand_path("../ssl_certs/*/*.pem", __FILE__)
Dir.glob(certs).each {|c| store.add_file c }
end
store
diff --git a/lib/bundler/fetcher/base.rb b/lib/bundler/fetcher/base.rb
index f7210bd03d..6714ea2cd7 100644
--- a/lib/bundler/fetcher/base.rb
+++ b/lib/bundler/fetcher/base.rb
@@ -21,7 +21,7 @@ module Bundler
@fetch_uri ||= begin
if remote_uri.host == "rubygems.org"
uri = remote_uri.dup
- uri.host = "bundler.rubygems.org"
+ uri.host = "index.rubygems.org"
uri
else
remote_uri
diff --git a/lib/bundler/fetcher/compact_index.rb b/lib/bundler/fetcher/compact_index.rb
index f249ec1835..c1beee6c75 100644
--- a/lib/bundler/fetcher/compact_index.rb
+++ b/lib/bundler/fetcher/compact_index.rb
@@ -16,7 +16,7 @@ module Bundler
rescue NetworkDownError, CompactIndexClient::Updater::MisMatchedChecksumError => e
raise HTTPError, e.message
rescue AuthenticationRequiredError
- # We got a 401 from the server. Just fail.
+ # Fail since we got a 401 from the server.
raise
rescue HTTPError => e
Bundler.ui.trace(e)
diff --git a/lib/bundler/fetcher/dependency.rb b/lib/bundler/fetcher/dependency.rb
index 274b34eefd..8b41fe9999 100644
--- a/lib/bundler/fetcher/dependency.rb
+++ b/lib/bundler/fetcher/dependency.rb
@@ -10,7 +10,7 @@ module Bundler
rescue NetworkDownError => e
raise HTTPError, e.message
rescue AuthenticationRequiredError
- # We got a 401 from the server. Just fail.
+ # Fail since we got a 401 from the server.
raise
rescue HTTPError
false
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index b453e8e625..f7a10d0035 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -63,7 +63,7 @@ module Bundler
- What happened instead?
- Instead, what actually happened was...
+ Instead, what happened was...
Error details
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 10ba3005d1..fcf68928e4 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -146,9 +146,9 @@ module Bundler
private
# the order that the resolver provides is significant, since
- # dependencies might actually affect the installation of a gem.
+ # dependencies might affect the installation of a gem.
# that said, it's a rare situation (other than rake), and parallel
- # installation is just SO MUCH FASTER. so we let people opt in.
+ # installation is SO MUCH FASTER. so we let people opt in.
def install(options)
force = options["force"]
jobs = 1
@@ -185,7 +185,7 @@ module Bundler
local = Bundler.ui.silence do
begin
tmpdef = Definition.build(Bundler.default_gemfile, Bundler.default_lockfile, nil)
- true unless tmpdef.new_platform? || tmpdef.missing_specs.any?
+ true unless tmpdef.new_platform? || tmpdef.missing_dependencies.any?
rescue BundlerError
end
end
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb
index 441c72108f..a91990d5f5 100644
--- a/lib/bundler/installer/gem_installer.rb
+++ b/lib/bundler/installer/gem_installer.rb
@@ -39,7 +39,7 @@ module Bundler
end
def handle_exception(e)
- # if install hook failed or gem signature is bad, just die
+ # Die if install hook failed or gem signature is bad.
raise e if e.is_a?(Bundler::InstallHookError) || e.is_a?(Bundler::SecurityError)
# other failure, likely a native extension build failure
Bundler.ui.info ""
diff --git a/lib/bundler/mirror.rb b/lib/bundler/mirror.rb
index 4978462bb3..655d2b3d07 100644
--- a/lib/bundler/mirror.rb
+++ b/lib/bundler/mirror.rb
@@ -32,10 +32,10 @@ module Bundler
def parse(key, value)
config = MirrorConfig.new(key, value)
- if config.all?
- mirror = @all
+ mirror = if config.all?
+ @all
else
- mirror = (@mirrors[config.uri] = @mirrors[config.uri] || Mirror.new)
+ (@mirrors[config.uri] = @mirrors[config.uri] || Mirror.new)
end
config.update_mirror(mirror)
end
@@ -177,7 +177,7 @@ module Bundler
# a given mirror.
#
# One mirror may correspond to many different addresses, both
- # because of it having many dns entries or just because
+ # because of it having many dns entries or because
# the network interface is both ipv4 and ipv5
class MirrorSockets
def initialize(mirror)
diff --git a/lib/bundler/psyched_yaml.rb b/lib/bundler/psyched_yaml.rb
index 2c85cb0a53..69d2ae78c5 100644
--- a/lib/bundler/psyched_yaml.rb
+++ b/lib/bundler/psyched_yaml.rb
@@ -5,7 +5,7 @@ begin
rescue LoadError
end if defined?(gem)
-# Psych could just be in the stdlib
+# Psych could be in the stdlib
# but it's too late if Syck is already loaded
begin
require "psych" unless defined?(Syck)
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 4e5ca7d1f8..8a0fdbaeeb 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -361,25 +361,31 @@ module Bundler
# +specs+
def replace_bin_path(specs)
gem_class = (class << Gem; self; end)
- redefine_method(gem_class, :bin_path) do |name, *args|
- exec_name = args.first
-
- return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"
- spec = nil
+ redefine_method(gem_class, :find_spec_for_exe) do |name, *args|
+ exec_name = args.first
- if exec_name
- spec = specs.find {|s| s.executables.include?(exec_name) }
- raise(Gem::Exception, "can't find executable #{exec_name}") unless spec
- unless spec.name == name
- warn "Bundler is using a binstub that was created for a different gem.\n" \
- "This is deprecated, in future versions you may need to `bundle binstub #{name}` " \
- "to work around a system/bundle conflict."
- end
+ spec = if exec_name
+ specs.find {|s| s.executables.include?(exec_name) }
else
- spec = specs.find {|s| s.name == name }
- raise Gem::Exception, "no default executable for #{spec.full_name}" unless exec_name = spec.default_executable
+ specs.find {|s| s.name == name }
+ end
+ raise(Gem::Exception, "can't find executable #{exec_name}") unless spec
+ raise Gem::Exception, "no default executable for #{spec.full_name}" unless exec_name ||= spec.default_executable
+ unless spec.name == name
+ warn "Bundler is using a binstub that was created for a different gem.\n" \
+ "This is deprecated, in future versions you may need to `bundle binstub #{name}` " \
+ "to work around a system/bundle conflict."
end
+ spec
+ end
+
+ redefine_method(gem_class, :bin_path) do |name, *args|
+ exec_name = args.first
+ return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"
+
+ spec = find_spec_for_exe(name, *args)
+ exec_name ||= spec.default_executable
gem_bin = File.join(spec.full_gem_path, spec.bindir, exec_name)
gem_from_path_bin = File.join(File.dirname(spec.loaded_from), spec.bindir, exec_name)
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index 5f1eb130b7..eee4ade45b 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -18,7 +18,7 @@ module Bundler
locked_spec = Bundler.locked_gems.specs.find {|s| s.name == spec.name }
locked_spec_version = locked_spec.version if locked_spec
if locked_spec_version && spec.version != locked_spec_version
- message += " (was #{locked_spec_version})"
+ message += " (#{Bundler.ui.add_color("was #{locked_spec_version}", :green)})"
end
end
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 228ab61a67..7926a7b50a 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -146,7 +146,7 @@ module Bundler
changed
end
- # TODO: actually cache git specs
+ # TODO: cache git specs
def specs(*)
set_local!(app_cache_path) if has_app_cache? && !local?
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index cebb68a700..d8ca36e3f9 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -343,7 +343,7 @@ module Bundler
# because ensuring we have all the gems we need involves downloading
# the gemspecs of those gems, if the non-api sites contain more than
- # about 100 gems, we just treat all sites as non-api for speed.
+ # about 100 gems, we treat all sites as non-api for speed.
allow_api = idx.size < API_REQUEST_LIMIT && dependency_names.size < API_REQUEST_LIMIT
Bundler.ui.debug "Need to query more than #{API_REQUEST_LIMIT} gems." \
" Downloading full index instead..." unless allow_api
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 5ec546e8e3..deb89a30fe 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -7,7 +7,7 @@ module Bundler
extend Forwardable
include TSort, Enumerable
- def_delegators :@specs, :<<, :length, :add, :remove
+ def_delegators :@specs, :<<, :length, :add, :remove, :size
def_delegators :sorted, :each
def initialize(specs)
diff --git a/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem b/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem
deleted file mode 100644
index 6fbdf52b17..0000000000
--- a/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem
+++ /dev/null
@@ -1,32 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFdDCCBFygAwIBAgIQJ2buVutJ846r13Ci/ITeIjANBgkqhkiG9w0BAQwFADBv
-MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
-ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
-eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow
-gYUxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
-BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMSswKQYD
-VQQDEyJDT01PRE8gUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkq
-hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAkehUktIKVrGsDSTdxc9EZ3SZKzejfSNw
-AHG8U9/E+ioSj0t/EFa9n3Byt2F/yUsPF6c947AEYe7/EZfH9IY+Cvo+XPmT5jR6
-2RRr55yzhaCCenavcZDX7P0N+pxs+t+wgvQUfvm+xKYvT3+Zf7X8Z0NyvQwA1onr
-ayzT7Y+YHBSrfuXjbvzYqOSSJNpDa2K4Vf3qwbxstovzDo2a5JtsaZn4eEgwRdWt
-4Q08RWD8MpZRJ7xnw8outmvqRsfHIKCxH2XeSAi6pE6p8oNGN4Tr6MyBSENnTnIq
-m1y9TBsoilwie7SrmNnu4FGDwwlGTm0+mfqVF9p8M1dBPI1R7Qu2XK8sYxrfV8g/
-vOldxJuvRZnio1oktLqpVj3Pb6r/SVi+8Kj/9Lit6Tf7urj0Czr56ENCHonYhMsT
-8dm74YlguIwoVqwUHZwK53Hrzw7dPamWoUi9PPevtQ0iTMARgexWO/bTouJbt7IE
-IlKVgJNp6I5MZfGRAy1wdALqi2cVKWlSArvX31BqVUa/oKMoYX9w0MOiqiwhqkfO
-KJwGRXa/ghgntNWutMtQ5mv0TIZxMOmm3xaG4Nj/QN370EKIf6MzOi5cHkERgWPO
-GHFrK+ymircxXDpqR+DDeVnWIBqv8mqYqnK8V0rSS527EPywTEHl7R09XiidnMy/
-s1Hap0flhFMCAwEAAaOB9DCB8TAfBgNVHSMEGDAWgBStvZh6NLQm9/rEJlTvA73g
-JMtUGjAdBgNVHQ4EFgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQD
-AgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAAMEQGA1UdHwQ9
-MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9BZGRUcnVzdEV4dGVy
-bmFsQ0FSb290LmNybDA1BggrBgEFBQcBAQQpMCcwJQYIKwYBBQUHMAGGGWh0dHA6
-Ly9vY3NwLnVzZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggEBAGS/g/FfmoXQ
-zbihKVcN6Fr30ek+8nYEbvFScLsePP9NDXRqzIGCJdPDoCpdTPW6i6FtxFQJdcfj
-Jw5dhHk3QBN39bSsHNA7qxcS1u80GH4r6XnTq1dFDK8o+tDb5VCViLvfhVdpfZLY
-Uspzgb8c8+a4bmYRBbMelC1/kZWSWfFMzqORcUx8Rww7Cxn2obFshj5cqsQugsv5
-B5a6SE2Q8pTIqXOi6wZ7I53eovNNVZ96YUWYGGjHXkBrI/V5eu+MtWuLt29G9Hvx
-PUsE2JOAWVrgQSQdso8VYFhH2+9uRv0V9dlfmrPb2LjkQLPNlzmuhbsdjrzch5vR
-pu/xO28QOG8=
------END CERTIFICATE-----
diff --git a/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem b/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem
deleted file mode 100644
index 87676acf5f..0000000000
--- a/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
-A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
-cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
-MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
-BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
-YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
-ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
-BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
-I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
-CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
-lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
-AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
------END CERTIFICATE-----
diff --git a/lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem b/lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem
deleted file mode 100644
index 4b8939ccba..0000000000
--- a/lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
-VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
-ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
-KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
-ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
-MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
-ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
-b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
-bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
-U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
-A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
-I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3
-wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC
-AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb
-oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5
-BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p
-dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
-MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
-b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
-dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
-MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
-E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
-MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
-hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
-95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
-2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
------END CERTIFICATE-----
diff --git a/lib/bundler/ssl_certs/GeoTrustGlobalCA.pem b/lib/bundler/ssl_certs/GeoTrustGlobalCA.pem
deleted file mode 100644
index bcb2529761..0000000000
--- a/lib/bundler/ssl_certs/GeoTrustGlobalCA.pem
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
-MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
-YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
-EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
-R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
-9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
-fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
-iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
-1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
-bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
-MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
-ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
-uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
-Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
-tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
-PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
-hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
-5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
------END CERTIFICATE-----
diff --git a/lib/bundler/ssl_certs/certificate_manager.rb b/lib/bundler/ssl_certs/certificate_manager.rb
index 76639a0cf1..f858b1e3c1 100644
--- a/lib/bundler/ssl_certs/certificate_manager.rb
+++ b/lib/bundler/ssl_certs/certificate_manager.rb
@@ -48,7 +48,7 @@ module Bundler
private
def certificates_in(path)
- Dir[File.join(path, "*.pem")].sort
+ Dir[File.join(path, "*/*.pem")].sort
end
def store
diff --git a/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRoot.pem b/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRoot.pem
new file mode 100644
index 0000000000..e0885addbc
--- /dev/null
+++ b/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRoot.pem
@@ -0,0 +1,18 @@
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx
+GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds
+b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV
+BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD
+VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa
+DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc
+THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb
+Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP
+c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX
+gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
+HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF
+AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj
+Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG
+j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH
+hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC
+X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
+-----END CERTIFICATE-----
diff --git a/lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem b/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem
index 9e6810ab70..9e6810ab70 100644
--- a/lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem
+++ b/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem
diff --git a/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem b/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot-2048.pem
index 20585f1c01..20585f1c01 100644
--- a/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem
+++ b/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot-2048.pem
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index 425ffae332..1317b1838a 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -17,6 +17,10 @@ module Bundler
@warning_history = []
end
+ def add_color(string, color)
+ @shell.set_color(string, color)
+ end
+
def info(msg, newline = nil)
tell_me(msg, nil, newline) if level("info")
end
diff --git a/lib/bundler/ui/silent.rb b/lib/bundler/ui/silent.rb
index 9f387d9e9f..af512eced3 100644
--- a/lib/bundler/ui/silent.rb
+++ b/lib/bundler/ui/silent.rb
@@ -2,6 +2,9 @@
module Bundler
module UI
class Silent
+ def add_color(string, color)
+ end
+
def info(message, newline = nil)
end
diff --git a/lib/bundler/vlad.rb b/lib/bundler/vlad.rb
index d017ca475a..db78f84baa 100644
--- a/lib/bundler/vlad.rb
+++ b/lib/bundler/vlad.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
# Vlad task for Bundler.
#
-# Just add "require 'bundler/vlad'" in your Vlad deploy.rb, and
+# Add "require 'bundler/vlad'" in your Vlad deploy.rb, and
# include the vlad:bundle:install task in your vlad:deploy task.
require "bundler/deployment"
diff --git a/man/bundle-install.ronn b/man/bundle-install.ronn
index 4f960f4948..efbf06d136 100644
--- a/man/bundle-install.ronn
+++ b/man/bundle-install.ronn
@@ -174,7 +174,7 @@ will cause an error when the Gemfile(5) is modified.
3. Gems are installed to `vendor/bundle` not your default system location
In development, it's convenient to share the gems used in your
- application with other applications and other scripts run on
+ application with other applications and other scripts that run on
the system.
In deployment, isolation is a more important default. In addition,
@@ -195,7 +195,7 @@ that case, Bundler will stage everything in a temporary directory,
then ask you for your `sudo` password in order to copy the gems into
their system location.
-From your perspective, this is identical to installing them gems
+From your perspective, this is identical to installing the gems
directly into the system.
You should never use `sudo bundle install`. This is because several
@@ -207,7 +207,7 @@ other steps in `bundle install` must be performed as the current user:
Of these three, the first two could theoretically be performed by
`chown`ing the resulting files to `$SUDO_USER`. The third, however,
-can only be performed by actually invoking the `git` command as
+can only be performed by invoking the `git` command as
the current user. Therefore, git gems are downloaded and installed
into `~/.bundle` rather than $GEM_HOME or $BUNDLE_PATH.
@@ -266,7 +266,7 @@ This also means that you cannot include different versions of the same
gem in different groups, because doing so would result in different
sets of dependencies used in development and production. Because of
the vagaries of the dependency resolution process, this usually
-affects more than just the gems you list in your Gemfile(5), and can
+affects more than the gems you list in your Gemfile(5), and can
(surprisingly) radically change the gems you are using.
## REMEMBERED OPTIONS
@@ -390,7 +390,7 @@ which other gems in the Gemfile(5) still depend on, run
`Summary`: In general, after making a change to the Gemfile(5) , you
should first try to run `bundle install`, which will guarantee that no
-other gems in the Gemfile(5) are impacted by the change. If that
+other gem in the Gemfile(5) is impacted by the change. If that
does not work, run [bundle update(1)][bundle-update].
## SEE ALSO
diff --git a/man/bundle-package.ronn b/man/bundle-package.ronn
index 8a6b439cd5..eacb83b54d 100644
--- a/man/bundle-package.ronn
+++ b/man/bundle-package.ronn
@@ -20,9 +20,10 @@ via the `--all` option. Once used, the `--all` option will be remembered.
## SUPPORT FOR MULTIPLE PLATFORMS
When using gems that have different packages for different platforms, Bundler
-1.8 and newer support caching of gems for other platforms in `vendor/cache`.
-This needs to be enabled via the `--all-platforms` option. This setting will be
-remembered in your local bundler configuration.
+1.8 and newer support caching of gems for other platforms where the Gemfile
+has been resolved (i.e. present in the lockfile) in `vendor/cache`. This needs
+to be enabled via the `--all-platforms` option. This setting will be remembered
+in your local bundler configuration.
## REMOTE FETCHING
@@ -43,12 +44,12 @@ to JRuby and run `bundle install`, bundler is forced to check to
see whether a `"java"` platformed `nokogiri` exists.
Even though the `nokogiri` gem for the Ruby platform is
-_technically_ acceptable on JRuby, it actually has a C extension
+_technically_ acceptable on JRuby, it has a C extension
that does not run on JRuby. As a result, bundler will, by default,
still connect to `rubygems.org` to check whether it has a version
of one of your gems more specific to your platform.
-This problem is also not just limited to the `"java"` platform.
+This problem is also not limited to the `"java"` platform.
A similar (common) problem can happen when developing on Windows
and deploying to Linux, or even when developing on OSX and
deploying to Linux.
@@ -56,7 +57,7 @@ deploying to Linux.
If you know for sure that the gems packaged in `vendor/cache`
are appropriate for the platform you are on, you can run
`bundle install --local` to skip checking for more appropriate
-gems, and just use the ones in `vendor/cache`.
+gems, and use the ones in `vendor/cache`.
One way to be sure that you have the right platformed versions
of all your gems is to run `bundle package` on an identical
diff --git a/man/bundle-platform.ronn b/man/bundle-platform.ronn
index 922a9f1a09..b5d3283fb6 100644
--- a/man/bundle-platform.ronn
+++ b/man/bundle-platform.ronn
@@ -38,5 +38,5 @@ match the running Ruby VM, it will tell you what part does not.
## OPTIONS
* `--ruby`:
- It will just display the ruby directive information, so you don't have to
+ It will display the ruby directive information, so you don't have to
parse it from the Gemfile(5).
diff --git a/man/bundle-update.ronn b/man/bundle-update.ronn
index b9900e3b50..d38c9d2f36 100644
--- a/man/bundle-update.ronn
+++ b/man/bundle-update.ronn
@@ -79,8 +79,8 @@ all of the dependencies, all the way down, and install what you need:
Bundle complete! 2 Gemfile dependencies, 26 gems total.
Use `bundle show [gemname]` to see where a bundled gem is installed.
-As you can see, even though you have just two gems in the Gemfile(5), your application
-actually needs 26 different gems in order to run. Bundler remembers the exact versions
+As you can see, even though you have two gems in the Gemfile(5), your application
+needs 26 different gems in order to run. Bundler remembers the exact versions
it installed in `Gemfile.lock`. The next time you run [bundle install(1)][bundle-install], bundler skips
the dependency resolution and installs the same gems as it installed last time.
diff --git a/man/bundle.ronn b/man/bundle.ronn
index f81af972d3..bd01276ff0 100644
--- a/man/bundle.ronn
+++ b/man/bundle.ronn
@@ -16,10 +16,10 @@ started, and Gemfile(5) for more information on the `Gemfile` format.
## OPTIONS
* `--no-color`:
- Prints all output without color
+ Print all output without color
* `--verbose`:
- Prints out additional logging information
+ Print out additional logging information
## BUNDLE COMMANDS
@@ -44,7 +44,7 @@ We divide `bundle` subcommands into primary commands and utilities.
Specify and read configuration options for bundler
* `bundle help(1)`:
- Displays detailed help for each subcommand
+ Display detailed help for each subcommand
## UTILITIES
@@ -80,10 +80,10 @@ We divide `bundle` subcommands into primary commands and utilities.
Create a simple gem, suitable for development with bundler
* [bundle platform(1)][bundle-platform]:
- Displays platform compatibility information
+ Display platform compatibility information
* `bundle clean(1)`:
- Cleans up unused gems in your bundler directory
+ Clean up unused gems in your bundler directory
## PLUGINS
diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn
index be580d9c90..b707e2a5c5 100644
--- a/man/gemfile.5.ronn
+++ b/man/gemfile.5.ronn
@@ -35,9 +35,9 @@ this warning, by using the [`:source` option](#SOURCE-source-) or a
### CREDENTIALS (#credentials)
-Some gem sources require a username and password. Use `bundle config` to set
-the username and password for any sources that need it. The command must be run
-once on each computer that will install the Gemfile, but this keeps the
+Some gem sources require a username and password. Use [bundle config(1)][bundle-config] to set
+the username and password for any of the sources that need it. The command must
+be run once on each computer that will install the Gemfile, but this keeps the
credentials from being stored in plain text in version control.
bundle config gems.example.com user:password
@@ -137,10 +137,10 @@ The Bundler runtime allows its two main methods, `Bundler.setup` and
Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
# require requires all of the gems in the specified groups
- Bundler.require # defaults to just the _default_ group
+ Bundler.require # defaults to the _default_ group
Bundler.require(:default) # identical
Bundler.require(:default, :test) # requires the _default_ and _test_ groups
- Bundler.require(:test) # requires just the _test_ group
+ Bundler.require(:test) # requires the _test_ group
The Bundler CLI allows you to specify a list of groups whose gems `bundle install` should
not install with the `--without` option. To specify multiple groups to ignore, specify a
@@ -155,7 +155,7 @@ without any `--without option`, bundler will recall it.
Also, calling `Bundler.setup` with no parameters, or calling `require "bundler/setup"`
will setup all groups except for the ones you excluded via `--without` (since they
-are obviously not available).
+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.
@@ -353,7 +353,7 @@ currently expands to an insecure `git://` URL. This allows a
man-in-the-middle attacker to compromise your system.
If the git repository you want to use is hosted on GitHub and is public, you can use the
-:github shorthand to specify just the github username and repository name (without the
+:github shorthand to specify the github username and repository name (without the
trailing ".git"), separated by a slash. If both the username and repository name are the
same, you can omit one.
@@ -369,7 +369,7 @@ Since the `github` method is a specialization of `git_source`, it accepts a `:br
### GIST (:gist)
If the git repository you want to use is hosted as a Github Gist and is public, you can use
-the :gist shorthand to specify just the gist identifier (without the trailing ".git").
+the :gist shorthand to specify the gist identifier (without the trailing ".git").
gem "the_hatch", :gist => "4815162342"
@@ -382,7 +382,7 @@ Since the `gist` method is a specialization of `git_source`, it accepts a `:bran
### BITBUCKET (:bitbucket)
If the git repository you want to use is hosted on Bitbucket and is public, you can use the
-:bitbucket shorthand to specify just the bitbucket username and repository name (without the
+:bitbucket shorthand to specify the bitbucket username and repository name (without the
trailing ".git"), separated by a slash. If both the username and repository name are the
same, you can omit one.
diff --git a/spec/bundler/fetcher/base_spec.rb b/spec/bundler/fetcher/base_spec.rb
index 5a8c7647b9..bd1c03660c 100644
--- a/spec/bundler/fetcher/base_spec.rb
+++ b/spec/bundler/fetcher/base_spec.rb
@@ -42,9 +42,9 @@ describe Bundler::Fetcher::Base do
before { allow(subject).to receive(:remote_uri).and_return(remote_uri_obj) }
context "when the remote uri's host is rubygems.org" do
- it "should create a copy of the remote uri with bundler.rubygems.org as the host" do
+ it "should create a copy of the remote uri with index.rubygems.org as the host" do
fetched_uri = subject.fetch_uri
- expect(fetched_uri.host).to eq("bundler.rubygems.org")
+ expect(fetched_uri.host).to eq("index.rubygems.org")
expect(fetched_uri).to_not be(remote_uri_obj)
end
end
diff --git a/spec/bundler/fetcher/downloader_spec.rb b/spec/bundler/fetcher/downloader_spec.rb
index ebfaf90534..bf6abd115a 100644
--- a/spec/bundler/fetcher/downloader_spec.rb
+++ b/spec/bundler/fetcher/downloader_spec.rb
@@ -12,7 +12,7 @@ describe Bundler::Fetcher::Downloader do
describe "fetch" do
let(:counter) { 0 }
let(:httpv) { "1.1" }
- let(:http_response) { nil }
+ let(:http_response) { double(:response) }
before do
allow(subject).to receive(:request).with(uri, options).and_return(http_response)
diff --git a/spec/bundler/source_spec.rb b/spec/bundler/source_spec.rb
index 1b4e4bdde9..fc28220c7d 100644
--- a/spec/bundler/source_spec.rb
+++ b/spec/bundler/source_spec.rb
@@ -58,7 +58,7 @@ describe Bundler::Source do
let(:locked_gem) { double(:locked_gem, :name => "nokogiri", :version => "< 1.5") }
it "should return a string with the spec name and version and locked spec version" do
- expect(subject.version_message(spec)).to eq("nokogiri >= 1.6 (was < 1.5)")
+ expect(subject.version_message(spec)).to eq("nokogiri >= 1.6 (\e[32mwas < 1.5\e[0m)")
end
end
end
diff --git a/spec/bundler/spec_set_spec.rb b/spec/bundler/spec_set_spec.rb
new file mode 100644
index 0000000000..29d81cb30c
--- /dev/null
+++ b/spec/bundler/spec_set_spec.rb
@@ -0,0 +1,43 @@
+# frozen_string_literal: true
+require "spec_helper"
+
+describe Bundler::SpecSet do
+ let(:specs) do
+ [
+ build_spec("a", "1.0"),
+ build_spec("b", "1.0"),
+ build_spec("c", "1.1") do |s|
+ s.dep "a", "< 2.0"
+ s.dep "e", "> 0"
+ end,
+ build_spec("d", "2.0") do |s|
+ s.dep "a", "1.0"
+ s.dep "c", "~> 1.0"
+ end,
+ build_spec("e", "1.0.0.pre.1"),
+ ].flatten
+ end
+ subject { described_class.new(specs) }
+
+ context "enumerable methods" do
+ it "has a length" do
+ expect(subject.length).to eq(5)
+ end
+
+ it "has a size" do
+ expect(subject.size).to eq(5)
+ end
+ end
+
+ describe "#to_a" do
+ it "returns the specs in order" do
+ expect(subject.to_a.map(&:full_name)).to eq %w(
+ a-1.0
+ b-1.0
+ e-1.0.0.pre.1
+ c-1.1
+ d-2.0
+ )
+ end
+ end
+end
diff --git a/spec/bundler/ssl_certs/certificate_manager_spec.rb b/spec/bundler/ssl_certs/certificate_manager_spec.rb
index 5a1650b432..7ac8d66791 100644
--- a/spec/bundler/ssl_certs/certificate_manager_spec.rb
+++ b/spec/bundler/ssl_certs/certificate_manager_spec.rb
@@ -3,9 +3,9 @@ require "spec_helper"
require "bundler/ssl_certs/certificate_manager"
describe Bundler::SSLCerts::CertificateManager do
- let(:rubygems_path) { root }
- let(:stub_cert) { File.join(root.to_s, "lib", "rubygems", "ssl_certs", "ssl-cert.pem") }
- let(:rubygems_certs_dir) { File.join(root.to_s, "lib", "rubygems", "ssl_certs") }
+ 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") }
subject { described_class.new(rubygems_path) }
@@ -37,13 +37,13 @@ describe Bundler::SSLCerts::CertificateManager do
end
it "should set bundler_certs as the paths of the bundler ssl certs" do
- expect(subject.bundler_certs).to include(File.join(root, "lib/bundler/ssl_certs/AddTrustExternalCARoot.pem"))
- expect(subject.bundler_certs).to include(File.join(root, "lib/bundler/ssl_certs/GeoTrustGlobalCA.pem"))
+ expect(subject.bundler_certs).to include(File.join(root, "lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem"))
+ expect(subject.bundler_certs).to include(File.join(root, "lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRoot.pem"))
end
context "when rubygems_path is not nil" do
it "should set rubygems_certs" do
- expect(subject.rubygems_certs).to include(File.join(root, "lib", "rubygems", "ssl_certs", "ssl-cert.pem"))
+ expect(subject.rubygems_certs).to include(File.join(root, "lib", "rubygems", "ssl_certs", "rubygems.org", "ssl-cert.pem"))
end
end
end
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index be2f8aa2a5..29f5927c14 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -128,13 +128,13 @@ describe "bundle exec" do
G
end
- bundle "exec rackup", :expect_err => true
+ bundle! "exec rackup", :expect_err => true
expect(out).to eq("0.9.1")
expect(err).to match("deprecated")
Dir.chdir bundled_app2 do
- bundle "exec rackup"
+ bundle! "exec rackup"
expect(out).to eq("1.0.0")
end
end
diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb
index a74e9175d1..04ec15e215 100644
--- a/spec/install/gems/standalone_spec.rb
+++ b/spec/install/gems/standalone_spec.rb
@@ -306,15 +306,31 @@ describe "bundle install --standalone" do
describe "with gem that has an invalid gemspec" do
before do
+ build_git "bar", :gemspec => false do |s|
+ s.write "lib/bar/version.rb", %(BAR_VERSION = '1.0')
+ s.write "bar.gemspec", <<-G
+ lib = File.expand_path('../lib/', __FILE__)
+ $:.unshift lib unless $:.include?(lib)
+ require 'bar/version'
+
+ Gem::Specification.new do |s|
+ s.name = 'bar'
+ s.version = BAR_VERSION
+ s.summary = 'Bar'
+ s.files = Dir["lib/**/*.rb"]
+ s.author = 'Anonymous'
+ s.require_path = [1,2]
+ end
+ G
+ end
install_gemfile <<-G, :standalone => true
- source 'https://rubygems.org'
- gem "resque-scheduler", "2.2.0"
+ gem "bar", :git => "#{lib_path("bar-1.0")}"
G
end
it "outputs a helpful error message" do
expect(out).to include("You have one or more invalid gemspecs that need to be fixed.")
- expect(out).to include("resque-scheduler 2.2.0 has an invalid gemspec")
+ expect(out).to include("bar 1.0 has an invalid gemspec")
end
end
end
diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index f3a1983740..401da1b1d3 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -14,5 +14,31 @@ describe "bundle install" do
expect(out).to include("Using foo 1.0 from #{lib_path("foo")} (at master@#{revision_for(lib_path("foo"))[0..6]})")
should_be_installed "foo 1.0"
end
+
+ it "should check out git repos that are missing but not being installed" do
+ build_git "foo"
+
+ gemfile <<-G
+ gem "foo", :git => "file://#{lib_path("foo-1.0")}", :group => :development
+ G
+
+ lockfile <<-L
+ GIT
+ remote: file://#{lib_path("foo-1.0")}
+ specs:
+ foo (1.0)
+
+ PLATFORMS
+ ruby
+
+ DEPENDENCIES
+ foo!
+ L
+
+ bundle "install --path=vendor/bundle --without development"
+
+ expect(out).to include("Bundle complete!")
+ expect(vendored_gems("bundler/gems/foo-1.0-#{revision_for(lib_path("foo-1.0"))[0..11]}")).to be_directory
+ end
end
end
diff --git a/spec/other/ssl_cert_spec.rb b/spec/other/ssl_cert_spec.rb
index b1b27ebb89..e1a134c919 100644
--- a/spec/other/ssl_cert_spec.rb
+++ b/spec/other/ssl_cert_spec.rb
@@ -3,15 +3,10 @@ require "spec_helper"
require "bundler/ssl_certs/certificate_manager"
describe "SSL Certificates", :rubygems_master do
- it "are up to date with Rubygems" do
- rubygems = File.expand_path("../../../tmp/rubygems", __FILE__)
- manager = Bundler::SSLCerts::CertificateManager.new(rubygems)
- expect(manager).to be_up_to_date
- end
-
hosts = %w(
- rubygems.global.ssl.fastly.net
rubygems.org
+ index.rubygems.org
+ rubygems.global.ssl.fastly.net
staging.rubygems.org
)
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index c68bfa1533..ce03839c17 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -40,6 +40,30 @@ describe "The library itself" do
"#{filename} has spaces on the EOL on lines #{failing_lines.join(", ")}"
end
+ def check_for_expendable_words(filename)
+ failing_line_message = []
+ useless_words = /\b(actually|obviously|just|clearly|basically|really)\b/i
+
+ File.readlines(filename).each_with_index do |line, number|
+ next unless word_found = useless_words.match(line)
+ failing_line_message << "#{filename} has '#{word_found}' on line #{number + 1}. Avoid using these kinds of weak modifiers."
+ end
+
+ failing_line_message unless failing_line_message.empty?
+ end
+
+ def check_for_specific_pronouns(filename)
+ failing_line_message = []
+ specific_pronouns = /\b(he|she|his|hers|him|her|himself|herself)\b/i
+
+ File.readlines(filename).each_with_index do |line, number|
+ next unless word_found = specific_pronouns.match(line)
+ failing_line_message << "#{filename} has '#{word_found}' on line #{number + 1}. Use more generic pronouns in documentation."
+ end
+
+ failing_line_message unless failing_line_message.empty?
+ end
+
RSpec::Matchers.define :be_well_formed do
match(&:empty?)
@@ -73,6 +97,32 @@ describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
+ it "maintains language quality of the documentation" do
+ included = /ronn/
+ error_messages = []
+ Dir.chdir(File.expand_path("../../man", __FILE__)) do
+ `git ls-files -z`.split("\x0").each do |filename|
+ next unless filename =~ included
+ error_messages << check_for_expendable_words(filename)
+ error_messages << check_for_specific_pronouns(filename)
+ end
+ end
+ expect(error_messages.compact).to be_well_formed
+ end
+
+ it "maintains language quality of sentences used in source code" do
+ error_messages = []
+ exempt = /vendor/
+ Dir.chdir(File.expand_path("../../lib", __FILE__)) do
+ `git ls-files -z`.split("\x0").each do |filename|
+ next if filename =~ exempt
+ error_messages << check_for_expendable_words(filename)
+ error_messages << check_for_specific_pronouns(filename)
+ end
+ end
+ expect(error_messages.compact).to be_well_formed
+ end
+
it "can still be built" do
Dir.chdir(root) do
`gem build bundler.gemspec`
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb
index 2f0ba9866a..89de134cc4 100644
--- a/spec/realworld/edgecases_spec.rb
+++ b/spec/realworld/edgecases_spec.rb
@@ -220,4 +220,13 @@ describe "real world edgecases", :realworld => true, :sometimes => true do
expect(err).to eq("")
expect(exitstatus).to eq(0) if exitstatus
end
+
+ it "outputs a helpful error message when gems have invalid gemspecs" do
+ install_gemfile <<-G, :standalone => true
+ source 'https://rubygems.org'
+ gem "resque-scheduler", "2.2.0"
+ G
+ expect(out).to include("You have one or more invalid gemspecs that need to be fixed.")
+ expect(out).to include("resque-scheduler 2.2.0 has an invalid gemspec")
+ end
end