Skip to content

Commit 2efa8ce

Browse files
Merge pull request #7389 from rubygems/release/bundler_2.5.5_rubygems_3.5.5
Prepare RubyGems 3.5.5 and Bundler 2.5.5
2 parents 7ffda9b + 3ce0cbb commit 2efa8ce

File tree

39 files changed

+338
-185
lines changed

39 files changed

+338
-185
lines changed

.changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ changelog_label_mapping:
2121
"rubygems: enhancement": "## Enhancements:"
2222
"rubygems: bug fix": "## Bug fixes:"
2323
"rubygems: documentation": "## Documentation:"
24-
"rubygems: backport": null
24+
"rubygems: skip changelog": null
2525

2626
patch_level_labels:
2727
- "rubygems: security"
@@ -30,4 +30,4 @@ patch_level_labels:
3030
- "rubygems: bug fix"
3131
- "rubygems: performance"
3232
- "rubygems: documentation"
33-
- "rubygems: backport"
33+
- "rubygems: skip changelog"

.github/workflows/realworld-bundler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Run Test
5858
run: bin/rake spec:realworld
5959
- name: Upload used cassettes as artifact
60-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
60+
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
6161
with:
6262
name: cassettes-bundler-${{ matrix.bundler.name }}-${{ matrix.os.value }}-${{ matrix.ruby.name }}
6363
path: ./bundler/spec/support/artifice/used_cassettes.txt
@@ -93,7 +93,7 @@ jobs:
9393
- name: Run Test
9494
run: bin/rake spec:realworld
9595
- name: Upload used cassettes as artifact
96-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
96+
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
9797
with:
9898
name: cassettes-system-rubygems-bundler-${{ matrix.bundler.name }}-${{ matrix.ruby.name }}
9999
path: ./bundler/spec/support/artifice/used_cassettes.txt
@@ -111,7 +111,7 @@ jobs:
111111
ruby-version: 3.3.0
112112
bundler: none
113113
- name: Download all used cassettes as artifacts
114-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
114+
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
115115
with:
116116
path: ./bundler/spec/support/artifice/used_vcr_cassettes
117117
- name: Check unused cassettes

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.rbc
22
*.swp
3+
.ruby-version
34
.DS_Store
45
/.idea
56
/.rdoc

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1-
# 3.5.4 / 2024-01-03
1+
# 3.5.5 / 2024-01-18
2+
3+
## Enhancements:
4+
5+
* Installs bundler 2.5.5 as a default gem.
6+
7+
## Bug fixes:
8+
9+
* Fix `require` activation conflicts when requiring default gems under
10+
some situations. Pull request
11+
[#7379](https://github.com/rubygems/rubygems/pull/7379) by
12+
deivid-rodriguez
13+
* Use cache_home instead of data_home in default_spec_cache_dir. Pull
14+
request [#7331](https://github.com/rubygems/rubygems/pull/7331) by mrkn
15+
16+
## Documentation:
17+
18+
* Use squiggly heredocs in `Gem::Specification#description` documentation,
19+
so it doesn't add leading whitespace. Pull request
20+
[#7373](https://github.com/rubygems/rubygems/pull/7373) by bravehager
21+
22+
# 3.5.4 / 2024-01-04
223

324
## Enhancements:
425

POLICIES.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ changelog.
7979
If PRs don't have a proper label, they won't be backported to patch releases.
8080

8181
If you want a PR to be backported to a patch level release, but don't want to
82-
include it in the changelog, you can use the special `rubygems: backport` and
83-
`bundler: backport` labels. For example, this is useful when backporting a PR
84-
generates conflicts that are solved by backporting another PR with no user
85-
visible changes. You can use these special labels to also backport the other PR
86-
and not get any conflicts.
82+
include it in the changelog, you can use the special `rubygems: skip changelog`
83+
and `bundler: skip changelog` labels. For example, this is useful when
84+
backporting a PR generates conflicts that are solved by backporting another PR
85+
with no user visible changes. You can use these special labels to also backport
86+
the other PR and not get any conflicts.
8787

8888
### Steps for patch releases
8989

bundler/.changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ changelog_label_mapping:
1515
"bundler: enhancement": "## Enhancements:"
1616
"bundler: bug fix": "## Bug fixes:"
1717
"bundler: documentation": "## Documentation:"
18-
"bundler: backport": null
18+
"bundler: skip changelog": null
1919

2020
patch_level_labels:
2121
- "bundler: security"
@@ -24,4 +24,4 @@ patch_level_labels:
2424
- "bundler: bug fix"
2525
- "bundler: performance"
2626
- "bundler: documentation"
27-
- "bundler: backport"
27+
- "bundler: skip changelog"

bundler/CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
# 2.5.4 (January 3, 2024)
1+
# 2.5.5 (January 18, 2024)
2+
3+
## Bug fixes:
4+
5+
- Fix development dependency not being added if introduced by two gemspecs [#7358](https://github.com/rubygems/rubygems/pull/7358)
6+
- Fix ETag quoting regression in If-None-Match header of compact index request [#7352](https://github.com/rubygems/rubygems/pull/7352)
7+
8+
## Documentation:
9+
10+
- Refer to underscores as underscores [#7364](https://github.com/rubygems/rubygems/pull/7364)
11+
12+
# 2.5.4 (January 4, 2024)
213

314
## Bug fixes:
415

bundler/doc/playbooks/MERGING_A_PR.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ release, make sure the following information is accurate:
3030
file.
3131

3232
If for some reason you need a PR to be backported to a stable branch, but it
33-
doesn't have any user visible changes, apply the "bundler: backport" label to
34-
it so that our release scripts know about that.
33+
doesn't have any user visible changes, apply the "bundler: skip changelog"
34+
label to it so that our release scripts know about that.
3535

3636
Finally, don't forget to review the changes in detail. Make sure you try them
3737
locally if they are not trivial and make sure you request changes and ask as

bundler/lib/bundler/compact_index_client/updater.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def append(remote_path, local_path, etag_path)
4242
else
4343
file.write(response.body)
4444
end
45-
CacheFile.write(etag_path, etag(response))
45+
CacheFile.write(etag_path, etag_from_response(response))
4646
true
4747
end
4848
end
@@ -53,13 +53,13 @@ def replace(remote_path, local_path, etag_path)
5353
response = @fetcher.call(remote_path, request_headers(etag))
5454
return true if response.is_a?(Gem::Net::HTTPNotModified)
5555
CacheFile.write(local_path, response.body, parse_digests(response))
56-
CacheFile.write(etag_path, etag(response))
56+
CacheFile.write(etag_path, etag_from_response(response))
5757
end
5858

5959
def request_headers(etag, range_start = nil)
6060
headers = {}
6161
headers["Range"] = "bytes=#{range_start}-" if range_start
62-
headers["If-None-Match"] = etag if etag
62+
headers["If-None-Match"] = %("#{etag}") if etag
6363
headers
6464
end
6565

@@ -77,7 +77,7 @@ def generate_etag(etag_path, file)
7777
etag
7878
end
7979

80-
def etag(response)
80+
def etag_from_response(response)
8181
return unless response["ETag"]
8282
etag = response["ETag"].delete_prefix("W/")
8383
return if etag.delete_prefix!('"') && !etag.delete_suffix!('"')

bundler/lib/bundler/dsl.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ def gem(name, *args)
102102

103103
# if there's already a dependency with this name we try to prefer one
104104
if current = @dependencies.find {|d| d.name == dep.name }
105-
# Always prefer the dependency from the Gemfile
106-
@dependencies.delete(current) if current.gemspec_dev_dep?
107-
108105
if current.requirement != dep.requirement
109106
current_requirement_open = current.requirements_list.include?(">= 0")
110107

@@ -116,8 +113,6 @@ def gem(name, *args)
116113
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" \
117114
"This behaviour may change in the future. Please remove either of them, or make sure they both have the same requirement\n"
118115
end
119-
120-
return if dep.gemspec_dev_dep?
121116
else
122117
update_prompt = ""
123118

@@ -135,8 +130,13 @@ def gem(name, *args)
135130
"You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})" \
136131
"#{update_prompt}"
137132
end
138-
elsif current.gemspec_dev_dep? || dep.gemspec_dev_dep?
139-
return if dep.gemspec_dev_dep?
133+
end
134+
135+
# Always prefer the dependency from the Gemfile
136+
if current.gemspec_dev_dep?
137+
@dependencies.delete(current)
138+
elsif dep.gemspec_dev_dep?
139+
return
140140
elsif current.source != dep.source
141141
raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
142142
"You specified that #{dep.name} (#{dep.requirement}) should come from " \

0 commit comments

Comments
 (0)