rubygems-update 2.0.0.preview2.1 → 2.0.0.preview2.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.

checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MDRiNTU5NDZhMmMyMjlmYzU1ZTc0NTcxODA3OTJmMTcwZjMyZThkZQ==
5
- data.tar.gz: !binary |-
6
- NTVhMmM4ZmM1ZTI3OTUwNzg2NzgzNjg3YmE5MjliZTE2MDRiMjMzMA==
3
+ metadata.gz: 91401633528f7c3f86f318466cec4743c796486f
4
+ data.tar.gz: 93bbdda6a76f26324bac46eea9603e7ecb19a9c9
7
5
  !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- OGExMjMzYmQyNzUwZWI4ZWE5NDUzYWYwNTY0YzY2MjFlN2ZkNjBiOTBkZDUz
10
- MDRiMTIxYjIzZmJlMjg4ZTM5YTBmOWMzYjliNjliMmEyMGVhY2MxNTIyZjYz
11
- Nzc1MDM0MGM1YWRiNWRhN2UyY2M0MzJkMjE2YTg0ZGU4NjgyODM=
12
- data.tar.gz: !binary |-
13
- YTliNzhhYmQyMjc5YzIxM2NkYTY3ZjJkOWM2ZWYyODcwZjUxNzA5NTdiMTAw
14
- ODM5MGRiNDdkMzhmYTM5MDY1N2MwYjQzNDVkNzZhOWRmYjc3MGIyMjVhMzFm
15
- NWM2ZTdkMjM2YzM4ODlmYjQ4YWRlMGM3NDgzYzNlZjY1NzI5MjE=
6
+ metadata.gz: 50d19b65248acee6a4813e187084861fa2024fd64ab00de1d32e526d2fe5c22a0682bd1e3ed042621833c56732ca3518a04b32d0f89b4460b28ba84f4fd1303c
7
+ data.tar.gz: d269891086df82e1440a012b6cb16bbc6f466d566bac86bbcaf620e8fac314c4224c0fbfff4c393a2d897c9d607f9b94adc7838dd190f02f3eab98b37b0efeab
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,9 +1,10 @@
1
1
  # coding: UTF-8
2
2
 
3
- === 2.0.0.preview2.1
3
+ === 2.0.0.preview2.2 / 2012-12-14
4
4
 
5
5
  As a preview release, please file bugs for any problems you have with RubyGems
6
- at https://github.com/rubygems/rubygems/issues.
6
+ at https://github.com/rubygems/rubygems/issues. To update to preview releases
7
+ use gem update --system=2.0.0.preview2.2
7
8
 
8
9
  RubyGems 2.0 includes several new features and many breaking changes. Some of
9
10
  these changes will cause existing software to break. These changes are a
@@ -13,6 +14,15 @@ maintainable and improve APIs for RubyGems users.
13
14
  If you are using bundler be sure to install version 1.3.0.pre. Older versions
14
15
  of bundler will not work with RubyGems 2.0.
15
16
 
17
+ * Minor enhancements:
18
+ * Added a cmake builder. Pull request #265 by Allan Espinosa.
19
+
20
+ * Bug fixes:
21
+ * Restored RubyGems 1.8 packaging behavior of omitting directories. Bug
22
+ #413 by Jeremy Kemper.
23
+
24
+ === 2.0.0.preview2.1 / 2012-12-08
25
+
16
26
  * Minor enhancements:
17
27
  * Gem::DependencyInstaller now passes build_args down to the installer.
18
28
  Pull Request #412 by Sam Rawlins.
@@ -60,6 +60,7 @@ lib/rubygems/errors.rb
60
60
  lib/rubygems/exceptions.rb
61
61
  lib/rubygems/ext.rb
62
62
  lib/rubygems/ext/builder.rb
63
+ lib/rubygems/ext/cmake_builder.rb
63
64
  lib/rubygems/ext/configure_builder.rb
64
65
  lib/rubygems/ext/ext_conf_builder.rb
65
66
  lib/rubygems/ext/rake_builder.rb
@@ -201,6 +202,7 @@ test/rubygems/test_gem_dependency.rb
201
202
  test/rubygems/test_gem_dependency_installer.rb
202
203
  test/rubygems/test_gem_dependency_list.rb
203
204
  test/rubygems/test_gem_dependency_resolver.rb
205
+ test/rubygems/test_gem_ext_cmake_builder.rb
204
206
  test/rubygems/test_gem_ext_configure_builder.rb
205
207
  test/rubygems/test_gem_ext_ext_conf_builder.rb
206
208
  test/rubygems/test_gem_ext_rake_builder.rb
@@ -98,7 +98,7 @@
98
98
  require 'rbconfig'
99
99
 
100
100
  module Gem
101
- VERSION = '2.0.0.preview2.1'
101
+ VERSION = '2.0.0.preview2.2'
102
102
  end
103
103
 
104
104
  # Must be first since it unloads the prelude from 1.9.2
@@ -1,6 +1,7 @@
1
1
  require 'rubygems/command'
2
2
  require 'rubygems/version_option'
3
3
  require 'rubygems/rdoc'
4
+ require 'fileutils'
4
5
 
5
6
  class Gem::Commands::RdocCommand < Gem::Command
6
7
  include Gem::VersionOption
@@ -72,6 +73,11 @@ The rdoc command builds RDoc and RI documentation for installed gems. Use
72
73
 
73
74
  doc.force = options[:overwrite]
74
75
 
76
+ if options[:overwrite] then
77
+ FileUtils.rm_rf File.join(spec.doc_dir, 'ri')
78
+ FileUtils.rm_rf File.join(spec.doc_dir, 'rdoc')
79
+ end
80
+
75
81
  begin
76
82
  doc.generate
77
83
  rescue Errno::ENOENT => e
@@ -15,4 +15,5 @@ require 'rubygems/ext/builder'
15
15
  require 'rubygems/ext/configure_builder'
16
16
  require 'rubygems/ext/ext_conf_builder'
17
17
  require 'rubygems/ext/rake_builder'
18
+ require 'rubygems/ext/cmake_builder'
18
19
 
@@ -0,0 +1,14 @@
1
+ class Gem::Ext::CmakeBuilder < Gem::Ext::Builder
2
+ def self.build(extension, directory, dest_path, results)
3
+ unless File.exist?('Makefile') then
4
+ cmd = "cmake . -DCMAKE_INSTALL_PREFIX=#{dest_path}"
5
+ cmd << " #{Gem::Command.build_args.join ' '}" unless Gem::Command.build_args.empty?
6
+
7
+ run cmd, results
8
+ end
9
+
10
+ make dest_path, results
11
+
12
+ results
13
+ end
14
+ end
@@ -667,6 +667,8 @@ TEXT
667
667
  when /rakefile/i, /mkrf_conf/i then
668
668
  ran_rake = true
669
669
  Gem::Ext::RakeBuilder
670
+ when /CMakeLists.txt/ then
671
+ Gem::Ext::CmakeBuilder
670
672
  else
671
673
  message = "No builder for extension '#{extension}'"
672
674
  extension_build_error extension_dir, message
@@ -192,6 +192,8 @@ class Gem::Package
192
192
  @spec.files.each do |file|
193
193
  stat = File.stat file
194
194
 
195
+ next unless stat.file?
196
+
195
197
  tar.add_file_simple file, stat.mode, stat.size do |dst_io|
196
198
  open file, 'rb' do |src_io|
197
199
  dst_io.write src_io.read 16384 until src_io.eof?
@@ -86,18 +86,16 @@ class Gem::RDoc # :nodoc: all
86
86
  def self.load_rdoc
87
87
  return if @rdoc_version
88
88
 
89
- begin
90
- require 'rdoc/rdoc'
89
+ require 'rdoc/rdoc'
91
90
 
92
- @rdoc_version = if ::RDoc.const_defined? :VERSION then
93
- Gem::Version.new ::RDoc::VERSION
94
- else
95
- Gem::Version.new '1.0.1'
96
- end
91
+ @rdoc_version = if ::RDoc.const_defined? :VERSION then
92
+ Gem::Version.new ::RDoc::VERSION
93
+ else
94
+ Gem::Version.new '1.0.1'
95
+ end
97
96
 
98
- rescue LoadError => e
99
- raise Gem::DocumentError, "RDoc is not installed: #{e}"
100
- end
97
+ rescue LoadError => e
98
+ raise Gem::DocumentError, "RDoc is not installed: #{e}"
101
99
  end
102
100
 
103
101
  ##
@@ -107,7 +105,7 @@ class Gem::RDoc # :nodoc: all
107
105
  #
108
106
  # Only +generate_ri+ is enabled by default.
109
107
 
110
- def initialize spec, generate_rdoc = false, generate_ri = true
108
+ def initialize spec, generate_rdoc = true, generate_ri = true
111
109
  @doc_dir = spec.doc_dir
112
110
  @file_info = nil
113
111
  @force = false
@@ -123,6 +121,8 @@ class Gem::RDoc # :nodoc: all
123
121
 
124
122
  ##
125
123
  # Removes legacy rdoc arguments from +args+
124
+ #--
125
+ # TODO move to RDoc::Options
126
126
 
127
127
  def delete_legacy_args args
128
128
  args.delete '--inline-source'
@@ -138,16 +138,20 @@ class Gem::RDoc # :nodoc: all
138
138
  # Documentation will be generated into +destination+
139
139
 
140
140
  def document generator, options, destination
141
+ generator_name = generator
142
+
141
143
  options = options.dup
142
144
  options.exclude ||= [] # TODO maybe move to RDoc::Options#finish
143
145
  options.setup_generator generator
144
146
  options.op_dir = destination
145
147
  options.finish
146
148
 
149
+ generator = options.generator.new @rdoc.store, options
150
+
147
151
  @rdoc.options = options
148
- @rdoc.generator = options.generator.new options
152
+ @rdoc.generator = generator
149
153
 
150
- say "Installing #{generator} documentation for #{@spec.full_name}"
154
+ say "Installing #{generator_name} documentation for #{@spec.full_name}"
151
155
 
152
156
  FileUtils.mkdir_p options.op_dir
153
157
 
@@ -169,44 +173,51 @@ class Gem::RDoc # :nodoc: all
169
173
 
170
174
  setup
171
175
 
176
+ options = nil
177
+
172
178
  if Gem::Requirement.new('< 3').satisfied_by? self.class.rdoc_version then
173
179
  generate_legacy
174
- else
175
- ::RDoc::TopLevel.reset # TODO ::RDoc::RDoc.reset
176
- ::RDoc::Parser::C.reset
180
+ return
181
+ end
177
182
 
178
- options = ::RDoc::Options.new
179
- options.default_title = "#{@spec.full_name} Documentation"
180
- options.files = []
181
- options.files.push(*@spec.require_paths)
182
- options.files.push(*@spec.extra_rdoc_files)
183
+ ::RDoc::TopLevel.reset # TODO ::RDoc::RDoc.reset
184
+ ::RDoc::Parser::C.reset
183
185
 
184
- args = @spec.rdoc_options
186
+ args = @spec.rdoc_options
187
+ args.concat @spec.require_paths
188
+ args.concat @spec.extra_rdoc_files
185
189
 
186
- case config_args = Gem.configuration[:rdoc]
187
- when String then
188
- args = args.concat config_args.split
189
- when Array then
190
- args = args.concat config_args
191
- end
190
+ case config_args = Gem.configuration[:rdoc]
191
+ when String then
192
+ args = args.concat config_args.split
193
+ when Array then
194
+ args = args.concat config_args
195
+ end
196
+
197
+ delete_legacy_args args
192
198
 
193
- delete_legacy_args args
199
+ Dir.chdir @spec.full_gem_path do
200
+ options = ::RDoc::Options.new
201
+ options.default_title = "#{@spec.full_name} Documentation"
194
202
  options.parse args
195
- options.quiet = !Gem.configuration.really_verbose
203
+ end
196
204
 
197
- @rdoc = new_rdoc
198
- @rdoc.options = options
205
+ options.quiet = !Gem.configuration.really_verbose
199
206
 
200
- Dir.chdir @spec.full_gem_path do
201
- @file_info = @rdoc.parse_files options.files
202
- end
207
+ @rdoc = new_rdoc
208
+ @rdoc.options = options
203
209
 
204
- document 'ri', options, @ri_dir if
205
- @generate_ri and (@force or not File.exist? @ri_dir)
210
+ say "Parsing documentation for #{@spec.full_name}"
206
211
 
207
- document 'darkfish', options, @rdoc_dir if
208
- @generate_rdoc and (@force or not File.exist? @rdoc_dir)
212
+ Dir.chdir @spec.full_gem_path do
213
+ @file_info = @rdoc.parse_files options.files
209
214
  end
215
+
216
+ document 'ri', options, @ri_dir if
217
+ @generate_ri and (@force or not File.exist? @ri_dir)
218
+
219
+ document 'darkfish', options, @rdoc_dir if
220
+ @generate_rdoc and (@force or not File.exist? @rdoc_dir)
210
221
  end
211
222
 
212
223
  ##
@@ -268,7 +279,7 @@ class Gem::RDoc # :nodoc: all
268
279
  # #new_rdoc creates a new RDoc instance. This method is provided only to
269
280
  # make testing easier.
270
281
 
271
- def new_rdoc
282
+ def new_rdoc # :nodoc:
272
283
  ::RDoc::RDoc.new
273
284
  end
274
285
 
@@ -79,7 +79,9 @@ class Gem::Server
79
79
 
80
80
  <b><%=spec["name"]%> <%=spec["version"]%></b>
81
81
 
82
- <% if spec["rdoc_installed"] then %>
82
+ <% if spec["ri_installed"] then %>
83
+ <a href="<%=spec["doc_path"]%>">[rdoc]</a>
84
+ <% elsif spec["rdoc_installed"] then %>
83
85
  <a href="<%=spec["doc_path"]%>">[rdoc]</a>
84
86
  <% else %>
85
87
  <span title="rdoc not installed">[rdoc]</span>
@@ -464,7 +466,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
464
466
 
465
467
  def have_rdoc_4_plus?
466
468
  @have_rdoc_4_plus ||=
467
- Gem::Requirement.new('>= 4').satisfied_by? Gem::RDoc.rdoc_version
469
+ Gem::Requirement.new('>= 4.0.0.preview2').satisfied_by? Gem::RDoc.rdoc_version
468
470
  end
469
471
 
470
472
  def latest_specs(req, res)
@@ -604,6 +606,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
604
606
  "homepage" => spec.homepage,
605
607
  "name" => spec.name,
606
608
  "rdoc_installed" => Gem::RDoc.new(spec).rdoc_installed?,
609
+ "ri_installed" => Gem::RDoc.new(spec).ri_installed?,
607
610
  "summary" => spec.summary,
608
611
  "version" => spec.version.to_s,
609
612
  }
@@ -619,7 +622,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
619
622
  "has_deps" => false,
620
623
  "homepage" => "http://docs.rubygems.org/",
621
624
  "name" => 'rubygems',
622
- "rdoc_installed" => true,
625
+ "ri_installed" => true,
623
626
  "summary" => "RubyGems itself",
624
627
  "version" => Gem::VERSION,
625
628
  }
@@ -0,0 +1,84 @@
1
+ require 'rubygems/test_case'
2
+ require 'rubygems/ext'
3
+
4
+ class TestGemExtCmakeBuilder < Gem::TestCase
5
+
6
+ def setup
7
+ super
8
+
9
+ `cmake #{Gem::Ext::Builder.redirector}`
10
+
11
+ skip 'cmake not present' unless $?.success?
12
+
13
+ @ext = File.join @tempdir, 'ext'
14
+ @dest_path = File.join @tempdir, 'prefix'
15
+
16
+ FileUtils.mkdir_p @ext
17
+ FileUtils.mkdir_p @dest_path
18
+ end
19
+
20
+ def test_self_build
21
+ File.open File.join(@ext, 'CMakeLists.txt'), 'w' do |cmakelists|
22
+ cmakelists.write <<-eo_cmake
23
+ cmake_minimum_required(VERSION 2.8)
24
+ install (FILES test.txt DESTINATION bin)
25
+ eo_cmake
26
+ end
27
+ File.open File.join(@ext, 'test.txt'), 'w' do |testfile|
28
+ end
29
+
30
+ output = []
31
+
32
+ Dir.chdir @ext do
33
+ Gem::Ext::CmakeBuilder.build nil, nil, @dest_path, output
34
+ end
35
+
36
+ assert_equal "cmake . -DCMAKE_INSTALL_PREFIX=#{@dest_path}", output.shift
37
+ assert_match(/#{@ext}/, output.shift)
38
+ assert_equal make_command, output.shift
39
+ assert_equal "", output.shift.gsub(/^make\[1\]: (?:Entering|Leaving) directory .*\n/,"")
40
+ assert_equal make_command + " install", output.shift
41
+ assert_match(/test\.txt/, output.shift)
42
+ end
43
+
44
+ def test_self_build_fail
45
+ output = []
46
+
47
+ error = assert_raises Gem::InstallError do
48
+ Dir.chdir @ext do
49
+ Gem::Ext::CmakeBuilder.build nil, nil, @dest_path, output
50
+ end
51
+ end
52
+
53
+ shell_error_msg = %r{(CMake Error: .*)}
54
+ sh_prefix_cmake = "cmake . -DCMAKE_INSTALL_PREFIX="
55
+
56
+ expected = %r(cmake failed:
57
+
58
+ #{Regexp.escape sh_prefix_cmake}#{Regexp.escape @dest_path}
59
+ #{shell_error_msg}
60
+ )
61
+
62
+ assert_match expected, error.message
63
+
64
+ assert_equal "#{sh_prefix_cmake}#{@dest_path}", output.shift
65
+ assert_match %r(#{shell_error_msg}), output.shift
66
+ assert_equal true, output.empty?
67
+ end
68
+
69
+ def test_self_build_has_makefile
70
+ File.open File.join(@ext, 'Makefile'), 'w' do |makefile|
71
+ makefile.puts "all:\n\t@echo ok\ninstall:\n\t@echo ok"
72
+ end
73
+
74
+ output = []
75
+ Dir.chdir @ext do
76
+ Gem::Ext::CmakeBuilder.build nil, nil, @dest_path, output
77
+ end
78
+
79
+ assert_equal make_command, output[0]
80
+ assert_equal "#{make_command} install", output[2]
81
+ end
82
+
83
+ end
84
+
@@ -180,7 +180,7 @@ load Gem.bin_path('a', 'executable', version)
180
180
  end
181
181
 
182
182
  conflicted = File.join @gemhome, 'bin', 'executable'
183
- assert_match /\A"executable" from a conflicts with (?:#{Regexp.quote(conflicted)}|installed executable from conflict)\z/,
183
+ assert_match %r%\A"executable" from a conflicts with (?:#{Regexp.quote(conflicted)}|installed executable from conflict)\z%,
184
184
  e.message
185
185
  end
186
186
  ensure
@@ -102,9 +102,10 @@ class TestGemPackage < Gem::Package::TarTestCase
102
102
 
103
103
  def test_add_files
104
104
  spec = Gem::Specification.new
105
- spec.files = 'lib/code.rb'
105
+ spec.files = %w[lib/code.rb lib/empty]
106
+
107
+ FileUtils.mkdir_p 'lib/empty'
106
108
 
107
- FileUtils.mkdir 'lib'
108
109
  open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end
109
110
  open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end
110
111
 
@@ -1,15 +1,25 @@
1
- require 'rubygems/test_case'
2
1
  require 'rubygems'
2
+ require 'rubygems/test_case'
3
3
  require 'rubygems/rdoc'
4
4
 
5
5
  class TestGemRDoc < Gem::TestCase
6
+ Gem::RDoc.load_rdoc
7
+ rdoc_4 = Gem::Requirement.new('> 3').satisfied_by?(Gem::RDoc.rdoc_version)
6
8
 
7
9
  def setup
8
10
  super
9
11
 
10
- @a = quick_spec 'a'
12
+ @a = quick_spec 'a' do |s|
13
+ s.rdoc_options = %w[--main MyTitle]
14
+ s.extra_rdoc_files = %w[README]
15
+ end
16
+
17
+ write_file File.join(@tempdir, 'lib', 'a.rb')
18
+ write_file File.join(@tempdir, 'README')
19
+
20
+ install_gem @a
11
21
 
12
- @rdoc = Gem::RDoc.new @a
22
+ @hook = Gem::RDoc.new @a
13
23
 
14
24
  begin
15
25
  Gem::RDoc.load_rdoc
@@ -24,17 +34,26 @@ class TestGemRDoc < Gem::TestCase
24
34
  # RDoc 4 ships with its own Gem::RDoc which overrides this one which is
25
35
  # shipped for backwards compatibility.
26
36
 
37
+ def rdoc_4?
38
+ Gem::Requirement.new('>= 4.0.0.preview2').satisfied_by? \
39
+ @hook.class.rdoc_version
40
+ end
41
+
27
42
  def rdoc_3?
28
- Gem::Requirement.new('~> 3.0').satisfied_by? @rdoc.class.rdoc_version
43
+ Gem::Requirement.new('~> 3.0').satisfied_by? @hook.class.rdoc_version
29
44
  end
30
45
 
31
46
  def rdoc_3_8_or_better?
32
- Gem::Requirement.new('>= 3.8').satisfied_by? @rdoc.class.rdoc_version
47
+ Gem::Requirement.new('>= 3.8').satisfied_by? @hook.class.rdoc_version
33
48
  end
34
49
 
35
50
  def test_initialize
36
- assert @rdoc.generate_rdoc
37
- assert @rdoc.generate_ri
51
+ if rdoc_4? then
52
+ refute @hook.generate_rdoc
53
+ else
54
+ assert @hook.generate_rdoc
55
+ end
56
+ assert @hook.generate_ri
38
57
 
39
58
  rdoc = Gem::RDoc.new @a, false, false
40
59
 
@@ -50,7 +69,7 @@ class TestGemRDoc < Gem::TestCase
50
69
  -p
51
70
  ]
52
71
 
53
- @rdoc.delete_legacy_args args
72
+ @hook.delete_legacy_args args
54
73
 
55
74
  assert_empty args
56
75
  end
@@ -61,13 +80,14 @@ class TestGemRDoc < Gem::TestCase
61
80
  options = RDoc::Options.new
62
81
  options.files = []
63
82
 
64
- @rdoc.instance_variable_set :@rdoc, @rdoc.new_rdoc
65
- @rdoc.instance_variable_set :@file_info, []
83
+ rdoc = @hook.new_rdoc
84
+ @hook.instance_variable_set :@rdoc, rdoc
85
+ @hook.instance_variable_set :@file_info, []
66
86
 
67
- @rdoc.document 'darkfish', options, @a.doc_dir('rdoc')
87
+ @hook.document 'darkfish', options, @a.doc_dir('rdoc')
68
88
 
69
- assert @rdoc.rdoc_installed?
70
- end
89
+ assert @hook.rdoc_installed?
90
+ end unless rdoc_4
71
91
 
72
92
  def test_generate
73
93
  skip 'RDoc 3 required' unless rdoc_3?
@@ -75,15 +95,15 @@ class TestGemRDoc < Gem::TestCase
75
95
  FileUtils.mkdir_p @a.doc_dir
76
96
  FileUtils.mkdir_p File.join(@a.gem_dir, 'lib')
77
97
 
78
- @rdoc.generate
98
+ @hook.generate
79
99
 
80
- assert @rdoc.rdoc_installed?
81
- assert @rdoc.ri_installed?
100
+ assert @hook.rdoc_installed?
101
+ assert @hook.ri_installed?
82
102
 
83
- rdoc = @rdoc.instance_variable_get :@rdoc
103
+ rdoc = @hook.instance_variable_get :@rdoc
84
104
 
85
105
  refute rdoc.options.hyperlink_all
86
- end
106
+ end unless rdoc_4
87
107
 
88
108
  def test_generate_configuration_rdoc_array
89
109
  skip 'RDoc 3 required' unless rdoc_3?
@@ -93,12 +113,12 @@ class TestGemRDoc < Gem::TestCase
93
113
  FileUtils.mkdir_p @a.doc_dir
94
114
  FileUtils.mkdir_p File.join(@a.gem_dir, 'lib')
95
115
 
96
- @rdoc.generate
116
+ @hook.generate
97
117
 
98
- rdoc = @rdoc.instance_variable_get :@rdoc
118
+ rdoc = @hook.instance_variable_get :@rdoc
99
119
 
100
120
  assert rdoc.options.hyperlink_all
101
- end
121
+ end unless rdoc_4
102
122
 
103
123
  def test_generate_configuration_rdoc_string
104
124
  skip 'RDoc 3 required' unless rdoc_3?
@@ -108,21 +128,21 @@ class TestGemRDoc < Gem::TestCase
108
128
  FileUtils.mkdir_p @a.doc_dir
109
129
  FileUtils.mkdir_p File.join(@a.gem_dir, 'lib')
110
130
 
111
- @rdoc.generate
131
+ @hook.generate
112
132
 
113
- rdoc = @rdoc.instance_variable_get :@rdoc
133
+ rdoc = @hook.instance_variable_get :@rdoc
114
134
 
115
135
  assert rdoc.options.hyperlink_all
116
- end
136
+ end unless rdoc_4
117
137
 
118
138
  def test_generate_disabled
119
- @rdoc.generate_rdoc = false
120
- @rdoc.generate_ri = false
139
+ @hook.generate_rdoc = false
140
+ @hook.generate_ri = false
121
141
 
122
- @rdoc.generate
142
+ @hook.generate
123
143
 
124
- refute @rdoc.rdoc_installed?
125
- refute @rdoc.ri_installed?
144
+ refute @hook.rdoc_installed?
145
+ refute @hook.ri_installed?
126
146
  end
127
147
 
128
148
  def test_generate_force
@@ -132,13 +152,13 @@ class TestGemRDoc < Gem::TestCase
132
152
  FileUtils.mkdir_p @a.doc_dir 'rdoc'
133
153
  FileUtils.mkdir_p File.join(@a.gem_dir, 'lib')
134
154
 
135
- @rdoc.force = true
155
+ @hook.force = true
136
156
 
137
- @rdoc.generate
157
+ @hook.generate
138
158
 
139
159
  assert_path_exists File.join(@a.doc_dir('rdoc'), 'index.html')
140
160
  assert_path_exists File.join(@a.doc_dir('ri'), 'cache.ri')
141
- end
161
+ end unless rdoc_4
142
162
 
143
163
  def test_generate_no_overwrite
144
164
  skip 'RDoc 3 required' unless rdoc_3?
@@ -147,11 +167,11 @@ class TestGemRDoc < Gem::TestCase
147
167
  FileUtils.mkdir_p @a.doc_dir 'rdoc'
148
168
  FileUtils.mkdir_p File.join(@a.gem_dir, 'lib')
149
169
 
150
- @rdoc.generate
170
+ @hook.generate
151
171
 
152
172
  refute_path_exists File.join(@a.doc_dir('rdoc'), 'index.html')
153
173
  refute_path_exists File.join(@a.doc_dir('ri'), 'cache.ri')
154
- end
174
+ end unless rdoc_4
155
175
 
156
176
  def test_generate_legacy
157
177
  skip 'RDoc < 3.8 required' if rdoc_3_8_or_better?
@@ -159,11 +179,11 @@ class TestGemRDoc < Gem::TestCase
159
179
  FileUtils.mkdir_p @a.doc_dir
160
180
  FileUtils.mkdir_p File.join(@a.gem_dir, 'lib')
161
181
 
162
- @rdoc.generate_legacy
182
+ @hook.generate_legacy
163
183
 
164
- assert @rdoc.rdoc_installed?
165
- assert @rdoc.ri_installed?
166
- end
184
+ assert @hook.rdoc_installed?
185
+ assert @hook.ri_installed?
186
+ end unless rdoc_4
167
187
 
168
188
  def test_legacy_rdoc
169
189
  skip 'RDoc < 3.8 required' if rdoc_3_8_or_better?
@@ -171,31 +191,31 @@ class TestGemRDoc < Gem::TestCase
171
191
  FileUtils.mkdir_p @a.doc_dir
172
192
  FileUtils.mkdir_p File.join(@a.gem_dir, 'lib')
173
193
 
174
- @rdoc.legacy_rdoc '--op', @a.doc_dir('rdoc')
194
+ @hook.legacy_rdoc '--op', @a.doc_dir('rdoc')
175
195
 
176
- assert @rdoc.rdoc_installed?
177
- end
196
+ assert @hook.rdoc_installed?
197
+ end unless rdoc_4
178
198
 
179
199
  def test_new_rdoc
180
- assert_kind_of RDoc::RDoc, @rdoc.new_rdoc
200
+ assert_kind_of RDoc::RDoc, @hook.new_rdoc
181
201
  end
182
202
 
183
203
  def test_rdoc_installed?
184
- refute @rdoc.rdoc_installed?
204
+ refute @hook.rdoc_installed?
185
205
 
186
206
  FileUtils.mkdir_p @a.doc_dir 'rdoc'
187
207
 
188
- assert @rdoc.rdoc_installed?
208
+ assert @hook.rdoc_installed?
189
209
  end
190
210
 
191
211
  def test_remove
192
212
  FileUtils.mkdir_p @a.doc_dir 'rdoc'
193
213
  FileUtils.mkdir_p @a.doc_dir 'ri'
194
214
 
195
- @rdoc.remove
215
+ @hook.remove
196
216
 
197
- refute @rdoc.rdoc_installed?
198
- refute @rdoc.ri_installed?
217
+ refute @hook.rdoc_installed?
218
+ refute @hook.ri_installed?
199
219
 
200
220
  assert_path_exists @a.doc_dir
201
221
  end
@@ -206,7 +226,7 @@ class TestGemRDoc < Gem::TestCase
206
226
  FileUtils.chmod 0, @a.base_dir
207
227
 
208
228
  e = assert_raises Gem::FilePermissionError do
209
- @rdoc.remove
229
+ @hook.remove
210
230
  end
211
231
 
212
232
  assert_equal @a.base_dir, e.directory
@@ -215,15 +235,15 @@ class TestGemRDoc < Gem::TestCase
215
235
  end
216
236
 
217
237
  def test_ri_installed?
218
- refute @rdoc.ri_installed?
238
+ refute @hook.ri_installed?
219
239
 
220
240
  FileUtils.mkdir_p @a.doc_dir 'ri'
221
241
 
222
- assert @rdoc.ri_installed?
242
+ assert @hook.ri_installed?
223
243
  end
224
244
 
225
245
  def test_setup
226
- @rdoc.setup
246
+ @hook.setup
227
247
 
228
248
  assert_path_exists @a.doc_dir
229
249
  end
@@ -234,12 +254,16 @@ class TestGemRDoc < Gem::TestCase
234
254
  FileUtils.chmod 0, @a.doc_dir
235
255
 
236
256
  e = assert_raises Gem::FilePermissionError do
237
- @rdoc.setup
257
+ @hook.setup
238
258
  end
239
259
 
240
260
  assert_equal @a.doc_dir, e.directory
241
261
  ensure
242
- FileUtils.chmod(0755, @a.doc_dir) if File.directory?(@a.doc_dir)
262
+ if File.exist? @a.doc_dir
263
+ FileUtils.chmod 0755, @a.doc_dir
264
+ FileUtils.rm_r @a.doc_dir
265
+ end
243
266
  end
244
267
 
245
268
  end
269
+
@@ -40,7 +40,7 @@ class TestGemServer < Gem::TestCase
40
40
 
41
41
  def test_have_rdoc_4_plus_eh
42
42
  orig_rdoc_version = Gem::RDoc.rdoc_version
43
- Gem::RDoc.instance_variable_set :@rdoc_version, Gem::Version.new('4.0')
43
+ Gem::RDoc.instance_variable_set(:@rdoc_version, Gem::Version.new('4.0'))
44
44
 
45
45
  server = Gem::Server.new Gem.dir, 0, false
46
46
  assert server.have_rdoc_4_plus?
@@ -49,6 +49,12 @@ class TestGemServer < Gem::TestCase
49
49
 
50
50
  server = Gem::Server.new Gem.dir, 0, false
51
51
  refute server.have_rdoc_4_plus?
52
+
53
+ Gem::RDoc.instance_variable_set(:@rdoc_version,
54
+ Gem::Version.new('4.0.0.preview2'))
55
+
56
+ server = Gem::Server.new Gem.dir, 0, false
57
+ assert server.have_rdoc_4_plus?
52
58
  ensure
53
59
  Gem::RDoc.instance_variable_set :@rdoc_version, orig_rdoc_version
54
60
  end
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.0.preview2.1
4
+ version: 2.0.0.preview2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -40,116 +40,145 @@ cert_chain:
40
40
  UndmQzdzL1lJTEFITkFUb3BhSmRIOUROcGQxClU4MXpHSE1VQk92ei9WR1Q2
41
41
  d0p3WUozZW1TMm5mQTJOT0hGZmdBPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUt
42
42
  LS0tLQo=
43
- date: 2012-12-08 00:00:00.000000000 Z
43
+ date: 2012-12-15 00:00:00.000000000 Z
44
44
  dependencies:
45
+ - !ruby/object:Gem::Dependency
46
+ name: minitest
47
+ requirement: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '4.3'
52
+ type: :development
53
+ prerelease: false
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: '4.3'
45
59
  - !ruby/object:Gem::Dependency
46
60
  name: rdoc
47
61
  requirement: !ruby/object:Gem::Requirement
48
62
  requirements:
49
- - - ~>
63
+ - - "~>"
50
64
  - !ruby/object:Gem::Version
51
65
  version: '3.10'
52
66
  type: :development
53
67
  prerelease: false
54
68
  version_requirements: !ruby/object:Gem::Requirement
55
69
  requirements:
56
- - - ~>
70
+ - - "~>"
57
71
  - !ruby/object:Gem::Version
58
72
  version: '3.10'
59
73
  - !ruby/object:Gem::Dependency
60
74
  name: builder
61
75
  requirement: !ruby/object:Gem::Requirement
62
76
  requirements:
63
- - - ~>
77
+ - - "~>"
64
78
  - !ruby/object:Gem::Version
65
79
  version: '2.1'
66
80
  type: :development
67
81
  prerelease: false
68
82
  version_requirements: !ruby/object:Gem::Requirement
69
83
  requirements:
70
- - - ~>
84
+ - - "~>"
71
85
  - !ruby/object:Gem::Version
72
86
  version: '2.1'
73
87
  - !ruby/object:Gem::Dependency
74
88
  name: hoe-seattlerb
75
89
  requirement: !ruby/object:Gem::Requirement
76
90
  requirements:
77
- - - ~>
91
+ - - "~>"
78
92
  - !ruby/object:Gem::Version
79
93
  version: '1.2'
80
94
  type: :development
81
95
  prerelease: false
82
96
  version_requirements: !ruby/object:Gem::Requirement
83
97
  requirements:
84
- - - ~>
98
+ - - "~>"
85
99
  - !ruby/object:Gem::Version
86
100
  version: '1.2'
87
101
  - !ruby/object:Gem::Dependency
88
102
  name: session
89
103
  requirement: !ruby/object:Gem::Requirement
90
104
  requirements:
91
- - - ~>
105
+ - - "~>"
92
106
  - !ruby/object:Gem::Version
93
107
  version: '2.4'
94
108
  type: :development
95
109
  prerelease: false
96
110
  version_requirements: !ruby/object:Gem::Requirement
97
111
  requirements:
98
- - - ~>
112
+ - - "~>"
99
113
  - !ruby/object:Gem::Version
100
114
  version: '2.4'
101
115
  - !ruby/object:Gem::Dependency
102
116
  name: ZenTest
103
117
  requirement: !ruby/object:Gem::Requirement
104
118
  requirements:
105
- - - ~>
119
+ - - "~>"
106
120
  - !ruby/object:Gem::Version
107
121
  version: '4.5'
108
122
  type: :development
109
123
  prerelease: false
110
124
  version_requirements: !ruby/object:Gem::Requirement
111
125
  requirements:
112
- - - ~>
126
+ - - "~>"
113
127
  - !ruby/object:Gem::Version
114
128
  version: '4.5'
115
129
  - !ruby/object:Gem::Dependency
116
130
  name: rake
117
131
  requirement: !ruby/object:Gem::Requirement
118
132
  requirements:
119
- - - ~>
133
+ - - "~>"
120
134
  - !ruby/object:Gem::Version
121
135
  version: 0.9.3
122
136
  type: :development
123
137
  prerelease: false
124
138
  version_requirements: !ruby/object:Gem::Requirement
125
139
  requirements:
126
- - - ~>
140
+ - - "~>"
127
141
  - !ruby/object:Gem::Version
128
142
  version: 0.9.3
129
143
  - !ruby/object:Gem::Dependency
130
144
  name: hoe
131
145
  requirement: !ruby/object:Gem::Requirement
132
146
  requirements:
133
- - - ~>
147
+ - - "~>"
134
148
  - !ruby/object:Gem::Version
135
149
  version: '3.3'
136
150
  type: :development
137
151
  prerelease: false
138
152
  version_requirements: !ruby/object:Gem::Requirement
139
153
  requirements:
140
- - - ~>
154
+ - - "~>"
141
155
  - !ruby/object:Gem::Version
142
156
  version: '3.3'
143
- description: ! "RubyGems is a package management framework for Ruby.\n\nThis gem is
144
- an update for the RubyGems software. You must have an\ninstallation of RubyGems
145
- before this update can be applied.\n\nSee Gem for information on RubyGems (or `ri
146
- Gem`)\n\nTo upgrade to the latest RubyGems, run:\n\n $ gem update --system # you
147
- might need to be an administrator or root\n\nSee UPGRADING.rdoc for more details
148
- and alternative instructions.\n\n-----\n\nIf you don't have RubyGems installed,
149
- you can still do it manually:\n\n* Download from: https://rubygems.org/pages/download\n*
150
- Unpack into a directory and cd there\n* Install with: ruby setup.rb # you may need
151
- admin/root privilege\n\nFor more details and other options, see:\n\n ruby setup.rb
152
- --help"
157
+ description: |-
158
+ RubyGems is a package management framework for Ruby.
159
+
160
+ This gem is an update for the RubyGems software. You must have an
161
+ installation of RubyGems before this update can be applied.
162
+
163
+ See Gem for information on RubyGems (or `ri Gem`)
164
+
165
+ To upgrade to the latest RubyGems, run:
166
+
167
+ $ gem update --system # you might need to be an administrator or root
168
+
169
+ See UPGRADING.rdoc for more details and alternative instructions.
170
+
171
+ -----
172
+
173
+ If you don't have RubyGems installed, you can still do it manually:
174
+
175
+ * Download from: https://rubygems.org/pages/download
176
+ * Unpack into a directory and cd there
177
+ * Install with: ruby setup.rb # you may need admin/root privilege
178
+
179
+ For more details and other options, see:
180
+
181
+ ruby setup.rb --help
153
182
  email:
154
183
  - rubygems-developers@rubyforge.org
155
184
  executables:
@@ -164,8 +193,8 @@ extra_rdoc_files:
164
193
  - UPGRADING.rdoc
165
194
  - hide_lib_for_update/note.txt
166
195
  files:
167
- - .autotest
168
- - .document
196
+ - ".autotest"
197
+ - ".document"
169
198
  - History.txt
170
199
  - LICENSE.txt
171
200
  - MIT.txt
@@ -226,6 +255,7 @@ files:
226
255
  - lib/rubygems/exceptions.rb
227
256
  - lib/rubygems/ext.rb
228
257
  - lib/rubygems/ext/builder.rb
258
+ - lib/rubygems/ext/cmake_builder.rb
229
259
  - lib/rubygems/ext/configure_builder.rb
230
260
  - lib/rubygems/ext/ext_conf_builder.rb
231
261
  - lib/rubygems/ext/rake_builder.rb
@@ -367,6 +397,7 @@ files:
367
397
  - test/rubygems/test_gem_dependency_installer.rb
368
398
  - test/rubygems/test_gem_dependency_list.rb
369
399
  - test/rubygems/test_gem_dependency_resolver.rb
400
+ - test/rubygems/test_gem_ext_cmake_builder.rb
370
401
  - test/rubygems/test_gem_ext_configure_builder.rb
371
402
  - test/rubygems/test_gem_ext_ext_conf_builder.rb
372
403
  - test/rubygems/test_gem_ext_rake_builder.rb
@@ -414,30 +445,30 @@ files:
414
445
  - test/rubygems/wrong_key_cert_32.pem
415
446
  - util/CL2notes
416
447
  - util/create_certs.rb
417
- - .gemtest
448
+ - ".gemtest"
418
449
  homepage: http://rubygems.org
419
450
  licenses: []
420
451
  metadata: {}
421
452
  post_install_message:
422
453
  rdoc_options:
423
- - --main
454
+ - "--main"
424
455
  - README.rdoc
425
- - --title=RubyGems 2.0.0.preview2.1 Documentation
456
+ - "--title=RubyGems 2.0.0.preview2.2 Documentation"
426
457
  require_paths:
427
458
  - hide_lib_for_update
428
459
  required_ruby_version: !ruby/object:Gem::Requirement
429
460
  requirements:
430
- - - ! '>='
461
+ - - ">="
431
462
  - !ruby/object:Gem::Version
432
463
  version: 1.8.7
433
464
  required_rubygems_version: !ruby/object:Gem::Requirement
434
465
  requirements:
435
- - - ! '>='
466
+ - - ">="
436
467
  - !ruby/object:Gem::Version
437
468
  version: '0'
438
469
  requirements: []
439
470
  rubyforge_project: rubygems
440
- rubygems_version: 2.0.0.preview2
471
+ rubygems_version: 2.0.0.preview2.1
441
472
  signing_key:
442
473
  specification_version: 4
443
474
  summary: RubyGems is a package management framework for Ruby
@@ -483,6 +514,7 @@ test_files:
483
514
  - test/rubygems/test_gem_dependency_installer.rb
484
515
  - test/rubygems/test_gem_dependency_list.rb
485
516
  - test/rubygems/test_gem_dependency_resolver.rb
517
+ - test/rubygems/test_gem_ext_cmake_builder.rb
486
518
  - test/rubygems/test_gem_ext_configure_builder.rb
487
519
  - test/rubygems/test_gem_ext_ext_conf_builder.rb
488
520
  - test/rubygems/test_gem_ext_rake_builder.rb
metadata.gz.sig CHANGED
Binary file