bundler 2.5.2 → 2.5.3

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: a6a2b30d88cbd8182542e60988d19819d7a99751c256c3cdfb4818dd78686d0f
4
- data.tar.gz: 90b8f7f6f40ce0167c852dde2b2556e723c57bc1f93b03b175557ff8d8f93db3
3
+ metadata.gz: 7b424116a8722a58d7872569da843f8d82e59165e44d7016c9e3160b4e5c7e17
4
+ data.tar.gz: e3d151c03cb0b9e31087992dec6cec17d67b4b309019c49d9b44c729fd3bfcf9
5
5
  SHA512:
6
- metadata.gz: 05f5ae18dc9d8e4cb36ad2cadbd40c381427fd04d6b854e161fecccfae5ed4c9a4b57451a263f8e5698cd86a05798dc324bcc91a207c8ceeb57fb6cd80e88a90
7
- data.tar.gz: c04850996399dcd36921294ff6949ccfd01a2b2e872285d07e716a069252b009b08a900c04cf9ddfac1147bd60e0d6c5e1c3bda2b340c968bbc69a9dd8a984bb
6
+ metadata.gz: 021372d2550752a3c9d097d623ac19d4e825099af77c0eeadd040958ce3ad4746d7766e8cea0e211562df1162b7dc29718a2bc2fa8d19d5b7de3d8e6421bb55e
7
+ data.tar.gz: 8f910b4a4404f5bd8e8e222e446277d7943afff9aa756ba5921476e9b3a3f2321ae9998c68c5ad73cf2b96473f12e4e69625f5aa47b0f3fa14f5c4bffad2c58a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 2.5.3 (December 22, 2023)
2
+
3
+ ## Bug fixes:
4
+
5
+ - Fix incorrect error when Gemfile overrides a gemspec development dependency [#7319](https://github.com/rubygems/rubygems/pull/7319)
6
+
1
7
  # 2.5.2 (December 21, 2023)
2
8
 
3
9
  ## 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 = "2023-12-21".freeze
8
- @git_commit_sha = "00351925e4".freeze
7
+ @built_at = "2023-12-22".freeze
8
+ @git_commit_sha = "a04f70b115".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -68,6 +68,10 @@ module Bundler
68
68
  @should_include && current_env? && current_platform?
69
69
  end
70
70
 
71
+ def gemspec_dev_dep?
72
+ type == :development
73
+ end
74
+
71
75
  def current_env?
72
76
  return true unless @env
73
77
  if @env.is_a?(Hash)
data/lib/bundler/dsl.rb CHANGED
@@ -103,16 +103,21 @@ module Bundler
103
103
  # if there's already a dependency with this name we try to prefer one
104
104
  if current = @dependencies.find {|d| d.name == dep.name }
105
105
  # Always prefer the dependency from the Gemfile
106
- deleted_dep = @dependencies.delete(current) if current.type == :development
106
+ @dependencies.delete(current) if current.gemspec_dev_dep?
107
107
 
108
108
  if current.requirement != dep.requirement
109
109
  current_requirement_open = current.requirements_list.include?(">= 0")
110
110
 
111
- if current.type == :development
112
- unless current_requirement_open || dep.type == :development
113
- Bundler.ui.warn "A gemspec development dependency (#{dep.name}, #{current.requirement}) is being overridden by a Gemfile dependency (#{dep.name}, #{dep.requirement}).\n" \
114
- "This behaviour may change in the future. Please remove either of them, or make sure they both have the same requirement\n" \
111
+ gemspec_dep = [dep, current].find(&:gemspec_dev_dep?)
112
+ if gemspec_dep
113
+ gemfile_dep = [dep, current].find(&:runtime?)
114
+
115
+ unless current_requirement_open
116
+ Bundler.ui.warn "A gemspec development dependency (#{gemspec_dep.name}, #{gemspec_dep.requirement}) is being overridden by a Gemfile dependency (#{gemfile_dep.name}, #{gemfile_dep.requirement}).\n" \
117
+ "This behaviour may change in the future. Please remove either of them, or make sure they both have the same requirement\n"
115
118
  end
119
+
120
+ return if dep.gemspec_dev_dep?
116
121
  else
117
122
  update_prompt = ""
118
123
 
@@ -130,8 +135,8 @@ module Bundler
130
135
  "You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})" \
131
136
  "#{update_prompt}"
132
137
  end
133
- elsif current.type == :development || dep.type == :development
134
- return if deleted_dep.nil?
138
+ elsif current.gemspec_dev_dep? || dep.gemspec_dev_dep?
139
+ return if dep.gemspec_dev_dep?
135
140
  elsif current.source != dep.source
136
141
  raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
137
142
  "You specified that #{dep.name} (#{dep.requirement}) should come from " \
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.5.2".freeze
4
+ VERSION = "2.5.3".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.2
4
+ version: 2.5.3
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: 2023-12-21 00:00:00.000000000 Z
25
+ date: 2023-12-22 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
@@ -398,7 +398,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
398
398
  - !ruby/object:Gem::Version
399
399
  version: 3.2.3
400
400
  requirements: []
401
- rubygems_version: 3.5.2
401
+ rubygems_version: 3.5.3
402
402
  signing_key:
403
403
  specification_version: 4
404
404
  summary: The best way to manage your application's dependencies