bundler 2.3.5 → 2.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b0d885e627a0cd83ab152b691c763806970a6cc0b3660a58cada89848613b3c
4
- data.tar.gz: be879e2e5d4bc4a5bdc9c34d12e1dd4644ca6a15a3cf109100a7717e4b84d7bf
3
+ metadata.gz: a47da55ac7611bc2d11a3e51335e288b92eee55c4f9fc9359372cd6f22ee4467
4
+ data.tar.gz: dcc894fbd93a03bf1b7e26613ae130524f54dbc8f16bad8d8adf94920138b733
5
5
  SHA512:
6
- metadata.gz: 5054958fd89192f4cf35e74b5c779e394e23e991f966cca3b4a4961ece6181ff0f0c7c17bfb52a0cd956ad45a110ea75597a96865d2f17f2dff9f4bcd5b84113
7
- data.tar.gz: c8ec46b4b31b44b45f72f03ac076a8626d6075ac38069b676deb696051d220e761305a0f1c8432ef9b2556095eb2de4ce23fc42424ac453034e0cc80e88d4588
6
+ metadata.gz: 4be9c6e3666eca2820132aaf02969ace58cbe9530743cbe34192c626f777a71c9997ad3e4d82a5c06dbcc111a5b45c669ffdde45b855cb62e49df2667b0c088e
7
+ data.tar.gz: 6cddfad4cec130c09bab8abef8608a1379bf07782bb36960fffbe4db071231e9dd3e4f0617573b9131b7a1a2e2faf3af81654b39a42d1c7e506297c0492f04d6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ # 2.3.6 (January 26, 2022)
2
+
3
+ ## Enhancements:
4
+
5
+ - Use `Gem::Platform.local` instead of `RUBY_PLATFORM` when displaying local platform [#5306](https://github.com/rubygems/rubygems/pull/5306)
6
+ - Lock standard.yml to the required ruby version [#5284](https://github.com/rubygems/rubygems/pull/5284)
7
+ - Use `Fiddle` in `bundle doctor` to check for dynamic library presence [#5173](https://github.com/rubygems/rubygems/pull/5173)
8
+
9
+ ## Bug fixes:
10
+
11
+ - Fix edge case where gems were incorrectly removed from the lockfile [#5302](https://github.com/rubygems/rubygems/pull/5302)
12
+ - Fix `force_ruby_platform` ignored when lockfile includes current specific platform [#5304](https://github.com/rubygems/rubygems/pull/5304)
13
+ - Create minitest file to underscored path in "bundle gem" command with dashed gem name [#5273](https://github.com/rubygems/rubygems/pull/5273)
14
+ - Fix regression with old marshaled specs having null `required_rubygems_version` [#5291](https://github.com/rubygems/rubygems/pull/5291)
15
+
1
16
  # 2.3.5 (January 12, 2022)
2
17
 
3
18
  ## 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 = "2022-01-12".freeze
8
- @git_commit_sha = "a13d015fcb".freeze
7
+ @built_at = "2022-01-26".freeze
8
+ @git_commit_sha = "056f64c33a".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "rbconfig"
4
4
  require "shellwords"
5
+ require "fiddle"
5
6
 
6
7
  module Bundler
7
8
  class CLI::Doctor
@@ -71,7 +72,14 @@ module Bundler
71
72
 
72
73
  definition.specs.each do |spec|
73
74
  bundles_for_gem(spec).each do |bundle|
74
- bad_paths = dylibs(bundle).select {|f| !File.exist?(f) }
75
+ bad_paths = dylibs(bundle).select do |f|
76
+ begin
77
+ Fiddle.dlopen(f)
78
+ false
79
+ rescue Fiddle::DLError
80
+ true
81
+ end
82
+ end
75
83
  if bad_paths.any?
76
84
  broken_links[spec] ||= []
77
85
  broken_links[spec].concat(bad_paths)
@@ -38,6 +38,7 @@ module Bundler
38
38
  namespaced_path = name.tr("-", "/")
39
39
  constant_name = name.gsub(/-[_-]*(?![_-]|$)/) { "::" }.gsub(/([_-]+|(::)|^)(.|$)/) { $2.to_s + $3.upcase }
40
40
  constant_array = constant_name.split("::")
41
+ minitest_constant_name = constant_array.clone.tap {|a| a[-1] = "Test#{a[-1]}" }.join("::") # Foo::Bar => Foo::TestBar
41
42
 
42
43
  use_git = Bundler.git_present? && options[:git]
43
44
 
@@ -69,6 +70,7 @@ module Bundler
69
70
  :git => use_git,
70
71
  :github_username => github_username.empty? ? "[USERNAME]" : github_username,
71
72
  :required_ruby_version => required_ruby_version,
73
+ :minitest_constant_name => minitest_constant_name,
72
74
  }
73
75
  ensure_safe_gem_name(name, constant_array)
74
76
 
@@ -104,9 +106,17 @@ module Bundler
104
106
  )
105
107
  config[:test_task] = :spec
106
108
  when "minitest"
109
+ # Generate path for minitest target file (FileList["test/**/test_*.rb"])
110
+ # foo => test/test_foo.rb
111
+ # foo-bar => test/foo/test_bar.rb
112
+ # foo_bar => test/test_foo_bar.rb
113
+ paths = namespaced_path.rpartition("/")
114
+ paths[2] = "test_#{paths[2]}"
115
+ minitest_namespaced_path = paths.join("")
116
+
107
117
  templates.merge!(
108
118
  "test/minitest/test_helper.rb.tt" => "test/test_helper.rb",
109
- "test/minitest/test_newgem.rb.tt" => "test/test_#{namespaced_path}.rb"
119
+ "test/minitest/test_newgem.rb.tt" => "test/#{minitest_namespaced_path}.rb"
110
120
  )
111
121
  config[:test_task] = :test
112
122
  when "test-unit"
@@ -23,7 +23,7 @@ module Bundler
23
23
  output << "No ruby version specified"
24
24
  end
25
25
  else
26
- output << "Your platform is: #{RUBY_PLATFORM}"
26
+ output << "Your platform is: #{Gem::Platform.local}"
27
27
  output << "Your app has gems that work on these platforms:\n#{platforms.join("\n")}"
28
28
 
29
29
  if ruby_version
@@ -265,7 +265,7 @@ module Bundler
265
265
  else
266
266
  # Run a resolve against the locally available gems
267
267
  Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
268
- expanded_dependencies = expand_dependencies(dependencies + metadata_dependencies, @remote)
268
+ expanded_dependencies = expand_dependencies(dependencies + metadata_dependencies, true)
269
269
  Resolver.resolve(expanded_dependencies, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
270
270
  end
271
271
  end
@@ -495,6 +495,7 @@ module Bundler
495
495
 
496
496
  def current_ruby_platform_locked?
497
497
  return false unless generic_local_platform == Gem::Platform::RUBY
498
+ return false if Bundler.settings[:force_ruby_platform] && !@platforms.include?(Gem::Platform::RUBY)
498
499
 
499
500
  current_platform_locked?
500
501
  end
data/lib/bundler/env.rb CHANGED
@@ -71,7 +71,7 @@ module Bundler
71
71
  def self.ruby_version
72
72
  str = String.new(RUBY_VERSION)
73
73
  str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
74
- str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]"
74
+ str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{Gem::Platform.local}]"
75
75
  end
76
76
 
77
77
  def self.git_version
@@ -27,6 +27,13 @@ module Bundler
27
27
  @platform = _remote_specification.platform
28
28
  end
29
29
 
30
+ # A fallback is included because the original version of the specification
31
+ # API didn't include that field, so some marshalled specs in the index have it
32
+ # set to +nil+.
33
+ def required_rubygems_version
34
+ @required_rubygems_version ||= _remote_specification.required_rubygems_version || Gem::Requirement.default
35
+ end
36
+
30
37
  def full_name
31
38
  if platform == Gem::Platform::RUBY || platform.nil?
32
39
  "#{@name}-#{@version}"
@@ -249,10 +249,11 @@ module Bundler
249
249
  end
250
250
 
251
251
  def verify_gemfile_dependencies_are_found!(requirements)
252
- requirements.each do |requirement|
252
+ requirements.map! do |requirement|
253
253
  name = requirement.name
254
- next if name == "bundler"
255
- next unless search_for(requirement).empty?
254
+ next requirement if name == "bundler"
255
+ next requirement unless search_for(requirement).empty?
256
+ next unless requirement.current_platform?
256
257
 
257
258
  if (base = @base[name]) && !base.empty?
258
259
  version = base.first.version
@@ -266,7 +267,7 @@ module Bundler
266
267
  message = gem_not_found_message(name, requirement, source_for(name))
267
268
  end
268
269
  raise GemNotFound, message
269
- end
270
+ end.compact!
270
271
  end
271
272
 
272
273
  def gem_not_found_message(name, requirement, source, extra_message = "")
@@ -1,2 +1,3 @@
1
1
  # For available configuration options, see:
2
2
  # https://github.com/testdouble/standard
3
+ ruby_version: <%= ::Gem::Version.new(config[:required_ruby_version]).segments[0..1].join(".") %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "test_helper"
4
4
 
5
- class Test<%= config[:constant_name] %> < Minitest::Test
5
+ class <%= config[:minitest_constant_name] %> < Minitest::Test
6
6
  def test_that_it_has_a_version_number
7
7
  refute_nil ::<%= config[:constant_name] %>::VERSION
8
8
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.3.5".freeze
4
+ VERSION = "2.3.6".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.3.5
4
+ version: 2.3.6
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: 2022-01-12 00:00:00.000000000 Z
25
+ date: 2022-01-26 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
@@ -370,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
370
370
  - !ruby/object:Gem::Version
371
371
  version: 2.5.2
372
372
  requirements: []
373
- rubygems_version: 3.3.5
373
+ rubygems_version: 3.3.6
374
374
  signing_key:
375
375
  specification_version: 4
376
376
  summary: The best way to manage your application's dependencies