hydra 0.23.3 → 0.24.0
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/README.rdoc +5 -1
- data/VERSION +1 -1
- data/lib/hydra.rb +1 -1
- data/lib/hydra/cucumber/partial_html.rb +24 -0
- data/lib/hydra/listener/cucumber.css +279 -0
- data/lib/hydra/listener/cucumber_html_report.rb +148 -0
- data/lib/hydra/listener/jquery-min.js +154 -0
- data/lib/hydra/listener/report_generator.rb +3 -0
- data/lib/hydra/master.rb +7 -2
- data/lib/hydra/messaging_io.rb +11 -8
- data/lib/hydra/runner.rb +89 -44
- data/lib/hydra/runner_listener/abstract.rb +23 -0
- data/lib/hydra/tasks.rb +30 -5
- data/lib/hydra/worker.rb +13 -2
- data/test/fixtures/hydra_worker_init.rb +2 -0
- data/test/fixtures/many_outputs_to_console.rb +9 -0
- data/test/fixtures/master_listeners.rb +10 -0
- data/test/fixtures/runner_listeners.rb +23 -0
- data/test/fixtures/task_test_config.yml +6 -0
- data/test/master_test.rb +204 -2
- data/test/runner_test.rb +65 -19
- data/test/ssh_test.rb +11 -0
- data/test/task_test.rb +21 -0
- data/test/test_helper.rb +33 -0
- metadata +60 -108
data/test/task_test.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
require 'hydra/tasks'
|
3
|
+
require 'rake'
|
4
|
+
|
5
|
+
class TaskTest < Test::Unit::TestCase
|
6
|
+
context "a task" do
|
7
|
+
should "execute the command in a remote machine" do
|
8
|
+
|
9
|
+
File.delete( "/tmp/new_file" ) if File.exists? "/tmp/new_file"
|
10
|
+
|
11
|
+
Hydra::RemoteTask.new('cat:text_file', 'touch new_file') do |t|
|
12
|
+
t.config = "test/fixtures/task_test_config.yml"
|
13
|
+
end
|
14
|
+
|
15
|
+
Rake.application['hydra:remote:cat:text_file'].invoke
|
16
|
+
|
17
|
+
assert( File.exists? "/tmp/new_file" )
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -4,6 +4,7 @@ gem 'shoulda', '2.10.3'
|
|
4
4
|
gem 'rspec', '2.0.0.beta.19'
|
5
5
|
require 'shoulda'
|
6
6
|
require 'tmpdir'
|
7
|
+
require "stringio"
|
7
8
|
|
8
9
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
9
10
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
@@ -56,6 +57,38 @@ class Test::Unit::TestCase
|
|
56
57
|
def conflicting_test_file
|
57
58
|
File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'conflicting.rb'))
|
58
59
|
end
|
60
|
+
|
61
|
+
def remote_dir_path
|
62
|
+
File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
|
63
|
+
end
|
64
|
+
|
65
|
+
def hydra_worker_init_file
|
66
|
+
File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'hydra_worker_init.rb'))
|
67
|
+
end
|
68
|
+
|
69
|
+
def capture_stderr
|
70
|
+
# The output stream must be an IO-like object. In this case we capture it in
|
71
|
+
# an in-memory IO object so we can return the string value. You can assign any
|
72
|
+
# IO object here.
|
73
|
+
previous_stderr, $stderr = $stderr, StringIO.new
|
74
|
+
yield
|
75
|
+
$stderr.string
|
76
|
+
ensure
|
77
|
+
# Restore the previous value of stderr (typically equal to STDERR).
|
78
|
+
$stderr = previous_stderr
|
79
|
+
end
|
80
|
+
|
81
|
+
#this method allow us to wait for a file for a maximum number of time, so the
|
82
|
+
#test can pass in slower machines. This helps to speed up the tests
|
83
|
+
def assert_file_exists file, time_to_wait = 2
|
84
|
+
time_begin = Time.now
|
85
|
+
|
86
|
+
until Time.now - time_begin >= time_to_wait or File.exists?( file ) do
|
87
|
+
sleep 0.01
|
88
|
+
end
|
89
|
+
|
90
|
+
assert File.exists?( file )
|
91
|
+
end
|
59
92
|
end
|
60
93
|
|
61
94
|
module Hydra #:nodoc:
|
metadata
CHANGED
@@ -1,100 +1,69 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.24.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 23
|
9
|
-
- 3
|
10
|
-
version: 0.23.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Nick Gauthier
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-02-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: shoulda
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &17448440 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 33
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 10
|
33
|
-
- 3
|
18
|
+
requirements:
|
19
|
+
- - =
|
20
|
+
- !ruby/object:Gem::Version
|
34
21
|
version: 2.10.3
|
35
22
|
type: :development
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: rspec
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: *17448440
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
requirement: &17444460 !ruby/object:Gem::Requirement
|
41
28
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 62196421
|
46
|
-
segments:
|
47
|
-
- 2
|
48
|
-
- 0
|
49
|
-
- 0
|
50
|
-
- beta
|
51
|
-
- 19
|
29
|
+
requirements:
|
30
|
+
- - =
|
31
|
+
- !ruby/object:Gem::Version
|
52
32
|
version: 2.0.0.beta.19
|
53
33
|
type: :development
|
54
|
-
version_requirements: *id002
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: cucumber
|
57
34
|
prerelease: false
|
58
|
-
|
35
|
+
version_requirements: *17444460
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: cucumber
|
38
|
+
requirement: &17457940 !ruby/object:Gem::Requirement
|
59
39
|
none: false
|
60
|
-
requirements:
|
61
|
-
- -
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
hash: 63
|
64
|
-
segments:
|
65
|
-
- 0
|
66
|
-
- 9
|
67
|
-
- 2
|
40
|
+
requirements:
|
41
|
+
- - =
|
42
|
+
- !ruby/object:Gem::Version
|
68
43
|
version: 0.9.2
|
69
44
|
type: :development
|
70
|
-
version_requirements: *id003
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: therubyracer
|
73
45
|
prerelease: false
|
74
|
-
|
46
|
+
version_requirements: *17457940
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: therubyracer
|
49
|
+
requirement: &17456820 !ruby/object:Gem::Requirement
|
75
50
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
hash: 11
|
80
|
-
segments:
|
81
|
-
- 0
|
82
|
-
- 7
|
83
|
-
- 4
|
51
|
+
requirements:
|
52
|
+
- - =
|
53
|
+
- !ruby/object:Gem::Version
|
84
54
|
version: 0.7.4
|
85
55
|
type: :development
|
86
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *17456820
|
87
58
|
description: Spread your tests over multiple machines to test your code faster.
|
88
59
|
email: nick@smartlogicsolutions.com
|
89
60
|
executables: []
|
90
|
-
|
91
61
|
extensions: []
|
92
|
-
|
93
|
-
extra_rdoc_files:
|
62
|
+
extra_rdoc_files:
|
94
63
|
- LICENSE
|
95
64
|
- README.rdoc
|
96
65
|
- TODO
|
97
|
-
files:
|
66
|
+
files:
|
98
67
|
- .document
|
99
68
|
- LICENSE
|
100
69
|
- README.rdoc
|
@@ -107,9 +76,13 @@ files:
|
|
107
76
|
- hydra_gray.png
|
108
77
|
- lib/hydra.rb
|
109
78
|
- lib/hydra/cucumber/formatter.rb
|
79
|
+
- lib/hydra/cucumber/partial_html.rb
|
110
80
|
- lib/hydra/hash.rb
|
111
81
|
- lib/hydra/js/lint.js
|
112
82
|
- lib/hydra/listener/abstract.rb
|
83
|
+
- lib/hydra/listener/cucumber.css
|
84
|
+
- lib/hydra/listener/cucumber_html_report.rb
|
85
|
+
- lib/hydra/listener/jquery-min.js
|
113
86
|
- lib/hydra/listener/minimal_output.rb
|
114
87
|
- lib/hydra/listener/notifier.rb
|
115
88
|
- lib/hydra/listener/progress_bar.rb
|
@@ -122,6 +95,7 @@ files:
|
|
122
95
|
- lib/hydra/messaging_io.rb
|
123
96
|
- lib/hydra/pipe.rb
|
124
97
|
- lib/hydra/runner.rb
|
98
|
+
- lib/hydra/runner_listener/abstract.rb
|
125
99
|
- lib/hydra/safe_fork.rb
|
126
100
|
- lib/hydra/spec/autorun_override.rb
|
127
101
|
- lib/hydra/spec/hydra_formatter.rb
|
@@ -139,10 +113,15 @@ files:
|
|
139
113
|
- test/fixtures/features/write_alternate_file.feature
|
140
114
|
- test/fixtures/features/write_file.feature
|
141
115
|
- test/fixtures/hello_world.rb
|
116
|
+
- test/fixtures/hydra_worker_init.rb
|
142
117
|
- test/fixtures/js_file.js
|
143
118
|
- test/fixtures/json_data.json
|
119
|
+
- test/fixtures/many_outputs_to_console.rb
|
120
|
+
- test/fixtures/master_listeners.rb
|
121
|
+
- test/fixtures/runner_listeners.rb
|
144
122
|
- test/fixtures/slow.rb
|
145
123
|
- test/fixtures/sync_test.rb
|
124
|
+
- test/fixtures/task_test_config.yml
|
146
125
|
- test/fixtures/write_file.rb
|
147
126
|
- test/fixtures/write_file_alternate_spec.rb
|
148
127
|
- test/fixtures/write_file_spec.rb
|
@@ -153,58 +132,31 @@ files:
|
|
153
132
|
- test/runner_test.rb
|
154
133
|
- test/ssh_test.rb
|
155
134
|
- test/sync_test.rb
|
135
|
+
- test/task_test.rb
|
156
136
|
- test/test_helper.rb
|
157
137
|
- test/worker_test.rb
|
158
|
-
has_rdoc: true
|
159
138
|
homepage: http://github.com/ngauthier/hydra
|
160
139
|
licenses: []
|
161
|
-
|
162
140
|
post_install_message:
|
163
141
|
rdoc_options: []
|
164
|
-
|
165
|
-
require_paths:
|
142
|
+
require_paths:
|
166
143
|
- lib
|
167
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
144
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
168
145
|
none: false
|
169
|
-
requirements:
|
170
|
-
- -
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
|
173
|
-
|
174
|
-
- 0
|
175
|
-
version: "0"
|
176
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
151
|
none: false
|
178
|
-
requirements:
|
179
|
-
- -
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
|
182
|
-
segments:
|
183
|
-
- 0
|
184
|
-
version: "0"
|
152
|
+
requirements:
|
153
|
+
- - ! '>='
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
185
156
|
requirements: []
|
186
|
-
|
187
157
|
rubyforge_project:
|
188
|
-
rubygems_version: 1.
|
158
|
+
rubygems_version: 1.8.15
|
189
159
|
signing_key:
|
190
160
|
specification_version: 3
|
191
161
|
summary: Distributed testing toolkit
|
192
|
-
test_files:
|
193
|
-
- test/fixtures/assert_true.rb
|
194
|
-
- test/fixtures/conflicting.rb
|
195
|
-
- test/fixtures/features/step_definitions.rb
|
196
|
-
- test/fixtures/hello_world.rb
|
197
|
-
- test/fixtures/slow.rb
|
198
|
-
- test/fixtures/sync_test.rb
|
199
|
-
- test/fixtures/write_file.rb
|
200
|
-
- test/fixtures/write_file_alternate_spec.rb
|
201
|
-
- test/fixtures/write_file_spec.rb
|
202
|
-
- test/fixtures/write_file_with_pending_spec.rb
|
203
|
-
- test/master_test.rb
|
204
|
-
- test/message_test.rb
|
205
|
-
- test/pipe_test.rb
|
206
|
-
- test/runner_test.rb
|
207
|
-
- test/ssh_test.rb
|
208
|
-
- test/sync_test.rb
|
209
|
-
- test/test_helper.rb
|
210
|
-
- test/worker_test.rb
|
162
|
+
test_files: []
|