rubygems-update 2.0.6 → 2.0.7
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -1
- data.tar.gz.sig +0 -0
- data/History.txt +12 -0
- data/Rakefile +25 -18
- data/lib/rubygems.rb +2 -2
- data/lib/rubygems/commands/pristine_command.rb +12 -11
- data/lib/rubygems/core_ext/kernel_require.rb +4 -4
- data/lib/rubygems/installer.rb +15 -4
- data/lib/rubygems/package_task.rb +5 -2
- data/lib/rubygems/specification.rb +53 -31
- data/lib/rubygems/test_case.rb +5 -1
- data/test/rubygems/test_gem_commands_install_command.rb +1 -0
- data/test/rubygems/test_gem_ext_builder.rb +4 -2
- data/test/rubygems/test_gem_package.rb +6 -8
- data/test/rubygems/test_gem_package_task.rb +23 -2
- metadata +6 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e9f42bf721ffd1d55ba8454036327f4c39d7b72
|
4
|
+
data.tar.gz: a37596374bcf4403abab869e8909ab2ecc28ab18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f3ac7f781ff7d1e8657ee683b27570dab4900f98ce685da00ddc9e5200fcf42edebdb54e4514652ea1bdd5f624bedf16288f1fa9dc299246f9c38bb632c5ba4
|
7
|
+
data.tar.gz: 06c7f64a81da01e747b6062d2c76210e97eeef08bd785b3da08105004ab312eb96d926a63f0d77d741f21e15dc7027f9a4bdfe0b2629e4de4087a77afc770d25
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
���J"�3�sy�C��:�iU<�d��}�%.����E�_��)�=�����bO���R�J~�!�v��텝!,�(Vkz=�$?5�D=�?%�騥����"�?Ӗ@�o�����G�*�eLH��o�ã~`� �3�K�x8����Jb�ZI.[�hU�6+>�c�������W�9cY�hr*�;�V�t~�oF�|�������rs�&�����hz�i_�G�1*���ď⟄k�z�%�]�huW�
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.0.7 / 2013-08-15
|
4
|
+
|
5
|
+
Bug fixes:
|
6
|
+
|
7
|
+
* Extensions may now be built in parallel (therefore gems may be installed in
|
8
|
+
parallel). Bug #606 by Hemant Kumar.
|
9
|
+
* Changed broken link to RubyGems Bookshelf to point to RubyGems guides. Ruby
|
10
|
+
pull request #369 by 謝致邦.
|
11
|
+
* Fixed various test failures due to platform differences or poor tests.
|
12
|
+
Patches by Yui Naruse and Koichi Sasada.
|
13
|
+
* Fixed documentation for Kernel#require.
|
14
|
+
|
3
15
|
=== 2.0.6 / 2013-07-24
|
4
16
|
|
5
17
|
Bug fixes:
|
data/Rakefile
CHANGED
@@ -26,11 +26,13 @@ Hoe.plugin :travis
|
|
26
26
|
# Hoe.plugin :isolate
|
27
27
|
|
28
28
|
hoe = Hoe.spec 'rubygems-update' do
|
29
|
-
self.rubyforge_name = 'rubygems'
|
30
29
|
self.author = ['Jim Weirich', 'Chad Fowler', 'Eric Hodel']
|
31
30
|
self.email = %w[rubygems-developers@rubyforge.org]
|
32
31
|
self.readme_file = 'README.rdoc'
|
33
32
|
|
33
|
+
license 'Ruby'
|
34
|
+
license 'MIT'
|
35
|
+
|
34
36
|
spec_extras[:required_rubygems_version] = Gem::Requirement.default
|
35
37
|
spec_extras[:required_ruby_version] = Gem::Requirement.new '>= 1.8.7'
|
36
38
|
spec_extras[:executables] = ['update_rubygems']
|
@@ -57,31 +59,36 @@ hoe = Hoe.spec 'rubygems-update' do
|
|
57
59
|
self.extra_rdoc_files = Dir["*.rdoc"]
|
58
60
|
|
59
61
|
spec_extras['rdoc_options'] = proc do |rdoc_options|
|
60
|
-
rdoc_options << "--title=RubyGems
|
62
|
+
rdoc_options << "--title=RubyGems Update Documentation"
|
61
63
|
end
|
62
64
|
|
63
65
|
self.rsync_args += " --no-p -O"
|
64
66
|
|
65
|
-
|
66
|
-
# doesn't uninstall it. It should uninstall or better, not install
|
67
|
-
# in the first place.
|
68
|
-
spec_extras['require_paths'] = %w[hide_lib_for_update] unless
|
69
|
-
ENV['RAKE_SUCKS']
|
67
|
+
spec_extras['require_paths'] = %w[hide_lib_for_update]
|
70
68
|
end
|
71
69
|
|
72
70
|
hoe.test_prelude = 'gem "minitest", "~> 4.0"'
|
73
71
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
72
|
+
Rake::Task['docs'].clear
|
73
|
+
Rake::Task['clobber_docs'].clear
|
74
|
+
|
75
|
+
begin
|
76
|
+
require 'rdoc/task'
|
77
|
+
|
78
|
+
RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
|
79
|
+
doc.main = hoe.readme_file
|
80
|
+
doc.title = "RubyGems #{hoe.version} API Documentation"
|
81
|
+
|
82
|
+
rdoc_files = Rake::FileList.new %w[lib History.txt LICENSE.txt MIT.txt]
|
83
|
+
rdoc_files.add hoe.extra_rdoc_files
|
84
|
+
|
85
|
+
doc.rdoc_files = rdoc_files
|
86
|
+
|
87
|
+
doc.rdoc_dir = 'doc'
|
88
|
+
end
|
89
|
+
rescue LoadError, RuntimeError # rake 10.1 on rdoc from ruby 1.9.2 and earlier
|
90
|
+
task 'docs' do
|
91
|
+
abort 'You must install rdoc to build documentation, try `rake newb` again'
|
85
92
|
end
|
86
93
|
end
|
87
94
|
|
data/lib/rubygems.rb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
require 'rbconfig'
|
9
9
|
|
10
10
|
module Gem
|
11
|
-
VERSION = '2.0.
|
11
|
+
VERSION = '2.0.7'
|
12
12
|
end
|
13
13
|
|
14
14
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -36,9 +36,9 @@ require 'rubygems/errors'
|
|
36
36
|
#
|
37
37
|
# Further RubyGems documentation can be found at:
|
38
38
|
#
|
39
|
+
# * {RubyGems Guides}[http://guides.rubygems.org]
|
39
40
|
# * {RubyGems API}[http://rubygems.rubyforge.org/rdoc] (also available from
|
40
41
|
# <tt>gem server</tt>)
|
41
|
-
# * {RubyGems Bookshelf}[http://rubygem.org]
|
42
42
|
#
|
43
43
|
# == RubyGems Plugins
|
44
44
|
#
|
@@ -21,7 +21,8 @@ class Gem::Commands::PristineCommand < Gem::Command
|
|
21
21
|
end
|
22
22
|
|
23
23
|
add_option('--[no-]extensions',
|
24
|
-
'Restore gems with extensions'
|
24
|
+
'Restore gems with extensions',
|
25
|
+
'in addition to regular gems') do |value, options|
|
25
26
|
options[:extensions] = value
|
26
27
|
end
|
27
28
|
|
@@ -43,23 +44,23 @@ class Gem::Commands::PristineCommand < Gem::Command
|
|
43
44
|
|
44
45
|
def description # :nodoc:
|
45
46
|
<<-EOF
|
46
|
-
The pristine command compares
|
47
|
-
cached gem and restores any files that don't match the cached gem's
|
47
|
+
The pristine command compares an installed gem with the contents of its
|
48
|
+
cached .gem file and restores any files that don't match the cached .gem's
|
49
|
+
copy.
|
48
50
|
|
49
|
-
If you have made modifications to
|
50
|
-
will revert them.
|
51
|
-
|
51
|
+
If you have made modifications to an installed gem, the pristine command
|
52
|
+
will revert them. All extensions are rebuilt and all bin stubs for the gem
|
53
|
+
are regenerated after checking for modifications.
|
52
54
|
|
53
|
-
If the cached gem cannot be found
|
54
|
-
revert the gem.
|
55
|
+
If the cached gem cannot be found it will be downloaded.
|
55
56
|
|
56
|
-
If --no-extensions is provided pristine will not attempt to restore
|
57
|
-
with
|
57
|
+
If --no-extensions is provided pristine will not attempt to restore a gem
|
58
|
+
with an extension.
|
58
59
|
EOF
|
59
60
|
end
|
60
61
|
|
61
62
|
def usage # :nodoc:
|
62
|
-
"#{program_name} [
|
63
|
+
"#{program_name} [GEMNAME ...]"
|
63
64
|
end
|
64
65
|
|
65
66
|
def execute
|
@@ -8,6 +8,8 @@ require 'monitor'
|
|
8
8
|
|
9
9
|
module Kernel
|
10
10
|
|
11
|
+
RUBYGEMS_ACTIVATION_MONITOR = Monitor.new # :nodoc:
|
12
|
+
|
11
13
|
if defined?(gem_original_require) then
|
12
14
|
# Ruby ships with a custom_require, override its require
|
13
15
|
remove_method :require
|
@@ -33,10 +35,8 @@ module Kernel
|
|
33
35
|
# The normal <tt>require</tt> functionality of returning false if
|
34
36
|
# that file has already been loaded is preserved.
|
35
37
|
|
36
|
-
ACTIVATION_MONITOR = Monitor.new
|
37
|
-
|
38
38
|
def require path
|
39
|
-
|
39
|
+
RUBYGEMS_ACTIVATION_MONITOR.enter
|
40
40
|
|
41
41
|
spec = Gem.find_unresolved_default_spec(path)
|
42
42
|
if spec
|
@@ -118,7 +118,7 @@ module Kernel
|
|
118
118
|
|
119
119
|
raise load_error
|
120
120
|
ensure
|
121
|
-
|
121
|
+
RUBYGEMS_ACTIVATION_MONITOR.exit
|
122
122
|
end
|
123
123
|
|
124
124
|
private :require
|
data/lib/rubygems/installer.rb
CHANGED
@@ -9,6 +9,7 @@ require 'rubygems/package'
|
|
9
9
|
require 'rubygems/ext'
|
10
10
|
require 'rubygems/user_interaction'
|
11
11
|
require 'fileutils'
|
12
|
+
require 'thread'
|
12
13
|
|
13
14
|
##
|
14
15
|
# The installer installs the files contained in the .gem into the Gem.home.
|
@@ -31,6 +32,14 @@ class Gem::Installer
|
|
31
32
|
|
32
33
|
ENV_PATHS = %w[/usr/bin/env /bin/env]
|
33
34
|
|
35
|
+
##
|
36
|
+
# The builder shells-out to run various commands after changing the
|
37
|
+
# directory. This means multiple installations cannot be allowed to build
|
38
|
+
# extensions in parallel as they may change each other's directories leading
|
39
|
+
# to broken extensions or failed installations.
|
40
|
+
|
41
|
+
CHDIR_MUTEX = Mutex.new # :nodoc:
|
42
|
+
|
34
43
|
##
|
35
44
|
# Raised when there is an error while building extensions.
|
36
45
|
#
|
@@ -675,11 +684,13 @@ TEXT
|
|
675
684
|
begin
|
676
685
|
FileUtils.mkdir_p dest_path
|
677
686
|
|
678
|
-
|
679
|
-
|
680
|
-
|
687
|
+
CHDIR_MUTEX.synchronize do
|
688
|
+
Dir.chdir extension_dir do
|
689
|
+
results = builder.build(extension, gem_dir, dest_path,
|
690
|
+
results, @build_args)
|
681
691
|
|
682
|
-
|
692
|
+
say results.join("\n") if Gem.configuration.really_verbose
|
693
|
+
end
|
683
694
|
end
|
684
695
|
rescue
|
685
696
|
extension_build_error(extension_dir, results.join("\n"), $@)
|
@@ -96,12 +96,15 @@ class Gem::PackageTask < Rake::PackageTask
|
|
96
96
|
def define
|
97
97
|
super
|
98
98
|
|
99
|
-
task :package => [:gem]
|
100
|
-
|
101
99
|
gem_file = File.basename gem_spec.cache_file
|
102
100
|
gem_path = File.join package_dir, gem_file
|
103
101
|
gem_dir = File.join package_dir, gem_spec.full_name
|
104
102
|
|
103
|
+
task :package => [:gem]
|
104
|
+
|
105
|
+
directory package_dir
|
106
|
+
directory gem_dir
|
107
|
+
|
105
108
|
desc "Build the gem file #{gem_file}"
|
106
109
|
task :gem => [gem_path]
|
107
110
|
|
@@ -188,15 +188,19 @@ class Gem::Specification
|
|
188
188
|
attr_reader :version
|
189
189
|
|
190
190
|
##
|
191
|
-
# Paths in the gem to add to <
|
191
|
+
# Paths in the gem to add to <code>$LOAD_PATH</code> when this gem is
|
192
|
+
# activated.
|
193
|
+
#
|
194
|
+
# If you have an extension you do not need to add <code>"ext"</code> to the
|
195
|
+
# require path, the extension build process will copy the extension files
|
196
|
+
# into "lib" for you.
|
197
|
+
#
|
198
|
+
# The default value is <code>"lib"</code>
|
192
199
|
#
|
193
200
|
# Usage:
|
194
201
|
#
|
195
202
|
# # If all library files are in the root directory...
|
196
203
|
# spec.require_path = '.'
|
197
|
-
#
|
198
|
-
# # If you have 'lib' and 'ext' directories...
|
199
|
-
# spec.require_paths << 'ext'
|
200
204
|
|
201
205
|
attr_accessor :require_paths
|
202
206
|
|
@@ -210,7 +214,7 @@ class Gem::Specification
|
|
210
214
|
##
|
211
215
|
# A short summary of this gem's description. Displayed in `gem list -d`.
|
212
216
|
#
|
213
|
-
# The description should be more detailed than the summary.
|
217
|
+
# The #description should be more detailed than the summary.
|
214
218
|
#
|
215
219
|
# Usage:
|
216
220
|
#
|
@@ -223,21 +227,23 @@ class Gem::Specification
|
|
223
227
|
#
|
224
228
|
# This is usually Gem::Platform::RUBY or Gem::Platform::CURRENT.
|
225
229
|
#
|
226
|
-
# Most gems contain pure Ruby code; they should simply leave the default
|
227
|
-
# in place.
|
228
|
-
#
|
229
|
-
# will only compile on a certain type of system.
|
230
|
-
# pre-compiled code (
|
231
|
-
# the platform attribute appropriately.
|
232
|
-
# Gem::Platform::CURRENT, which will cause the gem builder
|
233
|
-
# to the appropriate value for the system on which the
|
230
|
+
# Most gems contain pure Ruby code; they should simply leave the default
|
231
|
+
# value in place. Some gems contain C (or other) code to be compiled into a
|
232
|
+
# Ruby "extension". The should leave the default value in place unless
|
233
|
+
# their code will only compile on a certain type of system. Some gems
|
234
|
+
# consist of pre-compiled code ("binary gems"). It's especially important
|
235
|
+
# that they set the platform attribute appropriately. A shortcut is to set
|
236
|
+
# the platform to Gem::Platform::CURRENT, which will cause the gem builder
|
237
|
+
# to set the platform to the appropriate value for the system on which the
|
238
|
+
# build is being performed.
|
234
239
|
#
|
235
|
-
# If this attribute is set to a non-default value, it will be included in
|
236
|
-
# filename of the gem when it is built
|
240
|
+
# If this attribute is set to a non-default value, it will be included in
|
241
|
+
# the filename of the gem when it is built such as:
|
242
|
+
# nokogiri-1.6.0-x86-mingw32.gem
|
237
243
|
#
|
238
244
|
# Usage:
|
239
245
|
#
|
240
|
-
# spec.platform = Gem::Platform
|
246
|
+
# spec.platform = Gem::Platform.local
|
241
247
|
|
242
248
|
def platform= platform
|
243
249
|
if @original_platform.nil? or
|
@@ -339,7 +345,7 @@ class Gem::Specification
|
|
339
345
|
attr_reader :description
|
340
346
|
|
341
347
|
##
|
342
|
-
# A contact email for this gem
|
348
|
+
# A contact email address (or addresses) for this gem
|
343
349
|
#
|
344
350
|
# Usage:
|
345
351
|
#
|
@@ -455,6 +461,8 @@ class Gem::Specification
|
|
455
461
|
# Usage:
|
456
462
|
#
|
457
463
|
# spec.extensions << 'ext/rmagic/extconf.rb'
|
464
|
+
#
|
465
|
+
# See Gem::Ext::Builder for information about writing extensions for gems.
|
458
466
|
|
459
467
|
def extensions
|
460
468
|
@extensions ||= []
|
@@ -484,6 +492,8 @@ class Gem::Specification
|
|
484
492
|
# This should just be the name of your license. The full
|
485
493
|
# text of the license should be inside of the gem when you build it.
|
486
494
|
#
|
495
|
+
# You can set multiple licenses with #licenses=
|
496
|
+
#
|
487
497
|
# Usage:
|
488
498
|
# spec.license = 'MIT'
|
489
499
|
|
@@ -520,15 +530,20 @@ class Gem::Specification
|
|
520
530
|
end
|
521
531
|
|
522
532
|
##
|
523
|
-
# The version of
|
533
|
+
# The version of Ruby required by this gem. The ruby version can be
|
534
|
+
# specified to the patch-level:
|
535
|
+
#
|
536
|
+
# $ ruby -v -e 'p Gem.ruby_version'
|
537
|
+
# ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
|
538
|
+
# #<Gem::Version "2.0.0.247">
|
524
539
|
#
|
525
540
|
# Usage:
|
526
541
|
#
|
527
|
-
# #
|
542
|
+
# # This gem will work with 1.8.6 or greater...
|
528
543
|
# spec.required_ruby_version = '>= 1.8.6'
|
529
544
|
#
|
530
|
-
# #
|
531
|
-
# spec.required_ruby_version = '
|
545
|
+
# # Only with ruby 2.0.x
|
546
|
+
# spec.required_ruby_version = '~> 2.0'
|
532
547
|
|
533
548
|
def required_ruby_version= req
|
534
549
|
@required_ruby_version = Gem::Requirement.create req
|
@@ -536,7 +551,7 @@ class Gem::Specification
|
|
536
551
|
|
537
552
|
##
|
538
553
|
# Lists the external (to RubyGems) requirements that must be met for this gem
|
539
|
-
# to work.
|
554
|
+
# to work. It's simply information for the user.
|
540
555
|
#
|
541
556
|
# Usage:
|
542
557
|
#
|
@@ -548,7 +563,7 @@ class Gem::Specification
|
|
548
563
|
end
|
549
564
|
|
550
565
|
##
|
551
|
-
# A collection of unit test files.
|
566
|
+
# A collection of unit test files. They will be loaded as unit tests when
|
552
567
|
# the user requests a gem to be unit tested.
|
553
568
|
#
|
554
569
|
# Usage:
|
@@ -574,7 +589,7 @@ class Gem::Specification
|
|
574
589
|
#
|
575
590
|
# Deprecated: It is neither supported nor functional.
|
576
591
|
|
577
|
-
attr_accessor :autorequire
|
592
|
+
attr_accessor :autorequire # :nodoc:
|
578
593
|
|
579
594
|
##
|
580
595
|
# Sets the default executable for this gem.
|
@@ -602,9 +617,12 @@ class Gem::Specification
|
|
602
617
|
# The RubyGems version required by this gem
|
603
618
|
|
604
619
|
attr_reader :required_rubygems_version
|
620
|
+
|
605
621
|
##
|
606
622
|
# The rubyforge project this gem lives under. i.e. RubyGems'
|
607
623
|
# rubyforge_project is "rubygems".
|
624
|
+
#
|
625
|
+
# This option is deprecated.
|
608
626
|
|
609
627
|
attr_accessor :rubyforge_project
|
610
628
|
|
@@ -1267,7 +1285,7 @@ class Gem::Specification
|
|
1267
1285
|
end
|
1268
1286
|
|
1269
1287
|
##
|
1270
|
-
# Singular reader for #authors
|
1288
|
+
# Singular reader for #authors. Returns the first author in the list
|
1271
1289
|
|
1272
1290
|
def author
|
1273
1291
|
val = authors and val.first
|
@@ -1275,6 +1293,8 @@ class Gem::Specification
|
|
1275
1293
|
|
1276
1294
|
##
|
1277
1295
|
# The list of author names who wrote this gem.
|
1296
|
+
#
|
1297
|
+
# spec.authors = ['Chad Fowler', 'Jim Weirich', 'Rich Kilmer']
|
1278
1298
|
|
1279
1299
|
def authors
|
1280
1300
|
@authors ||= []
|
@@ -1381,7 +1401,9 @@ class Gem::Specification
|
|
1381
1401
|
end
|
1382
1402
|
|
1383
1403
|
##
|
1384
|
-
# The date this gem was created.
|
1404
|
+
# The date this gem was created. Lazily defaults to the current UTC date.
|
1405
|
+
#
|
1406
|
+
# There is no need to set this in your gem specification.
|
1385
1407
|
|
1386
1408
|
def date
|
1387
1409
|
@date ||= TODAY
|
@@ -1428,7 +1450,7 @@ class Gem::Specification
|
|
1428
1450
|
# Deprecated: The name of the gem is assumed to be the name of the
|
1429
1451
|
# executable now. See Gem.bin_path.
|
1430
1452
|
|
1431
|
-
def default_executable
|
1453
|
+
def default_executable # :nodoc:
|
1432
1454
|
if defined?(@default_executable) and @default_executable
|
1433
1455
|
result = @default_executable
|
1434
1456
|
elsif @executables and @executables.size == 1
|
@@ -1487,7 +1509,7 @@ class Gem::Specification
|
|
1487
1509
|
end
|
1488
1510
|
|
1489
1511
|
##
|
1490
|
-
# A
|
1512
|
+
# A detailed description of this gem. See also #summary
|
1491
1513
|
|
1492
1514
|
def description= str
|
1493
1515
|
@description = str.to_s
|
@@ -1676,7 +1698,7 @@ class Gem::Specification
|
|
1676
1698
|
#
|
1677
1699
|
# Formerly used to indicate this gem was RDoc-capable.
|
1678
1700
|
|
1679
|
-
def has_rdoc
|
1701
|
+
def has_rdoc # :nodoc:
|
1680
1702
|
true
|
1681
1703
|
end
|
1682
1704
|
|
@@ -1685,11 +1707,11 @@ class Gem::Specification
|
|
1685
1707
|
#
|
1686
1708
|
# Formerly used to indicate this gem was RDoc-capable.
|
1687
1709
|
|
1688
|
-
def has_rdoc= ignored
|
1710
|
+
def has_rdoc= ignored # :nodoc:
|
1689
1711
|
@has_rdoc = true
|
1690
1712
|
end
|
1691
1713
|
|
1692
|
-
alias :has_rdoc? :has_rdoc
|
1714
|
+
alias :has_rdoc? :has_rdoc # :nodoc:
|
1693
1715
|
|
1694
1716
|
##
|
1695
1717
|
# True if this gem has files in test_files
|
data/lib/rubygems/test_case.rb
CHANGED
@@ -50,8 +50,10 @@ install:
|
|
50
50
|
refute_match %r%"DESTDIR=#{ENV['DESTDIR']}" install$%, results
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
|
53
|
+
if /nmake/ !~ results
|
54
|
+
assert_match %r%^all: destination$%, results
|
55
|
+
assert_match %r%^install: destination$%, results
|
56
|
+
end
|
55
57
|
end
|
56
58
|
|
57
59
|
end
|
@@ -64,13 +64,16 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
64
64
|
reader = Gem::Package::TarReader.new gem_io
|
65
65
|
|
66
66
|
checksums = nil
|
67
|
+
tar = nil
|
67
68
|
|
68
69
|
reader.each_entry do |entry|
|
69
70
|
case entry.full_name
|
70
|
-
when 'checksums.yaml.gz'
|
71
|
+
when 'checksums.yaml.gz' then
|
71
72
|
Zlib::GzipReader.wrap entry do |io|
|
72
73
|
checksums = io.read
|
73
74
|
end
|
75
|
+
when 'data.tar.gz' then
|
76
|
+
tar = entry.read
|
74
77
|
end
|
75
78
|
end
|
76
79
|
|
@@ -83,19 +86,14 @@ class TestGemPackage < Gem::Package::TarTestCase
|
|
83
86
|
metadata_sha1 = Digest::SHA1.hexdigest s.string
|
84
87
|
metadata_sha512 = Digest::SHA512.hexdigest s.string
|
85
88
|
|
86
|
-
data_digests = nil
|
87
|
-
util_tar do |tar|
|
88
|
-
data_digests = package.add_contents tar
|
89
|
-
end
|
90
|
-
|
91
89
|
expected = {
|
92
90
|
'SHA1' => {
|
93
91
|
'metadata.gz' => metadata_sha1,
|
94
|
-
'data.tar.gz' =>
|
92
|
+
'data.tar.gz' => Digest::SHA1.hexdigest(tar),
|
95
93
|
},
|
96
94
|
'SHA512' => {
|
97
95
|
'metadata.gz' => metadata_sha512,
|
98
|
-
'data.tar.gz' =>
|
96
|
+
'data.tar.gz' => Digest::SHA512.hexdigest(tar),
|
99
97
|
}
|
100
98
|
}
|
101
99
|
|
@@ -4,16 +4,37 @@ require 'rubygems/package_task'
|
|
4
4
|
|
5
5
|
class TestGemPackageTask < Gem::TestCase
|
6
6
|
|
7
|
+
def setup
|
8
|
+
super
|
9
|
+
|
10
|
+
Rake.application = Rake::Application.new
|
11
|
+
RakeFileUtils.verbose_flag = false
|
12
|
+
end
|
13
|
+
|
7
14
|
def test_gem_package
|
8
15
|
gem = Gem::Specification.new do |g|
|
9
16
|
g.name = "pkgr"
|
10
17
|
g.version = "1.2.3"
|
11
|
-
|
18
|
+
|
19
|
+
g.authors = %w[author]
|
20
|
+
g.files = %w[x]
|
21
|
+
g.summary = 'summary'
|
12
22
|
end
|
23
|
+
|
13
24
|
pkg = Gem::PackageTask.new(gem) do |p|
|
14
25
|
p.package_files << "y"
|
15
26
|
end
|
16
|
-
|
27
|
+
|
28
|
+
assert_equal %w[x y], pkg.package_files
|
29
|
+
|
30
|
+
Dir.chdir @tempdir do
|
31
|
+
FileUtils.touch 'x'
|
32
|
+
FileUtils.touch 'y'
|
33
|
+
|
34
|
+
Rake.application['package'].invoke
|
35
|
+
|
36
|
+
assert_path_exists 'pkg/pkgr-1.2.3.gem'
|
37
|
+
end
|
17
38
|
end
|
18
39
|
|
19
40
|
def test_gem_package_with_current_platform
|
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.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -32,7 +32,7 @@ cert_chain:
|
|
32
32
|
KDyY1VIazVgoC8XvR4h/95/iScPiuglzA+DBG1hip1xScAtw05BrXyUNrc9CEMYU
|
33
33
|
wgF94UVoHRp6ywo8I7NP3HcwFQDFNEZPNGXsng==
|
34
34
|
-----END CERTIFICATE-----
|
35
|
-
date: 2013-
|
35
|
+
date: 2013-08-15 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: minitest
|
@@ -430,13 +430,14 @@ files:
|
|
430
430
|
- .gemtest
|
431
431
|
homepage: http://rubygems.org
|
432
432
|
licenses:
|
433
|
+
- Ruby
|
433
434
|
- MIT
|
434
435
|
metadata: {}
|
435
436
|
post_install_message:
|
436
437
|
rdoc_options:
|
437
438
|
- --main
|
438
439
|
- README.rdoc
|
439
|
-
- --title=RubyGems
|
440
|
+
- --title=RubyGems Update Documentation
|
440
441
|
require_paths:
|
441
442
|
- hide_lib_for_update
|
442
443
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -450,8 +451,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
450
451
|
- !ruby/object:Gem::Version
|
451
452
|
version: '0'
|
452
453
|
requirements: []
|
453
|
-
rubyforge_project: rubygems
|
454
|
-
rubygems_version: 2.0.
|
454
|
+
rubyforge_project: rubygems-update
|
455
|
+
rubygems_version: 2.0.7
|
455
456
|
signing_key:
|
456
457
|
specification_version: 4
|
457
458
|
summary: RubyGems is a package management framework for Ruby
|
metadata.gz.sig
CHANGED
Binary file
|