rubygems-update 3.4.5 → 3.4.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1128 -1095
  3. data/Manifest.txt +5 -6
  4. data/bundler/CHANGELOG.md +29 -0
  5. data/bundler/lib/bundler/build_metadata.rb +2 -2
  6. data/bundler/lib/bundler/cli/binstubs.rb +5 -1
  7. data/bundler/lib/bundler/cli/init.rb +2 -2
  8. data/bundler/lib/bundler/cli.rb +1 -0
  9. data/bundler/lib/bundler/current_ruby.rb +2 -0
  10. data/bundler/lib/bundler/dependency.rb +1 -1
  11. data/bundler/lib/bundler/inline.rb +6 -8
  12. data/bundler/lib/bundler/installer/parallel_installer.rb +16 -2
  13. data/bundler/lib/bundler/installer/standalone.rb +12 -8
  14. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  15. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  16. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  17. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  18. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  19. data/bundler/lib/bundler/man/bundle-config.1 +1 -1
  20. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  21. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  26. data/bundler/lib/bundler/man/bundle-init.1 +5 -1
  27. data/bundler/lib/bundler/man/bundle-init.1.ronn +2 -0
  28. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle.1 +1 -1
  43. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  44. data/bundler/lib/bundler/rubygems_integration.rb +8 -4
  45. data/bundler/lib/bundler/source/git/git_proxy.rb +6 -4
  46. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  47. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +6 -2
  48. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +8 -1
  49. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +5 -4
  50. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +4 -2
  51. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +4 -1
  52. data/bundler/lib/bundler/version.rb +1 -1
  53. data/lib/rubygems/core_ext/kernel_require.rb +113 -109
  54. data/lib/rubygems/deprecate.rb +2 -2
  55. data/lib/rubygems/ext/builder.rb +1 -2
  56. data/lib/rubygems/ext/cargo_builder.rb +129 -89
  57. data/lib/rubygems/package/tar_reader/entry.rb +6 -4
  58. data/lib/rubygems/specification_policy.rb +6 -1
  59. data/lib/rubygems.rb +11 -1
  60. data/rubygems-update.gemspec +1 -1
  61. data/test/rubygems/bundler_test_gem.rb +419 -0
  62. data/test/rubygems/test_gem.rb +0 -412
  63. data/test/rubygems/test_gem_command_manager.rb +25 -0
  64. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +2 -4
  65. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/{Cargo.lock → ext/custom_name_lib/Cargo.lock} +0 -0
  66. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/{Cargo.toml → ext/custom_name_lib/Cargo.toml} +0 -0
  67. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/{src → ext/custom_name_lib/src}/lib.rs +1 -1
  68. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/lib/custom_name.rb +1 -0
  69. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +4 -4
  70. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
  71. data/test/rubygems/test_gem_ext_cargo_builder.rb +9 -16
  72. data/test/rubygems/test_gem_ext_cargo_builder_unit.rb +5 -10
  73. data/test/rubygems/test_gem_package_tar_reader_entry.rb +60 -2
  74. data/test/rubygems/test_gem_specification.rb +17 -0
  75. metadata +8 -9
  76. data/bundler/lib/bundler/templates/gems.rb +0 -5
  77. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb +0 -21
  78. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb +0 -21
data/Manifest.txt CHANGED
@@ -205,7 +205,6 @@ bundler/lib/bundler/templates/Executable
205
205
  bundler/lib/bundler/templates/Executable.bundler
206
206
  bundler/lib/bundler/templates/Executable.standalone
207
207
  bundler/lib/bundler/templates/Gemfile
208
- bundler/lib/bundler/templates/gems.rb
209
208
  bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt
210
209
  bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
211
210
  bundler/lib/bundler/templates/newgem/Cargo.toml.tt
@@ -545,6 +544,7 @@ test/rubygems/alternate_cert.pem
545
544
  test/rubygems/alternate_cert_32.pem
546
545
  test/rubygems/alternate_key.pem
547
546
  test/rubygems/bad_rake.rb
547
+ test/rubygems/bundler_test_gem.rb
548
548
  test/rubygems/ca_cert.pem
549
549
  test/rubygems/child_cert.pem
550
550
  test/rubygems/child_cert_32.pem
@@ -652,15 +652,14 @@ test/rubygems/test_gem_doctor.rb
652
652
  test/rubygems/test_gem_ext_builder.rb
653
653
  test/rubygems/test_gem_ext_cargo_builder.rb
654
654
  test/rubygems/test_gem_ext_cargo_builder/custom_name/.gitignore
655
- test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock
656
- test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml
657
- test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
658
655
  test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec
659
- test/rubygems/test_gem_ext_cargo_builder/custom_name/src/lib.rs
656
+ test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock
657
+ test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml
658
+ test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/src/lib.rs
659
+ test/rubygems/test_gem_ext_cargo_builder/custom_name/lib/custom_name.rb
660
660
  test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/.gitignore
661
661
  test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock
662
662
  test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml
663
- test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb
664
663
  test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/rust_ruby_example.gemspec
665
664
  test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs
666
665
  test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ # 2.4.7 (February 15, 2023)
2
+
3
+ ## Enhancements:
4
+
5
+ - Add `--gemfile` flag to `bundle init` to configure gemfile name to generate [#6046](https://github.com/rubygems/rubygems/pull/6046)
6
+ - Improve solve failure explanations by using better wording [#6366](https://github.com/rubygems/rubygems/pull/6366)
7
+ - Restore better error message when locked ref does not exist [#6356](https://github.com/rubygems/rubygems/pull/6356)
8
+ - Avoid crashing when installing from a corrupted lockfile [#6355](https://github.com/rubygems/rubygems/pull/6355)
9
+ - Improve wording of unmet dependencies warning [#6357](https://github.com/rubygems/rubygems/pull/6357)
10
+ - Add Ruby 3.2 and 3.3 platforms to Gemfile DSL [#6346](https://github.com/rubygems/rubygems/pull/6346)
11
+
12
+ ## Bug fixes:
13
+
14
+ - Fix crash in pub grub involving empty ranges [#6365](https://github.com/rubygems/rubygems/pull/6365)
15
+ - Make gemspec file generated by `bundle gem` properly exclude itself from packaged gem [#6339](https://github.com/rubygems/rubygems/pull/6339)
16
+ - Preserve relative path sources in standalone setup [#6327](https://github.com/rubygems/rubygems/pull/6327)
17
+
18
+ # 2.4.6 (January 31, 2023)
19
+
20
+ ## Enhancements:
21
+
22
+ - Don't warn on `bundle binstubs --standalone --all` [#6312](https://github.com/rubygems/rubygems/pull/6312)
23
+
24
+ ## Bug fixes:
25
+
26
+ - Don't undo require decorations made by other gems [#6308](https://github.com/rubygems/rubygems/pull/6308)
27
+ - Fix `bundler/inline` not properly installing gems with extensions when used more than once [#6306](https://github.com/rubygems/rubygems/pull/6306)
28
+ - Fix `bundler/inline` not skipping installation when gems already there, when used more than once [#6305](https://github.com/rubygems/rubygems/pull/6305)
29
+
1
30
  # 2.4.5 (January 21, 2023)
2
31
 
3
32
  ## Bug fixes:
@@ -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 = "2023-01-21".freeze
8
- @git_commit_sha = "d8ff3b6e4a".freeze
7
+ @built_at = "2023-02-15".freeze
8
+ @git_commit_sha = "5d717a27e0".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -40,7 +40,11 @@ module Bundler
40
40
  end
41
41
 
42
42
  if options[:standalone]
43
- next Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") if gem_name == "bundler"
43
+ if gem_name == "bundler"
44
+ Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") unless options[:all]
45
+ next
46
+ end
47
+
44
48
  Bundler.settings.temporary(:path => (Bundler.settings[:path] || Bundler.root)) do
45
49
  installer.generate_standalone_bundler_executable_stubs(spec, installer_opts)
46
50
  end
@@ -32,7 +32,7 @@ module Bundler
32
32
  file << spec.to_gemfile
33
33
  end
34
34
  else
35
- File.open(File.expand_path("../templates/#{gemfile}", __dir__), "r") do |template|
35
+ File.open(File.expand_path("../templates/Gemfile", __dir__), "r") do |template|
36
36
  File.open(gemfile, "wb") do |destination|
37
37
  IO.copy_stream(template, destination)
38
38
  end
@@ -45,7 +45,7 @@ module Bundler
45
45
  private
46
46
 
47
47
  def gemfile
48
- @gemfile ||= Bundler.preferred_gemfile_name
48
+ @gemfile ||= options[:gemfile] || Bundler.preferred_gemfile_name
49
49
  end
50
50
  end
51
51
  end
@@ -156,6 +156,7 @@ module Bundler
156
156
  dependency listed in the gemspec file to the newly created Gemfile.
157
157
  D
158
158
  method_option "gemspec", :type => :string, :banner => "Use the specified .gemspec to create the Gemfile"
159
+ method_option "gemfile", :type => :string, :banner => "Use the specified name for the gemfile instead of 'Gemfile'"
159
160
  def init
160
161
  require_relative "cli/init"
161
162
  Init.new(options.dup).run
@@ -22,6 +22,8 @@ module Bundler
22
22
  2.7
23
23
  3.0
24
24
  3.1
25
+ 3.2
26
+ 3.3
25
27
  ].freeze
26
28
 
27
29
  KNOWN_MAJOR_VERSIONS = KNOWN_MINOR_VERSIONS.map {|v| v.split(".", 2).first }.uniq.freeze
@@ -9,7 +9,7 @@ module Bundler
9
9
  attr_reader :autorequire
10
10
  attr_reader :groups, :platforms, :gemfile, :path, :git, :github, :branch, :ref
11
11
 
12
- ALL_RUBY_VERSIONS = ((18..27).to_a + (30..31).to_a).freeze
12
+ ALL_RUBY_VERSIONS = ((18..27).to_a + (30..33).to_a).freeze
13
13
  PLATFORM_MAP = {
14
14
  :ruby => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
15
15
  :mri => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
@@ -31,6 +31,7 @@
31
31
  #
32
32
  def gemfile(install = false, options = {}, &gemfile)
33
33
  require_relative "../bundler"
34
+ Bundler.reset!
34
35
 
35
36
  opts = options.dup
36
37
  ui = opts.delete(:ui) { Bundler::UI::Shell.new }
@@ -38,9 +39,8 @@ def gemfile(install = false, options = {}, &gemfile)
38
39
  Bundler.ui = ui
39
40
  raise ArgumentError, "Unknown options: #{opts.keys.join(", ")}" unless opts.empty?
40
41
 
41
- begin
42
+ Bundler.with_unbundled_env do
42
43
  Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))
43
- old_gemfile = ENV["BUNDLE_GEMFILE"]
44
44
  Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"
45
45
 
46
46
  Bundler::Plugin.gemfile_install(&gemfile) if Bundler.feature_flag.plugins?
@@ -65,11 +65,9 @@ def gemfile(install = false, options = {}, &gemfile)
65
65
  runtime = Bundler::Runtime.new(nil, definition)
66
66
  runtime.setup.require
67
67
  end
68
- ensure
69
- if old_gemfile
70
- ENV["BUNDLE_GEMFILE"] = old_gemfile
71
- else
72
- ENV["BUNDLE_GEMFILE"] = ""
73
- end
68
+ end
69
+
70
+ if ENV["BUNDLE_GEMFILE"].nil?
71
+ ENV["BUNDLE_GEMFILE"] = ""
74
72
  end
75
73
  end
@@ -47,6 +47,13 @@ module Bundler
47
47
  dependencies.all? {|d| installed_specs.include? d.name }
48
48
  end
49
49
 
50
+ # Check whether spec's dependencies are missing, which can indicate a
51
+ # corrupted lockfile
52
+ def dependencies_missing?(all_specs)
53
+ spec_names = all_specs.map(&:name)
54
+ dependencies.any? {|d| !spec_names.include? d.name }
55
+ end
56
+
50
57
  # Represents only the non-development dependencies, the ones that are
51
58
  # itself and are in the total list.
52
59
  def dependencies
@@ -110,12 +117,17 @@ module Bundler
110
117
 
111
118
  warning = []
112
119
  warning << "Your lockfile doesn't include a valid resolution."
113
- warning << "You can fix this by regenerating your lockfile or trying to manually editing the bad locked gems to a version that satisfies all dependencies."
120
+ warning << "You can fix this by regenerating your lockfile or manually editing the bad locked gems to a version that satisfies all dependencies."
114
121
  warning << "The unmet dependencies are:"
115
122
 
116
123
  unmet_dependencies.each do |spec, unmet_spec_dependencies|
117
124
  unmet_spec_dependencies.each do |unmet_spec_dependency|
118
- warning << "* #{unmet_spec_dependency}, depended upon #{spec.full_name}, unsatisfied by #{@specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }.full_name}"
125
+ found = @specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }
126
+ if found
127
+ warning << "* #{unmet_spec_dependency}, dependency of #{spec.full_name}, unsatisfied by #{found.full_name}"
128
+ else
129
+ warning << "* #{unmet_spec_dependency}, dependency of #{spec.full_name} but missing from lockfile"
130
+ end
119
131
  end
120
132
  end
121
133
 
@@ -212,6 +224,8 @@ module Bundler
212
224
  if spec.dependencies_installed? @specs
213
225
  spec.state = :enqueued
214
226
  worker_pool.enq spec
227
+ elsif spec.dependencies_missing? @specs
228
+ spec.state = :failed
215
229
  end
216
230
  end
217
231
  end
@@ -52,7 +52,7 @@ module Bundler
52
52
 
53
53
  def gem_path(path, spec)
54
54
  full_path = Pathname.new(path).absolute? ? path : File.join(spec.full_gem_path, path)
55
- if spec.source.instance_of?(Source::Path)
55
+ if spec.source.instance_of?(Source::Path) && spec.source.path.absolute?
56
56
  full_path
57
57
  else
58
58
  Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path)).to_s
@@ -84,13 +84,17 @@ module Bundler
84
84
 
85
85
  def reverse_rubygems_kernel_mixin
86
86
  <<~END
87
- kernel = (class << ::Kernel; self; end)
88
- [kernel, ::Kernel].each do |k|
89
- if k.private_method_defined?(:gem_original_require)
90
- private_require = k.private_method_defined?(:require)
91
- k.send(:remove_method, :require)
92
- k.send(:define_method, :require, k.instance_method(:gem_original_require))
93
- k.send(:private, :require) if private_require
87
+ if Gem.respond_to?(:discover_gems_on_require=)
88
+ Gem.discover_gems_on_require = false
89
+ else
90
+ kernel = (class << ::Kernel; self; end)
91
+ [kernel, ::Kernel].each do |k|
92
+ if k.private_method_defined?(:gem_original_require)
93
+ private_require = k.private_method_defined?(:require)
94
+ k.send(:remove_method, :require)
95
+ k.send(:define_method, :require, k.instance_method(:gem_original_require))
96
+ k.send(:private, :require) if private_require
97
+ end
94
98
  end
95
99
  end
96
100
  END
@@ -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" "January 2023" "" ""
4
+ .TH "BUNDLE\-ADD" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-BINSTUBS" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-CACHE" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-CHECK" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-CLEAN" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-CONFIG" "1" "February 2023" "" ""
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\-CONSOLE" "1" "January 2023" "" ""
4
+ .TH "BUNDLE\-CONSOLE" "1" "February 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
@@ -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" "January 2023" "" ""
4
+ .TH "BUNDLE\-DOCTOR" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-EXEC" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-GEM" "1" "February 2023" "" ""
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\-HELP" "1" "January 2023" "" ""
4
+ .TH "BUNDLE\-HELP" "1" "February 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
@@ -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" "January 2023" "" ""
4
+ .TH "BUNDLE\-INFO" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-INIT" "1" "February 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
@@ -18,6 +18,10 @@ Init generates a default [\fBGemfile(5)\fR][Gemfile(5)] in the current working d
18
18
  \fB\-\-gemspec\fR
19
19
  Use the specified \.gemspec to create the [\fBGemfile(5)\fR][Gemfile(5)]
20
20
  .
21
+ .TP
22
+ \fB\-\-gemfile\fR
23
+ Use the specified name for the gemfile instead of \fBGemfile\fR
24
+ .
21
25
  .SH "FILES"
22
26
  Included in the default [\fBGemfile(5)\fR][Gemfile(5)] generated is the line \fB# frozen_string_literal: true\fR\. This is a magic comment supported for the first time in Ruby 2\.3\. The presence of this line results in all string literals in the file being implicitly frozen\.
23
27
  .
@@ -16,6 +16,8 @@ created [`Gemfile(5)`][Gemfile(5)].
16
16
 
17
17
  * `--gemspec`:
18
18
  Use the specified .gemspec to create the [`Gemfile(5)`][Gemfile(5)]
19
+ * `--gemfile`:
20
+ Use the specified name for the gemfile instead of `Gemfile`
19
21
 
20
22
  ## FILES
21
23
 
@@ -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" "January 2023" "" ""
4
+ .TH "BUNDLE\-INJECT" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-INSTALL" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-LIST" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-LOCK" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-OPEN" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-OUTDATED" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-PLATFORM" "1" "February 2023" "" ""
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\-PLUGIN" "1" "January 2023" "" ""
4
+ .TH "BUNDLE\-PLUGIN" "1" "February 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-plugin\fR \- Manage Bundler plugins
@@ -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" "January 2023" "" ""
4
+ .TH "BUNDLE\-PRISTINE" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-REMOVE" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-SHOW" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE\-UPDATE" "1" "February 2023" "" ""
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\-VERSION" "1" "January 2023" "" ""
4
+ .TH "BUNDLE\-VERSION" "1" "February 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-version\fR \- Prints Bundler version 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\-VIZ" "1" "January 2023" "" ""
4
+ .TH "BUNDLE\-VIZ" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "BUNDLE" "1" "February 2023" "" ""
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" "January 2023" "" ""
4
+ .TH "GEMFILE" "5" "February 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -227,10 +227,14 @@ module Bundler
227
227
 
228
228
  def reverse_rubygems_kernel_mixin
229
229
  # Disable rubygems' gem activation system
230
- kernel = (class << ::Kernel; self; end)
231
- [kernel, ::Kernel].each do |k|
232
- if k.private_method_defined?(:gem_original_require)
233
- redefine_method(k, :require, k.instance_method(:gem_original_require))
230
+ if Gem.respond_to?(:discover_gems_on_require=)
231
+ Gem.discover_gems_on_require = false
232
+ else
233
+ kernel = (class << ::Kernel; self; end)
234
+ [kernel, ::Kernel].each do |k|
235
+ if k.private_method_defined?(:gem_original_require)
236
+ redefine_method(k, :require, k.instance_method(:gem_original_require))
237
+ end
234
238
  end
235
239
  end
236
240
  end
@@ -139,8 +139,8 @@ module Bundler
139
139
  out, err, status = capture(command, path)
140
140
  return out if status.success?
141
141
 
142
- if err.include?("couldn't find remote ref")
143
- raise MissingGitRevisionError.new(command_with_no_credentials, path, explicit_ref, credential_filtered_uri)
142
+ if err.include?("couldn't find remote ref") || err.include?("not our ref")
143
+ raise MissingGitRevisionError.new(command_with_no_credentials, path, commit || explicit_ref, credential_filtered_uri)
144
144
  else
145
145
  raise GitCommandError.new(command_with_no_credentials, path, err)
146
146
  end
@@ -186,8 +186,6 @@ module Bundler
186
186
  end
187
187
 
188
188
  def refspec
189
- commit = pinned_to_full_sha? ? ref : @revision
190
-
191
189
  if commit
192
190
  @commit_ref = "refs/#{commit}-sha"
193
191
  return "#{commit}:#{@commit_ref}"
@@ -206,6 +204,10 @@ module Bundler
206
204
  "#{reference}:#{reference}"
207
205
  end
208
206
 
207
+ def commit
208
+ @commit ||= pinned_to_full_sha? ? ref : @revision
209
+ end
210
+
209
211
  def fully_qualified_ref
210
212
  if branch
211
213
  "refs/heads/#{branch}"
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
30
30
  spec.files = Dir.chdir(__dir__) do
31
31
  `git ls-files -z`.split("\x0").reject do |f|
32
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
32
+ (File.expand_path(f) == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
33
33
  end
34
34
  end
35
35
  spec.bindir = "exe"