bundler 2.2.32 → 2.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/lib/bundler/build_metadata.rb +2 -2
  4. data/lib/bundler/cli/doctor.rb +3 -2
  5. data/lib/bundler/cli/gem.rb +1 -0
  6. data/lib/bundler/cli/info.rb +6 -1
  7. data/lib/bundler/cli/update.rb +2 -2
  8. data/lib/bundler/cli.rb +1 -0
  9. data/lib/bundler/compact_index_client/updater.rb +0 -5
  10. data/lib/bundler/definition.rb +17 -50
  11. data/lib/bundler/dsl.rb +18 -3
  12. data/lib/bundler/environment_preserver.rb +4 -1
  13. data/lib/bundler/lazy_specification.rb +17 -1
  14. data/lib/bundler/man/bundle-add.1 +1 -1
  15. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  16. data/lib/bundler/man/bundle-cache.1 +1 -1
  17. data/lib/bundler/man/bundle-check.1 +1 -1
  18. data/lib/bundler/man/bundle-clean.1 +1 -1
  19. data/lib/bundler/man/bundle-config.1 +1 -1
  20. data/lib/bundler/man/bundle-doctor.1 +1 -1
  21. data/lib/bundler/man/bundle-exec.1 +1 -1
  22. data/lib/bundler/man/bundle-gem.1 +1 -1
  23. data/lib/bundler/man/bundle-info.1 +1 -1
  24. data/lib/bundler/man/bundle-init.1 +1 -1
  25. data/lib/bundler/man/bundle-inject.1 +1 -1
  26. data/lib/bundler/man/bundle-install.1 +1 -1
  27. data/lib/bundler/man/bundle-list.1 +1 -1
  28. data/lib/bundler/man/bundle-lock.1 +1 -1
  29. data/lib/bundler/man/bundle-open.1 +1 -1
  30. data/lib/bundler/man/bundle-outdated.1 +1 -1
  31. data/lib/bundler/man/bundle-platform.1 +1 -1
  32. data/lib/bundler/man/bundle-pristine.1 +1 -1
  33. data/lib/bundler/man/bundle-remove.1 +1 -1
  34. data/lib/bundler/man/bundle-show.1 +1 -1
  35. data/lib/bundler/man/bundle-update.1 +1 -1
  36. data/lib/bundler/man/bundle-viz.1 +1 -1
  37. data/lib/bundler/man/bundle.1 +1 -1
  38. data/lib/bundler/man/gemfile.5 +27 -1
  39. data/lib/bundler/man/gemfile.5.ronn +8 -0
  40. data/lib/bundler/plugin/api/source.rb +1 -0
  41. data/lib/bundler/resolver.rb +2 -4
  42. data/lib/bundler/shared_helpers.rb +2 -3
  43. data/lib/bundler/source/git/git_proxy.rb +2 -2
  44. data/lib/bundler/source/rubygems.rb +16 -12
  45. data/lib/bundler/source/rubygems_aggregate.rb +1 -1
  46. data/lib/bundler/source.rb +1 -1
  47. data/lib/bundler/source_list.rb +7 -29
  48. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -2
  49. data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
  50. data/lib/bundler/vendor/.document +1 -0
  51. data/lib/bundler/version.rb +1 -1
  52. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71d34e0696d7d7121b9bf4db66aca17c0e0b115a1099fa8879e509784ee62e4d
4
- data.tar.gz: 0a68018b980b5e28358609b632a3b5bbf738ec2fd664aa34c4cc7c3d3ff207ec
3
+ metadata.gz: 889ebea9ec62ae3ec9d4c7cfc9e5d99db2e48244890b93c3c1e5e6636cbbaae3
4
+ data.tar.gz: 28c8ff7149d6182d8cea46d9576d74e8a41115ef5243f253c6c7d023c23f28a4
5
5
  SHA512:
6
- metadata.gz: 2f0bc7ca02e4e2972c004cd40f4fb01c23ba52fdd8d0420733e2d4d0fe2afcc0a706f4985720c5ab8c9828821329f3e2b11328a2b61fe749833c1e8ba0d3edc7
7
- data.tar.gz: 39220087ca48d38cb1980593607946da010cdf74e3a039e493d848c46eff798539aec4267e95e9d03807e143cc7cfcaa29a36f5118bb6e09bbc60b00fa77fe03
6
+ metadata.gz: 1d949abc82fbe2f91e1ffebacb9dcb6f3366b4f0650ce96bfedd671965622e75d1a9cf2f6be762e8b7aa05a86eea2085f7834c2f23457c29b851eece9df81f78
7
+ data.tar.gz: f997fd1c1bfef3b9164cfefe9a4c5f092c870967dfc0352f5ac4b01a16bb2bb9c974511fb6b5126563672b736dc020f450a7b3ebfb0156757d26f41c3a2651de
data/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ # 2.2.33 (December 7, 2021)
2
+
3
+ ## Security fixes:
4
+
5
+ - Pass "--" to git commands to separate positional and optional args [#5142](https://github.com/rubygems/rubygems/pull/5142)
6
+
7
+ ## Enhancements:
8
+
9
+ - Accept pull request URLs as github source [#5126](https://github.com/rubygems/rubygems/pull/5126)
10
+ - Add `--version` parameter to `bundle info` command [#5137](https://github.com/rubygems/rubygems/pull/5137)
11
+ - Let original `Errno::EACCES` error be raised in compact index updater [#5110](https://github.com/rubygems/rubygems/pull/5110)
12
+ - Improve gemfile-lockfile source equivalence errors [#5120](https://github.com/rubygems/rubygems/pull/5120)
13
+ - Avoid float-to-string loss of characters in GitHub Actions configuration labels in new gem template [#5089](https://github.com/rubygems/rubygems/pull/5089)
14
+ - Add an initial rbs template to `bundle gem` skeleton [#5041](https://github.com/rubygems/rubygems/pull/5041)
15
+ - Avoid shared libraries not getting environment passed right after argv in memory when `bundle exec` is used [#4815](https://github.com/rubygems/rubygems/pull/4815)
16
+
17
+ ## Bug fixes:
18
+
19
+ - Don't cleanup paths from gems already activated from `$LOAD_PATH` [#5111](https://github.com/rubygems/rubygems/pull/5111)
20
+ - Fix handling prereleases of 0 versions, like 0.0.0.dev or 0.0.0.SNAPSHOT [#5116](https://github.com/rubygems/rubygems/pull/5116)
21
+ - Fix escape of filenames in `bundle doctor` [#5102](https://github.com/rubygems/rubygems/pull/5102)
22
+ - Don't unlock dependencies when running `bundle install` after changing global source [#5090](https://github.com/rubygems/rubygems/pull/5090)
23
+ - Fix missing locked specs when depended on another platform [#5092](https://github.com/rubygems/rubygems/pull/5092)
24
+ - Fix `bundle info` sometimes claiming that bundler has been deleted [#5097](https://github.com/rubygems/rubygems/pull/5097)
25
+
26
+ ## Documentation:
27
+
28
+ - Ignore to generate the documentation from vendored libraries [#5118](https://github.com/rubygems/rubygems/pull/5118)
29
+
1
30
  # 2.2.32 (November 23, 2021)
2
31
 
3
32
  ## Enhancements:
@@ -4,8 +4,8 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2021-11-23".freeze
8
- @git_commit_sha = "20d4957649".freeze
7
+ @built_at = "2021-12-07".freeze
8
+ @git_commit_sha = "9b5e2a350b".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rbconfig"
4
+ require "shellwords"
4
5
 
5
6
  module Bundler
6
7
  class CLI::Doctor
@@ -22,14 +23,14 @@ module Bundler
22
23
  end
23
24
 
24
25
  def dylibs_darwin(path)
25
- output = `/usr/bin/otool -L "#{path}"`.chomp
26
+ output = `/usr/bin/otool -L #{path.shellescape}`.chomp
26
27
  dylibs = output.split("\n")[1..-1].map {|l| l.match(DARWIN_REGEX).captures[0] }.uniq
27
28
  # ignore @rpath and friends
28
29
  dylibs.reject {|dylib| dylib.start_with? "@" }
29
30
  end
30
31
 
31
32
  def dylibs_ldd(path)
32
- output = `/usr/bin/ldd "#{path}"`.chomp
33
+ output = `/usr/bin/ldd #{path.shellescape}`.chomp
33
34
  output.split("\n").map do |l|
34
35
  match = l.match(LDD_REGEX)
35
36
  next if match.nil?
@@ -76,6 +76,7 @@ module Bundler
76
76
  "#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
77
77
  "lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
78
78
  "lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
79
+ "sig/newgem.rbs.tt" => "sig/#{namespaced_path}.rbs",
79
80
  "newgem.gemspec.tt" => "#{name}.gemspec",
80
81
  "Rakefile.tt" => "Rakefile",
81
82
  "README.md.tt" => "README.md",
@@ -18,6 +18,7 @@ module Bundler
18
18
 
19
19
  if spec
20
20
  return print_gem_path(spec) if @options[:path]
21
+ return print_gem_version(spec) if @options[:version]
21
22
  print_gem_info(spec)
22
23
  end
23
24
  end
@@ -39,6 +40,10 @@ module Bundler
39
40
  raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(gem_name, Bundler.definition.dependencies)
40
41
  end
41
42
 
43
+ def print_gem_version(spec)
44
+ Bundler.ui.info spec.version.to_s
45
+ end
46
+
42
47
  def print_gem_path(spec)
43
48
  name = spec.name
44
49
  if name == "bundler"
@@ -70,7 +75,7 @@ module Bundler
70
75
  gem_info << "\tPath: #{spec.full_gem_path}\n"
71
76
  gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
72
77
 
73
- if spec.deleted_gem?
78
+ if name != "bundler" && spec.deleted_gem?
74
79
  return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
75
80
  end
76
81
 
@@ -66,7 +66,7 @@ module Bundler
66
66
 
67
67
  if locked_gems = Bundler.definition.locked_gems
68
68
  previous_locked_info = locked_gems.specs.reduce({}) do |h, s|
69
- h[s.name] = { :spec => s, :version => s.version, :source => s.source.to_s }
69
+ h[s.name] = { :spec => s, :version => s.version, :source => s.source.identifier }
70
70
  h
71
71
  end
72
72
  end
@@ -95,7 +95,7 @@ module Bundler
95
95
  end
96
96
 
97
97
  locked_source = locked_info[:source]
98
- new_source = new_spec.source.to_s
98
+ new_source = new_spec.source.identifier
99
99
  next if locked_source != new_source
100
100
 
101
101
  new_version = new_spec.version
data/lib/bundler/cli.rb CHANGED
@@ -331,6 +331,7 @@ module Bundler
331
331
 
332
332
  desc "info GEM [OPTIONS]", "Show information for the given gem"
333
333
  method_option "path", :type => :boolean, :banner => "Print full path to gem"
334
+ method_option "version", :type => :boolean, :banner => "Print gem version"
334
335
  def info(gem_name)
335
336
  require_relative "cli/info"
336
337
  Info.new(options, gem_name).run
@@ -76,11 +76,6 @@ module Bundler
76
76
 
77
77
  update(local_path, remote_path, :retrying)
78
78
  end
79
- rescue Errno::EACCES
80
- raise Bundler::PermissionError,
81
- "Bundler does not have write access to create a temp directory " \
82
- "within #{Dir.tmpdir}. Bundler must have write access to your " \
83
- "systems temp directory to function properly. "
84
79
  rescue Zlib::GzipFile::Error
85
80
  raise Bundler::HTTPError
86
81
  end
@@ -158,10 +158,6 @@ module Bundler
158
158
  end
159
159
  end
160
160
 
161
- def multisource_allowed?
162
- @multisource_allowed
163
- end
164
-
165
161
  def resolve_only_locally!
166
162
  @remote = false
167
163
  sources.local_only!
@@ -368,44 +364,26 @@ module Bundler
368
364
  added.concat new_platforms.map {|p| "* platform: #{p}" }
369
365
  deleted.concat deleted_platforms.map {|p| "* platform: #{p}" }
370
366
 
371
- gemfile_sources = sources.lock_sources
372
-
373
- new_sources = gemfile_sources - @locked_sources
374
- deleted_sources = @locked_sources - gemfile_sources
375
-
376
367
  new_deps = @dependencies - locked_dependencies
377
368
  deleted_deps = locked_dependencies - @dependencies
378
369
 
379
- # Check if it is possible that the source is only changed thing
380
- if (new_deps.empty? && deleted_deps.empty?) && (!new_sources.empty? && !deleted_sources.empty?)
381
- new_sources.reject! {|source| (source.path? && source.path.exist?) || equivalent_rubygems_remotes?(source) }
382
- deleted_sources.reject! {|source| (source.path? && source.path.exist?) || equivalent_rubygems_remotes?(source) }
383
- end
384
-
385
- if @locked_sources != gemfile_sources
386
- if new_sources.any?
387
- added.concat new_sources.map {|source| "* source: #{source}" }
388
- end
389
-
390
- if deleted_sources.any?
391
- deleted.concat deleted_sources.map {|source| "* source: #{source}" }
392
- end
393
- end
394
-
395
370
  added.concat new_deps.map {|d| "* #{pretty_dep(d)}" } if new_deps.any?
396
- if deleted_deps.any?
397
- deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" }
398
- end
371
+ deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" } if deleted_deps.any?
399
372
 
400
373
  both_sources = Hash.new {|h, k| h[k] = [] }
401
374
  @dependencies.each {|d| both_sources[d.name][0] = d }
402
- @locked_deps.each {|name, d| both_sources[name][1] = d.source }
375
+ locked_dependencies.each {|d| both_sources[d.name][1] = d }
403
376
 
404
- both_sources.each do |name, (dep, lock_source)|
405
- next if lock_source.nil? || (dep && lock_source.can_lock?(dep))
406
- gemfile_source_name = (dep && dep.source) || "no specified source"
407
- lockfile_source_name = lock_source
408
- changed << "* #{name} from `#{gemfile_source_name}` to `#{lockfile_source_name}`"
377
+ both_sources.each do |name, (dep, lock_dep)|
378
+ next if dep.nil? || lock_dep.nil?
379
+
380
+ gemfile_source = dep.source || sources.default_source
381
+ lock_source = lock_dep.source || sources.default_source
382
+ next if lock_source.include?(gemfile_source)
383
+
384
+ gemfile_source_name = dep.source ? gemfile_source.identifier : "no specified source"
385
+ lockfile_source_name = lock_dep.source ? lock_source.identifier : "no specified source"
386
+ changed << "* #{name} from `#{lockfile_source_name}` to `#{gemfile_source_name}`"
409
387
  end
410
388
 
411
389
  reason = change_reason
@@ -649,15 +627,13 @@ module Bundler
649
627
  end
650
628
 
651
629
  def converge_dependencies
652
- (@dependencies + locked_dependencies).each do |dep|
630
+ changes = false
631
+
632
+ @dependencies.each do |dep|
653
633
  if dep.source
654
634
  dep.source = sources.get(dep.source)
655
635
  end
656
- end
657
636
 
658
- changes = false
659
-
660
- @dependencies.each do |dep|
661
637
  unless locked_dep = @locked_deps[dep.name]
662
638
  changes = true
663
639
  next
@@ -711,11 +687,8 @@ module Bundler
711
687
  deps << dep
712
688
  end
713
689
 
714
- s.source = (dep && dep.source) || sources.get(s.source) unless multisource_allowed?
690
+ s.source = (dep && dep.source) || sources.get(s.source) || sources.default_source unless Bundler.frozen_bundle?
715
691
 
716
- # Don't add a spec to the list if its source is expired. For example,
717
- # if you change a Git gem to RubyGems.
718
- next if s.source.nil?
719
692
  next if @unlock[:sources].include?(s.source.name)
720
693
 
721
694
  # If the spec is from a path source and it doesn't exist anymore
@@ -744,7 +717,7 @@ module Bundler
744
717
  s.dependencies.replace(new_spec.dependencies)
745
718
  end
746
719
 
747
- if dep.nil? && @dependencies.find {|d| s.name == d.name }
720
+ if dep.nil? && requested_dependencies.find {|d| s.name == d.name }
748
721
  @unlock[:gems] << s.name
749
722
  else
750
723
  converged << s
@@ -852,12 +825,6 @@ module Bundler
852
825
  end
853
826
  end
854
827
 
855
- def equivalent_rubygems_remotes?(source)
856
- return false unless source.is_a?(Source::Rubygems)
857
-
858
- Bundler.settings[:allow_deployment_source_credential_changes] && source.equivalent_remotes?(sources.rubygems_remotes)
859
- end
860
-
861
828
  def source_map
862
829
  @source_map ||= SourceMap.new(sources, dependencies)
863
830
  end
data/lib/bundler/dsl.rb CHANGED
@@ -18,6 +18,8 @@ module Bundler
18
18
  VALID_KEYS = %w[group groups git path glob name branch ref tag require submodules
19
19
  platform platforms type source install_if gemfile].freeze
20
20
 
21
+ GITHUB_PULL_REQUEST_URL = %r{\Ahttps://github\.com/([A-Za-z0-9_\-\.]+/[A-Za-z0-9_\-\.]+)/pull/(\d+)\z}.freeze
22
+
21
23
  attr_reader :gemspecs
22
24
  attr_accessor :dependencies
23
25
 
@@ -278,8 +280,17 @@ module Bundler
278
280
  warn_deprecated_git_source(:github, <<-'RUBY'.strip, 'Change any "reponame" :github sources to "username/reponame".')
279
281
  "https://github.com/#{repo_name}.git"
280
282
  RUBY
281
- repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
282
- "https://github.com/#{repo_name}.git"
283
+ if repo_name =~ GITHUB_PULL_REQUEST_URL
284
+ {
285
+ "git" => "https://github.com/#{$1}.git",
286
+ "branch" => "refs/pull/#{$2}/head",
287
+ "ref" => nil,
288
+ "tag" => nil,
289
+ }
290
+ else
291
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
292
+ "https://github.com/#{repo_name}.git"
293
+ end
283
294
  end
284
295
 
285
296
  git_source(:gist) do |repo_name|
@@ -365,7 +376,11 @@ repo_name ||= user_name
365
376
 
366
377
  git_name = (git_names & opts.keys).last
367
378
  if @git_sources[git_name]
368
- opts["git"] = @git_sources[git_name].call(opts[git_name])
379
+ git_opts = @git_sources[git_name].call(opts[git_name])
380
+ git_opts = { "git" => git_opts } if git_opts.is_a?(String)
381
+ opts.merge!(git_opts) do |key, _gemfile_value, _git_source_value|
382
+ raise GemfileError, %(The :#{key} option can't be used with `#{git_name}: #{opts[git_name].inspect}`)
383
+ end
369
384
  end
370
385
 
371
386
  %w[git path].each do |type|
@@ -38,7 +38,10 @@ module Bundler
38
38
 
39
39
  # Replaces `ENV` with the bundler environment variables backed up
40
40
  def replace_with_backup
41
- ENV.replace(backup) unless Gem.win_platform?
41
+ unless Gem.win_platform?
42
+ ENV.replace(backup)
43
+ return
44
+ end
42
45
 
43
46
  # Fallback logic for Windows below to workaround
44
47
  # https://bugs.ruby-lang.org/issues/16798. Can be dropped once all
@@ -38,8 +38,24 @@ module Bundler
38
38
  identifier.hash
39
39
  end
40
40
 
41
+ ##
42
+ # Does this locked specification satisfy +dependency+?
43
+ #
44
+ # NOTE: Rubygems default requirement is ">= 0", which doesn't match
45
+ # prereleases of 0 versions, like "0.0.0.dev" or "0.0.0.SNAPSHOT". However,
46
+ # bundler users expect those to work. We need to make sure that Gemfile
47
+ # dependencies without explicit requirements (which use ">= 0" under the
48
+ # hood by default) are still valid for locked specs using this kind of
49
+ # versions. The method implements an ad-hoc fix for that. A better solution
50
+ # might be to change default rubygems requirement of dependencies to be ">=
51
+ # 0.A" but that's a major refactoring likely to break things. Hopefully we
52
+ # can attempt it in the future.
53
+ #
54
+
41
55
  def satisfies?(dependency)
42
- @name == dependency.name && dependency.requirement.satisfied_by?(Gem::Version.new(@version))
56
+ effective_requirement = dependency.requirement == Gem::Requirement.default ? Gem::Requirement.new(">= 0.A") : dependency.requirement
57
+
58
+ @name == dependency.name && effective_requirement.satisfied_by?(Gem::Version.new(@version))
43
59
  end
44
60
 
45
61
  def to_lock
@@ -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\-ADD" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-ADD" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
@@ -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" "November 2021" "" ""
4
+ .TH "BUNDLE\-BINSTUBS" "1" "December 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" "November 2021" "" ""
4
+ .TH "BUNDLE\-CACHE" "1" "December 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" "November 2021" "" ""
4
+ .TH "BUNDLE\-CHECK" "1" "December 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\-CLEAN" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-CLEAN" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler 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\-CONFIG" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-CONFIG" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-config\fR \- Set bundler configuration options
@@ -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\-DOCTOR" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-DOCTOR" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
@@ -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\-EXEC" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-EXEC" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-exec\fR \- Execute a command in the context of the 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\-GEM" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-GEM" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
@@ -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\-INFO" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-INFO" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-info\fR \- Show information for the given 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\-INIT" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-INIT" "1" "December 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" "November 2021" "" ""
4
+ .TH "BUNDLE\-INJECT" "1" "December 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" "November 2021" "" ""
4
+ .TH "BUNDLE\-INSTALL" "1" "December 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\-LIST" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-LIST" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-list\fR \- List all the gems in the 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\-LOCK" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-LOCK" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
@@ -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" "November 2021" "" ""
4
+ .TH "BUNDLE\-OPEN" "1" "December 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" "November 2021" "" ""
4
+ .TH "BUNDLE\-OUTDATED" "1" "December 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" "November 2021" "" ""
4
+ .TH "BUNDLE\-PLATFORM" "1" "December 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" "November 2021" "" ""
4
+ .TH "BUNDLE\-PRISTINE" "1" "December 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\-REMOVE" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-REMOVE" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-remove\fR \- Removes gems from the 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\-SHOW" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-SHOW" "1" "December 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" "November 2021" "" ""
4
+ .TH "BUNDLE\-UPDATE" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-update\fR \- Update your gems to the latest available versions
@@ -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\-VIZ" "1" "November 2021" "" ""
4
+ .TH "BUNDLE\-VIZ" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-viz\fR \- Generates a visual dependency graph for 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" "1" "November 2021" "" ""
4
+ .TH "BUNDLE" "1" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\fR \- Ruby Dependency Management
@@ -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 "GEMFILE" "5" "November 2021" "" ""
4
+ .TH "GEMFILE" "5" "December 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -506,6 +506,32 @@ gem "rails", :git => "git://github\.com/rails/rails\.git"
506
506
  .P
507
507
  Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
508
508
  .
509
+ .P
510
+ You can also directly pass a pull request URL:
511
+ .
512
+ .IP "" 4
513
+ .
514
+ .nf
515
+
516
+ gem "rails", :github => "https://github\.com/rails/rails/pull/43753"
517
+ .
518
+ .fi
519
+ .
520
+ .IP "" 0
521
+ .
522
+ .P
523
+ Which is equivalent to:
524
+ .
525
+ .IP "" 4
526
+ .
527
+ .nf
528
+
529
+ gem "rails", :github => "rails/rails", branch: "refs/pull/43753/head"
530
+ .
531
+ .fi
532
+ .
533
+ .IP "" 0
534
+ .
509
535
  .SS "GIST"
510
536
  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 the gist identifier (without the trailing "\.git")\.
511
537
  .
@@ -372,6 +372,14 @@ Are both equivalent to
372
372
 
373
373
  Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
374
374
 
375
+ You can also directly pass a pull request URL:
376
+
377
+ gem "rails", :github => "https://github.com/rails/rails/pull/43753"
378
+
379
+ Which is equivalent to:
380
+
381
+ gem "rails", :github => "rails/rails", branch: "refs/pull/43753/head"
382
+
375
383
  ### GIST
376
384
 
377
385
  If the git repository you want to use is hosted as a Github Gist and is public, you can use
@@ -283,6 +283,7 @@ module Bundler
283
283
  def to_s
284
284
  "plugin source for #{@type} with uri #{@uri}"
285
285
  end
286
+ alias_method :identifier, :to_s
286
287
 
287
288
  # Note: Do not override if you don't know what you are doing.
288
289
  def include?(other)
@@ -30,10 +30,8 @@ module Bundler
30
30
  @resolver = Molinillo::Resolver.new(self, self)
31
31
  @search_for = {}
32
32
  @base_dg = Molinillo::DependencyGraph.new
33
- aggregate_global_source = @source_requirements[:default].is_a?(Source::RubygemsAggregate)
34
33
  @base.each do |ls|
35
34
  dep = Dependency.new(ls.name, ls.version)
36
- ls.source = source_for(ls.name) unless aggregate_global_source
37
35
  @base_dg.add_vertex(ls.name, DepProxy.get_proxy(dep, ls.platform), true)
38
36
  end
39
37
  additional_base_requirements.each {|d| @base_dg.add_vertex(d.name, d) }
@@ -272,7 +270,7 @@ module Bundler
272
270
  rescue GemfileNotFound
273
271
  nil
274
272
  end
275
- message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source.to_err}#{cache_message}.\n")
273
+ message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source}#{cache_message}.\n")
276
274
  message << "The source contains the following versions of '#{name}': #{formatted_versions_with_platforms(versions_with_platforms)}" if versions_with_platforms.any?
277
275
  end
278
276
  raise GemNotFound, message
@@ -371,7 +369,7 @@ module Bundler
371
369
  o << if metadata_requirement
372
370
  "is not available in #{relevant_source}"
373
371
  else
374
- "in #{relevant_source.to_err}.\n"
372
+ "in #{relevant_source}.\n"
375
373
  end
376
374
  end
377
375
  end,
@@ -320,12 +320,11 @@ module Bundler
320
320
  end
321
321
 
322
322
  def clean_load_path
323
- bundler_lib = bundler_ruby_lib
324
-
325
323
  loaded_gem_paths = Bundler.rubygems.loaded_gem_paths
326
324
 
327
325
  $LOAD_PATH.reject! do |p|
328
- next if resolve_path(p).start_with?(bundler_lib)
326
+ resolved_path = resolve_path(p)
327
+ next if $LOADED_FEATURES.any? {|lf| lf.start_with?(resolved_path) }
329
328
  loaded_gem_paths.delete(p)
330
329
  end
331
330
  $LOAD_PATH.uniq!
@@ -95,12 +95,12 @@ module Bundler
95
95
  SharedHelpers.filesystem_access(path.dirname) do |p|
96
96
  FileUtils.mkdir_p(p)
97
97
  end
98
- git_retry "clone", configured_uri, path.to_s, "--bare", "--no-hardlinks", "--quiet"
98
+ git_retry "clone", "--bare", "--no-hardlinks", "--quiet", "--", configured_uri, path.to_s
99
99
  return unless extra_ref
100
100
  end
101
101
 
102
102
  with_path do
103
- git_retry(*["fetch", "--force", "--quiet", "--tags", configured_uri, "refs/heads/*:refs/heads/*", extra_ref].compact, :dir => path)
103
+ git_retry(*["fetch", "--force", "--quiet", "--tags", "--", configured_uri, "refs/heads/*:refs/heads/*", extra_ref].compact, :dir => path)
104
104
  end
105
105
  end
106
106
 
@@ -98,26 +98,30 @@ module Bundler
98
98
  out << " specs:\n"
99
99
  end
100
100
 
101
- def to_err
101
+ def to_s
102
102
  if remotes.empty?
103
103
  "locally installed gems"
104
- elsif @allow_remote
104
+ elsif @allow_remote && @allow_cached && @allow_local
105
+ "rubygems repository #{remote_names}, cached gems or installed locally"
106
+ elsif @allow_remote && @allow_local
105
107
  "rubygems repository #{remote_names} or installed locally"
106
- elsif @allow_cached
107
- "cached gems from rubygems repository #{remote_names} or installed locally"
108
+ elsif @allow_remote
109
+ "rubygems repository #{remote_names}"
110
+ elsif @allow_cached && @allow_local
111
+ "cached gems or installed locally"
108
112
  else
109
113
  "locally installed gems"
110
114
  end
111
115
  end
112
116
 
113
- def to_s
117
+ def identifier
114
118
  if remotes.empty?
115
119
  "locally installed gems"
116
120
  else
117
- "rubygems repository #{remote_names} or installed locally"
121
+ "rubygems repository #{remote_names}"
118
122
  end
119
123
  end
120
- alias_method :name, :to_s
124
+ alias_method :name, :identifier
121
125
 
122
126
  def specs
123
127
  @specs ||= begin
@@ -262,10 +266,6 @@ module Bundler
262
266
  @remotes.unshift(uri) unless @remotes.include?(uri)
263
267
  end
264
268
 
265
- def equivalent_remotes?(other_remotes)
266
- other_remotes.map(&method(:remove_auth)) == @remotes.map(&method(:remove_auth))
267
- end
268
-
269
269
  def spec_names
270
270
  if @allow_remote && dependency_api_available?
271
271
  remote_specs.spec_names
@@ -334,7 +334,11 @@ module Bundler
334
334
  end
335
335
 
336
336
  def credless_remotes
337
- remotes.map(&method(:suppress_configured_credentials))
337
+ if Bundler.settings[:allow_deployment_source_credential_changes]
338
+ remotes.map(&method(:remove_auth))
339
+ else
340
+ remotes.map(&method(:suppress_configured_credentials))
341
+ end
338
342
  end
339
343
 
340
344
  def remotes_for_spec(spec)
@@ -16,7 +16,7 @@ module Bundler
16
16
  @index
17
17
  end
18
18
 
19
- def to_err
19
+ def identifier
20
20
  to_s
21
21
  end
22
22
 
@@ -67,7 +67,7 @@ module Bundler
67
67
  "#<#{self.class}:0x#{object_id} #{self}>"
68
68
  end
69
69
 
70
- def to_err
70
+ def identifier
71
71
  to_s
72
72
  end
73
73
 
@@ -98,7 +98,7 @@ module Bundler
98
98
  end
99
99
 
100
100
  def get(source)
101
- source_list_for(source).find {|s| equal_source?(source, s) || equivalent_source?(source, s) }
101
+ source_list_for(source).find {|s| equivalent_source?(source, s) }
102
102
  end
103
103
 
104
104
  def lock_sources
@@ -106,14 +106,14 @@ module Bundler
106
106
  end
107
107
 
108
108
  def lock_other_sources
109
- (path_sources + git_sources + plugin_sources).sort_by(&:to_s)
109
+ (path_sources + git_sources + plugin_sources).sort_by(&:identifier)
110
110
  end
111
111
 
112
112
  def lock_rubygems_sources
113
113
  if merged_gem_lockfile_sections?
114
114
  [combine_rubygems_sources]
115
115
  else
116
- rubygems_sources.sort_by(&:to_s)
116
+ rubygems_sources.sort_by(&:identifier)
117
117
  end
118
118
  end
119
119
 
@@ -173,7 +173,7 @@ module Bundler
173
173
  end
174
174
 
175
175
  def different_sources?(lock_sources, replacement_sources)
176
- !equal_sources?(lock_sources, replacement_sources) && !equivalent_sources?(lock_sources, replacement_sources)
176
+ !equivalent_sources?(lock_sources, replacement_sources)
177
177
  end
178
178
 
179
179
  def rubygems_aggregate_class
@@ -210,34 +210,12 @@ module Bundler
210
210
  end
211
211
  end
212
212
 
213
- def equal_sources?(lock_sources, replacement_sources)
214
- lock_sources.sort_by(&:to_s) == replacement_sources.sort_by(&:to_s)
215
- end
216
-
217
- def equal_source?(source, other_source)
218
- return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems)
219
-
220
- source == other_source
221
- end
222
-
223
- def equivalent_source?(source, other_source)
224
- return false unless Bundler.settings[:allow_deployment_source_credential_changes] && source.is_a?(Source::Rubygems)
225
-
226
- equivalent_rubygems_sources?([source], [other_source])
227
- end
228
-
229
213
  def equivalent_sources?(lock_sources, replacement_sources)
230
- return false unless Bundler.settings[:allow_deployment_source_credential_changes]
231
-
232
- lock_rubygems_sources, lock_other_sources = lock_sources.partition {|s| s.is_a?(Source::Rubygems) }
233
- replacement_rubygems_sources, replacement_other_sources = replacement_sources.partition {|s| s.is_a?(Source::Rubygems) }
234
-
235
- equivalent_rubygems_sources?(lock_rubygems_sources, replacement_rubygems_sources) && equal_sources?(lock_other_sources, replacement_other_sources)
214
+ lock_sources.sort_by(&:identifier) == replacement_sources.sort_by(&:identifier)
236
215
  end
237
216
 
238
- def equivalent_rubygems_sources?(lock_sources, replacement_sources)
239
- actual_remotes = replacement_sources.map(&:remotes).flatten.uniq
240
- lock_sources.all? {|s| s.equivalent_remotes?(actual_remotes) }
217
+ def equivalent_source?(source, other_source)
218
+ source == other_source
241
219
  end
242
220
  end
243
221
  end
@@ -10,11 +10,11 @@ on:
10
10
  jobs:
11
11
  build:
12
12
  runs-on: ubuntu-latest
13
-
13
+ name: Ruby ${{ matrix.ruby }}
14
14
  strategy:
15
15
  matrix:
16
16
  ruby:
17
- - <%= RUBY_VERSION %>
17
+ - '<%= RUBY_VERSION %>'
18
18
 
19
19
  steps:
20
20
  - uses: actions/checkout@v2
@@ -0,0 +1,8 @@
1
+ <%- config[:constant_array].each_with_index do |c, i| -%>
2
+ <%= " " * i %>module <%= c %>
3
+ <%- end -%>
4
+ <%= " " * config[:constant_array].size %>VERSION: String
5
+ <%= " " * config[:constant_array].size %># See the writing guide of rbs: https://github.com/ruby/rbs#guides
6
+ <%- (config[:constant_array].size-1).downto(0) do |i| -%>
7
+ <%= " " * i %>end
8
+ <%- end -%>
@@ -0,0 +1 @@
1
+ # Vendored files do not need to be documented
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.2.32".freeze
4
+ VERSION = "2.2.33".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.32
4
+ version: 2.2.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -22,7 +22,7 @@ authors:
22
22
  autorequire:
23
23
  bindir: exe
24
24
  cert_chain: []
25
- date: 2021-11-23 00:00:00.000000000 Z
25
+ date: 2021-12-07 00:00:00.000000000 Z
26
26
  dependencies: []
27
27
  description: Bundler manages an application's dependencies through its entire life,
28
28
  across many machines, systematically and repeatably
@@ -235,6 +235,7 @@ files:
235
235
  - lib/bundler/templates/newgem/newgem.gemspec.tt
236
236
  - lib/bundler/templates/newgem/rspec.tt
237
237
  - lib/bundler/templates/newgem/rubocop.yml.tt
238
+ - lib/bundler/templates/newgem/sig/newgem.rbs.tt
238
239
  - lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
239
240
  - lib/bundler/templates/newgem/spec/spec_helper.rb.tt
240
241
  - lib/bundler/templates/newgem/standard.yml.tt
@@ -248,6 +249,7 @@ files:
248
249
  - lib/bundler/ui/shell.rb
249
250
  - lib/bundler/ui/silent.rb
250
251
  - lib/bundler/uri_credentials_filter.rb
252
+ - lib/bundler/vendor/.document
251
253
  - lib/bundler/vendor/connection_pool/LICENSE
252
254
  - lib/bundler/vendor/connection_pool/lib/connection_pool.rb
253
255
  - lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
@@ -365,7 +367,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
365
367
  - !ruby/object:Gem::Version
366
368
  version: 2.5.2
367
369
  requirements: []
368
- rubygems_version: 3.2.32
370
+ rubygems_version: 3.2.33
369
371
  signing_key:
370
372
  specification_version: 4
371
373
  summary: The best way to manage your application's dependencies