rubygems-test 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +9 -0
- data/Rakefile +4 -2
- data/lib/rubygems/commands/test_command.rb +4 -3
- data/test/helper.rb +13 -5
- data/test/test_execute.rb +11 -0
- metadata +6 -26
data/History.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
=== 0.3.1 / 2011-02-03
|
2
|
+
|
3
|
+
* Formatted upload results output differently. Thanks postmodern.
|
4
|
+
* Added a handy little message to tell people about the failure testing. Thanks Rick Hull.
|
5
|
+
* If sudo was required to install gems, 'gem test' without sudo would fail. Fixed.
|
6
|
+
* Set minimum rubygems version; should solve #10.
|
7
|
+
* Install development dependencies without prompt if in quiet mode [Guillermo Álvarez]
|
8
|
+
* Ensure quiet mode does not ask any question. [Guillermo Álvarez]
|
9
|
+
|
1
10
|
=== 0.3.0 / 2011-01-30
|
2
11
|
|
3
12
|
* More fixes for garbagecollect
|
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ Hoe.spec 'rubygems-test' do
|
|
12
12
|
|
13
13
|
# doin' it wrong because we're a gem plugin
|
14
14
|
# that means I can be "special"!
|
15
|
-
self.version = '0.3.
|
15
|
+
self.version = '0.3.1'
|
16
16
|
|
17
17
|
self.rubyforge_name = nil
|
18
18
|
|
@@ -27,9 +27,11 @@ Hoe.spec 'rubygems-test' do
|
|
27
27
|
self.summary = 'commands and facilities for automated and user-contributed rubygems testing and reporting'
|
28
28
|
self.url = %w[http://github.com/rubygems/rubygems-test]
|
29
29
|
|
30
|
-
require_ruby_version ">= 1.8.7"
|
31
30
|
pluggable!
|
32
31
|
|
32
|
+
require_ruby_version ">= 1.8.7"
|
33
|
+
require_rubygems_version ">= 1.3.6"
|
34
|
+
|
33
35
|
extra_deps << ['rake', '>= 0.8.7']
|
34
36
|
|
35
37
|
desc "install a gem without sudo"
|
@@ -131,7 +131,7 @@ class Gem::Commands::TestCommand < Gem::Command
|
|
131
131
|
|
132
132
|
spec.development_dependencies.each do |dep|
|
133
133
|
unless Gem.source_index.search(dep).last
|
134
|
-
if config["install_development_dependencies"]
|
134
|
+
if config["install_development_dependencies"] || Gem.configuration.verbose == false
|
135
135
|
say "Installing test dependency #{dep.name} (#{dep.requirement})"
|
136
136
|
di.install(dep)
|
137
137
|
else
|
@@ -166,7 +166,7 @@ class Gem::Commands::TestCommand < Gem::Command
|
|
166
166
|
body = YAML::load(response.body)
|
167
167
|
if body[:success]
|
168
168
|
url = body[:data][0] if body[:data]
|
169
|
-
say "
|
169
|
+
say "\nTest results posted successfully! \n\nresults url:\t#{url}\n\n"
|
170
170
|
else
|
171
171
|
body[:errors].each do |error|
|
172
172
|
say error
|
@@ -350,7 +350,8 @@ class Gem::Commands::TestCommand < Gem::Command
|
|
350
350
|
config["upload_results"] or
|
351
351
|
(
|
352
352
|
!config.has_key?("upload_results") and
|
353
|
-
|
353
|
+
Gem.configuration.verbose == false ||
|
354
|
+
ask_yes_no("Upload these results?", true)
|
354
355
|
)
|
355
356
|
)
|
356
357
|
end
|
data/test/helper.rb
CHANGED
@@ -13,6 +13,8 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
13
13
|
|
14
14
|
require 'rubygems/commands/test_command' unless defined? Gem::Command::TestCommand
|
15
15
|
|
16
|
+
$stderr.puts "----- ERROR messages are a part of this output. Do not be alarmed by them! -----"
|
17
|
+
|
16
18
|
class Test::Unit::TestCase
|
17
19
|
def install_stub_gem(hash)
|
18
20
|
file = Tempfile.new("rubygems-test")
|
@@ -20,11 +22,17 @@ class Test::Unit::TestCase
|
|
20
22
|
path = file.path
|
21
23
|
file.close
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
Dir.mktmpdir('rubygems-test') do |dir|
|
26
|
+
FileUtils.chdir('gems') do
|
27
|
+
Dir['*'].each { |x| FileUtils.cp_r x, dir }
|
28
|
+
end
|
29
|
+
|
30
|
+
FileUtils.chdir(dir) do
|
31
|
+
spec = eval File.read(path)
|
32
|
+
filename = Gem::Builder.new(spec).build
|
33
|
+
Gem::Installer.new(filename).install
|
34
|
+
Gem.refresh
|
35
|
+
end
|
28
36
|
end
|
29
37
|
end
|
30
38
|
|
data/test/test_execute.rb
CHANGED
@@ -70,4 +70,15 @@ class TestExecute < Test::Unit::TestCase
|
|
70
70
|
|
71
71
|
assert_equal YAML.load(@test.gather_results(spec, output, true)), hash
|
72
72
|
end
|
73
|
+
|
74
|
+
def test_07_upload_results?
|
75
|
+
old_verbose = Gem.configuration.verbose
|
76
|
+
|
77
|
+
Gem.configuration.verbose = false
|
78
|
+
assert @test.upload_results?
|
79
|
+
|
80
|
+
ensure
|
81
|
+
Gem.configuration.verbose = old_verbose
|
82
|
+
end
|
83
|
+
|
73
84
|
end
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 3
|
8
|
-
- 0
|
9
|
-
version: 0.3.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.3.1
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Erik Hollensbe
|
@@ -15,7 +11,7 @@ autorequire:
|
|
15
11
|
bindir: bin
|
16
12
|
cert_chain: []
|
17
13
|
|
18
|
-
date: 2011-
|
14
|
+
date: 2011-02-04 00:00:00 -05:00
|
19
15
|
default_executable:
|
20
16
|
dependencies:
|
21
17
|
- !ruby/object:Gem::Dependency
|
@@ -26,10 +22,6 @@ dependencies:
|
|
26
22
|
requirements:
|
27
23
|
- - ">="
|
28
24
|
- !ruby/object:Gem::Version
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
- 8
|
32
|
-
- 7
|
33
25
|
version: 0.8.7
|
34
26
|
type: :runtime
|
35
27
|
version_requirements: *id001
|
@@ -41,11 +33,7 @@ dependencies:
|
|
41
33
|
requirements:
|
42
34
|
- - ">="
|
43
35
|
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
- 2
|
46
|
-
- 8
|
47
|
-
- 0
|
48
|
-
version: 2.8.0
|
36
|
+
version: 2.9.0
|
49
37
|
type: :development
|
50
38
|
version_requirements: *id002
|
51
39
|
description: " This installs three major features:\n\n * a 'gem test' command.\n * the ability to test your gems on installation, and uninstall them if they fail testing.\n * A facility to upload your test results to http://www.gem-testers.org.\n"
|
@@ -93,25 +81,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
81
|
requirements:
|
94
82
|
- - ">="
|
95
83
|
- !ruby/object:Gem::Version
|
96
|
-
segments:
|
97
|
-
- 1
|
98
|
-
- 8
|
99
|
-
- 7
|
100
84
|
version: 1.8.7
|
101
85
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
86
|
none: false
|
103
87
|
requirements:
|
104
88
|
- - ">="
|
105
89
|
- !ruby/object:Gem::Version
|
106
|
-
|
107
|
-
- 1
|
108
|
-
- 3
|
109
|
-
- 1
|
110
|
-
version: 1.3.1
|
90
|
+
version: 1.3.6
|
111
91
|
requirements: []
|
112
92
|
|
113
93
|
rubyforge_project:
|
114
|
-
rubygems_version: 1.
|
94
|
+
rubygems_version: 1.5.0
|
115
95
|
signing_key:
|
116
96
|
specification_version: 3
|
117
97
|
summary: commands and facilities for automated and user-contributed rubygems testing and reporting
|