Skip to content

Commit 8d04d6b

Browse files
authored
Merge branch 'master' into fix/request-uri-formatter-require
2 parents fdae8c7 + 0561869 commit 8d04d6b

43 files changed

Lines changed: 178 additions & 99 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bundler/lib/bundler/cli/outdated.rb

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ def print_gem(current_spec, active_spec, dependency, groups)
199199
end
200200

201201
spec_outdated_info = "#{active_spec.name} (newest #{spec_version}, " \
202-
"installed #{current_version}#{dependency_version})"
202+
"installed #{current_version}#{dependency_version}"
203+
204+
release_date = release_date_for(active_spec)
205+
spec_outdated_info += ", released #{release_date}" unless release_date.empty?
206+
spec_outdated_info += ")"
203207

204208
output_message = if options[:parseable]
205209
spec_outdated_info.to_s
@@ -218,6 +222,7 @@ def gem_column_for(current_spec, active_spec, dependency, groups)
218222
dependency = dependency.requirement if dependency
219223

220224
ret_val = [active_spec.name, current_version, spec_version, dependency.to_s, groups.to_s]
225+
ret_val << release_date_for(active_spec)
221226
ret_val << loaded_from_for(active_spec).to_s if Bundler.ui.debug?
222227
ret_val
223228
end
@@ -283,11 +288,28 @@ def print_indented(matrix)
283288
end
284289

285290
def table_header
286-
header = ["Gem", "Current", "Latest", "Requested", "Groups"]
291+
header = ["Gem", "Current", "Latest", "Requested", "Groups", "Release Date"]
287292
header << "Path" if Bundler.ui.debug?
288293
header
289294
end
290295

296+
def release_date_for(spec)
297+
return "" unless spec.respond_to?(:date)
298+
299+
date = spec.date
300+
return "" unless date
301+
302+
return "" unless Gem.const_defined?(:DEFAULT_SOURCE_DATE_EPOCH)
303+
default_date = Time.at(Gem::DEFAULT_SOURCE_DATE_EPOCH).utc
304+
default_date = Time.utc(default_date.year, default_date.month, default_date.day)
305+
306+
date = date.utc if date.respond_to?(:utc)
307+
308+
return "" if date == default_date
309+
310+
date.strftime("%Y-%m-%d")
311+
end
312+
291313
def justify(row, sizes)
292314
row.each_with_index.map do |element, index|
293315
element.ljust(sizes[index])

bundler/lib/bundler/fetcher/dependency.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def dependency_specs(gem_names)
5050

5151
def unmarshalled_dep_gems(gem_names)
5252
gem_list = []
53-
gem_names.each_slice(Source::Rubygems::API_REQUEST_SIZE) do |names|
53+
gem_names.each_slice(api_request_size) do |names|
5454
marshalled_deps = downloader.fetch(dependency_api_uri(names)).body
5555
gem_list.concat(Bundler.safe_load_marshal(marshalled_deps))
5656
end
@@ -74,6 +74,12 @@ def dependency_api_uri(gem_names = [])
7474
uri.query = "gems=#{CGI.escape(gem_names.sort.join(","))}" if gem_names.any?
7575
uri
7676
end
77+
78+
private
79+
80+
def api_request_size
81+
Bundler.settings[:api_request_size]&.to_i || Source::Rubygems::API_REQUEST_SIZE
82+
end
7783
end
7884
end
7985
end

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" generated with Ronn-NG/v0.10.1
22
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3-
.TH "BUNDLE\-ADD" "1" "February 2026" ""
3+
.TH "BUNDLE\-ADD" "1" "March 2026" ""
44
.SH "NAME"
55
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
66
.SH "SYNOPSIS"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" generated with Ronn-NG/v0.10.1
22
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3-
.TH "BUNDLE\-BINSTUBS" "1" "February 2026" ""
3+
.TH "BUNDLE\-BINSTUBS" "1" "March 2026" ""
44
.SH "NAME"
55
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
66
.SH "SYNOPSIS"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" generated with Ronn-NG/v0.10.1
22
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3-
.TH "BUNDLE\-CACHE" "1" "February 2026" ""
3+
.TH "BUNDLE\-CACHE" "1" "March 2026" ""
44
.SH "NAME"
55
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
66
.SH "SYNOPSIS"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" generated with Ronn-NG/v0.10.1
22
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3-
.TH "BUNDLE\-CHECK" "1" "February 2026" ""
3+
.TH "BUNDLE\-CHECK" "1" "March 2026" ""
44
.SH "NAME"
55
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
66
.SH "SYNOPSIS"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" generated with Ronn-NG/v0.10.1
22
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3-
.TH "BUNDLE\-CLEAN" "1" "February 2026" ""
3+
.TH "BUNDLE\-CLEAN" "1" "March 2026" ""
44
.SH "NAME"
55
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
66
.SH "SYNOPSIS"

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" generated with Ronn-NG/v0.10.1
22
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3-
.TH "BUNDLE\-CONFIG" "1" "February 2026" ""
3+
.TH "BUNDLE\-CONFIG" "1" "March 2026" ""
44
.SH "NAME"
55
\fBbundle\-config\fR \- Set bundler configuration options
66
.SH "SYNOPSIS"
@@ -70,6 +70,9 @@ Any periods in the configuration keys must be replaced with two underscores when
7070
.SH "LIST OF AVAILABLE KEYS"
7171
The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
7272
.TP
73+
\fBapi_request_size\fR (\fBBUNDLE_API_REQUEST_SIZE\fR)
74+
Configure how many dependencies to fetch when resolving the specifications\. This configuration is only used when fetchig specifications from RubyGems servers that didn't implement the Compact Index API\. Defaults to 100\.
75+
.TP
7376
\fBauto_install\fR (\fBBUNDLE_AUTO_INSTALL\fR)
7477
Automatically run \fBbundle install\fR when gems are missing\.
7578
.TP

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ the environment variable `BUNDLE_LOCAL__RACK`.
106106
The following is a list of all configuration keys and their purpose. You can
107107
learn more about their operation in [bundle install(1)](bundle-install.1.html).
108108

109+
* `api_request_size` (`BUNDLE_API_REQUEST_SIZE`):
110+
Configure how many dependencies to fetch when resolving the specifications.
111+
This configuration is only used when fetchig specifications from RubyGems
112+
servers that didn't implement the Compact Index API.
113+
Defaults to 100.
109114
* `auto_install` (`BUNDLE_AUTO_INSTALL`):
110115
Automatically run `bundle install` when gems are missing.
111116
* `bin` (`BUNDLE_BIN`):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" generated with Ronn-NG/v0.10.1
22
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3-
.TH "BUNDLE\-CONSOLE" "1" "February 2026" ""
3+
.TH "BUNDLE\-CONSOLE" "1" "March 2026" ""
44
.SH "NAME"
55
\fBbundle\-console\fR \- Open an IRB session with the bundle pre\-loaded
66
.SH "SYNOPSIS"

0 commit comments

Comments
 (0)