rubygems-update 2.6.6 → 2.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.txt +14 -0
- data/lib/rubygems.rb +3 -2
- data/lib/rubygems/config_file.rb +5 -1
- data/lib/rubygems/installer.rb +8 -3
- data/lib/rubygems/remote_fetcher.rb +3 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +8 -2
- data/test/rubygems/test_gem.rb +3 -0
- data/test/rubygems/test_gem_config_file.rb +1 -2
- data/test/rubygems/test_gem_installer.rb +29 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +17 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f8ebff1d7a817d5be825280b5c587a09bc84ea5
|
4
|
+
data.tar.gz: 8dfc361737e408f6291f7d670b1e9a7b6b9900f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76309ac79a71bc0d35a962741ebd39aec07c33d37eae5e5593cedc0d645970a0f26bc8a4f868897ed5d5f06d8ecc3a830b1694d8a3a9ee5df2ead8c934c14164
|
7
|
+
data.tar.gz: 3b4b9d5aaeedfc0c58b7e1418ddef65402044f0bf1cb948d5028ad8c70dccc10ac6c2e652670d24b577136ac8684cd2b744f4ffca0af0b6f6a19da590c6b343f
|
data/History.txt
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.6.7 / 2016-09-26
|
4
|
+
|
5
|
+
Bug fixes:
|
6
|
+
|
7
|
+
* Install native extensions in the correct location when using the
|
8
|
+
`--user-install` flag. Pull request #1683 by Noah Kantrowitz.
|
9
|
+
* When calling `Gem.sources`, load sources from `configuration`
|
10
|
+
if present, else use the default sources. Pull request #1699
|
11
|
+
by Luis Sagastume.
|
12
|
+
* Fail gracefully when attempting to redirect without a Location.
|
13
|
+
Pull request #1711 by Samuel Giddins.
|
14
|
+
* Update vendored Molinillo to 0.5.1. Pull request #1714 by
|
15
|
+
Samuel Giddins.
|
16
|
+
|
3
17
|
=== 2.6.6 / 2016-06-22
|
4
18
|
|
5
19
|
Bug fixes:
|
data/lib/rubygems.rb
CHANGED
@@ -10,7 +10,7 @@ require 'rbconfig'
|
|
10
10
|
require 'thread'
|
11
11
|
|
12
12
|
module Gem
|
13
|
-
VERSION = '2.6.
|
13
|
+
VERSION = '2.6.7'
|
14
14
|
end
|
15
15
|
|
16
16
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -971,7 +971,8 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
971
971
|
# default_sources if the sources list is empty.
|
972
972
|
|
973
973
|
def self.sources
|
974
|
-
|
974
|
+
source_list = configuration.sources || default_sources
|
975
|
+
@sources ||= Gem::SourceList.from(source_list)
|
975
976
|
end
|
976
977
|
|
977
978
|
##
|
data/lib/rubygems/config_file.rb
CHANGED
@@ -143,6 +143,10 @@ class Gem::ConfigFile
|
|
143
143
|
|
144
144
|
attr_accessor :ssl_ca_cert
|
145
145
|
|
146
|
+
##
|
147
|
+
# sources to look for gems
|
148
|
+
attr_accessor :sources
|
149
|
+
|
146
150
|
##
|
147
151
|
# Path name of directory or file of openssl client certificate, used for remote https connection with client authentication
|
148
152
|
|
@@ -216,6 +220,7 @@ class Gem::ConfigFile
|
|
216
220
|
@update_sources = @hash[:update_sources] if @hash.key? :update_sources
|
217
221
|
@verbose = @hash[:verbose] if @hash.key? :verbose
|
218
222
|
@disable_default_gem_server = @hash[:disable_default_gem_server] if @hash.key? :disable_default_gem_server
|
223
|
+
@sources = @hash[:sources] if @hash.key? :sources
|
219
224
|
|
220
225
|
@ssl_verify_mode = @hash[:ssl_verify_mode] if @hash.key? :ssl_verify_mode
|
221
226
|
@ssl_ca_cert = @hash[:ssl_ca_cert] if @hash.key? :ssl_ca_cert
|
@@ -224,7 +229,6 @@ class Gem::ConfigFile
|
|
224
229
|
@api_keys = nil
|
225
230
|
@rubygems_api_key = nil
|
226
231
|
|
227
|
-
Gem.sources = @hash[:sources] if @hash.key? :sources
|
228
232
|
handle_arguments arg_list
|
229
233
|
end
|
230
234
|
|
data/lib/rubygems/installer.rb
CHANGED
@@ -282,18 +282,23 @@ class Gem::Installer
|
|
282
282
|
|
283
283
|
run_pre_install_hooks
|
284
284
|
|
285
|
+
# Set loaded_from to ensure extension_dir is correct
|
286
|
+
if @options[:install_as_default] then
|
287
|
+
spec.loaded_from = default_spec_file
|
288
|
+
else
|
289
|
+
spec.loaded_from = spec_file
|
290
|
+
end
|
291
|
+
|
285
292
|
# Completely remove any previous gem files
|
286
293
|
FileUtils.rm_rf gem_dir
|
287
294
|
FileUtils.rm_rf spec.extension_dir
|
288
295
|
|
289
296
|
FileUtils.mkdir_p gem_dir
|
290
297
|
|
291
|
-
if @options[:install_as_default]
|
292
|
-
spec.loaded_from = default_spec_file
|
298
|
+
if @options[:install_as_default] then
|
293
299
|
extract_bin
|
294
300
|
write_default_spec
|
295
301
|
else
|
296
|
-
spec.loaded_from = spec_file
|
297
302
|
extract_files
|
298
303
|
|
299
304
|
build_extensions
|
@@ -260,6 +260,9 @@ class Gem::RemoteFetcher
|
|
260
260
|
Net::HTTPTemporaryRedirect then
|
261
261
|
raise FetchError.new('too many redirects', uri) if depth > 10
|
262
262
|
|
263
|
+
unless location = response['Location']
|
264
|
+
raise FetchError.new("redirecting but no redirect location was given", uri)
|
265
|
+
end
|
263
266
|
location = URI.parse response['Location']
|
264
267
|
|
265
268
|
if https?(uri) && !https?(location)
|
@@ -184,6 +184,8 @@ module Gem::Resolver::Molinillo
|
|
184
184
|
raise VersionConflict.new(c) unless state
|
185
185
|
activated.rewind_to(sliced_states.first || :initial_state) if sliced_states
|
186
186
|
state.conflicts = c
|
187
|
+
index = states.size - 1
|
188
|
+
@parent_of.reject! { |_, i| i >= index }
|
187
189
|
end
|
188
190
|
end
|
189
191
|
|
@@ -209,7 +211,10 @@ module Gem::Resolver::Molinillo
|
|
209
211
|
# @return [Object] the requirement that led to `requirement` being added
|
210
212
|
# to the list of requirements.
|
211
213
|
def parent_of(requirement)
|
212
|
-
|
214
|
+
return unless requirement
|
215
|
+
return unless index = @parent_of[requirement]
|
216
|
+
return unless parent_state = @states[index]
|
217
|
+
parent_state.requirement
|
213
218
|
end
|
214
219
|
|
215
220
|
# @return [Object] the requirement that led to a version of a possibility
|
@@ -418,7 +423,8 @@ module Gem::Resolver::Molinillo
|
|
418
423
|
debug(depth) { "Requiring nested dependencies (#{nested_dependencies.join(', ')})" }
|
419
424
|
nested_dependencies.each do |d|
|
420
425
|
activated.add_child_vertex(name_for(d), nil, [name_for(activated_spec)], d)
|
421
|
-
|
426
|
+
parent_index = states.size - 1
|
427
|
+
@parent_of[d] ||= parent_index
|
422
428
|
end
|
423
429
|
|
424
430
|
push_state_for_requirements(requirements + nested_dependencies, !nested_dependencies.empty?)
|
data/test/rubygems/test_gem.rb
CHANGED
@@ -961,6 +961,9 @@ class TestGem < Gem::TestCase
|
|
961
961
|
|
962
962
|
def test_self_sources
|
963
963
|
assert_equal %w[http://gems.example.com/], Gem.sources
|
964
|
+
Gem.sources = nil
|
965
|
+
Gem.configuration.sources = %w[http://test.example.com/]
|
966
|
+
assert_equal %w[http://test.example.com/], Gem.sources
|
964
967
|
end
|
965
968
|
|
966
969
|
def test_try_activate_returns_true_for_activated_specs
|
@@ -61,12 +61,11 @@ class TestGemConfigFile < Gem::TestCase
|
|
61
61
|
end
|
62
62
|
|
63
63
|
util_config_file
|
64
|
-
|
65
64
|
assert_equal true, @cfg.backtrace
|
66
65
|
assert_equal 10, @cfg.bulk_threshold
|
67
66
|
assert_equal false, @cfg.verbose
|
68
67
|
assert_equal false, @cfg.update_sources
|
69
|
-
assert_equal %w[http://more-gems.example.com],
|
68
|
+
assert_equal %w[http://more-gems.example.com], @cfg.sources
|
70
69
|
assert_equal '--wrappers', @cfg[:install]
|
71
70
|
assert_equal(['/usr/ruby/1.8/lib/ruby/gems/1.8', '/var/ruby/1.8/gem_home'],
|
72
71
|
@cfg.path)
|
@@ -1141,6 +1141,35 @@ gem 'other', version
|
|
1141
1141
|
refute_path_exists should_be_removed
|
1142
1142
|
end
|
1143
1143
|
|
1144
|
+
def test_install_user_extension_dir
|
1145
|
+
@spec.extensions << "extconf.rb"
|
1146
|
+
write_file File.join(@tempdir, "extconf.rb") do |io|
|
1147
|
+
io.write <<-RUBY
|
1148
|
+
require "mkmf"
|
1149
|
+
create_makefile("#{@spec.name}")
|
1150
|
+
RUBY
|
1151
|
+
end
|
1152
|
+
|
1153
|
+
@spec.files += %w[extconf.rb]
|
1154
|
+
|
1155
|
+
# Create the non-user ext dir
|
1156
|
+
expected_extension_dir = @spec.extension_dir.dup
|
1157
|
+
FileUtils.mkdir_p expected_extension_dir
|
1158
|
+
|
1159
|
+
use_ui @ui do
|
1160
|
+
path = Gem::Package.build @spec
|
1161
|
+
|
1162
|
+
installer = Gem::Installer.at path, :user_install => true
|
1163
|
+
installer.install
|
1164
|
+
end
|
1165
|
+
|
1166
|
+
expected_makefile = File.join Gem.user_dir, 'gems', @spec.full_name, 'Makefile'
|
1167
|
+
|
1168
|
+
assert_path_exists expected_makefile
|
1169
|
+
assert_path_exists expected_extension_dir
|
1170
|
+
refute_path_exists File.join expected_extension_dir, 'gem_make.out'
|
1171
|
+
end
|
1172
|
+
|
1144
1173
|
# ruby core repository needs to `depend` file for extension build.
|
1145
1174
|
# but 1.9.2 and earlier mkmf.rb does not create TOUCH file like depend.
|
1146
1175
|
if RUBY_VERSION < '1.9.3'
|
@@ -687,6 +687,23 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
687
687
|
assert_equal "too many redirects (#{url})", e.message
|
688
688
|
end
|
689
689
|
|
690
|
+
def test_fetch_http_redirects_without_location
|
691
|
+
fetcher = Gem::RemoteFetcher.new nil
|
692
|
+
@fetcher = fetcher
|
693
|
+
url = 'http://gems.example.com/redirect'
|
694
|
+
|
695
|
+
def fetcher.request(uri, request_class, last_modified = nil)
|
696
|
+
res = Net::HTTPMovedPermanently.new nil, 301, nil
|
697
|
+
res
|
698
|
+
end
|
699
|
+
|
700
|
+
e = assert_raises Gem::RemoteFetcher::FetchError do
|
701
|
+
fetcher.fetch_http URI.parse(url)
|
702
|
+
end
|
703
|
+
|
704
|
+
assert_equal "redirecting but no redirect location was given (#{url})", e.message
|
705
|
+
end
|
706
|
+
|
690
707
|
def test_fetch_http_with_additional_headers
|
691
708
|
ENV["http_proxy"] = @proxy_uri
|
692
709
|
ENV["no_proxy"] = URI::parse(@server_uri).host
|
@@ -1036,4 +1053,3 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
1036
1053
|
end
|
1037
1054
|
|
1038
1055
|
end
|
1039
|
-
|
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: 2.6.
|
4
|
+
version: 2.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: builder
|
@@ -791,7 +791,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
791
791
|
version: '0'
|
792
792
|
requirements: []
|
793
793
|
rubyforge_project:
|
794
|
-
rubygems_version: 2.6.
|
794
|
+
rubygems_version: 2.6.6
|
795
795
|
signing_key:
|
796
796
|
specification_version: 4
|
797
797
|
summary: RubyGems is a package management framework for Ruby
|