guard-jasmine 1.9.3 → 1.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/guard/jasmine.rb +2 -2
- data/lib/guard/jasmine/cli.rb +5 -3
- data/lib/guard/jasmine/runner.rb +3 -3
- data/lib/guard/jasmine/version.rb +1 -1
- metadata +3 -6
data/README.md
CHANGED
@@ -359,8 +359,8 @@ The server options configures the server environment that is needed to run Guard
|
|
359
359
|
:phantomjs_bin => '~/bin/phantomjs' # Path to phantomjs.
|
360
360
|
# default: auto-detect 'phantomjs'
|
361
361
|
|
362
|
-
:timeout =>
|
363
|
-
# default:
|
362
|
+
:timeout => 20 # The time in seconds to wait for the spec runner to finish.
|
363
|
+
# default: 10
|
364
364
|
|
365
365
|
:rackup_config => 'spec/dummy/config.ru' # Path to rackup config file (i.e. for webrick, mongrel, thin, unicorn).
|
366
366
|
# default: ./config.ru
|
data/lib/guard/jasmine.rb
CHANGED
@@ -27,7 +27,7 @@ module Guard
|
|
27
27
|
:port => 8888,
|
28
28
|
:rackup_config => nil,
|
29
29
|
:jasmine_url => 'http://localhost:8888/jasmine',
|
30
|
-
:timeout =>
|
30
|
+
:timeout => 10,
|
31
31
|
:spec_dir => 'spec/javascripts',
|
32
32
|
:notification => true,
|
33
33
|
:hide_success => false,
|
@@ -53,7 +53,7 @@ module Guard
|
|
53
53
|
# @option options [String] :rackup_config custom rackup config to use
|
54
54
|
# @option options [String] :jasmine_url the url of the Jasmine test runner
|
55
55
|
# @option options [String] :phantomjs_bin the location of the PhantomJS binary
|
56
|
-
# @option options [Integer] :timeout the maximum time in
|
56
|
+
# @option options [Integer] :timeout the maximum time in seconds to wait for the spec runner to finish
|
57
57
|
# @option options [String] :spec_dir the directory with the Jasmine specs
|
58
58
|
# @option options [Boolean] :notification show notifications
|
59
59
|
# @option options [Boolean] :hide_success hide success message notification
|
data/lib/guard/jasmine/cli.rb
CHANGED
@@ -70,8 +70,8 @@ module Guard
|
|
70
70
|
method_option :timeout,
|
71
71
|
:type => :numeric,
|
72
72
|
:aliases => '-t',
|
73
|
-
:default =>
|
74
|
-
:desc => 'The maximum time in
|
73
|
+
:default => 10,
|
74
|
+
:desc => 'The maximum time in seconds to wait for the spec runner to finish'
|
75
75
|
|
76
76
|
method_option :console,
|
77
77
|
:type => :string,
|
@@ -123,7 +123,9 @@ module Guard
|
|
123
123
|
runner_options[:max_error_notify] = 0
|
124
124
|
|
125
125
|
if CLI.phantomjs_bin_valid?(runner_options[:phantomjs_bin])
|
126
|
-
|
126
|
+
catch(:task_has_failed) do
|
127
|
+
::Guard::Jasmine::Server.start(runner_options) unless runner_options[:server] == :none
|
128
|
+
end
|
127
129
|
|
128
130
|
if CLI.runner_available?(runner_options)
|
129
131
|
result = ::Guard::Jasmine::Runner.run(paths, runner_options)
|
data/lib/guard/jasmine/runner.rb
CHANGED
@@ -18,7 +18,7 @@ module Guard
|
|
18
18
|
# @param [Hash] options the options for the execution
|
19
19
|
# @option options [String] :jasmine_url the url of the Jasmine test runner
|
20
20
|
# @option options [String] :phantomjs_bin the location of the PhantomJS binary
|
21
|
-
# @option options [Integer] :timeout the maximum time in
|
21
|
+
# @option options [Integer] :timeout the maximum time in seconds to wait for the spec runner to finish
|
22
22
|
# @option options [String] :rackup_config custom rackup config to use
|
23
23
|
# @option options [Boolean] :notification show notifications
|
24
24
|
# @option options [Boolean] :hide_success hide success message notification
|
@@ -82,12 +82,12 @@ module Guard
|
|
82
82
|
#
|
83
83
|
# @param [String] path the path of the spec
|
84
84
|
# @param [Hash] options the options for the execution
|
85
|
-
# @option options [Integer] :timeout the maximum time in
|
85
|
+
# @option options [Integer] :timeout the maximum time in seconds to wait for the spec runner to finish
|
86
86
|
#
|
87
87
|
def run_jasmine_spec(file, options)
|
88
88
|
suite = jasmine_suite(file, options)
|
89
89
|
Formatter.info("Run Jasmine suite at #{ suite }")
|
90
|
-
IO.popen("#{ phantomjs_command(options) } \"#{ suite }\" #{ options[:timeout] } #{ options[:specdoc] } #{ options[:focus] } #{ options[:console] } #{ options[:errors] }", 'r:UTF-8')
|
90
|
+
IO.popen("#{ phantomjs_command(options) } \"#{ suite }\" #{ options[:timeout] * 1000 } #{ options[:specdoc] } #{ options[:focus] } #{ options[:console] } #{ options[:errors] }", 'r:UTF-8')
|
91
91
|
end
|
92
92
|
|
93
93
|
# Get the PhantomJS binary and script to execute.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-jasmine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
@@ -137,9 +137,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
137
|
- - ! '>='
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
|
-
segments:
|
141
|
-
- 0
|
142
|
-
hash: 1974588860096635221
|
143
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
141
|
none: false
|
145
142
|
requirements:
|
@@ -148,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
145
|
version: 1.3.6
|
149
146
|
requirements: []
|
150
147
|
rubyforge_project: guard-jasmine
|
151
|
-
rubygems_version: 1.8.
|
148
|
+
rubygems_version: 1.8.23
|
152
149
|
signing_key:
|
153
150
|
specification_version: 3
|
154
151
|
summary: Guard gem for headless testing with Jasmine
|