rubygems-update 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +1 -1
- data/History.txt +26 -10
- data/Manifest.txt +1 -0
- data/README.md +4 -4
- data/Rakefile +2 -2
- data/bundler/lib/bundler/build_metadata.rb +1 -1
- data/lib/rubygems.rb +6 -6
- data/lib/rubygems/command.rb +1 -1
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/sources_command.rb +3 -3
- data/lib/rubygems/resolver/api_set.rb +1 -1
- data/lib/rubygems/resolver/api_specification.rb +1 -1
- data/lib/rubygems/server.rb +1 -1
- data/lib/rubygems/specification.rb +12 -8
- data/lib/rubygems/specification_policy.rb +9 -1
- data/lib/rubygems/test_case.rb +28 -12
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +14 -0
- data/test/rubygems/test_gem.rb +20 -32
- data/test/rubygems/test_gem_commands_build_command.rb +18 -1
- data/test/rubygems/test_gem_commands_sources_command.rb +39 -1
- data/test/rubygems/test_gem_specification.rb +20 -5
- data/test/rubygems/test_gem_stub_specification.rb +0 -1
- data/util/update_changelog.rb +7 -10
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4182b07cf1a7f54ac5ac57eb202fb98aeeec4cc8069e549a5f966f8496ff7e73
|
4
|
+
data.tar.gz: 7784e28ab8b43c6199702d49d531484304e4e0af5bbe3e35bb7626a93d704e64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cea3e83459b735337d934e1086cabf75979e6018edcb73fa1334b4ebbd107a7b8b316b9456b46f4d85b9a39d3988b77f32f4e87a6aa8cecbd3e6036cf2ee870
|
7
|
+
data.tar.gz: b0d7b6ac35d9c6bae856c2323bf48175945ff423302db5db729d07a5554df373de77489f4fbe23e442289646f51a9166c66a253be9132a0fbedb1a54e03b1d49
|
data/CONTRIBUTING.md
CHANGED
@@ -26,7 +26,7 @@ contributors to follow to reduce the time it takes to get changes merged in.
|
|
26
26
|
|
27
27
|
|
28
28
|
For more information and ideas on how to contribute to RubyGems ecosystem, see
|
29
|
-
here:
|
29
|
+
here: https://guides.rubygems.org/contributing/
|
30
30
|
|
31
31
|
## Getting Started
|
32
32
|
|
data/History.txt
CHANGED
@@ -1,7 +1,31 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 3.1.4 / 2020-06-03
|
4
|
+
|
5
|
+
Minor enhancements:
|
6
|
+
|
7
|
+
* Deprecate rubyforge_project attribute only during build
|
8
|
+
time. Pull request #3609 by Josef Šimánek.
|
9
|
+
* Update links. Pull request #3610 by Josef Šimánek.
|
10
|
+
* Run CI at 3.1 branch head as well. Pull request #3677 by Josef Šimánek.
|
11
|
+
* Remove failing ubuntu-rvm CI flow. Pull request #3611 by
|
12
|
+
Josef Šimánek.
|
13
|
+
|
3
14
|
=== 3.1.3 / 2020-05-05
|
4
15
|
|
16
|
+
Minor enhancements:
|
17
|
+
|
18
|
+
* Resolver: require NameTuple before use. Pull request #3171 by Olle
|
19
|
+
Jonsson.
|
20
|
+
* Use absolute paths with autoload. Pull request #3100 by David Rodríguez.
|
21
|
+
* Avoid changing $SOURCE_DATE_EPOCH. Pull request #3088 by Ellen Marie
|
22
|
+
Dash.
|
23
|
+
* Use Bundler 2.1.4. Pull request #3072 by Hiroshi SHIBATA.
|
24
|
+
* Add tests to check if Gem.ruby_version works with ruby git master.
|
25
|
+
Pull request #3049 by Yusuke Endoh.
|
26
|
+
|
27
|
+
Bug fixes:
|
28
|
+
|
5
29
|
* Fix platform comparison check in #contains_requirable_file?. Pull
|
6
30
|
request #3495 by Benoit Daloze.
|
7
31
|
* Improve gzip errors logging. Pull request #3485 by David Rodríguez.
|
@@ -9,16 +33,8 @@
|
|
9
33
|
Rodríguez.
|
10
34
|
* Fix incorrect bundler version being required. Pull request #3458 by
|
11
35
|
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
36
|
* Fix gem install from a gemdeps file with complex dependencies.
|
19
37
|
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.
|
22
38
|
|
23
39
|
=== 3.1.2 / 2019-12-20
|
24
40
|
|
@@ -3556,10 +3572,10 @@ Bug fixes:
|
|
3556
3572
|
|
3557
3573
|
NOTE:
|
3558
3574
|
|
3559
|
-
|
3575
|
+
https://rubygems.org/ is now the default source for downloading gems.
|
3560
3576
|
|
3561
3577
|
You may have sources set via ~/.gemrc, so you should replace
|
3562
|
-
http://gems.rubyforge.org with
|
3578
|
+
http://gems.rubyforge.org with https://rubygems.org/
|
3563
3579
|
|
3564
3580
|
http://gems.rubyforge.org will continue to work for the foreseeable future.
|
3565
3581
|
|
data/Manifest.txt
CHANGED
@@ -566,6 +566,7 @@ test/rubygems/sff/discover.rb
|
|
566
566
|
test/rubygems/simple_gem.rb
|
567
567
|
test/rubygems/specifications/bar-0.0.2.gemspec
|
568
568
|
test/rubygems/specifications/foo-0.0.1-x86-mswin32.gemspec
|
569
|
+
test/rubygems/specifications/rubyforge-0.0.1.gemspec
|
569
570
|
test/rubygems/ssl_cert.pem
|
570
571
|
test/rubygems/ssl_key.pem
|
571
572
|
test/rubygems/test_bundled_ca.rb
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ A package (also known as a library) contains a set of functionality that can be
|
|
6
6
|
We call these packages "gems" and RubyGems is a tool to install, create, manage and load these packages in your Ruby environment.
|
7
7
|
|
8
8
|
RubyGems is also a client for [RubyGems.org](https://rubygems.org), a public repository of Gems that allows you to publish a Gem
|
9
|
-
that can be shared and used by other developers. See our guide on publishing a Gem at [guides.rubygems.org](
|
9
|
+
that can be shared and used by other developers. See our guide on publishing a Gem at [guides.rubygems.org](https://guides.rubygems.org/publishing/)
|
10
10
|
|
11
11
|
## Getting Started
|
12
12
|
|
@@ -23,7 +23,7 @@ Finally, inside your Ruby program, load the Nokogiri gem and start parsing your
|
|
23
23
|
|
24
24
|
Nokogiri.XML('<h1>Hello World</h1>')
|
25
25
|
|
26
|
-
For more information about how to use RubyGems, see our RubyGems basics guide at [guides.rubygems.org](
|
26
|
+
For more information about how to use RubyGems, see our RubyGems basics guide at [guides.rubygems.org](https://guides.rubygems.org/rubygems-basics/)
|
27
27
|
|
28
28
|
## Requirements
|
29
29
|
|
@@ -65,10 +65,10 @@ See [UPGRADING](UPGRADING.md) for more details and alternative instructions.
|
|
65
65
|
## Documentation
|
66
66
|
|
67
67
|
RubyGems uses [rdoc](https://github.com/rdoc/rdoc) for documentation. A compiled set of the docs
|
68
|
-
can be viewed online at [rubydoc](
|
68
|
+
can be viewed online at [rubydoc](https://www.rubydoc.info/github/rubygems/rubygems).
|
69
69
|
|
70
70
|
RubyGems also provides a comprehensive set of guides which covers numerous topics such as
|
71
|
-
creating a new gem, security practices and other resources at
|
71
|
+
creating a new gem, security practices and other resources at https://guides.rubygems.org
|
72
72
|
|
73
73
|
## Getting Help
|
74
74
|
|
data/Rakefile
CHANGED
@@ -167,7 +167,7 @@ task :upload_to_s3 do
|
|
167
167
|
s3 = Aws::S3::Resource.new(region:'us-west-2')
|
168
168
|
%w[zip tgz].each do |ext|
|
169
169
|
obj = s3.bucket('oregon.production.s3.rubygems.org').object("rubygems/rubygems-#{v}.#{ext}")
|
170
|
-
obj.upload_file("pkg/rubygems-#{v}.#{ext}")
|
170
|
+
obj.upload_file("pkg/rubygems-#{v}.#{ext}", acl: 'public-read')
|
171
171
|
end
|
172
172
|
end
|
173
173
|
|
@@ -340,7 +340,7 @@ SHA256 Checksums:
|
|
340
340
|
|
341
341
|
#{checksums}
|
342
342
|
|
343
|
-
[download]:
|
343
|
+
[download]: https://rubygems.org/pages/download
|
344
344
|
[upgrading]: http://docs.seattlerb.org/rubygems/UPGRADING_rdoc.html
|
345
345
|
|
346
346
|
ANNOUNCEMENT
|
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.4".freeze
|
13
13
|
end
|
14
14
|
|
15
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -26,19 +26,19 @@ require 'rubygems/errors'
|
|
26
26
|
# For user documentation, see:
|
27
27
|
#
|
28
28
|
# * <tt>gem help</tt> and <tt>gem help [command]</tt>
|
29
|
-
# * {RubyGems User Guide}[
|
30
|
-
# * {Frequently Asked Questions}[
|
29
|
+
# * {RubyGems User Guide}[https://guides.rubygems.org/]
|
30
|
+
# * {Frequently Asked Questions}[https://guides.rubygems.org/faqs]
|
31
31
|
#
|
32
32
|
# For gem developer documentation see:
|
33
33
|
#
|
34
|
-
# * {Creating Gems}[
|
34
|
+
# * {Creating Gems}[https://guides.rubygems.org/make-your-own-gem]
|
35
35
|
# * Gem::Specification
|
36
36
|
# * Gem::Version for version dependency notes
|
37
37
|
#
|
38
38
|
# Further RubyGems documentation can be found at:
|
39
39
|
#
|
40
|
-
# * {RubyGems Guides}[
|
41
|
-
# * {RubyGems API}[
|
40
|
+
# * {RubyGems Guides}[https://guides.rubygems.org]
|
41
|
+
# * {RubyGems API}[https://www.rubydoc.info/github/rubygems/rubygems] (also available from
|
42
42
|
# <tt>gem server</tt>)
|
43
43
|
#
|
44
44
|
# == RubyGems Plugins
|
data/lib/rubygems/command.rb
CHANGED
@@ -136,7 +136,7 @@ RubyGems has been configured to serve gems via the following URLs through
|
|
136
136
|
its history:
|
137
137
|
|
138
138
|
* http://gems.rubyforge.org (RubyGems 1.3.6 and earlier)
|
139
|
-
*
|
139
|
+
* https://rubygems.org/ (RubyGems 1.3.7 through 1.8.25)
|
140
140
|
* https://rubygems.org (RubyGems 2.0.1 and newer)
|
141
141
|
|
142
142
|
Since all of these sources point to the same set of gems you only need one
|
@@ -153,8 +153,8 @@ before it is added.
|
|
153
153
|
|
154
154
|
To remove a source use the --remove argument:
|
155
155
|
|
156
|
-
$ gem sources --remove
|
157
|
-
|
156
|
+
$ gem sources --remove https://rubygems.org/
|
157
|
+
https://rubygems.org/ removed from sources
|
158
158
|
|
159
159
|
EOF
|
160
160
|
end
|
@@ -23,7 +23,7 @@ class Gem::Resolver::APISet < Gem::Resolver::Set
|
|
23
23
|
##
|
24
24
|
# Creates a new APISet that will retrieve gems from +uri+ using the RubyGems
|
25
25
|
# API URL +dep_uri+ which is described at
|
26
|
-
#
|
26
|
+
# https://guides.rubygems.org/rubygems-org-api
|
27
27
|
|
28
28
|
def initialize(dep_uri = 'https://rubygems.org/api/v1/dependencies')
|
29
29
|
super()
|
@@ -11,7 +11,7 @@ class Gem::Resolver::APISpecification < Gem::Resolver::Specification
|
|
11
11
|
# Creates an APISpecification for the given +set+ from the rubygems.org
|
12
12
|
# +api_data+.
|
13
13
|
#
|
14
|
-
# See
|
14
|
+
# See https://guides.rubygems.org/rubygems-org-api/#misc_methods for the
|
15
15
|
# format of the +api_data+.
|
16
16
|
|
17
17
|
def initialize(set, api_data)
|
data/lib/rubygems/server.rb
CHANGED
@@ -661,7 +661,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
661
661
|
"only_one_executable" => true,
|
662
662
|
"full_name" => "rubygems-#{Gem::VERSION}",
|
663
663
|
"has_deps" => false,
|
664
|
-
"homepage" => "
|
664
|
+
"homepage" => "https://guides.rubygems.org/",
|
665
665
|
"name" => 'rubygems',
|
666
666
|
"ri_installed" => true,
|
667
667
|
"summary" => "RubyGems itself",
|
@@ -193,6 +193,12 @@ class Gem::Specification < Gem::BasicSpecification
|
|
193
193
|
@@spec_with_requirable_file = {}
|
194
194
|
@@active_stub_with_requirable_file = {}
|
195
195
|
|
196
|
+
# Tracking removed method calls to warn users during build time.
|
197
|
+
REMOVED_METHODS = [:rubyforge_project=].freeze # :nodoc:
|
198
|
+
def removed_method_calls
|
199
|
+
@removed_method_calls ||= []
|
200
|
+
end
|
201
|
+
|
196
202
|
######################################################################
|
197
203
|
# :section: Required gemspec attributes
|
198
204
|
|
@@ -726,14 +732,6 @@ class Gem::Specification < Gem::BasicSpecification
|
|
726
732
|
|
727
733
|
attr_writer :original_platform # :nodoc:
|
728
734
|
|
729
|
-
##
|
730
|
-
# Deprecated and ignored.
|
731
|
-
#
|
732
|
-
# Formerly used to set rubyforge project.
|
733
|
-
|
734
|
-
attr_writer :rubyforge_project
|
735
|
-
deprecate :rubyforge_project=, :none, 2019, 12
|
736
|
-
|
737
735
|
##
|
738
736
|
# The Gem::Specification version of this gemspec.
|
739
737
|
#
|
@@ -2107,9 +2105,15 @@ class Gem::Specification < Gem::BasicSpecification
|
|
2107
2105
|
end
|
2108
2106
|
|
2109
2107
|
##
|
2108
|
+
# Track removed method calls to warn about during build time.
|
2110
2109
|
# Warn about unknown attributes while loading a spec.
|
2111
2110
|
|
2112
2111
|
def method_missing(sym, *a, &b) # :nodoc:
|
2112
|
+
if REMOVED_METHODS.include?(sym)
|
2113
|
+
removed_method_calls << sym
|
2114
|
+
return
|
2115
|
+
end
|
2116
|
+
|
2113
2117
|
if @specification_version > CURRENT_SPECIFICATION_VERSION and
|
2114
2118
|
sym.to_s =~ /=$/
|
2115
2119
|
warn "ignoring #{sym} loading #{full_name}" if $DEBUG
|
@@ -75,6 +75,8 @@ class Gem::SpecificationPolicy
|
|
75
75
|
|
76
76
|
validate_dependencies
|
77
77
|
|
78
|
+
validate_removed_attributes
|
79
|
+
|
78
80
|
if @warnings > 0
|
79
81
|
if strict
|
80
82
|
error "specification has warnings"
|
@@ -408,6 +410,12 @@ http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard li
|
|
408
410
|
warning "#{executable_path} is missing #! line"
|
409
411
|
end
|
410
412
|
|
413
|
+
def validate_removed_attributes # :nodoc:
|
414
|
+
@specification.removed_method_calls.each do |attr|
|
415
|
+
warning("#{attr} is deprecated and ignored. Please remove this from your gemspec to ensure that your gem continues to build in the future.")
|
416
|
+
end
|
417
|
+
end
|
418
|
+
|
411
419
|
def warning(statement) # :nodoc:
|
412
420
|
@warnings += 1
|
413
421
|
|
@@ -421,7 +429,7 @@ http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard li
|
|
421
429
|
end
|
422
430
|
|
423
431
|
def help_text # :nodoc:
|
424
|
-
"See
|
432
|
+
"See https://guides.rubygems.org/specification-reference/ for help"
|
425
433
|
end
|
426
434
|
|
427
435
|
end
|
data/lib/rubygems/test_case.rb
CHANGED
@@ -96,6 +96,8 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni
|
|
96
96
|
|
97
97
|
TEST_PATH = ENV.fetch('RUBYGEMS_TEST_PATH', File.expand_path('../../../test/rubygems', __FILE__))
|
98
98
|
|
99
|
+
SPECIFICATIONS = File.expand_path(File.join(TEST_PATH, "specifications"), __FILE__)
|
100
|
+
|
99
101
|
def assert_activate(expected, *specs)
|
100
102
|
specs.each do |spec|
|
101
103
|
case spec
|
@@ -169,20 +171,24 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni
|
|
169
171
|
# original value when the block ends
|
170
172
|
#
|
171
173
|
def bindir(value)
|
172
|
-
|
174
|
+
with_clean_path_to_ruby do
|
175
|
+
bindir = RbConfig::CONFIG['bindir']
|
173
176
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
177
|
+
if value
|
178
|
+
RbConfig::CONFIG['bindir'] = value
|
179
|
+
else
|
180
|
+
RbConfig::CONFIG.delete 'bindir'
|
181
|
+
end
|
179
182
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
183
|
+
begin
|
184
|
+
yield
|
185
|
+
ensure
|
186
|
+
if bindir
|
187
|
+
RbConfig::CONFIG['bindir'] = bindir
|
188
|
+
else
|
189
|
+
RbConfig::CONFIG.delete 'bindir'
|
190
|
+
end
|
191
|
+
end
|
186
192
|
end
|
187
193
|
end
|
188
194
|
|
@@ -1247,6 +1253,16 @@ Also, a list:
|
|
1247
1253
|
end
|
1248
1254
|
end
|
1249
1255
|
|
1256
|
+
def with_clean_path_to_ruby
|
1257
|
+
orig_ruby = Gem.ruby
|
1258
|
+
|
1259
|
+
Gem.instance_variable_set :@ruby, nil
|
1260
|
+
|
1261
|
+
yield
|
1262
|
+
ensure
|
1263
|
+
Gem.instance_variable_set :@ruby, orig_ruby
|
1264
|
+
end
|
1265
|
+
|
1250
1266
|
class << self
|
1251
1267
|
|
1252
1268
|
# :nodoc:
|
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.4"
|
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
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "rubyforge"
|
5
|
+
s.version = "0.0.1"
|
6
|
+
s.platform = "ruby"
|
7
|
+
s.require_paths = ["lib"]
|
8
|
+
s.summary = "A very bar gem"
|
9
|
+
s.authors = ["unknown"]
|
10
|
+
s.license = 'MIT'
|
11
|
+
s.homepage = 'http://example.com'
|
12
|
+
s.files = ['README.md']
|
13
|
+
s.rubyforge_project = 'abc'
|
14
|
+
end
|
data/test/rubygems/test_gem.rb
CHANGED
@@ -161,10 +161,8 @@ class TestGem < Gem::TestCase
|
|
161
161
|
|
162
162
|
def test_self_install_permissions_with_format_executable_and_non_standard_ruby_install_name
|
163
163
|
Gem::Installer.exec_format = nil
|
164
|
-
|
165
|
-
|
166
|
-
assert_self_install_permissions(format_executable: true)
|
167
|
-
end
|
164
|
+
ruby_install_name 'ruby27' do
|
165
|
+
assert_self_install_permissions(format_executable: true)
|
168
166
|
end
|
169
167
|
ensure
|
170
168
|
Gem::Installer.exec_format = nil
|
@@ -1039,21 +1037,17 @@ class TestGem < Gem::TestCase
|
|
1039
1037
|
end
|
1040
1038
|
|
1041
1039
|
def test_self_ruby_escaping_spaces_in_path
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
assert_equal "\"C:/Ruby 1.8/bin/ruby.exe\"", Gem.ruby
|
1046
|
-
end
|
1040
|
+
with_bindir_and_exeext("C:/Ruby 1.8/bin", ".exe") do
|
1041
|
+
ruby_install_name "ruby" do
|
1042
|
+
assert_equal "\"C:/Ruby 1.8/bin/ruby.exe\"", Gem.ruby
|
1047
1043
|
end
|
1048
1044
|
end
|
1049
1045
|
end
|
1050
1046
|
|
1051
1047
|
def test_self_ruby_path_without_spaces
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
assert_equal "C:/Ruby18/bin/ruby.exe", Gem.ruby
|
1056
|
-
end
|
1048
|
+
with_bindir_and_exeext("C:/Ruby18/bin", ".exe") do
|
1049
|
+
ruby_install_name "ruby" do
|
1050
|
+
assert_equal "C:/Ruby18/bin/ruby.exe", Gem.ruby
|
1057
1051
|
end
|
1058
1052
|
end
|
1059
1053
|
end
|
@@ -1965,15 +1959,19 @@ You may need to `gem install -g` to install missing gems
|
|
1965
1959
|
end
|
1966
1960
|
|
1967
1961
|
def ruby_install_name(name)
|
1968
|
-
|
1969
|
-
|
1962
|
+
with_clean_path_to_ruby do
|
1963
|
+
orig_RUBY_INSTALL_NAME = RbConfig::CONFIG['ruby_install_name']
|
1964
|
+
RbConfig::CONFIG['ruby_install_name'] = name
|
1970
1965
|
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1966
|
+
begin
|
1967
|
+
yield
|
1968
|
+
ensure
|
1969
|
+
if orig_RUBY_INSTALL_NAME
|
1970
|
+
RbConfig::CONFIG['ruby_install_name'] = orig_RUBY_INSTALL_NAME
|
1971
|
+
else
|
1972
|
+
RbConfig::CONFIG.delete 'ruby_install_name'
|
1973
|
+
end
|
1974
|
+
end
|
1977
1975
|
end
|
1978
1976
|
end
|
1979
1977
|
|
@@ -1985,16 +1983,6 @@ You may need to `gem install -g` to install missing gems
|
|
1985
1983
|
end
|
1986
1984
|
end
|
1987
1985
|
|
1988
|
-
def with_clean_path_to_ruby
|
1989
|
-
orig_ruby = Gem.ruby
|
1990
|
-
|
1991
|
-
Gem.instance_variable_set :@ruby, nil
|
1992
|
-
|
1993
|
-
yield
|
1994
|
-
ensure
|
1995
|
-
Gem.instance_variable_set :@ruby, orig_ruby
|
1996
|
-
end
|
1997
|
-
|
1998
1986
|
def with_plugin(path)
|
1999
1987
|
test_plugin_path = File.expand_path("test/rubygems/plugin/#{path}",
|
2000
1988
|
PROJECT_DIR)
|
@@ -122,6 +122,23 @@ class TestGemCommandsBuildCommand < Gem::TestCase
|
|
122
122
|
util_test_build_gem @gem
|
123
123
|
end
|
124
124
|
|
125
|
+
def test_execute_rubyforge_project_warning
|
126
|
+
rubyforge_gemspec = File.join SPECIFICATIONS, "rubyforge-0.0.1.gemspec"
|
127
|
+
|
128
|
+
@cmd.options[:args] = [rubyforge_gemspec]
|
129
|
+
|
130
|
+
use_ui @ui do
|
131
|
+
Dir.chdir @tempdir do
|
132
|
+
@cmd.execute
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
error = @ui.error.split("\n")
|
137
|
+
assert_equal "WARNING: rubyforge_project= is deprecated and ignored. Please remove this from your gemspec to ensure that your gem continues to build in the future.", error.shift
|
138
|
+
assert_equal "WARNING: See https://guides.rubygems.org/specification-reference/ for help", error.shift
|
139
|
+
assert_equal [], error
|
140
|
+
end
|
141
|
+
|
125
142
|
def test_execute_strict_with_warnings
|
126
143
|
bad_gem = util_spec 'some_bad_gem' do |s|
|
127
144
|
s.files = ['README.md']
|
@@ -147,7 +164,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
|
|
147
164
|
error = @ui.error.split "\n"
|
148
165
|
assert_equal "WARNING: licenses is empty, but is recommended. Use a license identifier from", error.shift
|
149
166
|
assert_equal "http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.", error.shift
|
150
|
-
assert_equal "WARNING: See
|
167
|
+
assert_equal "WARNING: See https://guides.rubygems.org/specification-reference/ for help", error.shift
|
151
168
|
assert_equal [], error
|
152
169
|
|
153
170
|
gem_file = File.join @tempdir, File.basename(@gem.cache_file)
|
@@ -247,7 +247,7 @@ source http://gems.example.com/ already present in the cache
|
|
247
247
|
end
|
248
248
|
|
249
249
|
def test_execute_add_http_rubygems_org
|
250
|
-
http_rubygems_org = 'http://rubygems.org'
|
250
|
+
http_rubygems_org = 'http://rubygems.org/'
|
251
251
|
|
252
252
|
spec_fetcher do |fetcher|
|
253
253
|
fetcher.spec 'a', 1
|
@@ -284,6 +284,44 @@ source http://gems.example.com/ already present in the cache
|
|
284
284
|
assert_empty @ui.error
|
285
285
|
end
|
286
286
|
|
287
|
+
def test_execute_add_https_rubygems_org
|
288
|
+
https_rubygems_org = 'https://rubygems.org/'
|
289
|
+
|
290
|
+
spec_fetcher do |fetcher|
|
291
|
+
fetcher.spec 'a', 1
|
292
|
+
end
|
293
|
+
|
294
|
+
specs = Gem::Specification.map do |spec|
|
295
|
+
[spec.name, spec.version, spec.original_platform]
|
296
|
+
end
|
297
|
+
|
298
|
+
specs_dump_gz = StringIO.new
|
299
|
+
Zlib::GzipWriter.wrap specs_dump_gz do |io|
|
300
|
+
Marshal.dump specs, io
|
301
|
+
end
|
302
|
+
|
303
|
+
@fetcher.data["#{https_rubygems_org}/specs.#{@marshal_version}.gz"] =
|
304
|
+
specs_dump_gz.string
|
305
|
+
|
306
|
+
@cmd.handle_options %W[--add #{https_rubygems_org}]
|
307
|
+
|
308
|
+
ui = Gem::MockGemUi.new "n"
|
309
|
+
|
310
|
+
use_ui ui do
|
311
|
+
assert_raises Gem::MockGemUi::TermError do
|
312
|
+
@cmd.execute
|
313
|
+
end
|
314
|
+
end
|
315
|
+
|
316
|
+
assert_equal [@gem_repo], Gem.sources
|
317
|
+
|
318
|
+
expected = <<-EXPECTED
|
319
|
+
EXPECTED
|
320
|
+
|
321
|
+
assert_equal expected, @ui.output
|
322
|
+
assert_empty @ui.error
|
323
|
+
end
|
324
|
+
|
287
325
|
def test_execute_add_bad_uri
|
288
326
|
@cmd.handle_options %w[--add beta-gems.example.com]
|
289
327
|
|
@@ -2789,7 +2789,7 @@ end
|
|
2789
2789
|
add_runtime_dependency 'l', '~> 1.2', '> 1.2.3'
|
2790
2790
|
#{w}: open-ended dependency on o (>= 0) is not recommended
|
2791
2791
|
use a bounded requirement, such as '~> x.y'
|
2792
|
-
#{w}: See
|
2792
|
+
#{w}: See https://guides.rubygems.org/specification-reference/ for help
|
2793
2793
|
EXPECTED
|
2794
2794
|
|
2795
2795
|
assert_equal expected, @ui.error, 'warning'
|
@@ -2821,7 +2821,7 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
|
|
2821
2821
|
end
|
2822
2822
|
|
2823
2823
|
assert_equal <<-EXPECTED, @ui.error
|
2824
|
-
#{w}: See
|
2824
|
+
#{w}: See https://guides.rubygems.org/specification-reference/ for help
|
2825
2825
|
EXPECTED
|
2826
2826
|
end
|
2827
2827
|
end
|
@@ -2932,7 +2932,7 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
|
|
2932
2932
|
end
|
2933
2933
|
end
|
2934
2934
|
|
2935
|
-
assert_match 'See
|
2935
|
+
assert_match 'See https://guides.rubygems.org/specification-reference/ for help', @ui.error
|
2936
2936
|
end
|
2937
2937
|
|
2938
2938
|
def test_validate_executables
|
@@ -3105,7 +3105,7 @@ Please report a bug if this causes problems.
|
|
3105
3105
|
|
3106
3106
|
assert_equal '"ftp://rubygems.org" is not a valid HTTP URI', e.message
|
3107
3107
|
|
3108
|
-
@a1.homepage = '
|
3108
|
+
@a1.homepage = 'https://rubygems.org/'
|
3109
3109
|
assert_equal true, @a1.validate
|
3110
3110
|
|
3111
3111
|
@a1.homepage = 'https://rubygems.org'
|
@@ -3128,6 +3128,21 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|
3128
3128
|
warning
|
3129
3129
|
end
|
3130
3130
|
|
3131
|
+
def test_removed_methods
|
3132
|
+
assert_equal Gem::Specification::REMOVED_METHODS, [:rubyforge_project=]
|
3133
|
+
end
|
3134
|
+
|
3135
|
+
def test_validate_removed_rubyforge_project
|
3136
|
+
util_setup_validate
|
3137
|
+
|
3138
|
+
use_ui @ui do
|
3139
|
+
@a1.rubyforge_project = 'invalid-attribute'
|
3140
|
+
@a1.validate
|
3141
|
+
end
|
3142
|
+
|
3143
|
+
assert_match "rubyforge_project= is deprecated", @ui.error
|
3144
|
+
end
|
3145
|
+
|
3131
3146
|
def test_validate_license_values
|
3132
3147
|
util_setup_validate
|
3133
3148
|
|
@@ -3435,7 +3450,7 @@ Did you mean 'Ruby'?
|
|
3435
3450
|
@a1.validate
|
3436
3451
|
end
|
3437
3452
|
|
3438
|
-
assert_match 'See
|
3453
|
+
assert_match 'See https://guides.rubygems.org/specification-reference/ for help', @ui.error
|
3439
3454
|
end
|
3440
3455
|
|
3441
3456
|
def test_version
|
@@ -4,7 +4,6 @@ require "rubygems/stub_specification"
|
|
4
4
|
|
5
5
|
class TestStubSpecification < Gem::TestCase
|
6
6
|
|
7
|
-
SPECIFICATIONS = File.expand_path(File.join("..", "specifications"), __FILE__)
|
8
7
|
FOO = File.join SPECIFICATIONS, "foo-0.0.1-x86-mswin32.gemspec"
|
9
8
|
BAR = File.join SPECIFICATIONS, "bar-0.0.2.gemspec"
|
10
9
|
|
data/util/update_changelog.rb
CHANGED
@@ -3,19 +3,15 @@
|
|
3
3
|
require 'json'
|
4
4
|
require 'net/http'
|
5
5
|
|
6
|
-
def access_token_query_string
|
7
|
-
@access_token_query_string ||= begin
|
8
|
-
token = ENV['GITHUB_API_TOKEN']
|
9
|
-
token ? "?access_token=#{token.strip}" : ''
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
6
|
def github_api(path)
|
14
7
|
base = 'https://api.github.com'
|
15
8
|
url = path.start_with?(base) ? path : base + path
|
16
|
-
url += access_token_query_string
|
17
9
|
uri = URI.parse(url)
|
18
|
-
|
10
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
11
|
+
http.use_ssl = true
|
12
|
+
req = Net::HTTP::Get.new(uri.request_uri)
|
13
|
+
req["authorization"] = "token #{ENV['GITHUB_API_TOKEN']}" if ENV['GITHUB_API_TOKEN']
|
14
|
+
response = http.request(req)
|
19
15
|
JSON.load(response.body)
|
20
16
|
end
|
21
17
|
|
@@ -46,12 +42,13 @@ def sentence(text)
|
|
46
42
|
text.end_with?('.') ? text : text << '.'
|
47
43
|
end
|
48
44
|
|
45
|
+
from = ARGV.shift || Gem::VERSION
|
49
46
|
branch = ARGV.shift || "HEAD"
|
50
47
|
|
51
48
|
history = File.read(File.expand_path('../../History.txt', __FILE__))
|
52
49
|
|
53
50
|
File.open(File.expand_path('../../ChangeLog', __FILE__), 'w') do |changelog|
|
54
|
-
commits = `git log --oneline v#{
|
51
|
+
commits = `git log --oneline v#{from}..#{branch}`.split("\n")
|
55
52
|
prs = commits.reverse_each.map { |c| c =~ /(Auto merge of|Merge pull request|Merge) #(\d+)/ && $2 }.compact.uniq.sort!
|
56
53
|
prs.each do |pr|
|
57
54
|
next if history =~ /Pull\srequest\s##{pr}/m
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -13,10 +13,10 @@ authors:
|
|
13
13
|
- André Arko
|
14
14
|
- Evan Phoenix
|
15
15
|
- Hiroshi SHIBATA
|
16
|
-
autorequire:
|
16
|
+
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2020-
|
19
|
+
date: 2020-06-03 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
|
@@ -647,6 +647,7 @@ files:
|
|
647
647
|
- test/rubygems/simple_gem.rb
|
648
648
|
- test/rubygems/specifications/bar-0.0.2.gemspec
|
649
649
|
- test/rubygems/specifications/foo-0.0.1-x86-mswin32.gemspec
|
650
|
+
- test/rubygems/specifications/rubyforge-0.0.1.gemspec
|
650
651
|
- test/rubygems/ssl_cert.pem
|
651
652
|
- test/rubygems/ssl_key.pem
|
652
653
|
- test/rubygems/test_bundled_ca.rb
|
@@ -801,7 +802,7 @@ licenses:
|
|
801
802
|
- Ruby
|
802
803
|
- MIT
|
803
804
|
metadata: {}
|
804
|
-
post_install_message:
|
805
|
+
post_install_message:
|
805
806
|
rdoc_options:
|
806
807
|
- "--main"
|
807
808
|
- README.md
|
@@ -820,7 +821,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
820
821
|
version: '0'
|
821
822
|
requirements: []
|
822
823
|
rubygems_version: 3.0.3
|
823
|
-
signing_key:
|
824
|
+
signing_key:
|
824
825
|
specification_version: 4
|
825
826
|
summary: RubyGems is a package management framework for Ruby.
|
826
827
|
test_files: []
|