bundler 2.2.27 → 2.2.31
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +52 -1
- data/README.md +1 -1
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/gem.rb +86 -8
- data/lib/bundler/cli/info.rb +11 -4
- data/lib/bundler/cli/issue.rb +4 -3
- data/lib/bundler/cli/remove.rb +1 -2
- data/lib/bundler/cli.rb +4 -1
- data/lib/bundler/compact_index_client.rb +2 -2
- data/lib/bundler/definition.rb +14 -9
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/errors.rb +18 -2
- data/lib/bundler/fetcher.rb +2 -1
- data/lib/bundler/friendly_errors.rb +5 -30
- data/lib/bundler/gem_helper.rb +6 -17
- data/lib/bundler/lockfile_parser.rb +1 -0
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +1 -1
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +1 -1
- data/lib/bundler/man/bundle-config.1 +3 -3
- data/lib/bundler/man/bundle-config.1.ronn +2 -2
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +14 -1
- data/lib/bundler/man/bundle-gem.1.ronn +16 -0
- data/lib/bundler/man/bundle-info.1 +1 -1
- data/lib/bundler/man/bundle-init.1 +1 -1
- data/lib/bundler/man/bundle-inject.1 +1 -1
- data/lib/bundler/man/bundle-install.1 +1 -1
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-open.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +1 -1
- data/lib/bundler/man/bundle-show.1 +1 -1
- data/lib/bundler/man/bundle-update.1 +1 -1
- data/lib/bundler/man/bundle-viz.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -1
- data/lib/bundler/man/gemfile.5 +1 -1
- data/lib/bundler/rubygems_ext.rb +4 -0
- data/lib/bundler/rubygems_gem_installer.rb +20 -4
- data/lib/bundler/rubygems_integration.rb +26 -9
- data/lib/bundler/runtime.rb +2 -2
- data/lib/bundler/source/git/git_proxy.rb +5 -2
- data/lib/bundler/source/git.rb +22 -4
- data/lib/bundler/source/rubygems.rb +36 -72
- data/lib/bundler/spec_set.rb +1 -1
- data/lib/bundler/templates/newgem/Gemfile.tt +5 -2
- data/lib/bundler/templates/newgem/Rakefile.tt +5 -1
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +13 -13
- data/lib/bundler/templates/newgem/standard.yml.tt +4 -0
- data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +57 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +39 -74
- data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
- data/lib/bundler/vendor/molinillo/LICENSE +9 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +2 -2
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
- data/lib/bundler/vendor/thor/LICENSE.md +20 -0
- data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
- data/lib/bundler/vendor/tsort/lib/tsort.rb +453 -0
- data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
- data/lib/bundler/vendored_tsort.rb +4 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/worker.rb +2 -2
- data/lib/bundler.rb +2 -1
- metadata +18 -7
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +0 -66
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-BINSTUBS" "1" "
|
4
|
+
.TH "BUNDLE\-BINSTUBS" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CACHE" "1" "
|
4
|
+
.TH "BUNDLE\-CACHE" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CHECK" "1" "
|
4
|
+
.TH "BUNDLE\-CHECK" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CONFIG" "1" "
|
4
|
+
.TH "BUNDLE\-CONFIG" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-config\fR \- Set bundler configuration options
|
@@ -462,13 +462,13 @@ export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x\-oauth\-basic
|
|
462
462
|
.IP "" 0
|
463
463
|
.
|
464
464
|
.P
|
465
|
-
Note that any configured credentials will be redacted by informative commands such as \fBbundle config list\fR or \fBbundle config get\fR, unless you use the \fB\-\-parseable\fR flag\. This is to avoid
|
465
|
+
Note that any configured credentials will be redacted by informative commands such as \fBbundle config list\fR or \fBbundle config get\fR, unless you use the \fB\-\-parseable\fR flag\. This is to avoid unintentionally leaking credentials when copy\-pasting bundler output\.
|
466
466
|
.
|
467
467
|
.P
|
468
468
|
Also note that to guarantee a sane mapping between valid environment variable names and valid host names, bundler makes the following transformations:
|
469
469
|
.
|
470
470
|
.IP "\(bu" 4
|
471
|
-
Any \fB\-\fR characters in a host name are mapped to a triple dash (\fB___\fR) in the corresponding
|
471
|
+
Any \fB\-\fR characters in a host name are mapped to a triple dash (\fB___\fR) in the corresponding environment variable\.
|
472
472
|
.
|
473
473
|
.IP "\(bu" 4
|
474
474
|
Any \fB\.\fR characters in a host name are mapped to a double dash (\fB__\fR) in the corresponding environment variable\.
|
@@ -367,14 +367,14 @@ where you can use personal OAuth tokens:
|
|
367
367
|
|
368
368
|
Note that any configured credentials will be redacted by informative commands
|
369
369
|
such as `bundle config list` or `bundle config get`, unless you use the
|
370
|
-
`--parseable` flag. This is to avoid
|
370
|
+
`--parseable` flag. This is to avoid unintentionally leaking credentials when
|
371
371
|
copy-pasting bundler output.
|
372
372
|
|
373
373
|
Also note that to guarantee a sane mapping between valid environment variable
|
374
374
|
names and valid host names, bundler makes the following transformations:
|
375
375
|
|
376
376
|
* Any `-` characters in a host name are mapped to a triple dash (`___`) in the
|
377
|
-
corresponding
|
377
|
+
corresponding environment variable.
|
378
378
|
|
379
379
|
* Any `.` characters in a host name are mapped to a double dash (`__`) in the
|
380
380
|
corresponding environment variable.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-GEM" "1" "
|
4
|
+
.TH "BUNDLE\-GEM" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
|
@@ -90,6 +90,19 @@ When Bundler is configured to not generate CI files, an interactive prompt will
|
|
90
90
|
When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
|
91
91
|
.
|
92
92
|
.TP
|
93
|
+
\fB\-\-linter\fR, \fB\-\-linter=rubocop\fR, \fB\-\-linter=standard\fR
|
94
|
+
Specify the linter and code formatter that Bundler should add to the project\'s development dependencies\. Acceptable values are \fBrubocop\fR and \fBstandard\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
|
95
|
+
.
|
96
|
+
.IP
|
97
|
+
When Bundler is configured to add a linter, this defaults to Bundler\'s global config setting \fBgem\.linter\fR\.
|
98
|
+
.
|
99
|
+
.IP
|
100
|
+
When Bundler is configured not to add a linter, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
|
101
|
+
.
|
102
|
+
.IP
|
103
|
+
When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
|
104
|
+
.
|
105
|
+
.TP
|
93
106
|
\fB\-e\fR, \fB\-\-edit[=EDITOR]\fR
|
94
107
|
Open the resulting GEM_NAME\.gemspec in EDITOR, or the default editor if not specified\. The default is \fB$BUNDLER_EDITOR\fR, \fB$VISUAL\fR, or \fB$EDITOR\fR\.
|
95
108
|
.
|
@@ -92,6 +92,22 @@ configuration file using the following names:
|
|
92
92
|
the answer will be saved in Bundler's global config for future `bundle gem`
|
93
93
|
use.
|
94
94
|
|
95
|
+
* `--linter`, `--linter=rubocop`, `--linter=standard`:
|
96
|
+
Specify the linter and code formatter that Bundler should add to the
|
97
|
+
project's development dependencies. Acceptable values are `rubocop` and
|
98
|
+
`standard`. A configuration file will be generated in the project directory.
|
99
|
+
Given no option is specified:
|
100
|
+
|
101
|
+
When Bundler is configured to add a linter, this defaults to Bundler's
|
102
|
+
global config setting `gem.linter`.
|
103
|
+
|
104
|
+
When Bundler is configured not to add a linter, an interactive prompt
|
105
|
+
will be displayed and the answer will be used for the current rubygem project.
|
106
|
+
|
107
|
+
When Bundler is unconfigured, an interactive prompt will be displayed and
|
108
|
+
the answer will be saved in Bundler's global config for future `bundle gem`
|
109
|
+
use.
|
110
|
+
|
95
111
|
* `-e`, `--edit[=EDITOR]`:
|
96
112
|
Open the resulting GEM_NAME.gemspec in EDITOR, or the default editor if not
|
97
113
|
specified. The default is `$BUNDLER_EDITOR`, `$VISUAL`, or `$EDITOR`.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INIT" "1" "
|
4
|
+
.TH "BUNDLE\-INIT" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INJECT" "1" "
|
4
|
+
.TH "BUNDLE\-INJECT" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INSTALL" "1" "
|
4
|
+
.TH "BUNDLE\-INSTALL" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OPEN" "1" "
|
4
|
+
.TH "BUNDLE\-OPEN" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OUTDATED" "1" "
|
4
|
+
.TH "BUNDLE\-OUTDATED" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PLATFORM" "1" "
|
4
|
+
.TH "BUNDLE\-PLATFORM" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-platform\fR \- Displays platform compatibility information
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
4
|
+
.TH "BUNDLE\-PRISTINE" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-SHOW" "1" "
|
4
|
+
.TH "BUNDLE\-SHOW" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-UPDATE" "1" "
|
4
|
+
.TH "BUNDLE\-UPDATE" "1" "November 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
data/lib/bundler/man/bundle.1
CHANGED
data/lib/bundler/man/gemfile.5
CHANGED
data/lib/bundler/rubygems_ext.rb
CHANGED
@@ -16,10 +16,12 @@ module Bundler
|
|
16
16
|
spec.loaded_from = spec_file
|
17
17
|
|
18
18
|
# Completely remove any previous gem files
|
19
|
-
|
20
|
-
|
19
|
+
strict_rm_rf gem_dir
|
20
|
+
strict_rm_rf spec.extension_dir
|
21
21
|
|
22
|
-
|
22
|
+
SharedHelpers.filesystem_access(gem_dir, :create) do
|
23
|
+
FileUtils.mkdir_p gem_dir, :mode => 0o755
|
24
|
+
end
|
23
25
|
|
24
26
|
extract_files
|
25
27
|
|
@@ -31,7 +33,10 @@ module Bundler
|
|
31
33
|
generate_plugins
|
32
34
|
|
33
35
|
write_spec
|
34
|
-
|
36
|
+
|
37
|
+
SharedHelpers.filesystem_access("#{gem_home}/cache", :write) do
|
38
|
+
write_cache_file
|
39
|
+
end
|
35
40
|
|
36
41
|
say spec.post_install_message unless spec.post_install_message.nil?
|
37
42
|
|
@@ -87,6 +92,17 @@ module Bundler
|
|
87
92
|
|
88
93
|
private
|
89
94
|
|
95
|
+
def strict_rm_rf(dir)
|
96
|
+
# FileUtils.rm_rf should probably rise in case of permission issues like
|
97
|
+
# `rm -rf` does. However, it fails to delete the folder silently due to
|
98
|
+
# https://github.com/ruby/fileutils/issues/57. It should probably be fixed
|
99
|
+
# inside `fileutils` but for now I`m checking whether the folder was
|
100
|
+
# removed after it completes, and raising otherwise.
|
101
|
+
FileUtils.rm_rf dir
|
102
|
+
|
103
|
+
raise PermissionError.new(dir, :delete) if File.directory?(dir)
|
104
|
+
end
|
105
|
+
|
90
106
|
def validate_bundler_checksum(checksum)
|
91
107
|
return true if Bundler.settings[:disable_checksum_validation]
|
92
108
|
return true unless checksum
|
@@ -86,16 +86,12 @@ module Bundler
|
|
86
86
|
def spec_missing_extensions?(spec, default = true)
|
87
87
|
return spec.missing_extensions? if spec.respond_to?(:missing_extensions?)
|
88
88
|
|
89
|
-
return false if
|
89
|
+
return false if spec.default_gem?
|
90
90
|
return false if spec.extensions.empty?
|
91
91
|
|
92
92
|
default
|
93
93
|
end
|
94
94
|
|
95
|
-
def spec_default_gem?(spec)
|
96
|
-
spec.respond_to?(:default_gem?) && spec.default_gem?
|
97
|
-
end
|
98
|
-
|
99
95
|
def spec_matches_for_glob(spec, glob)
|
100
96
|
return spec.matches_for_glob(glob) if spec.respond_to?(:matches_for_glob)
|
101
97
|
|
@@ -504,14 +500,15 @@ module Bundler
|
|
504
500
|
end
|
505
501
|
|
506
502
|
def fetch_specs(remote, name)
|
503
|
+
require "rubygems/remote_fetcher"
|
507
504
|
path = remote.uri.to_s + "#{name}.#{Gem.marshal_version}.gz"
|
508
505
|
fetcher = gem_remote_fetcher
|
509
506
|
fetcher.headers = { "X-Gemfile-Source" => remote.original_uri.to_s } if remote.original_uri
|
510
507
|
string = fetcher.fetch_path(path)
|
511
508
|
Bundler.load_marshal(string)
|
512
|
-
rescue Gem::RemoteFetcher::FetchError
|
509
|
+
rescue Gem::RemoteFetcher::FetchError
|
513
510
|
# it's okay for prerelease to fail
|
514
|
-
raise
|
511
|
+
raise unless name == "prerelease_specs"
|
515
512
|
end
|
516
513
|
|
517
514
|
def fetch_all_remote_specs(remote)
|
@@ -521,12 +518,32 @@ module Bundler
|
|
521
518
|
specs.concat(pres)
|
522
519
|
end
|
523
520
|
|
524
|
-
def download_gem(spec, uri,
|
521
|
+
def download_gem(spec, uri, cache_dir)
|
522
|
+
require "rubygems/remote_fetcher"
|
525
523
|
uri = Bundler.settings.mirror_for(uri)
|
526
524
|
fetcher = gem_remote_fetcher
|
527
525
|
fetcher.headers = { "X-Gemfile-Source" => spec.remote.original_uri.to_s } if spec.remote.original_uri
|
528
526
|
Bundler::Retry.new("download gem from #{uri}").attempts do
|
529
|
-
|
527
|
+
gem_file_name = spec.file_name
|
528
|
+
local_gem_path = File.join cache_dir, gem_file_name
|
529
|
+
return if File.exist? local_gem_path
|
530
|
+
|
531
|
+
begin
|
532
|
+
remote_gem_path = uri + "gems/#{gem_file_name}"
|
533
|
+
remote_gem_path = remote_gem_path.to_s if provides?("< 3.2.0.rc.1")
|
534
|
+
|
535
|
+
SharedHelpers.filesystem_access(local_gem_path) do
|
536
|
+
fetcher.cache_update_path remote_gem_path, local_gem_path
|
537
|
+
end
|
538
|
+
rescue Gem::RemoteFetcher::FetchError
|
539
|
+
raise if spec.original_platform == spec.platform
|
540
|
+
|
541
|
+
original_gem_file_name = "#{spec.original_name}.gem"
|
542
|
+
raise if gem_file_name == original_gem_file_name
|
543
|
+
|
544
|
+
gem_file_name = original_gem_file_name
|
545
|
+
retry
|
546
|
+
end
|
530
547
|
end
|
531
548
|
rescue Gem::RemoteFetcher::FetchError => e
|
532
549
|
raise Bundler::HTTPError, "Could not download gem from #{uri} due to underlying error <#{e.message}>"
|
data/lib/bundler/runtime.rb
CHANGED
@@ -265,7 +265,7 @@ module Bundler
|
|
265
265
|
|
266
266
|
return if manuals.empty?
|
267
267
|
Bundler::SharedHelpers.set_env "MANPATH", manuals.concat(
|
268
|
-
ENV["MANPATH"].to_s.split(File::PATH_SEPARATOR)
|
268
|
+
ENV["MANPATH"] ? ENV["MANPATH"].to_s.split(File::PATH_SEPARATOR) : [""]
|
269
269
|
).uniq.join(File::PATH_SEPARATOR)
|
270
270
|
end
|
271
271
|
|
@@ -291,7 +291,7 @@ module Bundler
|
|
291
291
|
return unless activated_spec = Bundler.rubygems.loaded_specs(spec.name)
|
292
292
|
return if activated_spec.version == spec.version
|
293
293
|
|
294
|
-
suggestion = if
|
294
|
+
suggestion = if activated_spec.default_gem?
|
295
295
|
"Since #{spec.name} is a default gem, you can either remove your dependency on it" \
|
296
296
|
" or try updating to a newer version of bundler that supports #{spec.name} as a default gem."
|
297
297
|
else
|
@@ -56,7 +56,6 @@ module Bundler
|
|
56
56
|
@ref = ref
|
57
57
|
@revision = revision
|
58
58
|
@git = git
|
59
|
-
raise GitNotInstalledError.new if allow? && !Bundler.git_present?
|
60
59
|
end
|
61
60
|
|
62
61
|
def revision
|
@@ -208,7 +207,11 @@ module Bundler
|
|
208
207
|
end
|
209
208
|
|
210
209
|
def allow?
|
211
|
-
@git ? @git.allow_git_ops? : true
|
210
|
+
allowed = @git ? @git.allow_git_ops? : true
|
211
|
+
|
212
|
+
raise GitNotInstalledError.new if allowed && !Bundler.git_present?
|
213
|
+
|
214
|
+
allowed
|
212
215
|
end
|
213
216
|
|
214
217
|
def with_path(&blk)
|
data/lib/bundler/source/git.rb
CHANGED
@@ -42,7 +42,7 @@ module Bundler
|
|
42
42
|
%w[ref branch tag submodules].each do |opt|
|
43
43
|
out << " #{opt}: #{options[opt]}\n" if options[opt]
|
44
44
|
end
|
45
|
-
out << " glob: #{@glob}\n" unless
|
45
|
+
out << " glob: #{@glob}\n" unless default_glob?
|
46
46
|
out << " specs:\n"
|
47
47
|
end
|
48
48
|
|
@@ -75,12 +75,20 @@ module Bundler
|
|
75
75
|
git_proxy.branch
|
76
76
|
end
|
77
77
|
|
78
|
-
rev = "
|
78
|
+
rev = "at #{at}@#{shortref_for_display(revision)}"
|
79
79
|
rescue GitError
|
80
80
|
""
|
81
81
|
end
|
82
82
|
|
83
|
-
|
83
|
+
specifiers = [rev, glob_for_display].compact
|
84
|
+
suffix =
|
85
|
+
if specifiers.any?
|
86
|
+
" (#{specifiers.join(", ")})"
|
87
|
+
else
|
88
|
+
""
|
89
|
+
end
|
90
|
+
|
91
|
+
"#{@safe_uri}#{suffix}"
|
84
92
|
end
|
85
93
|
|
86
94
|
def name
|
@@ -282,6 +290,14 @@ module Bundler
|
|
282
290
|
ref[0..11]
|
283
291
|
end
|
284
292
|
|
293
|
+
def glob_for_display
|
294
|
+
default_glob? ? nil : "glob: #{@glob}"
|
295
|
+
end
|
296
|
+
|
297
|
+
def default_glob?
|
298
|
+
@glob == DEFAULT_GLOB
|
299
|
+
end
|
300
|
+
|
285
301
|
def uri_hash
|
286
302
|
if uri =~ %r{^\w+://(\w+@)?}
|
287
303
|
# Downcase the domain component of the URI
|
@@ -291,7 +307,9 @@ module Bundler
|
|
291
307
|
# If there is no URI scheme, assume it is an ssh/git URI
|
292
308
|
input = uri
|
293
309
|
end
|
294
|
-
|
310
|
+
# We use SHA1 here for historical reason and to preserve backward compatibility.
|
311
|
+
# But a transition to a simpler mangling algorithm would be welcome.
|
312
|
+
Bundler::Digest.sha1(input)
|
295
313
|
end
|
296
314
|
|
297
315
|
def cached_revision
|