rubygems-update 1.8.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- data.tar.gz.sig +0 -0
- data/History.txt +14 -1
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/commands/outdated_command.rb +1 -18
- data/lib/rubygems/commands/pristine_command.rb +4 -3
- data/lib/rubygems/dependency.rb +1 -1
- data/lib/rubygems/gem_path_searcher.rb +3 -0
- data/lib/rubygems/gem_runner.rb +1 -0
- data/lib/rubygems/installer.rb +7 -3
- data/lib/rubygems/specification.rb +22 -0
- data/setup.rb +5 -2
- data/test/rubygems/test_gem_commands_pristine_command.rb +30 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,4 +1,17 @@
|
|
1
|
-
=== 1.8.
|
1
|
+
=== 1.8.2 / 2011-05-11
|
2
|
+
|
3
|
+
* 2 minor enhancements:
|
4
|
+
|
5
|
+
* Moved #outdated from OutdatedCommand to Specification (for Isolate).
|
6
|
+
* Print out a warning about missing executables.
|
7
|
+
|
8
|
+
* 3 bug fixes:
|
9
|
+
|
10
|
+
* Added missing requires to fix various upgrade issues.
|
11
|
+
* `gem pristine` respects multiple gem repositories.
|
12
|
+
* setup.rb now execs with --disable-gems when possible
|
13
|
+
|
14
|
+
=== 1.8.1 / 2011-05-05
|
2
15
|
|
3
16
|
* 1 minor enhancement:
|
4
17
|
|
data/lib/rubygems.rb
CHANGED
@@ -16,7 +16,7 @@ class Gem::Commands::OutdatedCommand < Gem::Command
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def execute
|
19
|
-
outdated.sort.each do |name|
|
19
|
+
Gem::Specification.outdated.sort.each do |name|
|
20
20
|
local = Gem::Specification.find_all_by_name(name).max
|
21
21
|
dep = Gem::Dependency.new local.name, ">= #{local.version}"
|
22
22
|
remotes = Gem::SpecFetcher.fetcher.fetch dep
|
@@ -27,21 +27,4 @@ class Gem::Commands::OutdatedCommand < Gem::Command
|
|
27
27
|
say "#{local.name} (#{local.version} < #{remote.version})"
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
31
|
-
def outdated
|
32
|
-
outdateds = []
|
33
|
-
|
34
|
-
fetcher = Gem::SpecFetcher.fetcher
|
35
|
-
|
36
|
-
Gem::Specification.latest_specs.each do |local|
|
37
|
-
dependency = Gem::Dependency.new local.name, ">= #{local.version}"
|
38
|
-
remotes = fetcher.find_matching dependency
|
39
|
-
remotes = remotes.map { |(_, version, _), _| version }
|
40
|
-
latest = remotes.sort.last
|
41
|
-
|
42
|
-
outdateds << local.name if latest and local.version < latest
|
43
|
-
end
|
44
|
-
|
45
|
-
outdateds
|
46
|
-
end
|
47
30
|
end
|
@@ -94,12 +94,13 @@ extensions.
|
|
94
94
|
end
|
95
95
|
|
96
96
|
# TODO use installer options
|
97
|
-
installer = Gem::Installer.new
|
97
|
+
installer = Gem::Installer.new(gem,
|
98
|
+
:wrappers => true,
|
99
|
+
:force => true,
|
100
|
+
:install_dir => spec.base_dir)
|
98
101
|
installer.install
|
99
102
|
|
100
103
|
say "Restored #{spec.full_name}"
|
101
104
|
end
|
102
105
|
end
|
103
|
-
|
104
106
|
end
|
105
|
-
|
data/lib/rubygems/dependency.rb
CHANGED
@@ -240,7 +240,7 @@ class Gem::Dependency
|
|
240
240
|
# TODO: check Gem.activated_spec[self.name] in case matches falls outside
|
241
241
|
|
242
242
|
if matches.empty? then
|
243
|
-
specs = Gem::Specification.
|
243
|
+
specs = Gem::Specification.all_names.join ", "
|
244
244
|
error = Gem::LoadError.new "Could not find #{name} (#{requirement}) amongst [#{specs}]"
|
245
245
|
error.name = self.name
|
246
246
|
error.requirement = self.requirement
|
data/lib/rubygems/gem_runner.rb
CHANGED
data/lib/rubygems/installer.rb
CHANGED
@@ -283,11 +283,15 @@ class Gem::Installer
|
|
283
283
|
spec.executables.each do |filename|
|
284
284
|
filename.untaint
|
285
285
|
bin_path = File.expand_path File.join(gem_dir, spec.bindir, filename)
|
286
|
-
|
287
|
-
|
288
|
-
|
286
|
+
|
287
|
+
unless File.exist? bin_path
|
288
|
+
warn "Hey?!?! Where did #{bin_path} go??"
|
289
|
+
next
|
289
290
|
end
|
290
291
|
|
292
|
+
mode = File.stat(bin_path).mode | 0111
|
293
|
+
FileUtils.chmod mode, bin_path
|
294
|
+
|
291
295
|
if @wrappers then
|
292
296
|
generate_bin_script filename, bindir
|
293
297
|
else
|
@@ -569,6 +569,28 @@ class Gem::Specification
|
|
569
569
|
result.gsub(/ !!null \n/, " \n")
|
570
570
|
end
|
571
571
|
|
572
|
+
##
|
573
|
+
# Return a list of all outdated specifications. This method is HEAVY
|
574
|
+
# as it must go fetch specifications from the server.
|
575
|
+
|
576
|
+
def self.outdated
|
577
|
+
outdateds = []
|
578
|
+
|
579
|
+
# TODO: maybe we should switch to rubygems' version service?
|
580
|
+
fetcher = Gem::SpecFetcher.fetcher
|
581
|
+
|
582
|
+
latest_specs.each do |local|
|
583
|
+
dependency = Gem::Dependency.new local.name, ">= #{local.version}"
|
584
|
+
remotes = fetcher.find_matching dependency
|
585
|
+
remotes = remotes.map { |(_, version, _), _| version }
|
586
|
+
latest = remotes.sort.last
|
587
|
+
|
588
|
+
outdateds << local.name if latest and local.version < latest
|
589
|
+
end
|
590
|
+
|
591
|
+
outdateds
|
592
|
+
end
|
593
|
+
|
572
594
|
##
|
573
595
|
# Removes +spec+ from the known specs.
|
574
596
|
|
data/setup.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
#++
|
7
7
|
|
8
8
|
# Make sure rubygems isn't already loaded.
|
9
|
-
if ENV['RUBYOPT']
|
9
|
+
if ENV['RUBYOPT'] or defined? Gem then
|
10
10
|
ENV.delete 'RUBYOPT'
|
11
11
|
|
12
12
|
require 'rbconfig'
|
@@ -15,7 +15,10 @@ if ENV['RUBYOPT'] and defined? Gem then
|
|
15
15
|
ruby = File.join config::CONFIG['bindir'], config::CONFIG['ruby_install_name']
|
16
16
|
ruby << config::CONFIG['EXEEXT']
|
17
17
|
|
18
|
-
|
18
|
+
cmd = [ruby, 'setup.rb', *ARGV].compact
|
19
|
+
cmd[1,0] = "--disable-gems" if RUBY_VERSION > "1.9"
|
20
|
+
|
21
|
+
exec(*cmd)
|
19
22
|
end
|
20
23
|
|
21
24
|
Dir.chdir File.dirname(__FILE__)
|
@@ -111,6 +111,36 @@ class TestGemCommandsPristineCommand < Gem::TestCase
|
|
111
111
|
assert_empty out, out.inspect
|
112
112
|
end
|
113
113
|
|
114
|
+
def test_execute_many_multi_repo
|
115
|
+
a = quick_spec 'a'
|
116
|
+
install_gem a
|
117
|
+
|
118
|
+
Gem.clear_paths
|
119
|
+
gemhome2 = File.join @tempdir, 'gemhome2'
|
120
|
+
Gem.paths = { "GEM_PATH" => [gemhome2, @gemhome], "GEM_HOME" => gemhome2 }
|
121
|
+
|
122
|
+
b = quick_spec 'b'
|
123
|
+
install_gem b
|
124
|
+
|
125
|
+
@cmd.options[:args] = %w[a b]
|
126
|
+
|
127
|
+
use_ui @ui do
|
128
|
+
@cmd.execute
|
129
|
+
end
|
130
|
+
|
131
|
+
out = @ui.output.split "\n"
|
132
|
+
|
133
|
+
assert_equal "Restoring gems to pristine condition...", out.shift
|
134
|
+
assert_equal "Restored #{a.full_name}", out.shift
|
135
|
+
assert_equal "Restored #{b.full_name}", out.shift
|
136
|
+
assert_empty out, out.inspect
|
137
|
+
|
138
|
+
assert_path_exists File.join(@gemhome, "gems", 'a-2')
|
139
|
+
refute_path_exists File.join(gemhome2, "gems", 'a-2')
|
140
|
+
assert_path_exists File.join(gemhome2, "gems", 'b-2')
|
141
|
+
refute_path_exists File.join(@gemhome, "gems", 'b-2')
|
142
|
+
end
|
143
|
+
|
114
144
|
def test_execute_missing_cache_gem
|
115
145
|
a_2 = quick_spec 'a', 2
|
116
146
|
a_3 = quick_spec 'a', 3
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 51
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 1.8.
|
9
|
+
- 2
|
10
|
+
version: 1.8.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jim Weirich
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
x52qPcexcYZR7w==
|
39
39
|
-----END CERTIFICATE-----
|
40
40
|
|
41
|
-
date: 2011-05-
|
41
|
+
date: 2011-05-12 00:00:00 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: minitest
|
@@ -406,7 +406,7 @@ post_install_message:
|
|
406
406
|
rdoc_options:
|
407
407
|
- --main
|
408
408
|
- README.rdoc
|
409
|
-
- --title=RubyGems 1.8.
|
409
|
+
- --title=RubyGems 1.8.2 Documentation
|
410
410
|
require_paths:
|
411
411
|
- hide_lib_for_update
|
412
412
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -432,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
432
432
|
requirements: []
|
433
433
|
|
434
434
|
rubyforge_project: rubygems
|
435
|
-
rubygems_version: 1.8.
|
435
|
+
rubygems_version: 1.8.1
|
436
436
|
signing_key:
|
437
437
|
specification_version: 3
|
438
438
|
summary: RubyGems is a package management framework for Ruby
|
metadata.gz.sig
CHANGED
Binary file
|