hydra 0.22.2 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/hydra.gemspec +5 -5
- data/lib/hydra/runner.rb +17 -11
- data/test/runner_test.rb +0 -3
- metadata +7 -7
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ begin
|
|
12
12
|
gem.authors = ["Nick Gauthier"]
|
13
13
|
gem.add_development_dependency "shoulda", "= 2.10.3"
|
14
14
|
gem.add_development_dependency "rspec", "= 2.0.0.beta.19"
|
15
|
-
gem.add_development_dependency "cucumber", "= 0.
|
15
|
+
gem.add_development_dependency "cucumber", "= 0.9.2"
|
16
16
|
gem.add_development_dependency "therubyracer", "= 0.7.4"
|
17
17
|
end
|
18
18
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.23.0
|
data/hydra.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{hydra}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.23.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nick Gauthier"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-10-22}
|
13
13
|
s.default_executable = %q{warmsnake.rb}
|
14
14
|
s.description = %q{Spread your tests over multiple machines to test your code faster.}
|
15
15
|
s.email = %q{nick@smartlogicsolutions.com}
|
@@ -114,18 +114,18 @@ Gem::Specification.new do |s|
|
|
114
114
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
115
115
|
s.add_development_dependency(%q<shoulda>, ["= 2.10.3"])
|
116
116
|
s.add_development_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
|
117
|
-
s.add_development_dependency(%q<cucumber>, ["= 0.
|
117
|
+
s.add_development_dependency(%q<cucumber>, ["= 0.9.2"])
|
118
118
|
s.add_development_dependency(%q<therubyracer>, ["= 0.7.4"])
|
119
119
|
else
|
120
120
|
s.add_dependency(%q<shoulda>, ["= 2.10.3"])
|
121
121
|
s.add_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
|
122
|
-
s.add_dependency(%q<cucumber>, ["= 0.
|
122
|
+
s.add_dependency(%q<cucumber>, ["= 0.9.2"])
|
123
123
|
s.add_dependency(%q<therubyracer>, ["= 0.7.4"])
|
124
124
|
end
|
125
125
|
else
|
126
126
|
s.add_dependency(%q<shoulda>, ["= 2.10.3"])
|
127
127
|
s.add_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
|
128
|
-
s.add_dependency(%q<cucumber>, ["= 0.
|
128
|
+
s.add_dependency(%q<cucumber>, ["= 0.9.2"])
|
129
129
|
s.add_dependency(%q<therubyracer>, ["= 0.7.4"])
|
130
130
|
end
|
131
131
|
end
|
data/lib/hydra/runner.rb
CHANGED
@@ -138,29 +138,35 @@ module Hydra #:nodoc:
|
|
138
138
|
dev_null = StringIO.new
|
139
139
|
hydra_response = StringIO.new
|
140
140
|
|
141
|
-
unless @
|
141
|
+
unless @cuke_runtime
|
142
142
|
require 'cucumber'
|
143
143
|
require 'hydra/cucumber/formatter'
|
144
|
-
|
144
|
+
Cucumber.logger.level = Logger::INFO
|
145
|
+
@cuke_runtime = Cucumber::Runtime.new
|
145
146
|
@cuke_configuration = Cucumber::Cli::Configuration.new(dev_null, dev_null)
|
146
147
|
@cuke_configuration.parse!(['features']+files)
|
147
148
|
|
148
|
-
|
149
|
-
@
|
150
|
-
|
151
|
-
|
152
|
-
@
|
149
|
+
support_code = Cucumber::Runtime::SupportCode.new(@cuke_runtime, @cuke_configuration.guess?)
|
150
|
+
support_code.load_files!(@cuke_configuration.support_to_load + @cuke_configuration.step_defs_to_load)
|
151
|
+
support_code.fire_hook(:after_configuration, @cuke_configuration)
|
152
|
+
# i don't like this, but there no access to set the instance of SupportCode in Runtime
|
153
|
+
@cuke_runtime.instance_variable_set('@support_code',support_code)
|
153
154
|
end
|
154
155
|
cuke_formatter = Cucumber::Formatter::Hydra.new(
|
155
|
-
@
|
156
|
+
@cuke_runtime, hydra_response, @cuke_configuration.options
|
156
157
|
)
|
157
158
|
|
158
159
|
cuke_runner ||= Cucumber::Ast::TreeWalker.new(
|
159
|
-
@
|
160
|
+
@cuke_runtime, [cuke_formatter], @cuke_configuration
|
160
161
|
)
|
161
|
-
@
|
162
|
+
@cuke_runtime.visitor = cuke_runner
|
162
163
|
|
163
|
-
|
164
|
+
loader = Cucumber::Runtime::FeaturesLoader.new(
|
165
|
+
files,
|
166
|
+
@cuke_configuration.filters,
|
167
|
+
@cuke_configuration.tag_expression
|
168
|
+
)
|
169
|
+
features = loader.features
|
164
170
|
tag_excess = tag_excess(features, @cuke_configuration.options[:tag_expression].limits)
|
165
171
|
@cuke_configuration.options[:tag_excess] = tag_excess
|
166
172
|
|
data/test/runner_test.rb
CHANGED
@@ -80,9 +80,6 @@ class RunnerTest < Test::Unit::TestCase
|
|
80
80
|
# we run this in a fork to not contaminate
|
81
81
|
# the main test environment
|
82
82
|
pid = Process.fork do
|
83
|
-
# need to get into the fixtures directory so cucumber doesn't load up the whole project
|
84
|
-
Dir.chdir(File.join(File.dirname(__FILE__), 'fixtures'))
|
85
|
-
|
86
83
|
runner = Hydra::Runner.new(:io => File.new('/dev/null', 'w'))
|
87
84
|
runner.run_file(cucumber_feature_file)
|
88
85
|
assert File.exists?(target_file)
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 23
|
8
|
+
- 0
|
9
|
+
version: 0.23.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nick Gauthier
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-10-22 00:00:00 -04:00
|
18
18
|
default_executable: warmsnake.rb
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -56,9 +56,9 @@ dependencies:
|
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
segments:
|
58
58
|
- 0
|
59
|
-
-
|
60
|
-
-
|
61
|
-
version: 0.
|
59
|
+
- 9
|
60
|
+
- 2
|
61
|
+
version: 0.9.2
|
62
62
|
type: :development
|
63
63
|
version_requirements: *id003
|
64
64
|
- !ruby/object:Gem::Dependency
|