bundler 2.5.10 → 2.5.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/lib/bundler/build_metadata.rb +2 -2
  4. data/lib/bundler/cli/install.rb +1 -1
  5. data/lib/bundler/compact_index_client/cache.rb +16 -7
  6. data/lib/bundler/constants.rb +8 -1
  7. data/lib/bundler/definition.rb +15 -24
  8. data/lib/bundler/errors.rb +14 -0
  9. data/lib/bundler/gem_helper.rb +1 -1
  10. data/lib/bundler/installer.rb +8 -8
  11. data/lib/bundler/man/bundle-add.1 +1 -1
  12. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  13. data/lib/bundler/man/bundle-cache.1 +1 -1
  14. data/lib/bundler/man/bundle-check.1 +1 -1
  15. data/lib/bundler/man/bundle-clean.1 +1 -1
  16. data/lib/bundler/man/bundle-config.1 +1 -1
  17. data/lib/bundler/man/bundle-console.1 +1 -1
  18. data/lib/bundler/man/bundle-doctor.1 +1 -1
  19. data/lib/bundler/man/bundle-exec.1 +1 -1
  20. data/lib/bundler/man/bundle-gem.1 +1 -1
  21. data/lib/bundler/man/bundle-help.1 +1 -1
  22. data/lib/bundler/man/bundle-info.1 +1 -1
  23. data/lib/bundler/man/bundle-init.1 +1 -1
  24. data/lib/bundler/man/bundle-inject.1 +1 -1
  25. data/lib/bundler/man/bundle-install.1 +1 -1
  26. data/lib/bundler/man/bundle-list.1 +1 -1
  27. data/lib/bundler/man/bundle-lock.1 +1 -1
  28. data/lib/bundler/man/bundle-open.1 +1 -1
  29. data/lib/bundler/man/bundle-outdated.1 +1 -1
  30. data/lib/bundler/man/bundle-platform.1 +1 -1
  31. data/lib/bundler/man/bundle-plugin.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-version.1 +1 -1
  37. data/lib/bundler/man/bundle-viz.1 +1 -1
  38. data/lib/bundler/man/bundle.1 +1 -1
  39. data/lib/bundler/man/gemfile.5 +1 -1
  40. data/lib/bundler/rubygems_ext.rb +20 -12
  41. data/lib/bundler/self_manager.rb +1 -1
  42. data/lib/bundler/shared_helpers.rb +6 -4
  43. data/lib/bundler/source/git/git_proxy.rb +8 -0
  44. data/lib/bundler/source/metadata.rb +2 -0
  45. data/lib/bundler/source/rubygems.rb +3 -2
  46. data/lib/bundler/source_list.rb +13 -2
  47. data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
  48. data/lib/bundler/version.rb +1 -1
  49. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2695a15d38685b993a09dcf7eb0acc5d52c61ea0259a5467b161bd5fd7a7ce6
4
- data.tar.gz: 794b454b5687c3cd0851daf45d355326cd8eaddce8abfc46e3e01f8cdbed87ad
3
+ metadata.gz: e07468635327ec2b436d1015aadd6b09377511e9793dbd614e4d528104f6cf95
4
+ data.tar.gz: 6fd4b37515fe7854b32c7cfa0a48568a36a5f2a81f0ca93be86c263fec92eabe
5
5
  SHA512:
6
- metadata.gz: eb611d6aed04553214e7304d6b3775cc64e34f5eb7e251c67d3e2e80fffb117681b322bbbaf759e58c942675b95c47d934f27ed715bd63b2ae4542a52c0a4ab5
7
- data.tar.gz: b5482313980b8e1e3dd3477b21e16248b009dd22ff54c519cd2f7328b2031689a18c724eb6c6fe26d441c532bb38bd18e0d91bd256f72f05ebac77067f9e8ac6
6
+ metadata.gz: 52cc1652e43f2568c0979188ce7a78f13e92a217fc67aa5063ce9d882739e288afc0ed43db43c18de8522e7b1460d9946a9ded85f3dd4195b9e411d6e2ef1c3f
7
+ data.tar.gz: '0581fccb9f4fb784b135bd5ffd84bd9b25e05597b9194d8d01844b243c85e899477b93204ea49298d72282d0bb38692b3aefebb78e24329853ac9e85d3effa2a'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # 2.5.11 (May 28, 2024)
2
+
3
+ ## Deprecations:
4
+
5
+ - Deprecate Bundler constants [#7653](https://github.com/rubygems/rubygems/pull/7653)
6
+
7
+ ## Enhancements:
8
+
9
+ - Bump `bundle gem` generated COC to Contributor Covenant 2.1 [#7692](https://github.com/rubygems/rubygems/pull/7692)
10
+ - Retry a full clone when git server does not support shallow capabilities [#7649](https://github.com/rubygems/rubygems/pull/7649)
11
+
12
+ ## Bug fixes:
13
+
14
+ - Fix regression when caching gems from secondary sources [#7659](https://github.com/rubygems/rubygems/pull/7659)
15
+ - Fix error when Bundler installation is corrupted [#7642](https://github.com/rubygems/rubygems/pull/7642)
16
+ - Fix crash caused by RubyGems `require` gem activation logic running before Bundler can properly register its own monkeypatches [#7647](https://github.com/rubygems/rubygems/pull/7647)
17
+
18
+ ## Performance:
19
+
20
+ - Update cache checksums to decrease string allocations [#7637](https://github.com/rubygems/rubygems/pull/7637)
21
+ - Fix performance regression in applications with a local cache [#7680](https://github.com/rubygems/rubygems/pull/7680)
22
+
23
+ ## Documentation:
24
+
25
+ - Recommend `bin/rake` over `rake` in contributing docs [#7648](https://github.com/rubygems/rubygems/pull/7648)
26
+ - Monthly man update for May 2024 [#7640](https://github.com/rubygems/rubygems/pull/7640)
27
+ - Clarify Bundler support policy [#7633](https://github.com/rubygems/rubygems/pull/7633)
28
+
1
29
  # 2.5.10 (May 3, 2024)
2
30
 
3
31
  ## Security:
@@ -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 = "2024-05-03".freeze
8
- @git_commit_sha = "24cac00613".freeze
7
+ @built_at = "2024-05-28".freeze
8
+ @git_commit_sha = "4afb2d450a".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -14,7 +14,7 @@ module Bundler
14
14
 
15
15
  Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
16
16
 
17
- Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
17
+ Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Gem.freebsd_platform?
18
18
 
19
19
  # Disable color in deployment mode
20
20
  Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment]
@@ -55,14 +55,9 @@ module Bundler
55
55
  end
56
56
 
57
57
  def checksums
58
- checksums = {}
59
-
60
- lines(versions_path).each do |line|
61
- name, _, checksum = line.split(" ", 3)
62
- checksums[name] = checksum
58
+ lines(versions_path).each_with_object({}) do |line, checksums|
59
+ parse_version_checksum(line, checksums)
63
60
  end
64
-
65
- checksums
66
61
  end
67
62
 
68
63
  def dependencies(name)
@@ -106,6 +101,20 @@ module Bundler
106
101
  @dependency_parser.parse(line)
107
102
  end
108
103
 
104
+ # This is mostly the same as `split(" ", 3)` but it avoids allocating extra objects.
105
+ # This method gets called at least once for every gem when parsing versions.
106
+ def parse_version_checksum(line, checksums)
107
+ line.freeze # allows slicing into the string to not allocate a copy of the line
108
+ name_end = line.index(" ")
109
+ checksum_start = line.index(" ", name_end + 1) + 1
110
+ checksum_end = line.size - checksum_start
111
+ # freeze name since it is used as a hash key
112
+ # pre-freezing means a frozen copy isn't created
113
+ name = line[0, name_end].freeze
114
+ checksum = line[checksum_start, checksum_end]
115
+ checksums[name] = checksum
116
+ end
117
+
109
118
  def info_roots
110
119
  [
111
120
  directory.join("info"),
@@ -1,7 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rbconfig"
4
+
3
5
  module Bundler
4
6
  WINDOWS = RbConfig::CONFIG["host_os"] =~ /(msdos|mswin|djgpp|mingw)/
7
+ deprecate_constant :WINDOWS
8
+
5
9
  FREEBSD = RbConfig::CONFIG["host_os"].to_s.include?("bsd")
6
- NULL = File::NULL
10
+ deprecate_constant :FREEBSD
11
+
12
+ NULL = File::NULL
13
+ deprecate_constant :NULL
7
14
  end
@@ -69,7 +69,6 @@ module Bundler
69
69
  @sources = sources
70
70
  @unlock = unlock
71
71
  @optional_groups = optional_groups
72
- @remote = false
73
72
  @prefer_local = false
74
73
  @specs = nil
75
74
  @ruby_version = ruby_version
@@ -164,37 +163,24 @@ module Bundler
164
163
  end
165
164
 
166
165
  def resolve_only_locally!
167
- @remote = false
168
166
  sources.local_only!
169
167
  resolve
170
168
  end
171
169
 
172
170
  def resolve_with_cache!
171
+ sources.local!
173
172
  sources.cached!
174
173
  resolve
175
174
  end
176
175
 
177
176
  def resolve_remotely!
178
- @remote = true
177
+ sources.cached!
179
178
  sources.remote!
180
179
  resolve
181
180
  end
182
181
 
183
- def resolution_mode=(options)
184
- if options["local"]
185
- @remote = false
186
- else
187
- @remote = true
188
- @prefer_local = options["prefer-local"]
189
- end
190
- end
191
-
192
- def setup_sources_for_resolve
193
- if @remote == false
194
- sources.cached!
195
- else
196
- sources.remote!
197
- end
182
+ def prefer_local!
183
+ @prefer_local = true
198
184
  end
199
185
 
200
186
  # For given dependency list returns a SpecSet with Gemspec of all the required
@@ -310,7 +296,12 @@ module Bundler
310
296
  end
311
297
  end
312
298
  else
313
- Bundler.ui.debug "Found changes from the lockfile, re-resolving dependencies because #{change_reason}"
299
+ if lockfile_exists?
300
+ Bundler.ui.debug "Found changes from the lockfile, re-resolving dependencies because #{change_reason}"
301
+ else
302
+ Bundler.ui.debug "Resolving dependencies because there's no lockfile"
303
+ end
304
+
314
305
  start_resolution
315
306
  end
316
307
  end
@@ -483,6 +474,8 @@ module Bundler
483
474
  private :sources
484
475
 
485
476
  def nothing_changed?
477
+ return false unless lockfile_exists?
478
+
486
479
  !@source_changes &&
487
480
  !@dependency_changes &&
488
481
  !@new_platform &&
@@ -587,7 +580,7 @@ module Bundler
587
580
  if missing_specs.any?
588
581
  missing_specs.each do |s|
589
582
  locked_gem = @locked_specs[s.name].last
590
- next if locked_gem.nil? || locked_gem.version != s.version || !@remote
583
+ next if locked_gem.nil? || locked_gem.version != s.version || sources.local_mode?
591
584
  raise GemNotFound, "Your bundle is locked to #{locked_gem} from #{locked_gem.source}, but that version can " \
592
585
  "no longer be found in that source. That means the author of #{locked_gem} has removed it. " \
593
586
  "You'll need to update your bundle to a version other than #{locked_gem} that hasn't been " \
@@ -606,7 +599,7 @@ module Bundler
606
599
  break if incomplete_specs.empty?
607
600
 
608
601
  Bundler.ui.debug("The lockfile does not have all gems needed for the current platform though, Bundler will still re-resolve dependencies")
609
- setup_sources_for_resolve
602
+ sources.remote!
610
603
  resolution_packages.delete(incomplete_specs)
611
604
  @resolve = start_resolution
612
605
  specs = resolve.materialize(dependencies)
@@ -967,7 +960,7 @@ module Bundler
967
960
  else
968
961
  { default: Source::RubygemsAggregate.new(sources, source_map) }.merge(source_map.direct_requirements)
969
962
  end
970
- source_requirements.merge!(source_map.locked_requirements) unless @remote
963
+ source_requirements.merge!(source_map.locked_requirements) if nothing_changed?
971
964
  metadata_dependencies.each do |dep|
972
965
  source_requirements[dep.name] = sources.metadata_source
973
966
  end
@@ -1038,8 +1031,6 @@ module Bundler
1038
1031
 
1039
1032
  def dup_for_full_unlock
1040
1033
  unlocked_definition = self.class.new(@lockfile, @dependencies, @sources, true, @ruby_version, @optional_groups, @gemfiles)
1041
- unlocked_definition.resolution_mode = { "local" => !@remote }
1042
- unlocked_definition.setup_sources_for_resolve
1043
1034
  unlocked_definition.gem_version_promoter.tap do |gvp|
1044
1035
  gvp.level = gem_version_promoter.level
1045
1036
  gvp.strict = gem_version_promoter.strict
@@ -230,4 +230,18 @@ module Bundler
230
230
 
231
231
  status_code(38)
232
232
  end
233
+
234
+ class CorruptBundlerInstallError < BundlerError
235
+ def initialize(loaded_spec)
236
+ @loaded_spec = loaded_spec
237
+ end
238
+
239
+ def message
240
+ "The running version of Bundler (#{Bundler::VERSION}) does not match the version of the specification installed for it (#{@loaded_spec.version}). " \
241
+ "This can be caused by reinstalling Ruby without removing previous installation, leaving around an upgraded default version of Bundler. " \
242
+ "Reinstalling Ruby from scratch should fix the problem."
243
+ end
244
+
245
+ status_code(39)
246
+ end
233
247
  end
@@ -47,7 +47,7 @@ module Bundler
47
47
  built_gem_path = build_gem
48
48
  end
49
49
 
50
- desc "Generate SHA512 checksum if #{name}-#{version}.gem into the checksums directory."
50
+ desc "Generate SHA512 checksum of #{name}-#{version}.gem into the checksums directory."
51
51
  task "build:checksum" => "build" do
52
52
  build_checksum(built_gem_path)
53
53
  end
@@ -249,15 +249,15 @@ module Bundler
249
249
 
250
250
  # returns whether or not a re-resolve was needed
251
251
  def resolve_if_needed(options)
252
- @definition.resolution_mode = options
253
-
254
- if !@definition.unlocking? && !options["force"] && !Bundler.settings[:inline] && Bundler.default_lockfile.file?
255
- return false if @definition.nothing_changed? && !@definition.missing_specs?
252
+ @definition.prefer_local! if options["prefer-local"]
253
+
254
+ if options["local"] || (@definition.no_resolve_needed? && !@definition.missing_specs?)
255
+ @definition.resolve_with_cache!
256
+ false
257
+ else
258
+ @definition.resolve_remotely!
259
+ true
256
260
  end
257
-
258
- @definition.setup_sources_for_resolve
259
-
260
- true
261
261
  end
262
262
 
263
263
  def lock
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-ADD" "1" "April 2024" ""
3
+ .TH "BUNDLE\-ADD" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-BINSTUBS" "1" "April 2024" ""
3
+ .TH "BUNDLE\-BINSTUBS" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CACHE" "1" "April 2024" ""
3
+ .TH "BUNDLE\-CACHE" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CHECK" "1" "April 2024" ""
3
+ .TH "BUNDLE\-CHECK" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CLEAN" "1" "April 2024" ""
3
+ .TH "BUNDLE\-CLEAN" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONFIG" "1" "April 2024" ""
3
+ .TH "BUNDLE\-CONFIG" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-config\fR \- Set bundler configuration options
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONSOLE" "1" "April 2024" ""
3
+ .TH "BUNDLE\-CONSOLE" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-DOCTOR" "1" "April 2024" ""
3
+ .TH "BUNDLE\-DOCTOR" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-EXEC" "1" "April 2024" ""
3
+ .TH "BUNDLE\-EXEC" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-GEM" "1" "April 2024" ""
3
+ .TH "BUNDLE\-GEM" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-HELP" "1" "April 2024" ""
3
+ .TH "BUNDLE\-HELP" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INFO" "1" "April 2024" ""
3
+ .TH "BUNDLE\-INFO" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-info\fR \- Show information for the given gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INIT" "1" "April 2024" ""
3
+ .TH "BUNDLE\-INIT" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INJECT" "1" "April 2024" ""
3
+ .TH "BUNDLE\-INJECT" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INSTALL" "1" "April 2024" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LIST" "1" "April 2024" ""
3
+ .TH "BUNDLE\-LIST" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-list\fR \- List all the gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LOCK" "1" "April 2024" ""
3
+ .TH "BUNDLE\-LOCK" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OPEN" "1" "April 2024" ""
3
+ .TH "BUNDLE\-OPEN" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OUTDATED" "1" "April 2024" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLATFORM" "1" "April 2024" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLUGIN" "1" "April 2024" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PRISTINE" "1" "April 2024" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-REMOVE" "1" "April 2024" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-SHOW" "1" "April 2024" ""
3
+ .TH "BUNDLE\-SHOW" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-UPDATE" "1" "April 2024" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-update\fR \- Update your gems to the latest available versions
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VERSION" "1" "April 2024" ""
3
+ .TH "BUNDLE\-VERSION" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-version\fR \- Prints Bundler version information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VIZ" "1" "April 2024" ""
3
+ .TH "BUNDLE\-VIZ" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE" "1" "April 2024" ""
3
+ .TH "BUNDLE" "1" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\fR \- Ruby Dependency Management
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "GEMFILE" "5" "April 2024" ""
3
+ .TH "GEMFILE" "5" "May 2024" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -1,11 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "pathname"
4
-
5
3
  require "rubygems" unless defined?(Gem)
6
4
 
7
- require "rubygems/specification"
8
-
9
5
  # We can't let `Gem::Source` be autoloaded in the `Gem::Specification#source`
10
6
  # redefinition below, so we need to load it upfront. The reason is that if
11
7
  # Bundler monkeypatches are loaded before RubyGems activates an executable (for
@@ -17,10 +13,6 @@ require "rubygems/specification"
17
13
  # `Gem::Source` from the redefined `Gem::Specification#source`.
18
14
  require "rubygems/source"
19
15
 
20
- require_relative "match_metadata"
21
- require_relative "force_platform"
22
- require_relative "match_platform"
23
-
24
16
  # Cherry-pick fixes to `Gem.ruby_version` to be useful for modern Bundler
25
17
  # versions and ignore patchlevels
26
18
  # (https://github.com/rubygems/rubygems/pull/5472,
@@ -31,7 +23,19 @@ unless Gem.ruby_version.to_s == RUBY_VERSION || RUBY_PATCHLEVEL == -1
31
23
  end
32
24
 
33
25
  module Gem
26
+ # Can be removed once RubyGems 3.5.11 support is dropped
27
+ unless Gem.respond_to?(:freebsd_platform?)
28
+ def self.freebsd_platform?
29
+ RbConfig::CONFIG["host_os"].to_s.include?("bsd")
30
+ end
31
+ end
32
+
33
+ require "rubygems/specification"
34
+
34
35
  class Specification
36
+ require_relative "match_metadata"
37
+ require_relative "match_platform"
38
+
35
39
  include ::Bundler::MatchMetadata
36
40
  include ::Bundler::MatchPlatform
37
41
 
@@ -48,7 +52,7 @@ module Gem
48
52
 
49
53
  def full_gem_path
50
54
  if source.respond_to?(:root)
51
- Pathname.new(loaded_from).dirname.expand_path(source.root).to_s
55
+ File.expand_path(File.dirname(loaded_from), source.root)
52
56
  else
53
57
  rg_full_gem_path
54
58
  end
@@ -148,17 +152,21 @@ module Gem
148
152
 
149
153
  module BetterPermissionError
150
154
  def data
151
- Bundler::SharedHelpers.filesystem_access(loaded_from, :read) do
152
- super
153
- end
155
+ super
156
+ rescue Errno::EACCES
157
+ raise Bundler::PermissionError.new(loaded_from, :read)
154
158
  end
155
159
  end
156
160
 
161
+ require "rubygems/stub_specification"
162
+
157
163
  class StubSpecification
158
164
  prepend BetterPermissionError
159
165
  end
160
166
 
161
167
  class Dependency
168
+ require_relative "force_platform"
169
+
162
170
  include ::Bundler::ForcePlatform
163
171
 
164
172
  attr_accessor :source, :groups
@@ -113,7 +113,7 @@ module Bundler
113
113
  end
114
114
 
115
115
  def local_specs
116
- @local_specs ||= Bundler::Source::Rubygems.new("allow_local" => true, "allow_cached" => true).specs.select {|spec| spec.name == "bundler" }
116
+ @local_specs ||= Bundler::Source::Rubygems.new("allow_local" => true).specs.select {|spec| spec.name == "bundler" }
117
117
  end
118
118
 
119
119
  def remote_specs
@@ -1,15 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "pathname"
4
- require "rbconfig"
5
-
6
3
  require_relative "version"
7
- require_relative "constants"
8
4
  require_relative "rubygems_integration"
9
5
  require_relative "current_ruby"
10
6
 
11
7
  module Bundler
8
+ autoload :WINDOWS, File.expand_path("constants", __dir__)
9
+ autoload :FREEBSD, File.expand_path("constants", __dir__)
10
+ autoload :NULL, File.expand_path("constants", __dir__)
11
+
12
12
  module SharedHelpers
13
+ autoload :Pathname, "pathname"
14
+
13
15
  def root
14
16
  gemfile = find_gemfile
15
17
  raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
@@ -182,6 +182,14 @@ module Bundler
182
182
  if err.include?("Could not find remote branch")
183
183
  raise MissingGitRevisionError.new(command_with_no_credentials, nil, explicit_ref, credential_filtered_uri)
184
184
  else
185
+ idx = command.index("--depth")
186
+ if idx
187
+ command.delete_at(idx)
188
+ command.delete_at(idx)
189
+ command_with_no_credentials = check_allowed(command)
190
+
191
+ err += "Retrying without --depth argument."
192
+ end
185
193
  raise GitCommandError.new(command_with_no_credentials, path, err)
186
194
  end
187
195
  end
@@ -11,6 +11,8 @@ module Bundler
11
11
  end
12
12
 
13
13
  if local_spec = Gem.loaded_specs["bundler"]
14
+ raise CorruptBundlerInstallError.new(local_spec) if local_spec.version.to_s != Bundler::VERSION
15
+
14
16
  idx << local_spec
15
17
  else
16
18
  idx << Gem::Specification.new do |s|
@@ -17,7 +17,7 @@ module Bundler
17
17
  @remotes = []
18
18
  @dependency_names = []
19
19
  @allow_remote = false
20
- @allow_cached = options["allow_cached"] || false
20
+ @allow_cached = false
21
21
  @allow_local = options["allow_local"] || false
22
22
  @checksum_store = Checksum::Store.new
23
23
 
@@ -50,10 +50,11 @@ module Bundler
50
50
  end
51
51
 
52
52
  def cached!
53
+ return unless File.exist?(cache_path)
54
+
53
55
  return if @allow_cached
54
56
 
55
57
  @specs = nil
56
- @allow_local = true
57
58
  @allow_cached = true
58
59
  end
59
60
 
@@ -9,7 +9,7 @@ module Bundler
9
9
  :metadata_source
10
10
 
11
11
  def global_rubygems_source
12
- @global_rubygems_source ||= rubygems_aggregate_class.new("allow_local" => true, "allow_cached" => true)
12
+ @global_rubygems_source ||= rubygems_aggregate_class.new("allow_local" => true)
13
13
  end
14
14
 
15
15
  def initialize
@@ -22,6 +22,7 @@ module Bundler
22
22
  @metadata_source = Source::Metadata.new
23
23
 
24
24
  @merged_gem_lockfile_sections = false
25
+ @local_mode = true
25
26
  end
26
27
 
27
28
  def merged_gem_lockfile_sections?
@@ -73,6 +74,10 @@ module Bundler
73
74
  global_rubygems_source
74
75
  end
75
76
 
77
+ def local_mode?
78
+ @local_mode
79
+ end
80
+
76
81
  def default_source
77
82
  global_path_source || global_rubygems_source
78
83
  end
@@ -140,11 +145,17 @@ module Bundler
140
145
  all_sources.each(&:local_only!)
141
146
  end
142
147
 
148
+ def local!
149
+ all_sources.each(&:local!)
150
+ end
151
+
143
152
  def cached!
144
153
  all_sources.each(&:cached!)
145
154
  end
146
155
 
147
156
  def remote!
157
+ @local_mode = false
158
+
148
159
  all_sources.each(&:remote!)
149
160
  end
150
161
 
@@ -178,7 +189,7 @@ module Bundler
178
189
  replacement_source = replace_rubygems_source(replacement_sources, global_rubygems_source)
179
190
  return global_rubygems_source unless replacement_source
180
191
 
181
- replacement_source.cached!
192
+ replacement_source.local!
182
193
  replacement_source
183
194
  end
184
195
 
@@ -2,83 +2,131 @@
2
2
 
3
3
  ## Our Pledge
4
4
 
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
6
11
 
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
8
14
 
9
15
  ## Our Standards
10
16
 
11
- Examples of behavior that contributes to a positive environment for our community include:
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
12
19
 
13
20
  * Demonstrating empathy and kindness toward other people
14
21
  * Being respectful of differing opinions, viewpoints, and experiences
15
22
  * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
18
27
 
19
28
  Examples of unacceptable behavior include:
20
29
 
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
23
32
  * Trolling, insulting or derogatory comments, and personal or political attacks
24
33
  * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
27
36
  * Other conduct which could reasonably be considered inappropriate in a
28
37
  professional setting
29
38
 
30
39
  ## Enforcement Responsibilities
31
40
 
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
33
45
 
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
35
50
 
36
51
  ## Scope
37
52
 
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
39
58
 
40
59
  ## Enforcement
41
60
 
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at <%= config[:email] %>. All complaints will be reviewed and investigated promptly and fairly.
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
43
65
 
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
45
68
 
46
69
  ## Enforcement Guidelines
47
70
 
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
49
73
 
50
74
  ### 1. Correction
51
75
 
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
53
78
 
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
55
82
 
56
83
  ### 2. Warning
57
84
 
58
- **Community Impact**: A violation through a single incident or series of actions.
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
59
87
 
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
61
94
 
62
95
  ### 3. Temporary Ban
63
96
 
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
65
99
 
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
67
105
 
68
106
  ### 4. Permanent Ban
69
107
 
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
71
111
 
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
73
114
 
74
115
  ## Attribution
75
116
 
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
78
120
 
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
82
123
 
83
124
  For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.5.10".freeze
4
+ VERSION = "2.5.11".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.5.10
4
+ version: 2.5.11
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: 2024-05-03 00:00:00.000000000 Z
25
+ date: 2024-05-28 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
@@ -399,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
399
399
  - !ruby/object:Gem::Version
400
400
  version: 3.2.3
401
401
  requirements: []
402
- rubygems_version: 3.5.10
402
+ rubygems_version: 3.5.11
403
403
  signing_key:
404
404
  specification_version: 4
405
405
  summary: The best way to manage your application's dependencies