rubygems-update 2.3.0 → 2.4.0
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 +0 -0
- data.tar.gz.sig +0 -0
- data/CONTRIBUTING +14 -2
- data/History.txt +63 -0
- data/Rakefile +68 -91
- data/lib/rubygems.rb +5 -3
- data/lib/rubygems/command_manager.rb +1 -0
- data/lib/rubygems/commands/contents_command.rb +23 -2
- data/lib/rubygems/commands/install_command.rb +8 -0
- data/lib/rubygems/commands/open_command.rb +1 -8
- data/lib/rubygems/commands/uninstall_command.rb +9 -1
- data/lib/rubygems/commands/update_command.rb +1 -1
- data/lib/rubygems/core_ext/kernel_gem.rb +8 -1
- data/lib/rubygems/core_ext/kernel_require.rb +12 -22
- data/lib/rubygems/defaults.rb +17 -5
- data/lib/rubygems/dependency.rb +7 -1
- data/lib/rubygems/dependency_installer.rb +3 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +13 -11
- data/lib/rubygems/install_update_options.rb +13 -0
- data/lib/rubygems/installer.rb +36 -20
- data/lib/rubygems/installer_test_case.rb +2 -0
- data/lib/rubygems/local_remote_options.rb +1 -1
- data/lib/rubygems/name_tuple.rb +1 -1
- data/lib/rubygems/request_set.rb +14 -3
- data/lib/rubygems/request_set/gem_dependency_api.rb +12 -0
- data/lib/rubygems/request_set/lockfile.rb +3 -1
- data/lib/rubygems/resolver.rb +15 -0
- data/lib/rubygems/resolver/best_set.rb +28 -0
- data/lib/rubygems/resolver/conflict.rb +45 -7
- data/lib/rubygems/resolver/git_specification.rb +24 -0
- data/lib/rubygems/resolver/lock_specification.rb +22 -0
- data/lib/rubygems/source.rb +2 -0
- data/lib/rubygems/source/git.rb +1 -1
- data/lib/rubygems/source/installed.rb +2 -1
- data/lib/rubygems/specification.rb +16 -15
- data/lib/rubygems/test_case.rb +9 -5
- data/test/rubygems/test_gem.rb +72 -2
- data/test/rubygems/test_gem_commands_contents_command.rb +46 -3
- data/test/rubygems/test_gem_commands_install_command.rb +32 -0
- data/test/rubygems/test_gem_commands_uninstall_command.rb +18 -0
- data/test/rubygems/test_gem_dependency.rb +23 -0
- data/test/rubygems/test_gem_dependency_installer.rb +17 -0
- data/test/rubygems/test_gem_ext_builder.rb +12 -1
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +2 -2
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +24 -8
- data/test/rubygems/test_gem_install_update_options.rb +16 -0
- data/test/rubygems/test_gem_installer.rb +52 -0
- data/test/rubygems/test_gem_local_remote_options.rb +13 -0
- data/test/rubygems/test_gem_package.rb +3 -1
- data/test/rubygems/test_gem_package_tar_header.rb +2 -0
- data/test/rubygems/test_gem_package_tar_reader.rb +11 -1
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +17 -2
- data/test/rubygems/test_gem_package_tar_writer.rb +1 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +24 -0
- data/test/rubygems/test_gem_request_set.rb +74 -4
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +9 -1
- data/test/rubygems/test_gem_request_set_lockfile.rb +3 -1
- data/test/rubygems/test_gem_requirement.rb +8 -0
- data/test/rubygems/test_gem_resolver.rb +39 -0
- data/test/rubygems/test_gem_resolver_best_set.rb +57 -0
- data/test/rubygems/test_gem_resolver_conflict.rb +22 -10
- data/test/rubygems/test_gem_resolver_git_specification.rb +12 -0
- data/test/rubygems/test_gem_source_git.rb +6 -2
- data/test/rubygems/test_gem_source_installed.rb +8 -0
- data/test/rubygems/test_gem_source_lock.rb +2 -2
- data/test/rubygems/test_gem_source_vendor.rb +4 -0
- data/test/rubygems/test_kernel.rb +6 -0
- data/test/rubygems/test_require.rb +60 -0
- metadata +5 -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: d252b22411a732dda23b05c5127a9748c60875e1
|
4
|
+
data.tar.gz: a97c4c16f3c1501d40dca2649eed2f84f4e81b02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0050121aa08473845edf6930f719201d3d9fca03c206c5d22f48c900c2e13d260f7c06d8853de17365357e6b2bef0d8360b71bd96df11cb592b7de12ec17cf8a
|
7
|
+
data.tar.gz: 538dcbc95cb5f02f70dcd6b8b3907f60cf1f813969ca84ccd38d331e41240eb86d4ac0ef471f78639ac90f01c1a5cf388816e876a130766eec5634dcd5aceebe
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CONTRIBUTING
CHANGED
@@ -8,8 +8,10 @@ contributors to follow to reduce the time it takes to get changes merged in.
|
|
8
8
|
|
9
9
|
1. New features should be coupled with tests.
|
10
10
|
|
11
|
-
2. Ensure that your code blends well with ours
|
12
|
-
|
11
|
+
2. Ensure that your code blends well with ours:
|
12
|
+
* No trailing whitespace
|
13
|
+
* Match indentation (two spaces)
|
14
|
+
* Match coding style (`if`, `elsif`, `when` need trailing `then`)
|
13
15
|
|
14
16
|
3. Don't modify the history file or version number.
|
15
17
|
|
@@ -18,3 +20,13 @@ contributors to follow to reduce the time it takes to get changes merged in.
|
|
18
20
|
|
19
21
|
For more information and ideas on how to contribute to RubyGems ecosystem, see
|
20
22
|
here: http://guides.rubygems.org/contributing/
|
23
|
+
|
24
|
+
== Getting Started
|
25
|
+
|
26
|
+
Run:
|
27
|
+
|
28
|
+
$ gem install hoe
|
29
|
+
$ rake newb
|
30
|
+
|
31
|
+
After `rake newb` finishes you can run `rake` to run the tests.
|
32
|
+
|
data/History.txt
CHANGED
@@ -1,5 +1,68 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.4.0 / 2014-07-16
|
4
|
+
|
5
|
+
Minor enhancements:
|
6
|
+
|
7
|
+
* The contents command now supports a --show-install-dir option that shows
|
8
|
+
only the directory the gem is installed in. Feature request #966 by Akinori
|
9
|
+
MUSHA.
|
10
|
+
* Added a --build-root option to the install command for packagers. Pull
|
11
|
+
request #965 by Marcus Rückert.
|
12
|
+
* Added vendor gem support to RubyGems. Package managers may now install gems
|
13
|
+
in Gem.vendor_dir with the --vendor option to gem install. Issue #943 by
|
14
|
+
Marcus Rückert.
|
15
|
+
|
16
|
+
Bug fixes:
|
17
|
+
|
18
|
+
* Kernel#gem now respects the prerelease flag when activating gems.
|
19
|
+
Previously this behavior was undefined which could lead to bugs when a
|
20
|
+
prerelease version was unintentionally activated. Bug #938 by Joe Ferris.
|
21
|
+
* RubyGems now prefers gems from git over installed gems. This allows gems
|
22
|
+
from git to override an installed gem with the same name and version. Bug
|
23
|
+
#944 by Thomas Kriechbaumer.
|
24
|
+
* Fixed handling of git gems in a lockfile with unversioned dependencies. Bug
|
25
|
+
#940 by Michael Kaiser-Nyman.
|
26
|
+
* The ruby directive in a gem dependencies file is ignored when installing.
|
27
|
+
Bug #941 by Michael Kaiser-Nyman.
|
28
|
+
* Added open to list of builtin commands (`gem open` now works). Reported by
|
29
|
+
Espen Antonsen.
|
30
|
+
* `gem open` now works with command-line editors. Pull request #962 by Tim
|
31
|
+
Pope.
|
32
|
+
* `gem install -g` now respects `--conservative`. Pull request #950 by Jeremy
|
33
|
+
Evans.
|
34
|
+
* RubyGems releases announcements now now include checksums. Bug #939 by
|
35
|
+
Alexander E. Fischer.
|
36
|
+
* RubyGems now expands ~ in $PATH when checking if installed executables will
|
37
|
+
be runnable. Pull request #945 by Alex Talker.
|
38
|
+
* Fixed `gem install -g --explain`. Issue #947 by Luis Lavena. Patch by
|
39
|
+
Hsing-Hui Hsu.
|
40
|
+
* RubyGems locks less during gem activation. Pull request #951 by Aaron
|
41
|
+
Patterson and Justin Searls, #969 by Jeremy Tryba.
|
42
|
+
* Kernel#gem is now thread-safe. Pull request #967 by Aaron Patterson.
|
43
|
+
* RubyGems now handles spaces in directory names for some parts of extension
|
44
|
+
building. Pull request #949 by Tristan Hill.
|
45
|
+
* RubyGems no longer defines an empty Date class. Pull Request #948 by Benoit
|
46
|
+
Daloze.
|
47
|
+
* RubyGems respects --document options for `gem update` again. Bug 946 by
|
48
|
+
jonforums. Patch by Hsing-Hui Hsu.
|
49
|
+
* RubyGems generates documentation again with --ignore-dependencies. Bug #961
|
50
|
+
by Pulfer.
|
51
|
+
* RubyGems can install extensions across partitions now. Pull request #970 by
|
52
|
+
Michael Scherer.
|
53
|
+
* `-s` is now short for `--source` which resolves an ambiguity with
|
54
|
+
--no-suggestions. Pull request #955 by Alexander Kahn.
|
55
|
+
* Added extra test for ~> for 0.0.X versions. Pull request #958 by Mark
|
56
|
+
Lorenz.
|
57
|
+
* Fixed typo in gem updated help. Pull request #952 by Per Modin.
|
58
|
+
* Clarified that the gem description should not be excessively long. Part of
|
59
|
+
bug #956 by Renier Morales.
|
60
|
+
* Hid documentation of outdated test_files related methods in Specification.
|
61
|
+
Guides issue #90 by Emil Soman.
|
62
|
+
* RubyGems now falls back to the old index if the rubygems.org API fails
|
63
|
+
during gem resolution.
|
64
|
+
|
65
|
+
|
3
66
|
=== 2.3.0 / 2014-06-10
|
4
67
|
|
5
68
|
Minor enhancements:
|
data/Rakefile
CHANGED
@@ -67,6 +67,8 @@ hoe = Hoe.spec 'rubygems-update' do
|
|
67
67
|
spec_extras['require_paths'] = %w[hide_lib_for_update]
|
68
68
|
end
|
69
69
|
|
70
|
+
v = hoe.version
|
71
|
+
|
70
72
|
hoe.test_prelude = 'gem "minitest", "~> 4.0"'
|
71
73
|
|
72
74
|
Rake::Task['docs'].clear
|
@@ -77,7 +79,7 @@ begin
|
|
77
79
|
|
78
80
|
RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
|
79
81
|
doc.main = hoe.readme_file
|
80
|
-
doc.title = "RubyGems #{
|
82
|
+
doc.title = "RubyGems #{v} API Documentation"
|
81
83
|
|
82
84
|
rdoc_files = Rake::FileList.new %w[lib History.txt LICENSE.txt MIT.txt]
|
83
85
|
rdoc_files.add hoe.extra_rdoc_files
|
@@ -104,18 +106,49 @@ task :prerelease => [:clobber, :check_manifest, :test]
|
|
104
106
|
|
105
107
|
task :postrelease => %w[upload guides:publish blog:publish publish_docs]
|
106
108
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
109
|
+
file "pkg/rubygems-#{v}" => "pkg/rubygems-update-#{v}" do |t|
|
110
|
+
require 'find'
|
111
|
+
|
112
|
+
dest_root = File.expand_path t.name
|
113
|
+
|
114
|
+
cd t.source do
|
115
|
+
Find.find '.' do |file|
|
116
|
+
dest = File.expand_path file, dest_root
|
117
|
+
|
118
|
+
if File.directory? file then
|
119
|
+
mkdir_p dest
|
120
|
+
else
|
121
|
+
rm_f dest
|
122
|
+
safe_ln file, dest
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
source_pkg_dir = "pkg/rubygems-#{v}"
|
129
|
+
|
130
|
+
file "pkg/rubygems-#{v}.tgz" => source_pkg_dir do
|
131
|
+
cd 'pkg' do
|
132
|
+
sh "tar -czf rubygems-#{v}.tgz rubygems-#{v}"
|
113
133
|
end
|
114
134
|
end
|
115
135
|
|
136
|
+
file "pkg/rubygems-#{v}.zip" => source_pkg_dir do
|
137
|
+
cd 'pkg' do
|
138
|
+
sh "zip -q -r rubygems-#{v}.zip rubygems-#{v}"
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
file "pkg/rubygems-update-#{v}.gem"
|
143
|
+
|
144
|
+
task :package => %W[
|
145
|
+
pkg/rubygems-update-#{v}.gem
|
146
|
+
pkg/rubygems-#{v}.tgz
|
147
|
+
pkg/rubygems-#{v}.zip
|
148
|
+
]
|
149
|
+
|
116
150
|
desc "Upload release to gemcutter S3"
|
117
151
|
task :upload_to_gemcutter do
|
118
|
-
v = hoe.version
|
119
152
|
sh "s3cmd put -P pkg/rubygems-update-#{v}.gem pkg/rubygems-#{v}.zip pkg/rubygems-#{v}.tgz s3://production.s3.rubygems.org/rubygems/"
|
120
153
|
end
|
121
154
|
|
@@ -155,7 +188,7 @@ namespace 'guides' do
|
|
155
188
|
sh 'git', 'diff', '--quiet'
|
156
189
|
rescue
|
157
190
|
sh 'git', 'commit', 'command-reference.md', 'specification-reference.md',
|
158
|
-
'-m', "Rebuild for RubyGems #{
|
191
|
+
'-m', "Rebuild for RubyGems #{v}"
|
159
192
|
end
|
160
193
|
end
|
161
194
|
end
|
@@ -185,7 +218,24 @@ end
|
|
185
218
|
|
186
219
|
namespace 'blog' do
|
187
220
|
date = Time.now.strftime '%Y-%m-%d'
|
188
|
-
post_page = "_posts/#{date}-#{
|
221
|
+
post_page = "_posts/#{date}-#{v}-released.md"
|
222
|
+
checksums = ''
|
223
|
+
|
224
|
+
task 'checksums' => 'package' do
|
225
|
+
require 'digest'
|
226
|
+
Dir['pkg/*{tgz,zip,gem}'].map do |file|
|
227
|
+
digest = Digest::SHA256.new
|
228
|
+
|
229
|
+
open file, 'rb' do |io|
|
230
|
+
while chunk = io.read(65536) do
|
231
|
+
digest.update chunk
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
checksums << "* #{File.basename(file)} \n"
|
236
|
+
checksums << " #{digest.hexdigest}\n"
|
237
|
+
end
|
238
|
+
end
|
189
239
|
|
190
240
|
task 'pull' => %w[../blog.rubygems.org] do
|
191
241
|
chdir '../blog.rubygems.org' do
|
@@ -197,7 +247,7 @@ namespace 'blog' do
|
|
197
247
|
|
198
248
|
task 'update' => [path]
|
199
249
|
|
200
|
-
file path do
|
250
|
+
file path => 'checksums' do
|
201
251
|
name = `git config --get user.name`.strip
|
202
252
|
email = `git config --get user.email`.strip
|
203
253
|
|
@@ -251,13 +301,13 @@ namespace 'blog' do
|
|
251
301
|
Tempfile.open 'blog_post' do |io|
|
252
302
|
io.write <<-ANNOUNCEMENT
|
253
303
|
---
|
254
|
-
title: #{
|
304
|
+
title: #{v} Released
|
255
305
|
layout: post
|
256
306
|
author: #{name}
|
257
307
|
author_email: #{email}
|
258
308
|
---
|
259
309
|
|
260
|
-
RubyGems #{
|
310
|
+
RubyGems #{v} includes #{change_types}.
|
261
311
|
|
262
312
|
To update to the latest RubyGems you can run:
|
263
313
|
|
@@ -269,6 +319,10 @@ RubyGems][upgrading] instructions. To install RubyGems by hand see the
|
|
269
319
|
|
270
320
|
#{change_log}
|
271
321
|
|
322
|
+
SHA256 Checksums:
|
323
|
+
|
324
|
+
#{checksums}
|
325
|
+
|
272
326
|
[download]: http://rubygems.org/pages/download
|
273
327
|
[upgrading]: http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html
|
274
328
|
|
@@ -286,7 +340,7 @@ RubyGems][upgrading] instructions. To install RubyGems by hand see the
|
|
286
340
|
chdir '../blog.rubygems.org' do
|
287
341
|
sh 'git', 'add', post_page
|
288
342
|
sh 'git', 'commit', post_page,
|
289
|
-
'-m', "Added #{
|
343
|
+
'-m', "Added #{v} release announcement"
|
290
344
|
end
|
291
345
|
end
|
292
346
|
|
@@ -365,83 +419,6 @@ task :diff_rubinius do
|
|
365
419
|
diff_with rubinius_dir
|
366
420
|
end
|
367
421
|
|
368
|
-
def changelog_section code
|
369
|
-
name = {
|
370
|
-
:major => "major enhancement",
|
371
|
-
:minor => "minor enhancement",
|
372
|
-
:bug => "bug fix",
|
373
|
-
:unknown => "unknown",
|
374
|
-
}[code]
|
375
|
-
|
376
|
-
changes = $changes[code]
|
377
|
-
count = changes.size
|
378
|
-
name += "s" if count > 1
|
379
|
-
name.sub!(/fixs/, 'fixes')
|
380
|
-
|
381
|
-
return if count < 1
|
382
|
-
|
383
|
-
puts "* #{count} #{name}:"
|
384
|
-
puts
|
385
|
-
changes.sort.each do |line|
|
386
|
-
puts " * #{line}"
|
387
|
-
end
|
388
|
-
puts
|
389
|
-
end
|
390
|
-
|
391
|
-
desc "Print the current changelog."
|
392
|
-
task "git:newchangelog" do
|
393
|
-
# This must be in here until rubygems depends on the version of hoe that has
|
394
|
-
# git_tags
|
395
|
-
# TODO: get this code back into hoe-git
|
396
|
-
module Hoe::Git
|
397
|
-
module_function :git_tags, :git_svn?, :git_release_tag_prefix
|
398
|
-
end
|
399
|
-
|
400
|
-
tags = Hoe::Git.git_tags
|
401
|
-
tag = ENV["FROM"] || tags.last
|
402
|
-
range = [tag, "HEAD"].compact.join ".."
|
403
|
-
cmd = "git log #{range} '--format=tformat:%B|||%aN|||%aE|||'"
|
404
|
-
now = Time.new.strftime "%Y-%m-%d"
|
405
|
-
|
406
|
-
changes = `#{cmd}`.split(/\|\|\|/).each_slice(3).map do |msg, author, email|
|
407
|
-
msg.split(/\n/).reject { |s| s.empty? }
|
408
|
-
end
|
409
|
-
|
410
|
-
changes = changes.flatten
|
411
|
-
|
412
|
-
next if changes.empty?
|
413
|
-
|
414
|
-
$changes = Hash.new { |h,k| h[k] = [] }
|
415
|
-
|
416
|
-
codes = {
|
417
|
-
"!" => :major,
|
418
|
-
"+" => :minor,
|
419
|
-
"*" => :minor,
|
420
|
-
"-" => :bug,
|
421
|
-
"?" => :unknown,
|
422
|
-
}
|
423
|
-
|
424
|
-
codes_re = Regexp.escape codes.keys.join
|
425
|
-
|
426
|
-
changes.each do |change|
|
427
|
-
if change =~ /^\s*([#{codes_re}])\s*(.*)/ then
|
428
|
-
code, line = codes[$1], $2
|
429
|
-
else
|
430
|
-
code, line = codes["?"], change.chomp
|
431
|
-
end
|
432
|
-
|
433
|
-
$changes[code] << line
|
434
|
-
end
|
435
|
-
|
436
|
-
puts "=== #{ENV['VERSION'] || 'NEXT'} / #{now}"
|
437
|
-
puts
|
438
|
-
changelog_section :major
|
439
|
-
changelog_section :minor
|
440
|
-
changelog_section :bug
|
441
|
-
changelog_section :unknown
|
442
|
-
puts
|
443
|
-
end
|
444
|
-
|
445
422
|
desc "Cleanup trailing whitespace"
|
446
423
|
task :whitespace do
|
447
424
|
system 'find . -not \( -name .svn -prune -o -name .git -prune \) -type f -print0 | xargs -0 sed -i "" -E "s/[[:space:]]*$//"'
|
data/lib/rubygems.rb
CHANGED
@@ -6,9 +6,10 @@
|
|
6
6
|
#++
|
7
7
|
|
8
8
|
require 'rbconfig'
|
9
|
+
require 'thread'
|
9
10
|
|
10
11
|
module Gem
|
11
|
-
VERSION = '2.
|
12
|
+
VERSION = '2.4.0'
|
12
13
|
end
|
13
14
|
|
14
15
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -156,6 +157,7 @@ module Gem
|
|
156
157
|
|
157
158
|
@configuration = nil
|
158
159
|
@loaded_specs = {}
|
160
|
+
LOADED_SPECS_MUTEX = Mutex.new
|
159
161
|
@path_to_default_spec_map = {}
|
160
162
|
@platforms = []
|
161
163
|
@ruby = nil
|
@@ -544,9 +546,9 @@ module Gem
|
|
544
546
|
# Fetching: minitest-3.0.1.gem (100%)
|
545
547
|
# => [#<Gem::Specification:0x1013b4528 @name="minitest", ...>]
|
546
548
|
|
547
|
-
def self.install name, version = Gem::Requirement.default
|
549
|
+
def self.install name, version = Gem::Requirement.default, *options
|
548
550
|
require "rubygems/dependency_installer"
|
549
|
-
inst = Gem::DependencyInstaller.new
|
551
|
+
inst = Gem::DependencyInstaller.new(*options)
|
550
552
|
inst.install name, version
|
551
553
|
inst.installed_gems
|
552
554
|
end
|
@@ -8,7 +8,8 @@ class Gem::Commands::ContentsCommand < Gem::Command
|
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
super 'contents', 'Display the contents of the installed gems',
|
11
|
-
:specdirs => [], :lib_only => false, :prefix => true
|
11
|
+
:specdirs => [], :lib_only => false, :prefix => true,
|
12
|
+
:show_install_dir => false
|
12
13
|
|
13
14
|
add_version_option
|
14
15
|
|
@@ -32,6 +33,11 @@ class Gem::Commands::ContentsCommand < Gem::Command
|
|
32
33
|
options[:prefix] = prefix
|
33
34
|
end
|
34
35
|
|
36
|
+
add_option( '--[no-]show-install-dir',
|
37
|
+
'Show only the gem install dir') do |show, options|
|
38
|
+
options[:show_install_dir] = show
|
39
|
+
end
|
40
|
+
|
35
41
|
@path_kind = nil
|
36
42
|
@spec_dirs = nil
|
37
43
|
@version = nil
|
@@ -65,7 +71,12 @@ prefix or only the files that are requireable.
|
|
65
71
|
names = gem_names
|
66
72
|
|
67
73
|
names.each do |name|
|
68
|
-
found =
|
74
|
+
found =
|
75
|
+
if options[:show_install_dir] then
|
76
|
+
gem_install_dir name
|
77
|
+
else
|
78
|
+
gem_contents name
|
79
|
+
end
|
69
80
|
|
70
81
|
terminate_interaction 1 unless found or names.length > 1
|
71
82
|
end
|
@@ -115,6 +126,16 @@ prefix or only the files that are requireable.
|
|
115
126
|
true
|
116
127
|
end
|
117
128
|
|
129
|
+
def gem_install_dir name
|
130
|
+
spec = spec_for name
|
131
|
+
|
132
|
+
return false unless spec
|
133
|
+
|
134
|
+
say spec.gem_dir
|
135
|
+
|
136
|
+
true
|
137
|
+
end
|
138
|
+
|
118
139
|
def gem_names # :nodoc:
|
119
140
|
if options[:all] then
|
120
141
|
Gem::Specification.map(&:name)
|
@@ -278,6 +278,14 @@ to write the specification by hand. For example:
|
|
278
278
|
inst = Gem::Installer.new gem, options
|
279
279
|
inst.install
|
280
280
|
|
281
|
+
require 'rubygems/dependency_installer'
|
282
|
+
dinst = Gem::DependencyInstaller.new options
|
283
|
+
dinst.installed_gems.replace [inst.spec]
|
284
|
+
|
285
|
+
Gem.done_installing_hooks.each do |hook|
|
286
|
+
hook.call dinst, [inst.spec]
|
287
|
+
end unless Gem.done_installing_hooks.empty?
|
288
|
+
|
281
289
|
@installed_specs.push(inst.spec)
|
282
290
|
end
|
283
291
|
|