specjour 0.2.3 → 0.2.4
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.markdown +7 -0
- data/VERSION +1 -1
- data/lib/specjour/connection.rb +17 -4
- data/lib/specjour/cucumber/final_report.rb +4 -0
- data/lib/specjour/dispatcher.rb +1 -0
- data/lib/specjour/printer.rb +12 -2
- data/lib/specjour/rspec/final_report.rb +4 -0
- data/lib/specjour/worker.rb +6 -12
- data/lib/specjour.rb +1 -1
- data/specjour.gemspec +101 -0
- metadata +4 -3
data/History.markdown
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.4
|
data/lib/specjour/connection.rb
CHANGED
|
@@ -39,11 +39,17 @@ module Specjour
|
|
|
39
39
|
raise Error, "Connection to dispatcher timed out"
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
def next_test
|
|
43
|
+
will_reconnect do
|
|
44
|
+
send_message(:ready)
|
|
45
|
+
load_object socket.gets(TERMINATOR)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
42
49
|
def print(arg)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
retry
|
|
50
|
+
will_reconnect do
|
|
51
|
+
socket.print dump_object(arg)
|
|
52
|
+
end
|
|
47
53
|
end
|
|
48
54
|
|
|
49
55
|
def puts(arg)
|
|
@@ -68,5 +74,12 @@ module Specjour
|
|
|
68
74
|
socket.close unless socket.closed?
|
|
69
75
|
connect
|
|
70
76
|
end
|
|
77
|
+
|
|
78
|
+
def will_reconnect(&block)
|
|
79
|
+
block.call
|
|
80
|
+
rescue SystemCallError => error
|
|
81
|
+
reconnect
|
|
82
|
+
retry
|
|
83
|
+
end
|
|
71
84
|
end
|
|
72
85
|
end
|
data/lib/specjour/dispatcher.rb
CHANGED
data/lib/specjour/printer.rb
CHANGED
|
@@ -33,14 +33,20 @@ module Specjour
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def ready(client)
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
synchronize do
|
|
37
|
+
client.print specs_to_run.shift
|
|
38
|
+
client.flush
|
|
39
|
+
end
|
|
38
40
|
end
|
|
39
41
|
|
|
40
42
|
def done(client)
|
|
41
43
|
self.completed_workers += 1
|
|
42
44
|
end
|
|
43
45
|
|
|
46
|
+
def exit_status
|
|
47
|
+
report.exit_status
|
|
48
|
+
end
|
|
49
|
+
|
|
44
50
|
def worker_summary=(client, summary)
|
|
45
51
|
report.add(summary)
|
|
46
52
|
end
|
|
@@ -83,6 +89,10 @@ module Specjour
|
|
|
83
89
|
end
|
|
84
90
|
end
|
|
85
91
|
|
|
92
|
+
def synchronize(&block)
|
|
93
|
+
@connectionsMutex.synchronize &block
|
|
94
|
+
end
|
|
95
|
+
|
|
86
96
|
def abandoned_worker_message
|
|
87
97
|
data = "* ERROR: NOT ALL WORKERS COMPLETED PROPERLY *"
|
|
88
98
|
filler = "*" * data.size
|
data/lib/specjour/worker.rb
CHANGED
|
@@ -22,22 +22,16 @@ module Specjour
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def run
|
|
25
|
-
connection.send_message(:ready)
|
|
26
25
|
run_time = 0
|
|
27
26
|
Dir.chdir(project_path)
|
|
28
|
-
while
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
run_time += Benchmark.realtime do
|
|
32
|
-
run_test test
|
|
33
|
-
end
|
|
34
|
-
connection.send_message(:ready)
|
|
35
|
-
else
|
|
36
|
-
connection.send_message(:worker_summary=, {:duration => sprintf("%6f", run_time)})
|
|
37
|
-
connection.send_message(:done)
|
|
38
|
-
connection.disconnect
|
|
27
|
+
while test = connection.next_test
|
|
28
|
+
run_time += Benchmark.realtime do
|
|
29
|
+
run_test test
|
|
39
30
|
end
|
|
40
31
|
end
|
|
32
|
+
connection.send_message(:worker_summary=, {:duration => sprintf("%6f", run_time)})
|
|
33
|
+
connection.send_message(:done)
|
|
34
|
+
connection.disconnect
|
|
41
35
|
end
|
|
42
36
|
|
|
43
37
|
protected
|
data/lib/specjour.rb
CHANGED
data/specjour.gemspec
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Generated by jeweler
|
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
|
4
|
+
# -*- encoding: utf-8 -*-
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |s|
|
|
7
|
+
s.name = %q{specjour}
|
|
8
|
+
s.version = "0.2.4"
|
|
9
|
+
|
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
|
+
s.authors = ["Sandro Turriate"]
|
|
12
|
+
s.date = %q{2010-05-10}
|
|
13
|
+
s.default_executable = %q{specjour}
|
|
14
|
+
s.description = %q{Distribute your spec suite amongst your LAN via Bonjour.}
|
|
15
|
+
s.email = %q{sandro.turriate@gmail.com}
|
|
16
|
+
s.executables = ["specjour"]
|
|
17
|
+
s.extra_rdoc_files = [
|
|
18
|
+
"README.markdown"
|
|
19
|
+
]
|
|
20
|
+
s.files = [
|
|
21
|
+
".dev",
|
|
22
|
+
".document",
|
|
23
|
+
".gitignore",
|
|
24
|
+
"History.markdown",
|
|
25
|
+
"MIT_LICENSE",
|
|
26
|
+
"README.markdown",
|
|
27
|
+
"Rakefile",
|
|
28
|
+
"VERSION",
|
|
29
|
+
"bin/specjour",
|
|
30
|
+
"lib/specjour.rb",
|
|
31
|
+
"lib/specjour/connection.rb",
|
|
32
|
+
"lib/specjour/cpu.rb",
|
|
33
|
+
"lib/specjour/cucumber.rb",
|
|
34
|
+
"lib/specjour/cucumber/dispatcher.rb",
|
|
35
|
+
"lib/specjour/cucumber/distributed_formatter.rb",
|
|
36
|
+
"lib/specjour/cucumber/final_report.rb",
|
|
37
|
+
"lib/specjour/cucumber/printer.rb",
|
|
38
|
+
"lib/specjour/db_scrub.rb",
|
|
39
|
+
"lib/specjour/dispatcher.rb",
|
|
40
|
+
"lib/specjour/manager.rb",
|
|
41
|
+
"lib/specjour/printer.rb",
|
|
42
|
+
"lib/specjour/protocol.rb",
|
|
43
|
+
"lib/specjour/rspec.rb",
|
|
44
|
+
"lib/specjour/rspec/distributed_formatter.rb",
|
|
45
|
+
"lib/specjour/rspec/final_report.rb",
|
|
46
|
+
"lib/specjour/rspec/marshalable_rspec_failure.rb",
|
|
47
|
+
"lib/specjour/rsync_daemon.rb",
|
|
48
|
+
"lib/specjour/socket_helpers.rb",
|
|
49
|
+
"lib/specjour/tasks/dispatch.rake",
|
|
50
|
+
"lib/specjour/tasks/specjour.rb",
|
|
51
|
+
"lib/specjour/worker.rb",
|
|
52
|
+
"rails/init.rb",
|
|
53
|
+
"spec/cpu_spec.rb",
|
|
54
|
+
"spec/lib/specjour/worker_spec.rb",
|
|
55
|
+
"spec/manager_spec.rb",
|
|
56
|
+
"spec/rsync_daemon_spec.rb",
|
|
57
|
+
"spec/spec.opts",
|
|
58
|
+
"spec/spec_helper.rb",
|
|
59
|
+
"spec/specjour_spec.rb",
|
|
60
|
+
"specjour.gemspec"
|
|
61
|
+
]
|
|
62
|
+
s.homepage = %q{http://github.com/sandro/specjour}
|
|
63
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
|
64
|
+
s.require_paths = ["lib"]
|
|
65
|
+
s.rubygems_version = %q{1.3.6}
|
|
66
|
+
s.summary = %q{Distribute your spec suite amongst your LAN via Bonjour.}
|
|
67
|
+
s.test_files = [
|
|
68
|
+
"spec/cpu_spec.rb",
|
|
69
|
+
"spec/lib/specjour/worker_spec.rb",
|
|
70
|
+
"spec/manager_spec.rb",
|
|
71
|
+
"spec/rsync_daemon_spec.rb",
|
|
72
|
+
"spec/spec_helper.rb",
|
|
73
|
+
"spec/specjour_spec.rb"
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
if s.respond_to? :specification_version then
|
|
77
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
78
|
+
s.specification_version = 3
|
|
79
|
+
|
|
80
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
81
|
+
s.add_runtime_dependency(%q<dnssd>, ["= 1.3.1"])
|
|
82
|
+
s.add_runtime_dependency(%q<rspec>, [">= 0"])
|
|
83
|
+
s.add_development_dependency(%q<rspec>, ["= 1.3.0"])
|
|
84
|
+
s.add_development_dependency(%q<rr>, ["= 0.10.11"])
|
|
85
|
+
s.add_development_dependency(%q<yard>, ["= 0.5.3"])
|
|
86
|
+
else
|
|
87
|
+
s.add_dependency(%q<dnssd>, ["= 1.3.1"])
|
|
88
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
|
89
|
+
s.add_dependency(%q<rspec>, ["= 1.3.0"])
|
|
90
|
+
s.add_dependency(%q<rr>, ["= 0.10.11"])
|
|
91
|
+
s.add_dependency(%q<yard>, ["= 0.5.3"])
|
|
92
|
+
end
|
|
93
|
+
else
|
|
94
|
+
s.add_dependency(%q<dnssd>, ["= 1.3.1"])
|
|
95
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
|
96
|
+
s.add_dependency(%q<rspec>, ["= 1.3.0"])
|
|
97
|
+
s.add_dependency(%q<rr>, ["= 0.10.11"])
|
|
98
|
+
s.add_dependency(%q<yard>, ["= 0.5.3"])
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 2
|
|
8
|
-
-
|
|
9
|
-
version: 0.2.
|
|
8
|
+
- 4
|
|
9
|
+
version: 0.2.4
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Sandro Turriate
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2010-
|
|
17
|
+
date: 2010-05-10 00:00:00 -04:00
|
|
18
18
|
default_executable: specjour
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
@@ -133,6 +133,7 @@ files:
|
|
|
133
133
|
- spec/spec.opts
|
|
134
134
|
- spec/spec_helper.rb
|
|
135
135
|
- spec/specjour_spec.rb
|
|
136
|
+
- specjour.gemspec
|
|
136
137
|
has_rdoc: true
|
|
137
138
|
homepage: http://github.com/sandro/specjour
|
|
138
139
|
licenses: []
|