rubygems-test 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/rubygems/commands/test_command.rb +16 -8
- data/lib/rubygems/on_install_test.rb +2 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -15,7 +15,7 @@ class Gem::Commands::TestCommand < Gem::Command
|
|
15
15
|
include Gem::VersionOption
|
16
16
|
include Gem::DefaultUserInteraction
|
17
17
|
|
18
|
-
VERSION = "0.4.
|
18
|
+
VERSION = "0.4.1"
|
19
19
|
|
20
20
|
# taken straight out of rake
|
21
21
|
DEFAULT_RAKEFILES = ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb']
|
@@ -32,7 +32,7 @@ class Gem::Commands::TestCommand < Gem::Command
|
|
32
32
|
"#{program_name} GEM [-v VERSION] [--force] [--dep-user-install]"
|
33
33
|
end
|
34
34
|
|
35
|
-
def initialize(spec=nil, on_install=false)
|
35
|
+
def initialize(spec=nil, on_install=false, gem_dir=nil)
|
36
36
|
options = { }
|
37
37
|
|
38
38
|
if spec
|
@@ -40,6 +40,8 @@ class Gem::Commands::TestCommand < Gem::Command
|
|
40
40
|
options[:version] = spec.version
|
41
41
|
end
|
42
42
|
|
43
|
+
@spec = spec
|
44
|
+
@gem_dir = gem_dir
|
43
45
|
@on_install = on_install
|
44
46
|
|
45
47
|
super 'test', description, options
|
@@ -499,14 +501,20 @@ class Gem::Commands::TestCommand < Gem::Command
|
|
499
501
|
end
|
500
502
|
[tmpdir, inst.spec]
|
501
503
|
else
|
502
|
-
spec = find_gem(name, version)
|
503
504
|
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
505
|
+
if @spec and @gem_dir and File.directory?(@gem_dir)
|
506
|
+
[@gem_dir, @spec]
|
507
|
+
else
|
508
|
+
|
509
|
+
spec = find_gem(name, version)
|
508
510
|
|
509
|
-
|
511
|
+
unless spec
|
512
|
+
say "unable to find gem #{name} #{version}"
|
513
|
+
next
|
514
|
+
end
|
515
|
+
|
516
|
+
[spec.full_gem_path, spec]
|
517
|
+
end
|
510
518
|
end
|
511
519
|
|
512
520
|
if File.exist?(File.join(path, '.gemtest')) or options[:force]
|
@@ -11,7 +11,8 @@ Gem.post_build do |gem|
|
|
11
11
|
gem.ui.ask_yes_no("Test #{gem.spec.name} (#{gem.spec.version})?", true)
|
12
12
|
|
13
13
|
begin
|
14
|
-
|
14
|
+
# HACK: request gem_dir be exposed in rubygems
|
15
|
+
Gem::Commands::TestCommand.new(gem.spec, true, gem.instance_variable_get(:@gem_dir) || gem.instance_variable_get("@gem_dir")).execute
|
15
16
|
true
|
16
17
|
rescue Gem::RakeNotFoundError, Gem::TestError
|
17
18
|
!(
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rubygems-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.4.
|
5
|
+
version: 0.4.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Erik Hollensbe
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-04-
|
14
|
+
date: 2011-04-26 00:00:00 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake
|