Skip to content

Commit 26eb456

Browse files
Merge pull request #6666 from rubygems/release/bundler_2.4.13_rubygems_3.4.13
Prepare RubyGems 3.4.13 and Bundler 2.4.13
2 parents e2cf278 + 814b05a commit 26eb456

18 files changed

+99
-32
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 3.4.13 / 2023-05-09
2+
3+
## Enhancements:
4+
5+
* Installs bundler 2.4.13 as a default gem.
6+
17
# 3.4.12 / 2023-04-11
28

39
## Enhancements:

Manifest.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ bundler/lib/bundler/rubygems_ext.rb
180180
bundler/lib/bundler/rubygems_gem_installer.rb
181181
bundler/lib/bundler/rubygems_integration.rb
182182
bundler/lib/bundler/runtime.rb
183+
bundler/lib/bundler/safe_marshal.rb
183184
bundler/lib/bundler/self_manager.rb
184185
bundler/lib/bundler/settings.rb
185186
bundler/lib/bundler/settings/validator.rb

bundler/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 2.4.13 (May 9, 2023)
2+
3+
## Bug fixes:
4+
5+
- Fix unexpected fallbacks to full index by adding FalseClass and Time to the SafeMarshal list [#6655](https://github.com/rubygems/rubygems/pull/6655)
6+
7+
## Documentation:
8+
9+
- Fix broken hyperlinks in bundle cache documentation [#6606](https://github.com/rubygems/rubygems/pull/6606)
10+
111
# 2.4.12 (April 11, 2023)
212

313
## Enhancements:

bundler/lib/bundler.rb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ module Bundler
3939
environment_preserver.replace_with_backup
4040
SUDO_MUTEX = Thread::Mutex.new
4141

42-
SAFE_MARSHAL_CLASSES = [Symbol, TrueClass, String, Array, Hash, Gem::Version, Gem::Specification].freeze
43-
SAFE_MARSHAL_ERROR = "Unexpected class %s present in marshaled data. Only %s are allowed."
44-
SAFE_MARSHAL_PROC = proc do |object|
45-
object.tap do
46-
unless SAFE_MARSHAL_CLASSES.include?(object.class)
47-
raise TypeError, format(SAFE_MARSHAL_ERROR, object.class, SAFE_MARSHAL_CLASSES.join(", "))
48-
end
49-
end
50-
end
51-
5242
autoload :Definition, File.expand_path("bundler/definition", __dir__)
5343
autoload :Dependency, File.expand_path("bundler/dependency", __dir__)
5444
autoload :Deprecate, File.expand_path("bundler/deprecate", __dir__)
@@ -86,6 +76,7 @@ module Bundler
8676
autoload :UI, File.expand_path("bundler/ui", __dir__)
8777
autoload :URICredentialsFilter, File.expand_path("bundler/uri_credentials_filter", __dir__)
8878
autoload :URINormalizer, File.expand_path("bundler/uri_normalizer", __dir__)
79+
autoload :SafeMarshal, File.expand_path("bundler/safe_marshal", __dir__)
8980

9081
class << self
9182
def configure
@@ -523,7 +514,7 @@ def read_file(file)
523514
end
524515

525516
def safe_load_marshal(data)
526-
load_marshal(data, :marshal_proc => SAFE_MARSHAL_PROC)
517+
load_marshal(data, :marshal_proc => SafeMarshal.proc)
527518
end
528519

529520
def load_gemspec(file, validate = false)

bundler/lib/bundler/man/bundle-cache.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
alias: \fBpackage\fR, \fBpack\fR
1414
.
1515
.SH "DESCRIPTION"
16-
Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running [bundle install(1)][bundle\-install], use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
16+
Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
1717
.
1818
.SH "GIT AND PATH GEMS"
1919
The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
@@ -22,7 +22,7 @@ The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR depen
2222
When using gems that have different packages for different platforms, Bundler supports caching of gems for other platforms where the Gemfile has been resolved (i\.e\. present in the lockfile) in \fBvendor/cache\fR\. This needs to be enabled via the \fB\-\-all\-platforms\fR option\. This setting will be remembered in your local bundler configuration\.
2323
.
2424
.SH "REMOTE FETCHING"
25-
By default, if you run \fBbundle install(1)\fR](bundle\-install\.1\.html) after running bundle cache(1) \fIbundle\-cache\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
25+
By default, if you run \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR after running bundle cache(1) \fIbundle\-cache\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
2626
.
2727
.P
2828
For instance, consider this Gemfile(5):

bundler/lib/bundler/man/bundle-cache.1.ronn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ alias: `package`, `pack`
1010
## DESCRIPTION
1111

1212
Copy all of the `.gem` files needed to run the application into the
13-
`vendor/cache` directory. In the future, when running [bundle install(1)][bundle-install],
13+
`vendor/cache` directory. In the future, when running [`bundle install(1)`](bundle-install.1.html),
1414
use the gems in the cache in preference to the ones on `rubygems.org`.
1515

1616
## GIT AND PATH GEMS
@@ -29,7 +29,7 @@ bundler configuration.
2929

3030
## REMOTE FETCHING
3131

32-
By default, if you run `bundle install(1)`](bundle-install.1.html) after running
32+
By default, if you run [`bundle install(1)`](bundle-install.1.html) after running
3333
[bundle cache(1)](bundle-cache.1.html), bundler will still connect to `rubygems.org`
3434
to check whether a platform-specific gem exists for any of the gems
3535
in `vendor/cache`.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# frozen_string_literal: true
2+
3+
module Bundler
4+
module SafeMarshal
5+
ALLOWED_CLASSES = [
6+
Array,
7+
FalseClass,
8+
Gem::Specification,
9+
Gem::Version,
10+
Hash,
11+
String,
12+
Symbol,
13+
Time,
14+
TrueClass,
15+
].freeze
16+
17+
ERROR = "Unexpected class %s present in marshaled data. Only %s are allowed."
18+
19+
PROC = proc do |object|
20+
object.tap do
21+
unless ALLOWED_CLASSES.include?(object.class)
22+
raise TypeError, format(ERROR, object.class, ALLOWED_CLASSES.join(", "))
23+
end
24+
end
25+
end
26+
27+
def self.proc
28+
PROC
29+
end
30+
end
31+
end

bundler/lib/bundler/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: false
22

33
module Bundler
4-
VERSION = "2.4.12".freeze
4+
VERSION = "2.4.13".freeze
55

66
def self.bundler_major_version
77
@bundler_major_version ||= VERSION.split(".").first.to_i

bundler/spec/bundler/bundler_spec.rb

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,42 @@
2828
expect(Bundler.safe_load_marshal(data)).to eq(simple_structure)
2929
end
3030

31-
it "loads Gem::Version" do
32-
gem_version = Gem::Version.new("3.7.2")
33-
data = Marshal.dump(gem_version)
34-
expect(Bundler.safe_load_marshal(data)).to eq(gem_version)
35-
end
36-
3731
it "loads Gem::Specification" do
38-
gem_spec = Gem::Specification.new("name", "3.7.2")
32+
gem_spec = Gem::Specification.new do |s|
33+
s.name = "bundler"
34+
s.version = Gem::Version.new("2.4.7")
35+
s.installed_by_version = Gem::Version.new("0")
36+
s.authors = ["André Arko",
37+
"Samuel Giddins",
38+
"Colby Swandale",
39+
"Hiroshi Shibata",
40+
"David Rodríguez",
41+
"Grey Baker",
42+
"Stephanie Morillo",
43+
"Chris Morris",
44+
"James Wen",
45+
"Tim Moore",
46+
"André Medeiros",
47+
"Jessica Lynn Suttles",
48+
"Terence Lee",
49+
"Carl Lerche",
50+
"Yehuda Katz"]
51+
s.date = Time.utc(2023, 2, 15)
52+
s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably"
53+
s.email = ["[email protected]"]
54+
s.homepage = "https://bundler.io"
55+
s.metadata = { "bug_tracker_uri" => "https://github.com/rubygems/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler",
56+
"changelog_uri" => "https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md",
57+
"homepage_uri" => "https://bundler.io/",
58+
"source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler" }
59+
s.require_paths = ["lib"]
60+
s.required_ruby_version = Gem::Requirement.new([">= 2.6.0"])
61+
s.required_rubygems_version = Gem::Requirement.new([">= 3.0.1"])
62+
s.rubygems_version = "3.4.7"
63+
s.specification_version = 4
64+
s.summary = "The best way to manage your application's dependencies"
65+
s.license = false
66+
end
3967
data = Marshal.dump(gem_spec)
4068
expect(Bundler.safe_load_marshal(data)).to eq(gem_spec)
4169
end

bundler/spec/commands/info_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
G
216216

217217
bundle "info rac"
218-
expect(out).to match(/\A1 : rack\n2 : rack-obama\n0 : - exit -(\n>)?\z/)
218+
expect(out).to match(/\A1 : rack\n2 : rack-obama\n0 : - exit -(\n>.*)?\z/)
219219
end
220220
end
221221

0 commit comments

Comments
 (0)