rubygems-update 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +19 -0
- data/bundler/CHANGELOG.md +16 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/install.rb +3 -2
- data/bundler/lib/bundler/gem_helper.rb +2 -3
- data/bundler/lib/bundler/inline.rb +1 -1
- data/bundler/lib/bundler/rubygems_integration.rb +1 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +0 -22
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/man/bundle-add.1 +1 -1
- data/bundler/man/bundle-add.1.txt +1 -1
- data/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/man/bundle-binstubs.1.txt +1 -1
- data/bundler/man/bundle-cache.1 +1 -1
- data/bundler/man/bundle-cache.1.txt +1 -1
- data/bundler/man/bundle-check.1 +1 -1
- data/bundler/man/bundle-check.1.txt +1 -1
- data/bundler/man/bundle-clean.1 +1 -1
- data/bundler/man/bundle-clean.1.txt +1 -1
- data/bundler/man/bundle-config.1 +1 -1
- data/bundler/man/bundle-config.1.txt +1 -1
- data/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/man/bundle-doctor.1.txt +1 -1
- data/bundler/man/bundle-exec.1 +1 -1
- data/bundler/man/bundle-exec.1.txt +1 -1
- data/bundler/man/bundle-gem.1 +1 -1
- data/bundler/man/bundle-gem.1.txt +1 -1
- data/bundler/man/bundle-info.1 +1 -1
- data/bundler/man/bundle-info.1.txt +1 -1
- data/bundler/man/bundle-init.1 +1 -1
- data/bundler/man/bundle-init.1.txt +1 -1
- data/bundler/man/bundle-inject.1 +1 -1
- data/bundler/man/bundle-inject.1.txt +1 -1
- data/bundler/man/bundle-install.1 +1 -1
- data/bundler/man/bundle-install.1.txt +1 -1
- data/bundler/man/bundle-list.1 +1 -1
- data/bundler/man/bundle-list.1.txt +1 -1
- data/bundler/man/bundle-lock.1 +1 -1
- data/bundler/man/bundle-lock.1.txt +1 -1
- data/bundler/man/bundle-open.1 +1 -1
- data/bundler/man/bundle-open.1.txt +1 -1
- data/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/man/bundle-outdated.1.txt +1 -1
- data/bundler/man/bundle-platform.1 +1 -1
- data/bundler/man/bundle-platform.1.txt +1 -1
- data/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/man/bundle-pristine.1.txt +1 -1
- data/bundler/man/bundle-remove.1 +1 -1
- data/bundler/man/bundle-remove.1.txt +1 -1
- data/bundler/man/bundle-show.1 +1 -1
- data/bundler/man/bundle-show.1.txt +1 -1
- data/bundler/man/bundle-update.1 +1 -1
- data/bundler/man/bundle-update.1.txt +1 -1
- data/bundler/man/bundle-viz.1 +1 -1
- data/bundler/man/bundle-viz.1.txt +1 -1
- data/bundler/man/bundle.1 +1 -1
- data/bundler/man/bundle.1.txt +1 -1
- data/bundler/man/gemfile.5 +1 -1
- data/bundler/man/gemfile.5.txt +1 -1
- data/lib/rubygems.rb +55 -28
- data/lib/rubygems/basic_specification.rb +1 -1
- data/lib/rubygems/commands/uninstall_command.rb +1 -1
- data/lib/rubygems/ext/builder.rb +3 -1
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/util.rb +7 -1
- data/lib/rubygems/version.rb +1 -1
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/test_gem.rb +63 -2
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -0
- data/test/rubygems/test_gem_package.rb +3 -8
- data/test/rubygems/test_gem_package_tar_writer.rb +5 -0
- data/test/rubygems/test_gem_request_set.rb +52 -0
- data/test/rubygems/test_gem_specification.rb +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20050e3691c1f80c0d2efc9faae4569b86bb8fdc93f131fa889f7ae9df44765d
|
4
|
+
data.tar.gz: a37197a0a4a4d629ec0e41bb5424252b4ee3dabc38ddf40541981696bf029f5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d201f0092d2c4fc16b8a2b32bda6d76c9fb549f7b5362af18f5b05265b63c7dd2f75401ec57cd410a203da9138e9fa7fad1220dbcdfcdd0f55718d0b723e762d
|
7
|
+
data.tar.gz: 7ed04b369163a2d667229c2314c6542db90202be1db80df7f6d6d17c76e77fcb837c549e0d56c7fdfa05dd3facd4d2cfb4cbbb1d2485a0087657ccf51af6acc8
|
data/History.txt
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 3.1.3 / 2020-05-05
|
4
|
+
|
5
|
+
* Fix platform comparison check in #contains_requirable_file?. Pull
|
6
|
+
request #3495 by Benoit Daloze.
|
7
|
+
* Improve gzip errors logging. Pull request #3485 by David Rodríguez.
|
8
|
+
* Fix incorrect `gem uninstall --all` message. Pull request #3483 by David
|
9
|
+
Rodríguez.
|
10
|
+
* Fix incorrect bundler version being required. Pull request #3458 by
|
11
|
+
David Rodríguez.
|
12
|
+
* Resolver: require NameTuple before use. Pull request #3171 by Olle
|
13
|
+
Jonsson.
|
14
|
+
* Use absolute paths with autoload. Pull request #3100 by David Rodríguez.
|
15
|
+
* Avoid changing $SOURCE_DATE_EPOCH. Pull request #3088 by Ellen Marie
|
16
|
+
Dash.
|
17
|
+
* Use Bundler 2.1.4. Pull request #3072 by Hiroshi SHIBATA.
|
18
|
+
* Fix gem install from a gemdeps file with complex dependencies.
|
19
|
+
Pull request #3054 by Luis Sagastume.
|
20
|
+
* Add tests to check if Gem.ruby_version works with ruby git master.
|
21
|
+
Pull request #3049 by Yusuke Endoh.
|
3
22
|
|
4
23
|
=== 3.1.2 / 2019-12-20
|
5
24
|
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## 2.1.4 (January 5, 2020)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
|
5
|
+
- Fix `net-http-pipeline` no longer being allowed in Gemfiles if already installed in the system due to our vendored version of `net-http-persistent` optionally requiring it [#7529](https://github.com/bundler/bundler/pull/7529)
|
6
|
+
- Fix inline gems no longer being requirable if no Gemfile is present in the directory hierarchy [#7537](https://github.com/bundler/bundler/pull/7537)
|
7
|
+
|
8
|
+
## 2.1.3 (January 2, 2020)
|
9
|
+
|
10
|
+
Bugfixes:
|
11
|
+
|
12
|
+
- Fix `rake build` when path has spaces on it [#7514](https://github.com/bundler/bundler/pull/7514)
|
13
|
+
- Fix `rake release` git push tasks when the running shell has `git` as an alias of another command (like `hub`) [#7510](https://github.com/bundler/bundler/pull/7510)
|
14
|
+
- Fix some circular require warnings [#7520](https://github.com/bundler/bundler/pull/7520)
|
15
|
+
- Fix `bundle config set deployment true` recommended alternative to `bundle config --deployment` to behave in the same way as the `--deployment` flag [#7519](https://github.com/bundler/bundler/pull/7519)
|
16
|
+
|
1
17
|
## 2.1.2 (December 20, 2019)
|
2
18
|
|
3
19
|
Bugfixes:
|
@@ -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 = "
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2020-05-04".freeze
|
8
|
+
@git_commit_sha = "32a4159325".freeze
|
9
9
|
@release = false
|
10
10
|
# end ivars
|
11
11
|
|
@@ -38,7 +38,8 @@ module Bundler
|
|
38
38
|
if Bundler.feature_flag.deployment_means_frozen?
|
39
39
|
Bundler.settings.set_command_option :deployment, true
|
40
40
|
else
|
41
|
-
Bundler.settings.set_command_option :
|
41
|
+
Bundler.settings.set_command_option :deployment, true if options[:deployment]
|
42
|
+
Bundler.settings.set_command_option :frozen, true if options[:frozen]
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
@@ -169,7 +170,7 @@ module Bundler
|
|
169
170
|
def normalize_settings
|
170
171
|
Bundler.settings.set_command_option :path, nil if options[:system]
|
171
172
|
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
172
|
-
Bundler.settings.set_command_option :path, "vendor/bundle" if
|
173
|
+
Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil?
|
173
174
|
end
|
174
175
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
175
176
|
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
@@ -73,7 +73,7 @@ module Bundler
|
|
73
73
|
|
74
74
|
def build_gem
|
75
75
|
file_name = nil
|
76
|
-
sh("#{gem_command} build -V #{spec_path}".shellsplit) do
|
76
|
+
sh("#{gem_command} build -V #{spec_path.shellescape}".shellsplit) do
|
77
77
|
file_name = File.basename(built_gem_path)
|
78
78
|
SharedHelpers.filesystem_access(File.join(base, "pkg")) {|p| FileUtils.mkdir_p(p) }
|
79
79
|
FileUtils.mv(built_gem_path, "pkg")
|
@@ -130,9 +130,8 @@ module Bundler
|
|
130
130
|
|
131
131
|
def perform_git_push(options = "")
|
132
132
|
cmd = "git push #{options}"
|
133
|
-
out, status = sh_with_status(cmd)
|
133
|
+
out, status = sh_with_status(cmd.shellsplit)
|
134
134
|
return if status.success?
|
135
|
-
cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin)
|
136
135
|
raise "Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n"
|
137
136
|
end
|
138
137
|
|
@@ -3,11 +3,6 @@ require_relative '../../../../uri/lib/uri'
|
|
3
3
|
require 'cgi' # for escaping
|
4
4
|
require_relative '../../../../connection_pool/lib/connection_pool'
|
5
5
|
|
6
|
-
begin
|
7
|
-
require 'net/http/pipeline'
|
8
|
-
rescue LoadError
|
9
|
-
end
|
10
|
-
|
11
6
|
autoload :OpenSSL, 'openssl'
|
12
7
|
|
13
8
|
##
|
@@ -773,23 +768,6 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
|
773
768
|
(uri =~ /^https?:/) ? uri : "http://#{uri}"
|
774
769
|
end
|
775
770
|
|
776
|
-
##
|
777
|
-
# Pipelines +requests+ to the HTTP server at +uri+ yielding responses if a
|
778
|
-
# block is given. Returns all responses received.
|
779
|
-
#
|
780
|
-
# See
|
781
|
-
# Net::HTTP::Pipeline[http://docs.seattlerb.org/net-http-pipeline/Net/HTTP/Pipeline.html]
|
782
|
-
# for further details.
|
783
|
-
#
|
784
|
-
# Only if <tt>net-http-pipeline</tt> was required before
|
785
|
-
# <tt>net-http-persistent</tt> #pipeline will be present.
|
786
|
-
|
787
|
-
def pipeline uri, requests, &block # :yields: responses
|
788
|
-
connection_for uri do |connection|
|
789
|
-
connection.http.pipeline requests, &block
|
790
|
-
end
|
791
|
-
end
|
792
|
-
|
793
771
|
##
|
794
772
|
# Sets this client's SSL private key
|
795
773
|
|
data/bundler/man/bundle-add.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-BINSTUBS" "1" "
|
4
|
+
.TH "BUNDLE\-BINSTUBS" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
data/bundler/man/bundle-cache.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CACHE" "1" "
|
4
|
+
.TH "BUNDLE\-CACHE" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
data/bundler/man/bundle-check.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CHECK" "1" "
|
4
|
+
.TH "BUNDLE\-CHECK" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
data/bundler/man/bundle-clean.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CLEAN" "1" "
|
4
|
+
.TH "BUNDLE\-CLEAN" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
|
data/bundler/man/bundle-config.1
CHANGED
data/bundler/man/bundle-doctor.1
CHANGED
data/bundler/man/bundle-exec.1
CHANGED
data/bundler/man/bundle-gem.1
CHANGED
data/bundler/man/bundle-info.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INFO" "1" "
|
4
|
+
.TH "BUNDLE\-INFO" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-info\fR \- Show information for the given gem in your bundle
|
data/bundler/man/bundle-init.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INIT" "1" "
|
4
|
+
.TH "BUNDLE\-INIT" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
|
data/bundler/man/bundle-inject.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INJECT" "1" "
|
4
|
+
.TH "BUNDLE\-INJECT" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INSTALL" "1" "
|
4
|
+
.TH "BUNDLE\-INSTALL" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
data/bundler/man/bundle-list.1
CHANGED
data/bundler/man/bundle-lock.1
CHANGED
data/bundler/man/bundle-open.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OPEN" "1" "
|
4
|
+
.TH "BUNDLE\-OPEN" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OUTDATED" "1" "
|
4
|
+
.TH "BUNDLE\-OUTDATED" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PLATFORM" "1" "
|
4
|
+
.TH "BUNDLE\-PLATFORM" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-platform\fR \- Displays platform compatibility information
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
4
|
+
.TH "BUNDLE\-PRISTINE" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
data/bundler/man/bundle-remove.1
CHANGED
data/bundler/man/bundle-show.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-SHOW" "1" "
|
4
|
+
.TH "BUNDLE\-SHOW" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
data/bundler/man/bundle-update.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-UPDATE" "1" "
|
4
|
+
.TH "BUNDLE\-UPDATE" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
data/bundler/man/bundle-viz.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-VIZ" "1" "
|
4
|
+
.TH "BUNDLE\-VIZ" "1" "January 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
|
data/bundler/man/bundle.1
CHANGED
data/bundler/man/bundle.1.txt
CHANGED
data/bundler/man/gemfile.5
CHANGED
data/bundler/man/gemfile.5.txt
CHANGED
data/lib/rubygems.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
require 'rbconfig'
|
10
10
|
|
11
11
|
module Gem
|
12
|
-
VERSION = "3.1.
|
12
|
+
VERSION = "3.1.3".freeze
|
13
13
|
end
|
14
14
|
|
15
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -189,6 +189,8 @@ module Gem
|
|
189
189
|
@pre_reset_hooks ||= []
|
190
190
|
@post_reset_hooks ||= []
|
191
191
|
|
192
|
+
@default_source_date_epoch = nil
|
193
|
+
|
192
194
|
##
|
193
195
|
# Try to activate a gem containing +path+. Returns true if
|
194
196
|
# activation succeeded or wasn't needed because it was already
|
@@ -1236,20 +1238,43 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1236
1238
|
end
|
1237
1239
|
|
1238
1240
|
##
|
1239
|
-
#
|
1240
|
-
#
|
1241
|
+
# If the SOURCE_DATE_EPOCH environment variable is set, returns it's value.
|
1242
|
+
# Otherwise, returns the time that `Gem.source_date_epoch_string` was
|
1243
|
+
# first called in the same format as SOURCE_DATE_EPOCH.
|
1241
1244
|
#
|
1242
|
-
#
|
1245
|
+
# NOTE(@duckinator): The implementation is a tad weird because we want to:
|
1246
|
+
# 1. Make builds reproducible by default, by having this function always
|
1247
|
+
# return the same result during a given run.
|
1248
|
+
# 2. Allow changing ENV['SOURCE_DATE_EPOCH'] at runtime, since multiple
|
1249
|
+
# tests that set this variable will be run in a single process.
|
1250
|
+
#
|
1251
|
+
# If you simplify this function and a lot of tests fail, that is likely
|
1252
|
+
# due to #2 above.
|
1243
1253
|
#
|
1244
1254
|
# Details on SOURCE_DATE_EPOCH:
|
1245
1255
|
# https://reproducible-builds.org/specs/source-date-epoch/
|
1246
1256
|
|
1247
|
-
def self.
|
1248
|
-
if
|
1249
|
-
|
1250
|
-
|
1257
|
+
def self.source_date_epoch_string
|
1258
|
+
# The value used if $SOURCE_DATE_EPOCH is not set.
|
1259
|
+
@default_source_date_epoch ||= Time.now.to_i.to_s
|
1260
|
+
|
1261
|
+
specified_epoch = ENV["SOURCE_DATE_EPOCH"]
|
1262
|
+
|
1263
|
+
# If it's empty or just whitespace, treat it like it wasn't set at all.
|
1264
|
+
specified_epoch = nil if !specified_epoch.nil? && specified_epoch.strip.empty?
|
1265
|
+
|
1266
|
+
epoch = specified_epoch || @default_source_date_epoch
|
1251
1267
|
|
1252
|
-
|
1268
|
+
epoch.strip
|
1269
|
+
end
|
1270
|
+
|
1271
|
+
##
|
1272
|
+
# Returns the value of Gem.source_date_epoch_string, as a Time object.
|
1273
|
+
#
|
1274
|
+
# This is used throughout RubyGems for enabling reproducible builds.
|
1275
|
+
|
1276
|
+
def self.source_date_epoch
|
1277
|
+
Time.at(self.source_date_epoch_string.to_i).utc.freeze
|
1253
1278
|
end
|
1254
1279
|
|
1255
1280
|
# FIX: Almost everywhere else we use the `def self.` way of defining class
|
@@ -1281,10 +1306,11 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1281
1306
|
#
|
1282
1307
|
|
1283
1308
|
def register_default_spec(spec)
|
1284
|
-
|
1309
|
+
extended_require_paths = spec.require_paths.map {|f| f + "/"}
|
1310
|
+
new_format = extended_require_paths.any? {|path| spec.files.any? {|f| f.start_with? path } }
|
1285
1311
|
|
1286
1312
|
if new_format
|
1287
|
-
prefix_group =
|
1313
|
+
prefix_group = extended_require_paths.join("|")
|
1288
1314
|
prefix_pattern = /^(#{prefix_group})/
|
1289
1315
|
end
|
1290
1316
|
|
@@ -1366,23 +1392,24 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1366
1392
|
|
1367
1393
|
MARSHAL_SPEC_DIR = "quick/Marshal.#{Gem.marshal_version}/".freeze
|
1368
1394
|
|
1369
|
-
autoload :BundlerVersionFinder, 'rubygems/bundler_version_finder'
|
1370
|
-
autoload :ConfigFile, 'rubygems/config_file'
|
1371
|
-
autoload :Dependency, 'rubygems/dependency'
|
1372
|
-
autoload :DependencyList, 'rubygems/dependency_list'
|
1373
|
-
autoload :Installer, 'rubygems/installer'
|
1374
|
-
autoload :Licenses, 'rubygems/util/licenses'
|
1375
|
-
autoload :
|
1376
|
-
autoload :
|
1377
|
-
autoload :
|
1378
|
-
autoload :
|
1379
|
-
autoload :
|
1380
|
-
autoload :
|
1381
|
-
autoload :
|
1382
|
-
autoload :
|
1383
|
-
autoload :
|
1384
|
-
autoload :
|
1385
|
-
autoload :
|
1395
|
+
autoload :BundlerVersionFinder, File.expand_path('rubygems/bundler_version_finder', __dir__)
|
1396
|
+
autoload :ConfigFile, File.expand_path('rubygems/config_file', __dir__)
|
1397
|
+
autoload :Dependency, File.expand_path('rubygems/dependency', __dir__)
|
1398
|
+
autoload :DependencyList, File.expand_path('rubygems/dependency_list', __dir__)
|
1399
|
+
autoload :Installer, File.expand_path('rubygems/installer', __dir__)
|
1400
|
+
autoload :Licenses, File.expand_path('rubygems/util/licenses', __dir__)
|
1401
|
+
autoload :NameTuple, File.expand_path('rubygems/name_tuple', __dir__)
|
1402
|
+
autoload :PathSupport, File.expand_path('rubygems/path_support', __dir__)
|
1403
|
+
autoload :Platform, File.expand_path('rubygems/platform', __dir__)
|
1404
|
+
autoload :RequestSet, File.expand_path('rubygems/request_set', __dir__)
|
1405
|
+
autoload :Requirement, File.expand_path('rubygems/requirement', __dir__)
|
1406
|
+
autoload :Resolver, File.expand_path('rubygems/resolver', __dir__)
|
1407
|
+
autoload :Source, File.expand_path('rubygems/source', __dir__)
|
1408
|
+
autoload :SourceList, File.expand_path('rubygems/source_list', __dir__)
|
1409
|
+
autoload :SpecFetcher, File.expand_path('rubygems/spec_fetcher', __dir__)
|
1410
|
+
autoload :Specification, File.expand_path('rubygems/specification', __dir__)
|
1411
|
+
autoload :Util, File.expand_path('rubygems/util', __dir__)
|
1412
|
+
autoload :Version, File.expand_path('rubygems/version', __dir__)
|
1386
1413
|
|
1387
1414
|
require "rubygems/specification"
|
1388
1415
|
end
|
@@ -78,7 +78,7 @@ class Gem::BasicSpecification
|
|
78
78
|
elsif missing_extensions?
|
79
79
|
@ignored = true
|
80
80
|
|
81
|
-
if
|
81
|
+
if Gem::Platform::RUBY == platform || Gem::Platform.local === platform
|
82
82
|
warn "Ignoring #{full_name} because its extensions are not built. " +
|
83
83
|
"Try: gem pristine #{name} --version #{version}"
|
84
84
|
end
|
@@ -143,7 +143,7 @@ that is a dependency of an existing gem. You can use the
|
|
143
143
|
uninstall_gem spec.name
|
144
144
|
end
|
145
145
|
|
146
|
-
alert "Uninstalled all gems in #{options[:install_dir]}"
|
146
|
+
alert "Uninstalled all gems in #{options[:install_dir] || Gem.dir}"
|
147
147
|
end
|
148
148
|
|
149
149
|
def uninstall_specific
|
data/lib/rubygems/ext/builder.rb
CHANGED
@@ -68,7 +68,9 @@ class Gem::Ext::Builder
|
|
68
68
|
results << (command.respond_to?(:shelljoin) ? command.shelljoin : command)
|
69
69
|
|
70
70
|
require "open3"
|
71
|
-
|
71
|
+
# Set $SOURCE_DATE_EPOCH for the subprocess.
|
72
|
+
env = {'SOURCE_DATE_EPOCH' => Gem.source_date_epoch_string}
|
73
|
+
output, status = Open3.capture2e(env, *command)
|
72
74
|
if verbose
|
73
75
|
puts output
|
74
76
|
else
|
data/lib/rubygems/util.rb
CHANGED
@@ -14,7 +14,13 @@ module Gem::Util
|
|
14
14
|
require 'stringio'
|
15
15
|
data = StringIO.new(data, 'r')
|
16
16
|
|
17
|
-
|
17
|
+
gzip_reader = begin
|
18
|
+
Zlib::GzipReader.new(data)
|
19
|
+
rescue Zlib::GzipFile::Error => e
|
20
|
+
raise e.class, e.inspect, e.backtrace
|
21
|
+
end
|
22
|
+
|
23
|
+
unzipped = gzip_reader.read
|
18
24
|
unzipped.force_encoding Encoding::BINARY
|
19
25
|
unzipped
|
20
26
|
end
|
data/lib/rubygems/version.rb
CHANGED
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.1.
|
5
|
+
s.version = "3.1.3"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
data/test/rubygems/test_gem.rb
CHANGED
@@ -310,6 +310,21 @@ class TestGem < Gem::TestCase
|
|
310
310
|
assert_equal %w(a-1 b-2 c-1), loaded_spec_names
|
311
311
|
end
|
312
312
|
|
313
|
+
def test_activate_bin_path_in_debug_mode
|
314
|
+
a1 = util_spec 'a', '1' do |s|
|
315
|
+
s.executables = ['exec']
|
316
|
+
end
|
317
|
+
|
318
|
+
install_specs a1
|
319
|
+
|
320
|
+
output, status = Open3.capture2e(
|
321
|
+
{ "GEM_HOME" => Gem.paths.home, "DEBUG_RESOLVER" => "1" },
|
322
|
+
Gem.ruby, "-I", File.expand_path("../../lib", __dir__), "-e", "\"Gem.activate_bin_path('a', 'exec', '>= 0')\""
|
323
|
+
)
|
324
|
+
|
325
|
+
assert status.success?, output
|
326
|
+
end
|
327
|
+
|
313
328
|
def test_activate_bin_path_gives_proper_error_for_bundler
|
314
329
|
bundler = util_spec 'bundler', '2' do |s|
|
315
330
|
s.executables = ['bundle']
|
@@ -1090,7 +1105,7 @@ class TestGem < Gem::TestCase
|
|
1090
1105
|
util_restore_RUBY_VERSION
|
1091
1106
|
end
|
1092
1107
|
|
1093
|
-
def
|
1108
|
+
def test_self_ruby_version_with_svn_prerelease
|
1094
1109
|
util_set_RUBY_VERSION '2.6.0', -1, 63539, 'ruby 2.6.0preview2 (2018-05-31 trunk 63539) [x86_64-linux]'
|
1095
1110
|
|
1096
1111
|
assert_equal Gem::Version.new('2.6.0.preview2'), Gem.ruby_version
|
@@ -1098,6 +1113,14 @@ class TestGem < Gem::TestCase
|
|
1098
1113
|
util_restore_RUBY_VERSION
|
1099
1114
|
end
|
1100
1115
|
|
1116
|
+
def test_self_ruby_version_with_git_prerelease
|
1117
|
+
util_set_RUBY_VERSION '2.7.0', -1, 'b563439274a402e33541f5695b1bfd4ac1085638', 'ruby 2.7.0preview3 (2019-11-23 master b563439274) [x86_64-linux]'
|
1118
|
+
|
1119
|
+
assert_equal Gem::Version.new('2.7.0.preview3'), Gem.ruby_version
|
1120
|
+
ensure
|
1121
|
+
util_restore_RUBY_VERSION
|
1122
|
+
end
|
1123
|
+
|
1101
1124
|
def test_self_ruby_version_with_non_mri_implementations_with_mri_prerelase_compatibility
|
1102
1125
|
util_set_RUBY_VERSION '2.6.0', -1, 63539, 'weirdjruby 9.2.0.0 (2.6.0preview2) 2018-05-24 81156a8 OpenJDK 64-Bit Server VM 25.171-b11 on 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11 [linux-x86_64]', 'weirdjruby', '9.2.0.0'
|
1103
1126
|
|
@@ -1106,7 +1129,7 @@ class TestGem < Gem::TestCase
|
|
1106
1129
|
util_restore_RUBY_VERSION
|
1107
1130
|
end
|
1108
1131
|
|
1109
|
-
def
|
1132
|
+
def test_self_ruby_version_with_svn_trunk
|
1110
1133
|
util_set_RUBY_VERSION '1.9.2', -1, 23493, 'ruby 1.9.2dev (2009-05-20 trunk 23493) [x86_64-linux]'
|
1111
1134
|
|
1112
1135
|
assert_equal Gem::Version.new('1.9.2.dev'), Gem.ruby_version
|
@@ -1114,6 +1137,14 @@ class TestGem < Gem::TestCase
|
|
1114
1137
|
util_restore_RUBY_VERSION
|
1115
1138
|
end
|
1116
1139
|
|
1140
|
+
def test_self_ruby_version_with_git_master
|
1141
|
+
util_set_RUBY_VERSION '2.7.0', -1, '5de284ec78220e75643f89b454ce999da0c1c195', 'ruby 2.7.0dev (2019-12-23T01:37:30Z master 5de284ec78) [x86_64-linux]'
|
1142
|
+
|
1143
|
+
assert_equal Gem::Version.new('2.7.0.dev'), Gem.ruby_version
|
1144
|
+
ensure
|
1145
|
+
util_restore_RUBY_VERSION
|
1146
|
+
end
|
1147
|
+
|
1117
1148
|
def test_self_rubygems_version
|
1118
1149
|
assert_equal Gem::Version.new(Gem::VERSION), Gem.rubygems_version
|
1119
1150
|
end
|
@@ -1731,6 +1762,18 @@ class TestGem < Gem::TestCase
|
|
1731
1762
|
assert_nil Gem.find_unresolved_default_spec("README")
|
1732
1763
|
end
|
1733
1764
|
|
1765
|
+
def test_register_default_spec_old_style_with_folder_starting_with_lib
|
1766
|
+
Gem.clear_default_specs
|
1767
|
+
|
1768
|
+
old_style = Gem::Specification.new do |spec|
|
1769
|
+
spec.files = ["libexec/bundle", "foo.rb", "bar.rb"]
|
1770
|
+
end
|
1771
|
+
|
1772
|
+
Gem.register_default_spec old_style
|
1773
|
+
|
1774
|
+
assert_equal old_style, Gem.find_unresolved_default_spec("foo.rb")
|
1775
|
+
end
|
1776
|
+
|
1734
1777
|
def test_use_gemdeps
|
1735
1778
|
gem_deps_file = 'gem.deps.rb'.tap(&Gem::UNTAINT)
|
1736
1779
|
spec = util_spec 'a', 1
|
@@ -1903,6 +1946,24 @@ You may need to `gem install -g` to install missing gems
|
|
1903
1946
|
assert platform_defaults.is_a? Hash
|
1904
1947
|
end
|
1905
1948
|
|
1949
|
+
# Ensure that `Gem.source_date_epoch` is consistent even if
|
1950
|
+
# $SOURCE_DATE_EPOCH has not been set.
|
1951
|
+
def test_default_source_date_epoch_doesnt_change
|
1952
|
+
old_epoch = ENV['SOURCE_DATE_EPOCH']
|
1953
|
+
ENV['SOURCE_DATE_EPOCH'] = nil
|
1954
|
+
|
1955
|
+
# Unfortunately, there is no real way to test this aside from waiting
|
1956
|
+
# enough for `Time.now.to_i` to change -- which is a whole second.
|
1957
|
+
#
|
1958
|
+
# Fortunately, we only need to do this once.
|
1959
|
+
a = Gem.source_date_epoch
|
1960
|
+
sleep 1
|
1961
|
+
b = Gem.source_date_epoch
|
1962
|
+
assert_equal a, b
|
1963
|
+
ensure
|
1964
|
+
ENV['SOURCE_DATE_EPOCH'] = old_epoch
|
1965
|
+
end
|
1966
|
+
|
1906
1967
|
def ruby_install_name(name)
|
1907
1968
|
orig_RUBY_INSTALL_NAME = RbConfig::CONFIG['ruby_install_name']
|
1908
1969
|
RbConfig::CONFIG['ruby_install_name'] = name
|
@@ -361,6 +361,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
|
|
361
361
|
end
|
362
362
|
|
363
363
|
assert_equal %w[default-1], Gem::Specification.all_names.sort
|
364
|
+
assert_equal "INFO: Uninstalled all gems in #{@gemhome}", @ui.output.split("\n").last
|
364
365
|
end
|
365
366
|
|
366
367
|
def test_execute_outside_gem_home
|
@@ -106,7 +106,7 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
106
106
|
assert_equal expected, YAML.load(checksums)
|
107
107
|
end
|
108
108
|
|
109
|
-
def
|
109
|
+
def test_build_time_uses_source_date_epoch
|
110
110
|
epoch = ENV["SOURCE_DATE_EPOCH"]
|
111
111
|
ENV["SOURCE_DATE_EPOCH"] = "123456789"
|
112
112
|
|
@@ -124,12 +124,10 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
124
124
|
ENV["SOURCE_DATE_EPOCH"] = epoch
|
125
125
|
end
|
126
126
|
|
127
|
-
def
|
127
|
+
def test_build_time_without_source_date_epoch
|
128
128
|
epoch = ENV["SOURCE_DATE_EPOCH"]
|
129
129
|
ENV["SOURCE_DATE_EPOCH"] = nil
|
130
130
|
|
131
|
-
start_time = Time.now.utc.to_i
|
132
|
-
|
133
131
|
spec = Gem::Specification.new 'build', '1'
|
134
132
|
spec.summary = 'build'
|
135
133
|
spec.authors = 'build'
|
@@ -138,14 +136,11 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
138
136
|
|
139
137
|
package = Gem::Package.new spec.file_name
|
140
138
|
|
141
|
-
end_time = Time.now.utc.to_i
|
142
|
-
|
143
139
|
assert_kind_of Time, package.build_time
|
144
140
|
|
145
141
|
build_time = package.build_time.to_i
|
146
142
|
|
147
|
-
|
148
|
-
assert_operator(build_time, :<=, end_time)
|
143
|
+
assert_equal Gem.source_date_epoch.to_i, build_time
|
149
144
|
ensure
|
150
145
|
ENV["SOURCE_DATE_EPOCH"] = epoch
|
151
146
|
end
|
@@ -8,6 +8,11 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
8
8
|
def setup
|
9
9
|
super
|
10
10
|
|
11
|
+
# Setting `@default_source_date_epoch` to `nil` effectively resets the
|
12
|
+
# value used for `Gem.source_date_epoch` whenever `$SOURCE_DATE_EPOCH`
|
13
|
+
# is not set.
|
14
|
+
Gem.instance_variable_set(:'@default_source_date_epoch', nil)
|
15
|
+
|
11
16
|
@data = 'abcde12345'
|
12
17
|
@io = TempIO.new
|
13
18
|
@tar_writer = Gem::Package::TarWriter.new @io
|
@@ -183,6 +183,58 @@ DEPENDENCIES
|
|
183
183
|
assert_path_exists File.join @gemhome, 'specifications', 'b-1.gemspec'
|
184
184
|
end
|
185
185
|
|
186
|
+
def test_install_from_gemdeps_complex_dependencies
|
187
|
+
quick_gem("z", 1)
|
188
|
+
quick_gem("z", "1.0.1")
|
189
|
+
quick_gem("z", "1.0.2")
|
190
|
+
quick_gem("z", "1.0.3")
|
191
|
+
quick_gem("z", 2)
|
192
|
+
|
193
|
+
spec_fetcher do |fetcher|
|
194
|
+
fetcher.download "z", 1
|
195
|
+
end
|
196
|
+
|
197
|
+
rs = Gem::RequestSet.new
|
198
|
+
installed = []
|
199
|
+
|
200
|
+
File.open 'Gemfile.lock', 'w' do |io|
|
201
|
+
io.puts <<-LOCKFILE
|
202
|
+
GEM
|
203
|
+
remote: #{@gem_repo}
|
204
|
+
specs:
|
205
|
+
z (1)
|
206
|
+
|
207
|
+
PLATFORMS
|
208
|
+
#{Gem::Platform::RUBY}
|
209
|
+
|
210
|
+
DEPENDENCIES
|
211
|
+
z (~> 1.0, >= 1.0.1)
|
212
|
+
LOCKFILE
|
213
|
+
end
|
214
|
+
|
215
|
+
File.open 'testo.gemspec', 'w' do |io|
|
216
|
+
io.puts <<-LOCKFILE
|
217
|
+
Gem::Specification.new do |spec|
|
218
|
+
spec.name = 'testo'
|
219
|
+
spec.version = '1.0.0'
|
220
|
+
spec.add_dependency('z', '~> 1.0', '>= 1.0.1')
|
221
|
+
end
|
222
|
+
LOCKFILE
|
223
|
+
end
|
224
|
+
|
225
|
+
File.open 'Gemfile', 'w' do |io|
|
226
|
+
io.puts("gemspec")
|
227
|
+
end
|
228
|
+
|
229
|
+
rs.install_from_gemdeps :gemdeps => 'Gemfile' do |req, installer|
|
230
|
+
installed << req.full_name
|
231
|
+
end
|
232
|
+
|
233
|
+
assert_includes installed, 'z-1.0.3'
|
234
|
+
|
235
|
+
assert_path_exists File.join @gemhome, 'specifications', 'z-1.0.3.gemspec'
|
236
|
+
end
|
237
|
+
|
186
238
|
def test_install_from_gemdeps_version_mismatch
|
187
239
|
spec_fetcher do |fetcher|
|
188
240
|
fetcher.gem 'a', 2
|
@@ -83,6 +83,11 @@ end
|
|
83
83
|
def setup
|
84
84
|
super
|
85
85
|
|
86
|
+
# Setting `@default_source_date_epoch` to `nil` effectively resets the
|
87
|
+
# value used for `Gem.source_date_epoch` whenever `$SOURCE_DATE_EPOCH`
|
88
|
+
# is not set.
|
89
|
+
Gem.instance_variable_set(:'@default_source_date_epoch', nil)
|
90
|
+
|
86
91
|
@a1 = util_spec 'a', '1' do |s|
|
87
92
|
s.executable = 'exec'
|
88
93
|
s.test_file = 'test/suite.rb'
|
@@ -939,7 +944,7 @@ dependencies: []
|
|
939
944
|
assert_equal File.join(@tempdir, 'a-2.gemspec'), spec.loaded_from
|
940
945
|
end
|
941
946
|
|
942
|
-
if RUBY_VERSION < '2.7'
|
947
|
+
if RUBY_ENGINE == 'ruby' and RUBY_VERSION < '2.7'
|
943
948
|
def test_self_load_tainted
|
944
949
|
full_path = @a2.spec_file
|
945
950
|
write_file full_path do |io|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date:
|
19
|
+
date: 2020-05-04 00:00:00.000000000 Z
|
20
20
|
dependencies: []
|
21
21
|
description: |-
|
22
22
|
A package (also known as a library) contains a set of functionality
|
@@ -819,7 +819,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
819
819
|
- !ruby/object:Gem::Version
|
820
820
|
version: '0'
|
821
821
|
requirements: []
|
822
|
-
rubygems_version: 3.
|
822
|
+
rubygems_version: 3.0.3
|
823
823
|
signing_key:
|
824
824
|
specification_version: 4
|
825
825
|
summary: RubyGems is a package management framework for Ruby.
|