specjour 0.3.0.rc6 → 0.3.0.rc7
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 +10 -0
- data/VERSION +1 -1
- data/lib/specjour/dispatcher.rb +5 -10
- data/lib/specjour/worker.rb +8 -5
- data/lib/specjour.rb +1 -1
- data/specjour.gemspec +2 -2
- metadata +3 -12
data/History.markdown
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
History
|
2
2
|
=======
|
3
3
|
|
4
|
+
## 0.3.0.rc7 / 2010-08-09
|
5
|
+
|
6
|
+
* [fixed] Distributing absolute paths to remote machines.
|
7
|
+
|
8
|
+
* [added] Workers print the elapsed time of each test (redsquirrel)
|
9
|
+
* [added] Dispatcher loads specjour/hooks.rb, useful for monkey patching
|
10
|
+
(redsquirrel)
|
11
|
+
|
12
|
+
* [changed] Decreased timeout to 2 seconds when searching for remote managers
|
13
|
+
|
4
14
|
## 0.3.0.rc6 / 2010-08-07
|
5
15
|
|
6
16
|
* [fixed] Ruby 1.9.2 support through minor changes and DNSSD upgrade
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.0.
|
1
|
+
0.3.0.rc7
|
data/lib/specjour/dispatcher.rb
CHANGED
@@ -8,6 +8,7 @@ module Specjour
|
|
8
8
|
attr_accessor :worker_size, :project_path
|
9
9
|
|
10
10
|
def initialize(options = {})
|
11
|
+
Specjour.load_custom_hooks
|
11
12
|
@options = options
|
12
13
|
@project_path = File.expand_path options[:project_path]
|
13
14
|
@worker_size = 0
|
@@ -33,22 +34,16 @@ module Specjour
|
|
33
34
|
self.project_path = $1
|
34
35
|
@all_tests = $3 == 'spec' ? all_specs($2) : all_features($2)
|
35
36
|
else
|
36
|
-
@all_tests =
|
37
|
+
@all_tests = all_specs | all_features
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
40
41
|
def all_specs(tests_path = 'spec')
|
41
|
-
|
42
|
-
if File.exists? full_path
|
43
|
-
Dir[File.join(full_path, "**/*_spec.rb")].sort
|
44
|
-
end
|
42
|
+
Dir[File.join(".", tests_path, "**/*_spec.rb")].sort
|
45
43
|
end
|
46
44
|
|
47
45
|
def all_features(tests_path = 'features')
|
48
|
-
|
49
|
-
if File.exists? full_path
|
50
|
-
Dir[File.join(full_path, "**/*.feature")].sort
|
51
|
-
end
|
46
|
+
Dir[File.join(".", tests_path, "**/*.feature")].sort
|
52
47
|
end
|
53
48
|
|
54
49
|
def add_manager(manager)
|
@@ -112,7 +107,7 @@ module Specjour
|
|
112
107
|
|
113
108
|
def gather_remote_managers
|
114
109
|
browser = DNSSD::Service.new
|
115
|
-
Timeout.timeout(
|
110
|
+
Timeout.timeout(2) do
|
116
111
|
browser.browse '_druby._tcp' do |reply|
|
117
112
|
if reply.flags.add?
|
118
113
|
resolve_reply(reply)
|
data/lib/specjour/worker.rb
CHANGED
@@ -38,9 +38,9 @@ module Specjour
|
|
38
38
|
run_times = Hash.new(0)
|
39
39
|
|
40
40
|
while test = connection.next_test
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
print_status(test)
|
42
|
+
time = Benchmark.realtime { run_test test }
|
43
|
+
print_time_for(test, time)
|
44
44
|
run_times[test_type(test)] += time
|
45
45
|
end
|
46
46
|
|
@@ -76,12 +76,15 @@ module Specjour
|
|
76
76
|
|
77
77
|
def print_status(test)
|
78
78
|
status = "[#{ENV['TEST_ENV_NUMBER']}] Running #{test}"
|
79
|
-
|
79
|
+
Specjour.logger.debug status
|
80
80
|
$PROGRAM_NAME = "specjour#{status}"
|
81
81
|
end
|
82
82
|
|
83
|
+
def print_time_for(test, time)
|
84
|
+
printf "[#{ENV['TEST_ENV_NUMBER']}] Finished #{test} in %.4f\n", time
|
85
|
+
end
|
86
|
+
|
83
87
|
def run_test(test)
|
84
|
-
print_status(test)
|
85
88
|
if test_type(test) == :cucumber
|
86
89
|
run_feature test
|
87
90
|
else
|
data/lib/specjour.rb
CHANGED
data/specjour.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{specjour}
|
8
|
-
s.version = "0.3.0.
|
8
|
+
s.version = "0.3.0.rc7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Sandro Turriate"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-09}
|
13
13
|
s.default_executable = %q{specjour}
|
14
14
|
s.description = %q{Distribute your spec suite amongst your LAN via Bonjour.}
|
15
15
|
s.email = %q{sandro.turriate@gmail.com}
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specjour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 977940563
|
5
4
|
prerelease: true
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 3
|
9
8
|
- 0
|
10
|
-
-
|
11
|
-
version: 0.3.0.
|
9
|
+
- rc7
|
10
|
+
version: 0.3.0.rc7
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Sandro Turriate
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-09 00:00:00 -04:00
|
20
19
|
default_executable: specjour
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
@@ -27,7 +26,6 @@ dependencies:
|
|
27
26
|
requirements:
|
28
27
|
- - "="
|
29
28
|
- !ruby/object:Gem::Version
|
30
|
-
hash: 19
|
31
29
|
segments:
|
32
30
|
- 1
|
33
31
|
- 3
|
@@ -43,7 +41,6 @@ dependencies:
|
|
43
41
|
requirements:
|
44
42
|
- - ">="
|
45
43
|
- !ruby/object:Gem::Version
|
46
|
-
hash: 39
|
47
44
|
segments:
|
48
45
|
- 0
|
49
46
|
- 14
|
@@ -59,7 +56,6 @@ dependencies:
|
|
59
56
|
requirements:
|
60
57
|
- - "="
|
61
58
|
- !ruby/object:Gem::Version
|
62
|
-
hash: 27
|
63
59
|
segments:
|
64
60
|
- 1
|
65
61
|
- 3
|
@@ -75,7 +71,6 @@ dependencies:
|
|
75
71
|
requirements:
|
76
72
|
- - ">="
|
77
73
|
- !ruby/object:Gem::Version
|
78
|
-
hash: 33
|
79
74
|
segments:
|
80
75
|
- 0
|
81
76
|
- 10
|
@@ -91,7 +86,6 @@ dependencies:
|
|
91
86
|
requirements:
|
92
87
|
- - ">="
|
93
88
|
- !ruby/object:Gem::Version
|
94
|
-
hash: 13
|
95
89
|
segments:
|
96
90
|
- 0
|
97
91
|
- 5
|
@@ -107,7 +101,6 @@ dependencies:
|
|
107
101
|
requirements:
|
108
102
|
- - ">="
|
109
103
|
- !ruby/object:Gem::Version
|
110
|
-
hash: 7
|
111
104
|
segments:
|
112
105
|
- 1
|
113
106
|
- 4
|
@@ -187,7 +180,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
180
|
requirements:
|
188
181
|
- - ">="
|
189
182
|
- !ruby/object:Gem::Version
|
190
|
-
hash: 3
|
191
183
|
segments:
|
192
184
|
- 0
|
193
185
|
version: "0"
|
@@ -196,7 +188,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
188
|
requirements:
|
197
189
|
- - ">"
|
198
190
|
- !ruby/object:Gem::Version
|
199
|
-
hash: 25
|
200
191
|
segments:
|
201
192
|
- 1
|
202
193
|
- 3
|