rubygems-update 1.8.21 → 1.8.22
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.
- data/.travis.yml +14 -0
- data/History.txt +9 -0
- data/Manifest.txt +1 -0
- data/Rakefile +4 -3
- data/lib/rubygems.rb +2 -1
- data/lib/rubygems/installer.rb +7 -3
- data/lib/rubygems/installer_test_case.rb +3 -1
- data/lib/rubygems/specification.rb +7 -1
- data/test/rubygems/test_gem_installer.rb +96 -3
- data/test/rubygems/test_gem_specification.rb +1 -1
- metadata +11 -11
data/.travis.yml
ADDED
data/History.txt
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# coding: UTF-8
|
|
2
2
|
|
|
3
|
+
=== 1.8.22 / 2012-04-13
|
|
4
|
+
|
|
5
|
+
* 4 bug fixes:
|
|
6
|
+
|
|
7
|
+
* Workaround for psych/syck YAML date parsing issue
|
|
8
|
+
* Don't trust the encoding of ARGV. Fixes #307
|
|
9
|
+
* Quiet default warnings about missing spec variables
|
|
10
|
+
* Read a binary file properly (windows fix)
|
|
11
|
+
|
|
3
12
|
=== 1.8.21 / 2012-03-22
|
|
4
13
|
|
|
5
14
|
* 2 bug fixes:
|
data/Manifest.txt
CHANGED
data/Rakefile
CHANGED
|
@@ -56,7 +56,7 @@ hoe = Hoe.spec 'rubygems-update' do
|
|
|
56
56
|
rdoc_options << "--title=RubyGems #{self.version} Documentation"
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
self.rsync_args += " --no-p"
|
|
59
|
+
self.rsync_args += " --no-p -O"
|
|
60
60
|
|
|
61
61
|
# FIX: this exists because update --system installs the gem and
|
|
62
62
|
# doesn't uninstall it. It should uninstall or better, not install
|
|
@@ -226,10 +226,11 @@ task "git:newchangelog" do
|
|
|
226
226
|
now = Time.new.strftime "%Y-%m-%d"
|
|
227
227
|
|
|
228
228
|
changes = `#{cmd}`.split(/\|\|\|/).each_slice(3).map do |msg, author, email|
|
|
229
|
-
msg.split(/\n/).reject { |s| s.empty? }
|
|
229
|
+
c = msg.split(/\n/).reject { |s| s.empty? }
|
|
230
|
+
c.empty? ? nil : c.first
|
|
230
231
|
end
|
|
231
232
|
|
|
232
|
-
changes = changes.flatten
|
|
233
|
+
changes = changes.flatten.compact
|
|
233
234
|
|
|
234
235
|
next if changes.empty?
|
|
235
236
|
|
data/lib/rubygems.rb
CHANGED
|
@@ -112,6 +112,7 @@ require "rubygems/deprecate"
|
|
|
112
112
|
# * Daniel Berger -- djberg96(at)gmail.com
|
|
113
113
|
# * Phil Hagelberg -- technomancy(at)gmail.com
|
|
114
114
|
# * Ryan Davis -- ryand-ruby(at)zenspider.com
|
|
115
|
+
# * Evan Phoenix -- evan@phx.io
|
|
115
116
|
#
|
|
116
117
|
# (If your name is missing, PLEASE let us know!)
|
|
117
118
|
#
|
|
@@ -120,7 +121,7 @@ require "rubygems/deprecate"
|
|
|
120
121
|
# -The RubyGems Team
|
|
121
122
|
|
|
122
123
|
module Gem
|
|
123
|
-
VERSION = '1.8.
|
|
124
|
+
VERSION = '1.8.22'
|
|
124
125
|
|
|
125
126
|
##
|
|
126
127
|
# Raised when RubyGems is unable to load or activate a gem. Contains the
|
data/lib/rubygems/installer.rb
CHANGED
|
@@ -466,9 +466,13 @@ require 'rubygems'
|
|
|
466
466
|
|
|
467
467
|
version = "#{Gem::Requirement.default}"
|
|
468
468
|
|
|
469
|
-
if ARGV.first
|
|
470
|
-
|
|
471
|
-
|
|
469
|
+
if ARGV.first
|
|
470
|
+
str = ARGV.first
|
|
471
|
+
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
|
|
472
|
+
if str =~ /\\A_(.*)_\\z/
|
|
473
|
+
version = $1
|
|
474
|
+
ARGV.shift
|
|
475
|
+
end
|
|
472
476
|
end
|
|
473
477
|
|
|
474
478
|
gem '#{spec.name}', version
|
|
@@ -118,7 +118,9 @@ class Gem::InstallerTestCase < Gem::TestCase
|
|
|
118
118
|
FileUtils.mkdir_p 'bin'
|
|
119
119
|
FileUtils.mkdir_p 'lib'
|
|
120
120
|
FileUtils.mkdir_p File.join('ext', 'a')
|
|
121
|
-
File.open File.join('bin', 'executable'), 'w' do |f|
|
|
121
|
+
File.open File.join('bin', 'executable'), 'w' do |f|
|
|
122
|
+
f.puts "raise 'ran executable'"
|
|
123
|
+
end
|
|
122
124
|
File.open File.join('lib', 'code.rb'), 'w' do |f| f.puts '1' end
|
|
123
125
|
File.open File.join('ext', 'a', 'mkrf_conf.rb'), 'w' do |f|
|
|
124
126
|
f << <<-EOF
|
|
@@ -1002,6 +1002,12 @@ class Gem::Specification
|
|
|
1002
1002
|
when String then
|
|
1003
1003
|
if /\A(\d{4})-(\d{2})-(\d{2})\Z/ =~ date then
|
|
1004
1004
|
Time.utc($1.to_i, $2.to_i, $3.to_i)
|
|
1005
|
+
|
|
1006
|
+
# Workaround for where the date format output from psych isn't
|
|
1007
|
+
# parsed as a Time object by syck and thus comes through as a
|
|
1008
|
+
# string.
|
|
1009
|
+
elsif /\A(\d{4})-(\d{2})-(\d{2}) \d{2}:\d{2}:\d{2}\.\d+?Z\z/ =~ date then
|
|
1010
|
+
Time.utc($1.to_i, $2.to_i, $3.to_i)
|
|
1005
1011
|
else
|
|
1006
1012
|
raise(Gem::InvalidSpecificationException,
|
|
1007
1013
|
"invalid date format in specification: #{date.inspect}")
|
|
@@ -1378,7 +1384,7 @@ class Gem::Specification
|
|
|
1378
1384
|
val = other_spec.instance_variable_get(name)
|
|
1379
1385
|
if val then
|
|
1380
1386
|
instance_variable_set name, val.dup
|
|
1381
|
-
|
|
1387
|
+
elsif Gem.configuration.really_verbose
|
|
1382
1388
|
warn "WARNING: #{full_name} has an invalid nil value for #{name}"
|
|
1383
1389
|
end
|
|
1384
1390
|
rescue TypeError
|
|
@@ -35,9 +35,13 @@ require 'rubygems'
|
|
|
35
35
|
|
|
36
36
|
version = \">= 0\"
|
|
37
37
|
|
|
38
|
-
if ARGV.first
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
if ARGV.first
|
|
39
|
+
str = ARGV.first
|
|
40
|
+
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
|
|
41
|
+
if str =~ /\\A_(.*)_\\z/
|
|
42
|
+
version = $1
|
|
43
|
+
ARGV.shift
|
|
44
|
+
end
|
|
41
45
|
end
|
|
42
46
|
|
|
43
47
|
gem 'a', version
|
|
@@ -669,6 +673,95 @@ load Gem.bin_path('a', 'executable', version)
|
|
|
669
673
|
assert_same @installer, @pre_install_hook_arg
|
|
670
674
|
end
|
|
671
675
|
|
|
676
|
+
def test_install_creates_working_binstub
|
|
677
|
+
Dir.mkdir util_inst_bindir
|
|
678
|
+
util_setup_gem
|
|
679
|
+
util_clear_gems
|
|
680
|
+
|
|
681
|
+
@installer.wrappers = true
|
|
682
|
+
|
|
683
|
+
gemdir = File.join @gemhome, 'gems', @spec.full_name
|
|
684
|
+
|
|
685
|
+
@newspec = nil
|
|
686
|
+
build_rake_in do
|
|
687
|
+
use_ui @ui do
|
|
688
|
+
@newspec = @installer.install
|
|
689
|
+
end
|
|
690
|
+
end
|
|
691
|
+
|
|
692
|
+
exe = File.join gemdir, 'bin', 'executable'
|
|
693
|
+
|
|
694
|
+
e = assert_raises RuntimeError do
|
|
695
|
+
instance_eval File.read(exe)
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
assert_match(/ran executable/, e.message)
|
|
699
|
+
end
|
|
700
|
+
|
|
701
|
+
def test_install_creates_binstub_that_understand_version
|
|
702
|
+
Dir.mkdir util_inst_bindir
|
|
703
|
+
util_setup_gem
|
|
704
|
+
util_clear_gems
|
|
705
|
+
|
|
706
|
+
@installer.wrappers = true
|
|
707
|
+
|
|
708
|
+
@newspec = nil
|
|
709
|
+
build_rake_in do
|
|
710
|
+
use_ui @ui do
|
|
711
|
+
@newspec = @installer.install
|
|
712
|
+
end
|
|
713
|
+
end
|
|
714
|
+
|
|
715
|
+
exe = File.join @gemhome, 'bin', 'executable'
|
|
716
|
+
|
|
717
|
+
ARGV.unshift "_3.0_"
|
|
718
|
+
|
|
719
|
+
begin
|
|
720
|
+
Gem::Specification.reset
|
|
721
|
+
|
|
722
|
+
e = assert_raises Gem::LoadError do
|
|
723
|
+
instance_eval File.read(exe)
|
|
724
|
+
end
|
|
725
|
+
ensure
|
|
726
|
+
ARGV.shift if ARGV.first == "_3.0_"
|
|
727
|
+
end
|
|
728
|
+
|
|
729
|
+
assert_match(/\(= 3\.0\)/, e.message)
|
|
730
|
+
end
|
|
731
|
+
|
|
732
|
+
def test_install_creates_binstub_that_dont_trust_encoding
|
|
733
|
+
skip unless "".respond_to?(:force_encoding)
|
|
734
|
+
|
|
735
|
+
Dir.mkdir util_inst_bindir
|
|
736
|
+
util_setup_gem
|
|
737
|
+
util_clear_gems
|
|
738
|
+
|
|
739
|
+
@installer.wrappers = true
|
|
740
|
+
|
|
741
|
+
@newspec = nil
|
|
742
|
+
build_rake_in do
|
|
743
|
+
use_ui @ui do
|
|
744
|
+
@newspec = @installer.install
|
|
745
|
+
end
|
|
746
|
+
end
|
|
747
|
+
|
|
748
|
+
exe = File.join @gemhome, 'bin', 'executable'
|
|
749
|
+
|
|
750
|
+
ARGV.unshift "\xE4pfel".force_encoding("UTF-8")
|
|
751
|
+
|
|
752
|
+
begin
|
|
753
|
+
Gem::Specification.reset
|
|
754
|
+
|
|
755
|
+
e = assert_raises RuntimeError do
|
|
756
|
+
instance_eval File.read(exe)
|
|
757
|
+
end
|
|
758
|
+
ensure
|
|
759
|
+
ARGV.shift if ARGV.first == "\xE4pfel"
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
assert_match(/ran executable/, e.message)
|
|
763
|
+
end
|
|
764
|
+
|
|
672
765
|
def test_install_with_no_prior_files
|
|
673
766
|
Dir.mkdir util_inst_bindir
|
|
674
767
|
util_clear_gems
|
|
@@ -411,7 +411,7 @@ dependencies: []
|
|
|
411
411
|
def test_handles_private_null_type
|
|
412
412
|
path = File.join DATA_PATH, "null-type.gemspec.rz"
|
|
413
413
|
|
|
414
|
-
data = Marshal.load Gem.inflate(
|
|
414
|
+
data = Marshal.load Gem.inflate(Gem.read_binary(path))
|
|
415
415
|
|
|
416
416
|
assert_equal nil, data.rubyforge_project
|
|
417
417
|
end
|
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: 27
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 8
|
|
9
|
-
-
|
|
10
|
-
version: 1.8.
|
|
9
|
+
- 22
|
|
10
|
+
version: 1.8.22
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jim Weirich
|
|
@@ -17,7 +17,7 @@ autorequire:
|
|
|
17
17
|
bindir: bin
|
|
18
18
|
cert_chain: []
|
|
19
19
|
|
|
20
|
-
date: 2012-
|
|
20
|
+
date: 2012-04-13 00:00:00 Z
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|
|
23
23
|
name: minitest
|
|
@@ -25,14 +25,13 @@ dependencies:
|
|
|
25
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
|
26
26
|
none: false
|
|
27
27
|
requirements:
|
|
28
|
-
- -
|
|
28
|
+
- - ~>
|
|
29
29
|
- !ruby/object:Gem::Version
|
|
30
|
-
hash:
|
|
30
|
+
hash: 27
|
|
31
31
|
segments:
|
|
32
32
|
- 2
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
version: 2.11.3
|
|
33
|
+
- 12
|
|
34
|
+
version: "2.12"
|
|
36
35
|
type: :development
|
|
37
36
|
version_requirements: *id001
|
|
38
37
|
- !ruby/object:Gem::Dependency
|
|
@@ -183,6 +182,7 @@ extra_rdoc_files:
|
|
|
183
182
|
files:
|
|
184
183
|
- .autotest
|
|
185
184
|
- .document
|
|
185
|
+
- .travis.yml
|
|
186
186
|
- History.txt
|
|
187
187
|
- LICENSE.txt
|
|
188
188
|
- MIT.txt
|
|
@@ -387,7 +387,7 @@ post_install_message:
|
|
|
387
387
|
rdoc_options:
|
|
388
388
|
- --main
|
|
389
389
|
- README.rdoc
|
|
390
|
-
- --title=RubyGems 1.8.
|
|
390
|
+
- --title=RubyGems 1.8.22 Documentation
|
|
391
391
|
require_paths:
|
|
392
392
|
- hide_lib_for_update
|
|
393
393
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
@@ -413,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
413
413
|
requirements: []
|
|
414
414
|
|
|
415
415
|
rubyforge_project: rubygems
|
|
416
|
-
rubygems_version: 1.8.
|
|
416
|
+
rubygems_version: 1.8.21
|
|
417
417
|
signing_key:
|
|
418
418
|
specification_version: 3
|
|
419
419
|
summary: RubyGems is a package management framework for Ruby
|