nulogy-hydra 0.23.2.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/.document +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +39 -0
- data/Rakefile +56 -0
- data/TODO +18 -0
- data/VERSION +1 -0
- data/caliper.yml +6 -0
- data/hydra-icon-64x64.png +0 -0
- data/hydra.gemspec +131 -0
- data/hydra_gray.png +0 -0
- data/lib/hydra/cucumber/formatter.rb +29 -0
- data/lib/hydra/hash.rb +16 -0
- data/lib/hydra/js/lint.js +5150 -0
- data/lib/hydra/listener/abstract.rb +39 -0
- data/lib/hydra/listener/minimal_output.rb +24 -0
- data/lib/hydra/listener/notifier.rb +17 -0
- data/lib/hydra/listener/progress_bar.rb +48 -0
- data/lib/hydra/listener/report_generator.rb +31 -0
- data/lib/hydra/master.rb +252 -0
- data/lib/hydra/message/master_messages.rb +19 -0
- data/lib/hydra/message/runner_messages.rb +46 -0
- data/lib/hydra/message/worker_messages.rb +52 -0
- data/lib/hydra/message.rb +47 -0
- data/lib/hydra/messaging_io.rb +49 -0
- data/lib/hydra/pipe.rb +61 -0
- data/lib/hydra/proxy_config.rb +27 -0
- data/lib/hydra/runner.rb +306 -0
- data/lib/hydra/runner_listener/abstract.rb +23 -0
- data/lib/hydra/safe_fork.rb +31 -0
- data/lib/hydra/spec/autorun_override.rb +3 -0
- data/lib/hydra/spec/hydra_formatter.rb +26 -0
- data/lib/hydra/ssh.rb +41 -0
- data/lib/hydra/stdio.rb +16 -0
- data/lib/hydra/sync.rb +99 -0
- data/lib/hydra/tasks.rb +366 -0
- data/lib/hydra/threadsafe_io.rb +18 -0
- data/lib/hydra/tmpdir.rb +11 -0
- data/lib/hydra/trace.rb +29 -0
- data/lib/hydra/worker.rb +168 -0
- data/lib/hydra.rb +16 -0
- data/nulogy-hydra.gemspec +122 -0
- data/test/fixtures/assert_true.rb +7 -0
- data/test/fixtures/bad_proxy_config.yml +4 -0
- data/test/fixtures/config.yml +4 -0
- data/test/fixtures/conflicting.rb +10 -0
- data/test/fixtures/features/step_definitions.rb +21 -0
- data/test/fixtures/features/write_alternate_file.feature +7 -0
- data/test/fixtures/features/write_file.feature +7 -0
- data/test/fixtures/hello_world.rb +3 -0
- data/test/fixtures/hydra_worker_init.rb +2 -0
- data/test/fixtures/js_file.js +4 -0
- data/test/fixtures/json_data.json +4 -0
- data/test/fixtures/many_outputs_to_console.rb +9 -0
- data/test/fixtures/master_listeners.rb +10 -0
- data/test/fixtures/proxy_config.yml +4 -0
- data/test/fixtures/proxy_config_http.yml +4 -0
- data/test/fixtures/runner_listeners.rb +23 -0
- data/test/fixtures/slow.rb +9 -0
- data/test/fixtures/sync_test.rb +8 -0
- data/test/fixtures/task_test_config.yml +6 -0
- data/test/fixtures/write_file.rb +10 -0
- data/test/fixtures/write_file_alternate_spec.rb +10 -0
- data/test/fixtures/write_file_spec.rb +9 -0
- data/test/fixtures/write_file_with_pending_spec.rb +11 -0
- data/test/master_test.rb +383 -0
- data/test/message_test.rb +31 -0
- data/test/pipe_test.rb +38 -0
- data/test/proxy_config_test.rb +31 -0
- data/test/runner_test.rb +196 -0
- data/test/ssh_test.rb +25 -0
- data/test/sync_test.rb +113 -0
- data/test/task_test.rb +21 -0
- data/test/test_helper.rb +107 -0
- data/test/worker_test.rb +60 -0
- metadata +208 -0
@@ -0,0 +1,122 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "nulogy-hydra"
|
8
|
+
s.version = "0.23.2.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Nick Gauthier", "Justin Fitzsimmons", "Victor Savkin"]
|
12
|
+
s.date = "2011-11-09"
|
13
|
+
s.description = "Spread your tests over multiple machines to test your code faster."
|
14
|
+
s.email = "engineering@nulogy.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc",
|
18
|
+
"TODO"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".document",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"TODO",
|
26
|
+
"VERSION",
|
27
|
+
"caliper.yml",
|
28
|
+
"hydra-icon-64x64.png",
|
29
|
+
"hydra.gemspec",
|
30
|
+
"hydra_gray.png",
|
31
|
+
"lib/hydra.rb",
|
32
|
+
"lib/hydra/cucumber/formatter.rb",
|
33
|
+
"lib/hydra/hash.rb",
|
34
|
+
"lib/hydra/js/lint.js",
|
35
|
+
"lib/hydra/listener/abstract.rb",
|
36
|
+
"lib/hydra/listener/minimal_output.rb",
|
37
|
+
"lib/hydra/listener/notifier.rb",
|
38
|
+
"lib/hydra/listener/progress_bar.rb",
|
39
|
+
"lib/hydra/listener/report_generator.rb",
|
40
|
+
"lib/hydra/master.rb",
|
41
|
+
"lib/hydra/message.rb",
|
42
|
+
"lib/hydra/message/master_messages.rb",
|
43
|
+
"lib/hydra/message/runner_messages.rb",
|
44
|
+
"lib/hydra/message/worker_messages.rb",
|
45
|
+
"lib/hydra/messaging_io.rb",
|
46
|
+
"lib/hydra/pipe.rb",
|
47
|
+
"lib/hydra/proxy_config.rb",
|
48
|
+
"lib/hydra/runner.rb",
|
49
|
+
"lib/hydra/runner_listener/abstract.rb",
|
50
|
+
"lib/hydra/safe_fork.rb",
|
51
|
+
"lib/hydra/spec/autorun_override.rb",
|
52
|
+
"lib/hydra/spec/hydra_formatter.rb",
|
53
|
+
"lib/hydra/ssh.rb",
|
54
|
+
"lib/hydra/stdio.rb",
|
55
|
+
"lib/hydra/sync.rb",
|
56
|
+
"lib/hydra/tasks.rb",
|
57
|
+
"lib/hydra/threadsafe_io.rb",
|
58
|
+
"lib/hydra/tmpdir.rb",
|
59
|
+
"lib/hydra/trace.rb",
|
60
|
+
"lib/hydra/worker.rb",
|
61
|
+
"nulogy-hydra.gemspec",
|
62
|
+
"test/fixtures/assert_true.rb",
|
63
|
+
"test/fixtures/bad_proxy_config.yml",
|
64
|
+
"test/fixtures/config.yml",
|
65
|
+
"test/fixtures/conflicting.rb",
|
66
|
+
"test/fixtures/features/step_definitions.rb",
|
67
|
+
"test/fixtures/features/write_alternate_file.feature",
|
68
|
+
"test/fixtures/features/write_file.feature",
|
69
|
+
"test/fixtures/hello_world.rb",
|
70
|
+
"test/fixtures/hydra_worker_init.rb",
|
71
|
+
"test/fixtures/js_file.js",
|
72
|
+
"test/fixtures/json_data.json",
|
73
|
+
"test/fixtures/many_outputs_to_console.rb",
|
74
|
+
"test/fixtures/master_listeners.rb",
|
75
|
+
"test/fixtures/proxy_config.yml",
|
76
|
+
"test/fixtures/proxy_config_http.yml",
|
77
|
+
"test/fixtures/runner_listeners.rb",
|
78
|
+
"test/fixtures/slow.rb",
|
79
|
+
"test/fixtures/sync_test.rb",
|
80
|
+
"test/fixtures/task_test_config.yml",
|
81
|
+
"test/fixtures/write_file.rb",
|
82
|
+
"test/fixtures/write_file_alternate_spec.rb",
|
83
|
+
"test/fixtures/write_file_spec.rb",
|
84
|
+
"test/fixtures/write_file_with_pending_spec.rb",
|
85
|
+
"test/master_test.rb",
|
86
|
+
"test/message_test.rb",
|
87
|
+
"test/pipe_test.rb",
|
88
|
+
"test/proxy_config_test.rb",
|
89
|
+
"test/runner_test.rb",
|
90
|
+
"test/ssh_test.rb",
|
91
|
+
"test/sync_test.rb",
|
92
|
+
"test/task_test.rb",
|
93
|
+
"test/test_helper.rb",
|
94
|
+
"test/worker_test.rb"
|
95
|
+
]
|
96
|
+
s.homepage = "http://github.com/nulogy/hydra"
|
97
|
+
s.require_paths = ["lib"]
|
98
|
+
s.rubygems_version = "1.8.10"
|
99
|
+
s.summary = "Distributed testing toolkit"
|
100
|
+
|
101
|
+
if s.respond_to? :specification_version then
|
102
|
+
s.specification_version = 3
|
103
|
+
|
104
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
105
|
+
s.add_development_dependency(%q<shoulda>, ["= 2.10.3"])
|
106
|
+
s.add_development_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
|
107
|
+
s.add_development_dependency(%q<cucumber>, ["= 0.9.2"])
|
108
|
+
s.add_development_dependency(%q<therubyracer>, ["= 0.7.4"])
|
109
|
+
else
|
110
|
+
s.add_dependency(%q<shoulda>, ["= 2.10.3"])
|
111
|
+
s.add_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
|
112
|
+
s.add_dependency(%q<cucumber>, ["= 0.9.2"])
|
113
|
+
s.add_dependency(%q<therubyracer>, ["= 0.7.4"])
|
114
|
+
end
|
115
|
+
else
|
116
|
+
s.add_dependency(%q<shoulda>, ["= 2.10.3"])
|
117
|
+
s.add_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
|
118
|
+
s.add_dependency(%q<cucumber>, ["= 0.9.2"])
|
119
|
+
s.add_dependency(%q<therubyracer>, ["= 0.7.4"])
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Given /^a target file$/ do
|
2
|
+
@target_file = File.expand_path(File.join(Dir.consistent_tmpdir, 'hydra_test.txt'))
|
3
|
+
end
|
4
|
+
|
5
|
+
Given /^an alternate target file$/ do
|
6
|
+
@target_file = File.expand_path(File.join(Dir.consistent_tmpdir, 'alternate_hydra_test.txt'))
|
7
|
+
end
|
8
|
+
|
9
|
+
When /^I write "([^\"]*)" to the file$/ do |text|
|
10
|
+
f = File.new(@target_file, 'w')
|
11
|
+
f.write text
|
12
|
+
f.flush
|
13
|
+
f.close
|
14
|
+
end
|
15
|
+
|
16
|
+
Then /^"([^\"]*)" should be written in the file$/ do |text|
|
17
|
+
f = File.new(@target_file, 'r')
|
18
|
+
raise 'Did not write to file' unless text == f.read
|
19
|
+
f.close
|
20
|
+
end
|
21
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module HydraExtension
|
2
|
+
module Listener
|
3
|
+
class WorkerBeganFlag < Hydra::Listener::Abstract
|
4
|
+
# Fired after runner processes have been started
|
5
|
+
def worker_begin(worker)
|
6
|
+
FileUtils.touch File.expand_path(File.join(Dir.consistent_tmpdir, 'worker_began_flag'))
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module HydraExtension
|
2
|
+
module RunnerListener
|
3
|
+
class RunnerBeginTest < Hydra::RunnerListener::Abstract
|
4
|
+
# Fired by the runner just before requesting the first file
|
5
|
+
def runner_begin( runner )
|
6
|
+
FileUtils.touch File.expand_path(File.join(Dir.consistent_tmpdir, 'alternate_hydra_test.txt'))
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
class RunnerEndTest < Hydra::RunnerListener::Abstract
|
11
|
+
# Fired by the runner just before requesting the first file
|
12
|
+
def runner_begin( runner )
|
13
|
+
FileUtils.touch File.expand_path(File.join(Dir.consistent_tmpdir, 'runner_began_flag')) #used to know when the runner is ready
|
14
|
+
end
|
15
|
+
# Fired by the runner just after stoping
|
16
|
+
def runner_end( runner )
|
17
|
+
# NOTE: do not use trace here
|
18
|
+
#runner.trace "Ending runner"
|
19
|
+
FileUtils.touch File.expand_path(File.join(Dir.consistent_tmpdir, 'alternate_hydra_test.txt'))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|