rubygems-update 1.3.1 → 1.3.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/.autotest +24 -0
- data/.document +4 -3
- data/ChangeLog +382 -1
- data/Manifest.txt +214 -0
- data/README +1 -49
- data/Rakefile +124 -191
- data/bin/gem +1 -4
- data/cruise_config.rb +22 -0
- data/doc/release_notes/rel_1_3_1.rdoc +3 -3
- data/doc/release_notes/rel_1_3_2.rdoc +119 -0
- data/lib/gauntlet_rubygems.rb +50 -0
- data/lib/rubygems.rb +250 -25
- data/lib/rubygems/builder.rb +62 -60
- data/lib/rubygems/command.rb +421 -319
- data/lib/rubygems/command_manager.rb +153 -125
- data/lib/rubygems/commands/check_command.rb +12 -7
- data/lib/rubygems/commands/cleanup_command.rb +11 -2
- data/lib/rubygems/commands/contents_command.rb +42 -18
- data/lib/rubygems/commands/generate_index_command.rb +91 -15
- data/lib/rubygems/commands/install_command.rb +33 -47
- data/lib/rubygems/commands/query_command.rb +36 -20
- data/lib/rubygems/commands/rdoc_command.rb +62 -68
- data/lib/rubygems/commands/search_command.rb +26 -32
- data/lib/rubygems/commands/setup_command.rb +353 -0
- data/lib/rubygems/commands/sources_command.rb +5 -0
- data/lib/rubygems/commands/specification_command.rb +23 -3
- data/lib/rubygems/commands/uninstall_command.rb +71 -61
- data/lib/rubygems/commands/unpack_command.rb +14 -12
- data/lib/rubygems/commands/update_command.rb +26 -5
- data/lib/rubygems/defaults.rb +16 -3
- data/lib/rubygems/dependency.rb +38 -7
- data/lib/rubygems/dependency_installer.rb +7 -4
- data/lib/rubygems/digest/digest_adapter.rb +42 -33
- data/lib/rubygems/digest/sha1.rb +6 -1
- data/lib/rubygems/digest/sha2.rb +5 -0
- data/lib/rubygems/doc_manager.rb +31 -11
- data/lib/rubygems/ext/ext_conf_builder.rb +2 -1
- data/lib/rubygems/ext/rake_builder.rb +6 -2
- data/lib/rubygems/format.rb +63 -63
- data/lib/rubygems/gem_openssl.rb +14 -2
- data/lib/rubygems/gem_path_searcher.rb +7 -3
- data/lib/rubygems/gem_runner.rb +59 -39
- data/lib/rubygems/indexer.rb +450 -109
- data/lib/rubygems/install_update_options.rb +13 -1
- data/lib/rubygems/installer.rb +25 -22
- data/lib/rubygems/local_remote_options.rb +5 -3
- data/lib/rubygems/old_format.rb +124 -120
- data/lib/rubygems/package/tar_header.rb +25 -3
- data/lib/rubygems/package/tar_input.rb +5 -5
- data/lib/rubygems/package/tar_output.rb +2 -0
- data/lib/rubygems/package/tar_reader.rb +19 -0
- data/lib/rubygems/package/tar_reader/entry.rb +43 -0
- data/lib/rubygems/package/tar_writer.rb +65 -3
- data/lib/rubygems/package_task.rb +117 -0
- data/lib/rubygems/platform.rb +12 -8
- data/lib/rubygems/remote_fetcher.rb +43 -24
- data/lib/rubygems/require_paths_builder.rb +14 -12
- data/lib/rubygems/requirement.rb +15 -6
- data/lib/rubygems/rubygems_version.rb +14 -1
- data/lib/rubygems/source_index.rb +38 -16
- data/lib/rubygems/source_info_cache_entry.rb +2 -2
- data/lib/rubygems/spec_fetcher.rb +43 -20
- data/lib/rubygems/specification.rb +1122 -947
- data/lib/rubygems/text.rb +30 -0
- data/lib/rubygems/timer.rb +14 -11
- data/lib/rubygems/uninstaller.rb +25 -5
- data/lib/rubygems/user_interaction.rb +294 -264
- data/lib/rubygems/validator.rb +70 -36
- data/lib/rubygems/version.rb +97 -33
- data/lib/rubygems/version_option.rb +1 -0
- data/setup.rb +11 -306
- data/test/foo/discover.rb +0 -0
- data/test/gem_installer_test_case.rb +22 -11
- data/test/gem_package_tar_test_case.rb +0 -14
- data/test/gemutilities.rb +89 -8
- data/test/mockgemui.rb +2 -1
- data/test/rubygems_plugin.rb +16 -0
- data/test/test_gem.rb +107 -36
- data/test/test_gem_command.rb +3 -13
- data/test/test_gem_command_manager.rb +1 -14
- data/test/test_gem_commands_cert_command.rb +1 -1
- data/test/test_gem_commands_contents_command.rb +63 -0
- data/test/test_gem_commands_environment_command.rb +1 -1
- data/test/test_gem_commands_generate_index_command.rb +104 -1
- data/test/test_gem_commands_install_command.rb +95 -0
- data/test/test_gem_commands_pristine_command.rb +3 -3
- data/test/test_gem_commands_query_command.rb +46 -0
- data/test/test_gem_commands_sources_command.rb +9 -5
- data/test/test_gem_commands_specification_command.rb +31 -0
- data/test/test_gem_commands_uninstall_command.rb +3 -2
- data/test/test_gem_commands_unpack_command.rb +3 -2
- data/test/test_gem_commands_update_command.rb +12 -7
- data/test/test_gem_dependency.rb +62 -11
- data/test/test_gem_dependency_installer.rb +18 -5
- data/test/test_gem_dependency_list.rb +6 -6
- data/test/test_gem_doc_manager.rb +7 -1
- data/test/test_gem_ext_configure_builder.rb +8 -10
- data/test/test_gem_ext_ext_conf_builder.rb +14 -8
- data/test/test_gem_gem_path_searcher.rb +1 -1
- data/test/test_gem_gem_runner.rb +11 -0
- data/test/test_gem_indexer.rb +398 -21
- data/test/test_gem_install_update_options.rb +20 -6
- data/test/test_gem_installer.rb +22 -14
- data/test/test_gem_local_remote_options.rb +2 -1
- data/test/test_gem_package_tar_header.rb +3 -3
- data/test/test_gem_package_tar_input.rb +3 -3
- data/test/test_gem_package_tar_output.rb +2 -2
- data/test/test_gem_package_task.rb +70 -0
- data/test/test_gem_platform.rb +12 -6
- data/test/test_gem_remote_fetcher.rb +23 -1
- data/test/test_gem_source_index.rb +32 -21
- data/test/test_gem_spec_fetcher.rb +77 -5
- data/test/test_gem_specification.rb +274 -1
- data/test/test_gem_uninstaller.rb +34 -4
- data/test/test_gem_version.rb +94 -4
- data/test/test_gem_version_option.rb +13 -0
- data/test/test_kernel.rb +4 -4
- data/util/CL2notes +56 -0
- data/util/gem_prelude.rb.template +251 -0
- metadata +30 -20
- metadata.gz.sig +3 -4
- data/TODO +0 -1
- data/scripts/buildtests.rb +0 -31
- data/scripts/gemdoc.rb +0 -67
- data/scripts/runtest.rb +0 -40
- data/scripts/specdoc.rb +0 -171
- data/scripts/upload_gemdoc.rb +0 -140
data/README
CHANGED
@@ -14,55 +14,7 @@ For more details and other options, see:
|
|
14
14
|
|
15
15
|
* {User Guide/Installation}[http://docs.rubygems.org/read/chapter/3]
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
* {RubyGems User Guide}[http://docs.rubygems.org/read/book/1]
|
20
|
-
* {Frequently Asked Questions}[http://docs.rubygems.org/read/book/3]
|
21
|
-
|
22
|
-
== For developer docs see
|
23
|
-
|
24
|
-
* {Creating Gems}[http://docs.rubygems.org/read/chapter/5]
|
25
|
-
* {GEM Specification}[http://docs.rubygems.org/read/chapter/20]
|
26
|
-
|
27
|
-
== The home page of the RubyGems Documentation
|
28
|
-
|
29
|
-
* {RubyGems Home}[http://rubygems.rubyforge.org]
|
30
|
-
|
31
|
-
== Additional directories
|
32
|
-
|
33
|
-
[./bin/...] binary commands (gem, gem_server, etc)
|
34
|
-
[./lib/...] the RubyGems library
|
35
|
-
[./pkgs/...] default RubyGems packages (currently only 'sources')
|
36
|
-
[./test/...] unit and functional tests
|
37
|
-
|
38
|
-
== Credits
|
39
|
-
|
40
|
-
RubyGems was originally developed at RubyConf 2003 by:
|
41
|
-
|
42
|
-
* Rich Kilmer -- rich(at)infoether.com
|
43
|
-
* Chad Fowler -- chad(at)chadfowler.com
|
44
|
-
* David Black -- dblack(at)wobblini.net
|
45
|
-
* Paul Brannan -- paul(at)atdesk.com
|
46
|
-
* Jim Weirch -- {jim(at)weirichhouse.org}[mailto:jim@weirichhouse.org]
|
47
|
-
|
48
|
-
== Contributors since then
|
49
|
-
|
50
|
-
* Gavin Sinclair -- gsinclair(at)soyabean.com.au
|
51
|
-
* George Marrows-- george.marrows(at)ntlworld.com
|
52
|
-
* Dick Davies -- rasputnik(at)hellooperator.net
|
53
|
-
* Mauricio Fernandez -- batsman.geo(at)yahoo.com
|
54
|
-
* Simon Strandgaard -- neoneye(at)adslhome.dk
|
55
|
-
* Dave Glasser -- glasser(at)mit.edu
|
56
|
-
* Paul Duncan -- pabs(at)pablotron.org
|
57
|
-
* Ville Aine -- vaine(at)cs.helsinki.fi
|
58
|
-
* Ryan Davis --
|
59
|
-
* Eric Hodel -- drbrain(at)segment7.net
|
60
|
-
|
61
|
-
(If your name is missing, PLEASE let us know!)
|
62
|
-
|
63
|
-
== Feedback
|
64
|
-
|
65
|
-
Please provide us feedback at http://rubyforge.org/projects/rubygems
|
17
|
+
Further documentation can be found on the Gem module. (<tt>ri Gem</tt>)
|
66
18
|
|
67
19
|
Thanks!
|
68
20
|
|
data/Rakefile
CHANGED
@@ -11,63 +11,57 @@ $:.unshift 'lib'
|
|
11
11
|
require 'rubygems'
|
12
12
|
require 'rake/clean'
|
13
13
|
require 'rake/testtask'
|
14
|
-
require '
|
15
|
-
require 'rake/gempackagetask'
|
16
|
-
require 'rake/rdoctask'
|
17
|
-
|
18
|
-
def announce(msg='')
|
19
|
-
$stderr.puts msg
|
20
|
-
end
|
14
|
+
require 'rubygems/package_task'
|
21
15
|
|
22
16
|
def generate_rubygems_version(path, version)
|
23
17
|
open path, 'w' do |f|
|
24
18
|
f.puts <<-EOF
|
19
|
+
#--
|
25
20
|
# DO NOT EDIT
|
26
21
|
# This file is auto-generated by build scripts.
|
27
22
|
# See: rake update_version
|
23
|
+
#++
|
24
|
+
|
28
25
|
module Gem
|
26
|
+
|
27
|
+
##
|
28
|
+
# The version of RubyGems you are using
|
29
|
+
|
29
30
|
RubyGemsVersion = '#{version}'
|
31
|
+
|
32
|
+
##
|
33
|
+
# The version of RubyGems you are using (duplicated for familiarity)
|
34
|
+
|
35
|
+
VERSION = RubyGemsVersion
|
36
|
+
|
30
37
|
end
|
31
38
|
EOF
|
32
39
|
end
|
33
40
|
end
|
34
41
|
|
35
|
-
|
36
|
-
ENV['CERT_DIR'] ||= (File.join(ENV['USERPROFILE'], '.gem'))
|
37
|
-
else
|
38
|
-
ENV['CERT_DIR'] ||= File.expand_path(File.join('~', '.gem'))
|
39
|
-
end
|
42
|
+
ENV['CERT_DIR'] ||= File.join(Gem.user_home, '.gem')
|
40
43
|
|
41
44
|
PKG_NAME = 'rubygems'
|
42
|
-
def package_version
|
43
|
-
`ruby -Ilib bin/gem environment packageversion`.chomp
|
44
|
-
end
|
45
45
|
|
46
|
-
if ENV['REL']
|
46
|
+
if ENV['REL'] then
|
47
47
|
PKG_VERSION = ENV['REL']
|
48
|
-
CURRENT_VERSION =
|
48
|
+
CURRENT_VERSION = Gem::RubyGemsVersion
|
49
49
|
else
|
50
|
-
PKG_VERSION =
|
50
|
+
PKG_VERSION = Gem::RubyGemsVersion
|
51
51
|
CURRENT_VERSION = PKG_VERSION
|
52
52
|
end
|
53
53
|
|
54
|
-
CLEAN.include("COMMENTS")
|
55
54
|
CLOBBER.include(
|
56
|
-
'
|
57
|
-
|
58
|
-
|
59
|
-
'test/mock/gem/doc',
|
60
|
-
'test/mock/gem/cache',
|
61
|
-
'test/data/gemhome',
|
62
|
-
'test/data/[a-z]*.gem',
|
63
|
-
'scripts/*.hieraki',
|
55
|
+
'**/debug.log',
|
56
|
+
'*.out',
|
57
|
+
'.config',
|
64
58
|
'data__',
|
65
59
|
'html',
|
66
|
-
'pkgs/sources/sources*.gem',
|
67
|
-
'.config',
|
68
|
-
'**/debug.log',
|
69
60
|
'logs',
|
70
|
-
'*.
|
61
|
+
'pkgs/sources/sources*.gem',
|
62
|
+
'scripts/*.hieraki',
|
63
|
+
'test/data/[a-z]*.gem',
|
64
|
+
'test/data/gemhome'
|
71
65
|
)
|
72
66
|
CLOBBER.exclude('test/data/broken-1.0.0.gem')
|
73
67
|
|
@@ -81,6 +75,7 @@ desc "Run just the unit tests"
|
|
81
75
|
Rake::TestTask.new(:test_units) do |t|
|
82
76
|
t.test_files = FileList['test/test*.rb']
|
83
77
|
t.warning = true
|
78
|
+
t.libs = %w[lib test]
|
84
79
|
end
|
85
80
|
|
86
81
|
desc "Run just the functional tests"
|
@@ -95,33 +90,11 @@ Rake::TestTask.new(:test_all) do |t|
|
|
95
90
|
t.warning = true
|
96
91
|
end
|
97
92
|
|
98
|
-
desc "Run the tests for a build"
|
99
|
-
task :build_tests do
|
100
|
-
html_dir = ENV['TESTRESULTS'] || 'html/tests'
|
101
|
-
ruby %{-Ilib scripts/buildtests.rb #{html_dir}}
|
102
|
-
open("#{html_dir}/summary.html") do |inf|
|
103
|
-
open("#{html_dir}/summary.new", "w") do |outf|
|
104
|
-
inf.each do |line|
|
105
|
-
if line =~ /td align/
|
106
|
-
line = " <td align=\"left\">#{Time.now}</td><td align=\"right\">"
|
107
|
-
end
|
108
|
-
outf.puts line
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
112
|
-
mv "#{html_dir}/summary.html", "#{html_dir}/summary.old"
|
113
|
-
mv "#{html_dir}/summary.new", "#{html_dir}/summary.html"
|
114
|
-
end
|
115
|
-
|
116
93
|
# Shortcuts for test targets
|
117
94
|
task :tf => [:test_functional]
|
118
95
|
task :tu => [:test_units]
|
119
96
|
task :ta => [:test_all]
|
120
97
|
|
121
|
-
task :gemtest do
|
122
|
-
ruby %{-Ilib -rscripts/runtest -e 'run_tests("test/test_gempaths.rb", true)'}
|
123
|
-
end
|
124
|
-
|
125
98
|
# --------------------------------------------------------------------
|
126
99
|
# Creating a release
|
127
100
|
|
@@ -129,27 +102,24 @@ desc "Make a new release"
|
|
129
102
|
task :release => [
|
130
103
|
:prerelease,
|
131
104
|
:clobber,
|
132
|
-
:
|
105
|
+
:test_functional,
|
106
|
+
:test_units,
|
133
107
|
:update_version,
|
134
108
|
:package,
|
135
109
|
:tag] do
|
136
110
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
announce "**************************************************************"
|
142
|
-
announce
|
111
|
+
warn "**************************************************************"
|
112
|
+
warn "* Release #{PKG_VERSION} Complete."
|
113
|
+
warn "* Packages ready to upload."
|
114
|
+
warn "**************************************************************"
|
143
115
|
end
|
144
116
|
|
145
117
|
desc "Validate that everything is ready to go for a release."
|
146
118
|
task :prerelease do
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
announce "**************************************************************"
|
152
|
-
announce
|
119
|
+
warn "**************************************************************"
|
120
|
+
warn "* Making RubyGem Release #{PKG_VERSION}"
|
121
|
+
warn "* (current version #{CURRENT_VERSION})"
|
122
|
+
warn "**************************************************************"
|
153
123
|
|
154
124
|
# Is a release number supplied?
|
155
125
|
raise "Usage: rake release REL=x.y.z [REUSE=tag_suffix]" unless ENV['REL']
|
@@ -161,28 +131,28 @@ task :prerelease do
|
|
161
131
|
end
|
162
132
|
|
163
133
|
# Are all source files checked in?
|
164
|
-
if ENV['RELTEST']
|
165
|
-
|
134
|
+
if ENV['RELTEST'] then
|
135
|
+
warn "Release Task Testing, skipping checked-in file test"
|
166
136
|
else
|
167
|
-
|
137
|
+
warn "Checking for unchecked-in files..."
|
168
138
|
data = `svn st`
|
169
139
|
unless data =~ /^$/
|
170
140
|
abort "svn status is not clean ... do you have unchecked-in files?"
|
171
141
|
end
|
172
|
-
|
142
|
+
warn "No outstanding checkins found ... OK"
|
173
143
|
end
|
174
144
|
end
|
175
145
|
|
176
146
|
task :update_version => [:prerelease] do
|
177
|
-
if PKG_VERSION == CURRENT_VERSION
|
178
|
-
|
147
|
+
if PKG_VERSION == CURRENT_VERSION then
|
148
|
+
warn "No version change ... skipping version update"
|
179
149
|
else
|
180
|
-
|
150
|
+
warn "Updating RubyGem version to #{PKG_VERSION}"
|
181
151
|
|
182
152
|
generate_rubygems_version 'lib/rubygems/rubygems_version.rb', PKG_VERSION
|
183
153
|
|
184
|
-
if ENV['RELTEST']
|
185
|
-
|
154
|
+
if ENV['RELTEST'] then
|
155
|
+
warn "Release Task Testing, skipping commiting of new version"
|
186
156
|
else
|
187
157
|
sh %{svn commit -m "Updated to version #{PKG_VERSION}" lib/rubygems/rubygems_version.rb} # "
|
188
158
|
end
|
@@ -192,17 +162,15 @@ end
|
|
192
162
|
task :tag => [:prerelease] do
|
193
163
|
reltag = "REL_#{PKG_VERSION.gsub(/\./, '_')}"
|
194
164
|
reltag = "REL_#{ENV['REUSE'].gsub(/\./, '_')}" if ENV['REUSE']
|
195
|
-
|
165
|
+
warn "Tagging SVN with [#{reltag}]"
|
196
166
|
software_dir = File.basename(Dir.pwd)
|
197
|
-
if ENV['RELTEST']
|
198
|
-
|
167
|
+
if ENV['RELTEST'] then
|
168
|
+
warn "Release Task Testing, skipping SVN tagging (in dir #{software_dir})"
|
199
169
|
else
|
200
170
|
sh %{svn copy svn+ssh://rubyforge.org/var/svn/rubygems/trunk svn+ssh://rubyforge.org/var/svn/rubygems/tags/#{reltag}}
|
201
171
|
end
|
202
172
|
end
|
203
173
|
|
204
|
-
# --------------------------------------------------------------------
|
205
|
-
|
206
174
|
begin # rcov
|
207
175
|
require 'rcov/rcovtask'
|
208
176
|
|
@@ -217,26 +185,24 @@ begin # rcov
|
|
217
185
|
rescue LoadError
|
218
186
|
end
|
219
187
|
|
220
|
-
#
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
sh "scp -rq html/* rubyforge:/var/www/gforge-projects/rubygems/rdoc"
|
239
|
-
rm_r "emptydir"
|
188
|
+
begin # rdoc
|
189
|
+
gem 'rdoc'
|
190
|
+
require 'rdoc/task'
|
191
|
+
|
192
|
+
desc "Create the RDoc html files"
|
193
|
+
RDoc::Task.new :rdoc do |rdoc|
|
194
|
+
rdoc.rdoc_dir = 'html'
|
195
|
+
rdoc.title = "RubyGems #{CURRENT_VERSION}"
|
196
|
+
rdoc.options << '--line-numbers' << '--main' << 'README'
|
197
|
+
rdoc.rdoc_files.include 'README', 'LICENSE.txt', 'GPL.txt', 'lib', 'doc'
|
198
|
+
end
|
199
|
+
|
200
|
+
desc "Publish RDoc on RubyForge"
|
201
|
+
task :publish_rdoc => ["html/index.html"] do
|
202
|
+
sh "rsync -avP --delete html/ rubyforge.org:/var/www/gforge-projects/rubygems/rdoc"
|
203
|
+
end
|
204
|
+
rescue Gem::LoadError
|
205
|
+
warn "install RDoc 2.4.2+"
|
240
206
|
end
|
241
207
|
|
242
208
|
# Wiki Doc Targets
|
@@ -266,68 +232,49 @@ end
|
|
266
232
|
|
267
233
|
# Package tasks
|
268
234
|
|
269
|
-
PKG_FILES =
|
270
|
-
".document",
|
271
|
-
"ChangeLog",
|
272
|
-
"GPL.txt",
|
273
|
-
"LICENSE.txt",
|
274
|
-
"README",
|
275
|
-
"Rakefile",
|
276
|
-
"TODO",
|
277
|
-
"bin/*",
|
278
|
-
"doc/release_notes/*",
|
279
|
-
"lib/**/*.rb",
|
280
|
-
"pkgs/**/*",
|
281
|
-
"scripts/*.rb",
|
282
|
-
"setup.rb",
|
283
|
-
"test/**/*"
|
284
|
-
]
|
285
|
-
|
286
|
-
PKG_FILES.exclude %r(^test/temp(/|$))
|
287
|
-
PKG_FILES.exclude %r(\*\.rbc$)
|
288
|
-
|
289
|
-
task :package_files do
|
290
|
-
puts PKG_FILES.join("\n")
|
291
|
-
end
|
235
|
+
PKG_FILES = File.read('Manifest.txt').split "\n"
|
292
236
|
|
293
|
-
Rake::PackageTask.new
|
294
|
-
p.name
|
295
|
-
p.version
|
296
|
-
p.need_tar
|
297
|
-
p.need_zip
|
237
|
+
Rake::PackageTask.new :package do |p|
|
238
|
+
p.name = PKG_NAME
|
239
|
+
p.version = PKG_VERSION
|
240
|
+
p.need_tar = true
|
241
|
+
p.need_zip = true
|
298
242
|
p.package_files = PKG_FILES
|
299
243
|
end
|
300
244
|
|
301
245
|
warn_unsigned = true
|
302
246
|
|
303
247
|
Spec = Gem::Specification.new do |s|
|
304
|
-
s.name
|
305
|
-
s.version
|
248
|
+
s.name = PKG_NAME + "-update"
|
249
|
+
s.version = PKG_VERSION
|
306
250
|
s.required_ruby_version = Gem::Requirement.new '> 1.8.3'
|
307
|
-
s.summary
|
308
|
-
s.description
|
309
|
-
is a
|
251
|
+
s.summary = "RubyGems update gem"
|
252
|
+
s.description = <<-DESCRIPTION
|
253
|
+
RubyGems is a package management framework for Ruby.
|
254
|
+
|
255
|
+
This gem is an update for the RubyGems software. You must have an
|
310
256
|
installation of RubyGems before this update can be applied.
|
311
|
-
|
312
|
-
s.files
|
313
|
-
s.require_path
|
314
|
-
s.authors
|
315
|
-
s.email
|
316
|
-
s.homepage
|
317
|
-
s.rubyforge_project
|
318
|
-
s.bindir
|
319
|
-
s.executables
|
320
|
-
|
257
|
+
DESCRIPTION
|
258
|
+
s.files = PKG_FILES
|
259
|
+
s.require_path = 'lib'
|
260
|
+
s.authors = ['Jim Weirich', 'Chad Fowler', 'Eric Hodel']
|
261
|
+
s.email = "rubygems-developers@rubyforge.org"
|
262
|
+
s.homepage = "http://rubygems.rubyforge.org"
|
263
|
+
s.rubyforge_project = "rubygems"
|
264
|
+
s.bindir = "bin"
|
265
|
+
s.executables = ["update_rubygems"]
|
266
|
+
|
267
|
+
certdir = ENV['CERT_DIR']
|
268
|
+
|
321
269
|
if certdir then
|
322
270
|
key = File.join certdir, 'gem-private_key.pem'
|
323
271
|
cert = File.join certdir, 'gem-public_cert.pem'
|
324
272
|
|
325
|
-
|
273
|
+
warn_unsigned = ! (File.exist? key and File.exist? cert)
|
274
|
+
|
275
|
+
unless warn_unsigned then
|
326
276
|
s.signing_key = File.join(certdir, 'gem-private_key.pem')
|
327
277
|
s.cert_chain = [File.join(certdir, 'gem-public_cert.pem')]
|
328
|
-
warn_unsigned = false
|
329
|
-
else
|
330
|
-
warn_unsigned = true
|
331
278
|
end
|
332
279
|
end
|
333
280
|
end
|
@@ -341,12 +288,14 @@ file "pkg/#{Spec.full_name}.gem" do
|
|
341
288
|
end
|
342
289
|
end
|
343
290
|
|
344
|
-
|
291
|
+
Gem::PackageTask.new Spec do |p| end
|
345
292
|
|
346
293
|
desc "Build the Gem spec file for the rubygems-update package"
|
347
294
|
task :gemspec => "pkg/rubygems-update.gemspec"
|
348
295
|
file "pkg/rubygems-update.gemspec" => ["pkg", "Rakefile"] do |t|
|
349
|
-
open
|
296
|
+
open t.name, 'w' do |f|
|
297
|
+
f.puts Spec.to_yaml
|
298
|
+
end
|
350
299
|
end
|
351
300
|
|
352
301
|
desc "Install RubyGems"
|
@@ -354,7 +303,7 @@ task :install do
|
|
354
303
|
opts = ENV['SETUP_OPTIONS']
|
355
304
|
ruby "setup.rb #{opts}".strip
|
356
305
|
|
357
|
-
svnversion = `svnversion`.split(':').last.sub(/[^\d]
|
306
|
+
svnversion = `svnversion`.split(':').last.sub(/[^\d]+/, '').strip
|
358
307
|
|
359
308
|
unless svnversion.empty? then
|
360
309
|
File.read('lib/rubygems/rubygems_version.rb') =~ /RubyGemsVersion = '(.*)'/
|
@@ -367,45 +316,29 @@ task :install do
|
|
367
316
|
end
|
368
317
|
end
|
369
318
|
|
370
|
-
desc "Run local 'gem' e.g. rake rungem -- install -i ~/tmp/gems"
|
371
|
-
task :rungem do
|
372
|
-
ARGV.shift
|
373
|
-
exec(Gem.ruby, '-Ilib', 'bin/gem', *ARGV)
|
374
|
-
end
|
375
|
-
|
376
319
|
# Misc Tasks ---------------------------------------------------------
|
377
320
|
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
count += 1
|
384
|
-
if line =~ pattern
|
385
|
-
puts "#{fn}:#{count}:#{line}"
|
386
|
-
end
|
387
|
-
end
|
388
|
-
end
|
389
|
-
end
|
390
|
-
end
|
321
|
+
desc "build util/gem_prelude.rb from the template and defaults.rb"
|
322
|
+
file 'util/gem_prelude.rb' =>
|
323
|
+
%w[util/gem_prelude.rb.template lib/rubygems/defaults.rb] do
|
324
|
+
gem_prelude = File.read 'util/gem_prelude.rb.template'
|
325
|
+
defaults = File.read 'lib/rubygems/defaults.rb'
|
391
326
|
|
392
|
-
|
393
|
-
|
394
|
-
egrep /#.*(FIXME|TODO|TBD)/
|
395
|
-
end
|
327
|
+
raise 'template error' unless defaults.sub!(/^module Gem\n/, '')
|
328
|
+
raise 'template error' unless defaults.sub!(/^end\n/, '')
|
396
329
|
|
397
|
-
|
398
|
-
task :dbg do
|
399
|
-
egrep /\bDBG|\bbreakpoint\b/
|
400
|
-
end
|
330
|
+
defaults.gsub!(/^/, ' ')
|
401
331
|
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
332
|
+
raise 'template error' unless
|
333
|
+
gem_prelude.sub!(/^# WARN\n/,
|
334
|
+
"# THIS FILE WAS AUTOGENERATED, DO NOT EDIT\n")
|
335
|
+
raise 'template error' unless
|
336
|
+
gem_prelude.sub!(/^ # INCLUDE rubygems\/defaults\n/, defaults)
|
407
337
|
|
408
|
-
|
338
|
+
open 'util/gem_prelude.rb', 'w' do |io|
|
339
|
+
io.write gem_prelude
|
340
|
+
end
|
341
|
+
end
|
409
342
|
|
410
343
|
# These tasks expect to have the following directory structure:
|
411
344
|
#
|
@@ -423,7 +356,7 @@ rubinius_dir = ENV['RUBINIUS_PATH'] || '../../../git/git.rubini.us/code'
|
|
423
356
|
ruby_dir = ENV['RUBY_PATH'] || '../../ruby/trunk'
|
424
357
|
|
425
358
|
desc "Updates Ruby HEAD with the currently checked-out copy of RubyGems."
|
426
|
-
task :update_ruby do
|
359
|
+
task :update_ruby => 'util/gem_prelude.rb' do
|
427
360
|
sh "rsync #{rsync_options} bin/gem #{ruby_dir}/bin/gem"
|
428
361
|
sh "rsync #{rsync_options} lib/ #{ruby_dir}/lib"
|
429
362
|
sh "rsync #{rsync_options} test/ #{ruby_dir}/test/rubygems"
|
@@ -431,7 +364,7 @@ task :update_ruby do
|
|
431
364
|
end
|
432
365
|
|
433
366
|
desc "Diffs Ruby HEAD with the currently checked-out copy of RubyGems."
|
434
|
-
task :diff_ruby do
|
367
|
+
task :diff_ruby => 'util/gem_prelude.rb' do
|
435
368
|
options = "-urpN --exclude '*svn*' --exclude '*swp' --exclude '*rbc'"
|
436
369
|
|
437
370
|
sh "diff #{diff_options} bin/gem #{ruby_dir}/bin/gem; true"
|
@@ -444,19 +377,19 @@ task :diff_ruby do
|
|
444
377
|
end
|
445
378
|
|
446
379
|
desc "Updates Rubinius HEAD with the currently checked-out copy of RubyGems."
|
447
|
-
task :update_rubinius do
|
448
|
-
sh "rsync #{rsync_options} bin/gem #{rubinius_dir}/lib/bin/gem"
|
380
|
+
task :update_rubinius => 'util/gem_prelude.rb' do
|
381
|
+
sh "rsync #{rsync_options} bin/gem #{rubinius_dir}/lib/bin/gem.rb"
|
449
382
|
sh "rsync #{rsync_options} lib/ #{rubinius_dir}/lib"
|
450
383
|
sh "rsync #{rsync_options} test/ #{rubinius_dir}/test/rubygems"
|
451
|
-
sh "rsync #{rsync_options} util/gem_prelude.rb #{rubinius_dir}/kernel/
|
384
|
+
sh "rsync #{rsync_options} util/gem_prelude.rb #{rubinius_dir}/kernel/common/gem_prelude.rb"
|
452
385
|
end
|
453
386
|
|
454
387
|
desc "Diffs Rubinius HEAD with the currently checked-out copy of RubyGems."
|
455
|
-
task :diff_rubinius do
|
456
|
-
sh "diff #{diff_options} bin/gem #{rubinius_dir}/lib/bin/gem; true"
|
388
|
+
task :diff_rubinius => 'util/gem_prelude.rb' do
|
389
|
+
sh "diff #{diff_options} bin/gem #{rubinius_dir}/lib/bin/gem.rb; true"
|
457
390
|
sh "diff #{diff_options} lib/ubygems.rb #{rubinius_dir}/lib/ubygems.rb; true"
|
458
391
|
sh "diff #{diff_options} lib/rubygems.rb #{rubinius_dir}/lib/rubygems.rb; true"
|
459
392
|
sh "diff #{diff_options} lib/rubygems #{rubinius_dir}/lib/rubygems; true"
|
460
393
|
sh "diff #{diff_options} test #{rubinius_dir}/test/rubygems; true"
|
461
|
-
sh "diff #{diff_options} util/gem_prelude.rb #{rubinius_dir}/kernel/
|
394
|
+
sh "diff #{diff_options} util/gem_prelude.rb #{rubinius_dir}/kernel/common/gem_prelude.rb; true"
|
462
395
|
end
|