rubygems-update 2.4.4 → 2.4.5
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/CONTRIBUTING.rdoc +58 -0
- data/History.txt +42 -0
- data/Manifest.txt +1 -1
- data/lib/rubygems.rb +8 -2
- data/lib/rubygems/basic_specification.rb +52 -22
- data/lib/rubygems/commands/contents_command.rb +0 -1
- data/lib/rubygems/commands/pristine_command.rb +15 -1
- data/lib/rubygems/commands/uninstall_command.rb +1 -1
- data/lib/rubygems/commands/update_command.rb +0 -2
- data/lib/rubygems/core_ext/kernel_gem.rb +8 -1
- data/lib/rubygems/core_ext/kernel_require.rb +1 -1
- data/lib/rubygems/dependency.rb +1 -1
- data/lib/rubygems/dependency_list.rb +1 -5
- data/lib/rubygems/ext/ext_conf_builder.rb +1 -1
- data/lib/rubygems/indexer.rb +1 -1
- data/lib/rubygems/installer.rb +2 -2
- data/lib/rubygems/package/old.rb +2 -2
- data/lib/rubygems/package/tar_writer.rb +9 -3
- data/lib/rubygems/remote_fetcher.rb +5 -1
- data/lib/rubygems/request/connection_pools.rb +5 -1
- data/lib/rubygems/request/http_pool.rb +9 -0
- data/lib/rubygems/request_set.rb +1 -4
- data/lib/rubygems/request_set/lockfile.rb +21 -8
- data/lib/rubygems/resolver/api_set.rb +1 -1
- data/lib/rubygems/resolver/api_specification.rb +1 -1
- data/lib/rubygems/resolver/installer_set.rb +1 -1
- data/lib/rubygems/source.rb +6 -2
- data/lib/rubygems/specification.rb +10 -2
- data/lib/rubygems/stub_specification.rb +11 -5
- data/lib/rubygems/test_case.rb +31 -0
- data/lib/rubygems/text.rb +2 -2
- data/lib/rubygems/user_interaction.rb +0 -1
- data/test/rubygems/test_gem.rb +15 -32
- data/test/rubygems/test_gem_commands_pristine_command.rb +92 -0
- data/test/rubygems/test_gem_package_tar_writer.rb +10 -6
- data/test/rubygems/test_gem_remote_fetcher.rb +25 -1
- data/test/rubygems/test_gem_request_set_lockfile.rb +28 -0
- data/test/rubygems/test_gem_resolver_api_specification.rb +2 -2
- data/test/rubygems/test_gem_resolver_installer_set.rb +14 -0
- data/test/rubygems/test_gem_source.rb +14 -0
- data/test/rubygems/test_gem_specification.rb +50 -1
- data/test/rubygems/test_gem_stub_specification.rb +9 -1
- data/test/rubygems/test_gem_text.rb +16 -0
- data/test/rubygems/test_kernel.rb +24 -0
- metadata +4 -3
- data/CONTRIBUTING +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc0bb2181c07efffa060674fa83f662444173e18
|
4
|
+
data.tar.gz: 4435d084f527dd663d15ecdba564b8ebe43792a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0deecdcea9efcdc0e64ec35651c22b0019df5cf41bdd6a8667392d4e36648117ed512d624b44e4f7d3b388c74a494f0ec5d3f845563b8c67c8fc5ec5b252edac
|
7
|
+
data.tar.gz: e880b4f113c6a6549527c7754307fcf47d501cf7c6876a56ec3ef0cff4a2ade0b47bae7c445edc169778c526af5952ef31bf35606f89fb8e8ac1826b5ce466cf
|
data/CONTRIBUTING.rdoc
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
= How to contribute
|
2
|
+
|
3
|
+
Community involvement is essential to RubyGems. We want to keep it easy as
|
4
|
+
possible to contribute changes. There are a few guidelines that we need
|
5
|
+
contributors to follow to reduce the time it takes to get changes merged in.
|
6
|
+
|
7
|
+
== Guidelines
|
8
|
+
|
9
|
+
1. New features should be coupled with tests.
|
10
|
+
|
11
|
+
2. Ensure that your code blends well with ours:
|
12
|
+
* No trailing whitespace
|
13
|
+
* Match indentation (two spaces)
|
14
|
+
* Match coding style (`if`, `elsif`, `when` need trailing `then`)
|
15
|
+
|
16
|
+
3. Don't modify the history file or version number.
|
17
|
+
|
18
|
+
4. If you have any questions, just ask on IRC in #rubygems on Freenode or file
|
19
|
+
an issue here: http://github.com/rubygems/rubygems/issues
|
20
|
+
|
21
|
+
For more information and ideas on how to contribute to RubyGems ecosystem, see
|
22
|
+
here: http://guides.rubygems.org/contributing/
|
23
|
+
|
24
|
+
== Getting Started
|
25
|
+
|
26
|
+
Run:
|
27
|
+
|
28
|
+
$ gem install hoe
|
29
|
+
$ rake newb
|
30
|
+
|
31
|
+
After `rake newb` finishes you can run `rake` to run the tests.
|
32
|
+
|
33
|
+
== Issues
|
34
|
+
|
35
|
+
RubyGems uses milestones and labels to track issues and pull requests.
|
36
|
+
|
37
|
+
A new milestone is created for each feature release. New features will be
|
38
|
+
merged (for a pull request) or implemented when "enough" have accumulated.
|
39
|
+
Upon release the milestone will be closed. Bug fixes are added to the next
|
40
|
+
feature release milestone and merged or fixed and released as-needed. Bug fix
|
41
|
+
releases use the previous feature release minor version number.
|
42
|
+
|
43
|
+
Issues in the "Unfulfilled Promises and Broken Dreams" milestone are looking
|
44
|
+
for implementors. It is highly unlikely they will be implemented by RubyGems
|
45
|
+
committers. They may be closed after one year.
|
46
|
+
|
47
|
+
Issues in the "Future" milestone are more likely to be implemented by RubyGems
|
48
|
+
committers. They are triaged with each new feature release and either move to
|
49
|
+
the new version numbered milestone, left in "Future" or moved to "Unfulfilled
|
50
|
+
Promises and Broken Dreams". They may be closed after one year.
|
51
|
+
|
52
|
+
Issues with accepted status in a feature release milestone have been reviewed
|
53
|
+
and triaged and are scheduled for a fix or implementation.
|
54
|
+
|
55
|
+
Issues with the feedback status may be closed one week after a request for more
|
56
|
+
information from a collaborator. They will be reopened when more information
|
57
|
+
becomes available.
|
58
|
+
|
data/History.txt
CHANGED
@@ -1,5 +1,47 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.4.5 / 2014-12-03
|
4
|
+
|
5
|
+
Bug fixes:
|
6
|
+
|
7
|
+
* Improved speed of requiring gems. (Around 25% for a 60 gem test). Pull
|
8
|
+
request #1060 by unak.
|
9
|
+
* RubyGems no longer attempts to look up gems remotely with the --local flag.
|
10
|
+
Pull request #1084 by Jeremy Evans.
|
11
|
+
* Executable stubs use the correct gem version when RUBYGEMS_GEMDEPS is
|
12
|
+
active. Issue #1072 by Michael Kaiser-Nyman.
|
13
|
+
* Fixed handling of pinned gems in lockfiles with versions. Issue #1078 by
|
14
|
+
Ian Ker-Seymer.
|
15
|
+
* Fixed handling of git@example:gem.git URIs. Issue #1054 by Mogutan Mogu.
|
16
|
+
* Fixed handling of platforms retrieved from the dependencies API. Issue
|
17
|
+
#1058 and patch suggestion by tux-mind.
|
18
|
+
* RubyGems now suggests a copy-pasteable `gem pristine` command when
|
19
|
+
extensions are missing. Pull request #1057 by Shannon Skipper.
|
20
|
+
* Improved errors for long file names when packaging. Pull request #1016 by
|
21
|
+
Piotrek Bator.
|
22
|
+
* `gem pristine` now skips gems cannot be found remotely. Pull request #1064
|
23
|
+
by Tuomas Kareinen.
|
24
|
+
* `gem pristine` now caches gems to the proper directory. Pull request #1064
|
25
|
+
by Tuomas Kareinen.
|
26
|
+
* `gem pristine` now skips bundled gems properly. Pull request #1064 by
|
27
|
+
Tuomas Kareinen.
|
28
|
+
* Improved interoperability of Vagrant with RubyGems. Pull request #1057 by
|
29
|
+
Vít Ondruch.
|
30
|
+
* Renamed CONTRIBUTING to CONTRIBUTING.rdoc to allow markup. Pull request
|
31
|
+
#1090 by Roberto Miranda.
|
32
|
+
* Switched from #partition to #reject as only one collection is used. Pull
|
33
|
+
request #1074 by Tuomas Kareinen.
|
34
|
+
* Fixed installation of gems on systems using memory-mapped files. Pull
|
35
|
+
request #1038 by Justin Li.
|
36
|
+
* Fixed bug in Gem::Text#min3 where `a == b < c`. Pull request #1026 by
|
37
|
+
fortissimo1997.
|
38
|
+
* Fixed uninitialized variable warning in BasicSpecification. Pull request
|
39
|
+
#1019 by Piotr Szotkowski.
|
40
|
+
* Removed unneeded exception handling for cyclic dependencies. Pull request
|
41
|
+
#1043 by Jens Wille.
|
42
|
+
* Fixed grouped expression warning. Pull request #1081 by André Arko.
|
43
|
+
* Fixed handling of platforms when writing lockfiles.
|
44
|
+
|
3
45
|
=== 2.4.4 / 2014-11-12
|
4
46
|
|
5
47
|
Bug fixes:
|
data/Manifest.txt
CHANGED
data/lib/rubygems.rb
CHANGED
@@ -9,7 +9,7 @@ require 'rbconfig'
|
|
9
9
|
require 'thread'
|
10
10
|
|
11
11
|
module Gem
|
12
|
-
VERSION = '2.4.
|
12
|
+
VERSION = '2.4.5'
|
13
13
|
end
|
14
14
|
|
15
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -232,7 +232,13 @@ module Gem
|
|
232
232
|
requirements = Gem::Requirement.default if
|
233
233
|
requirements.empty?
|
234
234
|
|
235
|
-
|
235
|
+
dep = Gem::Dependency.new name, requirements
|
236
|
+
|
237
|
+
loaded = Gem.loaded_specs[name]
|
238
|
+
|
239
|
+
return loaded.bin_file exec_name if loaded && dep.matches_spec?(loaded)
|
240
|
+
|
241
|
+
specs = dep.matching_specs(true)
|
236
242
|
|
237
243
|
raise Gem::GemNotFoundException,
|
238
244
|
"can't find gem #{name} (#{requirements})" if specs.empty?
|
@@ -58,23 +58,28 @@ class Gem::BasicSpecification
|
|
58
58
|
# Return true if this spec can require +file+.
|
59
59
|
|
60
60
|
def contains_requirable_file? file
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
61
|
+
@contains_requirable_file ||= {}
|
62
|
+
@contains_requirable_file[file] ||=
|
63
|
+
begin
|
64
|
+
if instance_variable_defined?(:@ignored) or
|
65
|
+
instance_variable_defined?('@ignored') then
|
66
|
+
return false
|
67
|
+
elsif missing_extensions? then
|
68
|
+
@ignored = true
|
69
|
+
|
70
|
+
warn "Ignoring #{full_name} because its extensions are not built. " +
|
71
|
+
"Try: gem pristine #{name} --version #{version}"
|
72
|
+
return false
|
73
|
+
end
|
74
|
+
|
75
|
+
suffixes = Gem.suffixes
|
76
|
+
|
77
|
+
full_require_paths.any? do |dir|
|
78
|
+
base = "#{dir}/#{file}"
|
79
|
+
suffixes.any? { |suf| File.file? "#{base}#{suf}" }
|
80
|
+
end
|
81
|
+
end ? :yes : :no
|
82
|
+
@contains_requirable_file[file] == :yes
|
78
83
|
end
|
79
84
|
|
80
85
|
def default_gem?
|
@@ -134,13 +139,38 @@ class Gem::BasicSpecification
|
|
134
139
|
# activated.
|
135
140
|
|
136
141
|
def full_require_paths
|
137
|
-
|
138
|
-
|
139
|
-
|
142
|
+
@full_require_paths ||=
|
143
|
+
begin
|
144
|
+
full_paths = raw_require_paths.map do |path|
|
145
|
+
File.join full_gem_path, path
|
146
|
+
end
|
140
147
|
|
141
|
-
|
148
|
+
full_paths.unshift extension_dir unless @extensions.nil? || @extensions.empty?
|
142
149
|
|
143
|
-
|
150
|
+
full_paths
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Full path of the target library file.
|
156
|
+
# If the file is not in this gem, return nil.
|
157
|
+
|
158
|
+
def to_fullpath path
|
159
|
+
if activated? then
|
160
|
+
@paths_map ||= {}
|
161
|
+
@paths_map[path] ||=
|
162
|
+
begin
|
163
|
+
fullpath = nil
|
164
|
+
suffixes = Gem.suffixes
|
165
|
+
full_require_paths.find do |dir|
|
166
|
+
suffixes.find do |suf|
|
167
|
+
File.file?(fullpath = "#{dir}/#{path}#{suf}")
|
168
|
+
end
|
169
|
+
end ? fullpath : nil
|
170
|
+
end
|
171
|
+
else
|
172
|
+
nil
|
173
|
+
end
|
144
174
|
end
|
145
175
|
|
146
176
|
##
|
@@ -109,6 +109,11 @@ extensions will be restored.
|
|
109
109
|
next
|
110
110
|
end
|
111
111
|
|
112
|
+
if spec.bundled_gem_in_old_ruby?
|
113
|
+
say "Skipped #{spec.full_name}, it is bundled with old Ruby"
|
114
|
+
next
|
115
|
+
end
|
116
|
+
|
112
117
|
unless spec.extensions.empty? or options[:extensions] then
|
113
118
|
say "Skipped #{spec.full_name}, it needs to compile an extension"
|
114
119
|
next
|
@@ -120,8 +125,17 @@ extensions will be restored.
|
|
120
125
|
require 'rubygems/remote_fetcher'
|
121
126
|
|
122
127
|
say "Cached gem for #{spec.full_name} not found, attempting to fetch..."
|
128
|
+
|
123
129
|
dep = Gem::Dependency.new spec.name, spec.version
|
124
|
-
Gem::
|
130
|
+
found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dep
|
131
|
+
|
132
|
+
if found.empty?
|
133
|
+
say "Skipped #{spec.full_name}, it was not found from cache and remote sources"
|
134
|
+
next
|
135
|
+
end
|
136
|
+
|
137
|
+
spec_candidate, source = found.first
|
138
|
+
Gem::RemoteFetcher.fetcher.download spec_candidate, source.uri.to_s, spec.base_dir
|
125
139
|
end
|
126
140
|
|
127
141
|
env_shebang =
|
@@ -124,7 +124,7 @@ that is a dependency of an existing gem. You can use the
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def uninstall_all
|
127
|
-
|
127
|
+
specs = Gem::Specification.reject { |spec| spec.default_gem? }
|
128
128
|
|
129
129
|
specs.each do |spec|
|
130
130
|
options[:version] = spec.version
|
@@ -55,7 +55,14 @@ module Kernel
|
|
55
55
|
gem_name = gem_name.name
|
56
56
|
end
|
57
57
|
|
58
|
-
|
58
|
+
dep = Gem::Dependency.new(gem_name, *requirements)
|
59
|
+
|
60
|
+
loaded = Gem.loaded_specs[gem_name]
|
61
|
+
|
62
|
+
return false if loaded && dep.matches_spec?(loaded)
|
63
|
+
|
64
|
+
spec = dep.to_spec
|
65
|
+
|
59
66
|
Gem::LOADED_SPECS_MUTEX.synchronize {
|
60
67
|
spec.activate
|
61
68
|
} if spec
|
data/lib/rubygems/dependency.rb
CHANGED
@@ -49,7 +49,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|
49
49
|
FileUtils.mkdir_p lib_dir
|
50
50
|
entries = Dir.entries(tmp_dest) - %w[. ..]
|
51
51
|
entries = entries.map { |entry| File.join tmp_dest, entry }
|
52
|
-
FileUtils.cp_r entries, lib_dir
|
52
|
+
FileUtils.cp_r entries, lib_dir, :remove_destination => true
|
53
53
|
end
|
54
54
|
|
55
55
|
FileEntry.new(tmp_dest).traverse do |ent|
|
data/lib/rubygems/indexer.rb
CHANGED
data/lib/rubygems/installer.rb
CHANGED
@@ -421,8 +421,8 @@ class Gem::Installer
|
|
421
421
|
next
|
422
422
|
end
|
423
423
|
|
424
|
-
mode = File.stat(bin_path).mode
|
425
|
-
FileUtils.chmod mode, bin_path
|
424
|
+
mode = File.stat(bin_path).mode
|
425
|
+
FileUtils.chmod mode | 0111, bin_path unless (mode | 0111) == mode
|
426
426
|
|
427
427
|
check_executable_overwrite filename
|
428
428
|
|
data/lib/rubygems/package/old.rb
CHANGED
@@ -153,10 +153,10 @@ class Gem::Package::Old < Gem::Package
|
|
153
153
|
|
154
154
|
begin
|
155
155
|
@spec = Gem::Specification.from_yaml yaml
|
156
|
-
rescue yaml_error
|
156
|
+
rescue yaml_error
|
157
157
|
raise Gem::Exception, "Failed to parse gem specification out of gem file"
|
158
158
|
end
|
159
|
-
rescue ArgumentError
|
159
|
+
rescue ArgumentError
|
160
160
|
raise Gem::Exception, "Failed to parse gem specification out of gem file"
|
161
161
|
end
|
162
162
|
|
@@ -290,7 +290,9 @@ class Gem::Package::TarWriter
|
|
290
290
|
# Splits +name+ into a name and prefix that can fit in the TarHeader
|
291
291
|
|
292
292
|
def split_name(name) # :nodoc:
|
293
|
-
|
293
|
+
if name.bytesize > 256
|
294
|
+
raise Gem::Package::TooLongFileName.new("File \"#{name}\" has a too long path (should be 256 or less)")
|
295
|
+
end
|
294
296
|
|
295
297
|
if name.bytesize <= 100 then
|
296
298
|
prefix = ""
|
@@ -308,8 +310,12 @@ class Gem::Package::TarWriter
|
|
308
310
|
prefix = (parts + [nxt]).join "/"
|
309
311
|
name = newname
|
310
312
|
|
311
|
-
if name.bytesize > 100
|
312
|
-
raise Gem::Package::TooLongFileName
|
313
|
+
if name.bytesize > 100
|
314
|
+
raise Gem::Package::TooLongFileName.new("File \"#{prefix}/#{name}\" has a too long name (should be 100 or less)")
|
315
|
+
end
|
316
|
+
|
317
|
+
if prefix.bytesize > 155 then
|
318
|
+
raise Gem::Package::TooLongFileName.new("File \"#{prefix}/#{name}\" has a too long base path (should be 155 or less)")
|
313
319
|
end
|
314
320
|
end
|
315
321
|
|
@@ -326,7 +326,7 @@ class Gem::RemoteFetcher
|
|
326
326
|
|
327
327
|
def correct_for_windows_path(path)
|
328
328
|
if path[0].chr == '/' && path[1].chr =~ /[a-z]/i && path[2].chr == ':'
|
329
|
-
path
|
329
|
+
path[1..-1]
|
330
330
|
else
|
331
331
|
path
|
332
332
|
end
|
@@ -352,6 +352,10 @@ class Gem::RemoteFetcher
|
|
352
352
|
uri.scheme.downcase == 'https'
|
353
353
|
end
|
354
354
|
|
355
|
+
def close_all
|
356
|
+
@pools.each_value {|pool| pool.close_all}
|
357
|
+
end
|
358
|
+
|
355
359
|
protected
|
356
360
|
|
357
361
|
# we have our own signing code here to avoid a dependency on the aws-sdk gem
|
@@ -28,6 +28,10 @@ class Gem::Request::ConnectionPools # :nodoc:
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
def close_all
|
32
|
+
@pools.each_value {|pool| pool.close_all}
|
33
|
+
end
|
34
|
+
|
31
35
|
private
|
32
36
|
|
33
37
|
##
|
@@ -69,7 +73,7 @@ class Gem::Request::ConnectionPools # :nodoc:
|
|
69
73
|
Gem::UriFormatter.new(proxy_uri.password).unescape,
|
70
74
|
]
|
71
75
|
elsif no_proxy? uri.host, no_proxy then
|
72
|
-
net_http_args
|
76
|
+
net_http_args + [nil, nil]
|
73
77
|
else
|
74
78
|
net_http_args
|
75
79
|
end
|