guard-rspec 2.3.3 → 2.4.0
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/LICENSE +2 -2
- data/README.md +13 -1
- data/lib/guard/rspec/runner.rb +23 -2
- data/lib/guard/rspec/version.rb +1 -1
- metadata +5 -2
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2010-
|
1
|
+
Copyright (c) 2010-2013 Thibaud Guillaume-Gentil
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
17
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
19
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -101,7 +101,12 @@ guard 'rspec', :turnip => true do
|
|
101
101
|
# ...
|
102
102
|
end
|
103
103
|
```
|
104
|
-
|
104
|
+
[Spring](https://github.com/jonleighton/spring) is supported (Ruby 1.9.X / Rails 3.2+ only), but you must enable it:
|
105
|
+
``` ruby
|
106
|
+
guard 'rspec', :spring => true do
|
107
|
+
# ...
|
108
|
+
end
|
109
|
+
```
|
105
110
|
|
106
111
|
Former `:color`, `:drb`, `:fail_fast` and `:formatter` options are deprecated and have no effect anymore.
|
107
112
|
|
@@ -118,6 +123,7 @@ Former `:color`, `:drb`, `:fail_fast` and `:formatter` options are deprecated an
|
|
118
123
|
:keep_failed => false # keep failed specs until they pass, default: true
|
119
124
|
:run_all => { :cli => "-p" } # cli arguments to use when running all specs, default: same as :cli
|
120
125
|
:spec_paths => ["spec"] # specify an array of paths that contain spec files
|
126
|
+
:spring => true # enable spring support; default: false
|
121
127
|
:turnip => true # enable turnip support; default: false
|
122
128
|
:zeus => true # enable zeus support; default: false
|
123
129
|
:focus_on_failed => false # focus on the first 10 failed specs first, rerun till they pass
|
@@ -201,3 +207,9 @@ Author
|
|
201
207
|
------
|
202
208
|
|
203
209
|
[Thibaud Guillaume-Gentil](https://github.com/thibaudgg)
|
210
|
+
|
211
|
+
Contributors
|
212
|
+
------------
|
213
|
+
|
214
|
+
[https://github.com/guard/guard-rspec/contributors](https://github.com/guard/guard-rspec/contributors)
|
215
|
+
|
data/lib/guard/rspec/runner.rb
CHANGED
@@ -17,6 +17,7 @@ module Guard
|
|
17
17
|
:cli => nil,
|
18
18
|
:env => nil,
|
19
19
|
:notification => true,
|
20
|
+
:spring => false,
|
20
21
|
:turnip => false,
|
21
22
|
:zeus => false
|
22
23
|
}.merge(options)
|
@@ -40,7 +41,7 @@ module Guard
|
|
40
41
|
end
|
41
42
|
|
42
43
|
def rspec_executable
|
43
|
-
@rspec_executable ||= binstubs? ? "#{binstubs}/rspec" : "rspec"
|
44
|
+
@rspec_executable ||= (binstubs? && !executable_prefix?) ? "#{binstubs}/rspec" : "rspec"
|
44
45
|
end
|
45
46
|
|
46
47
|
def failure_exit_code_supported?
|
@@ -92,7 +93,7 @@ module Guard
|
|
92
93
|
cmd_parts << environment_variables
|
93
94
|
cmd_parts << "rvm #{@options[:rvm].join(',')} exec" if @options[:rvm].respond_to?(:join)
|
94
95
|
cmd_parts << "bundle exec" if bundle_exec?
|
95
|
-
cmd_parts <<
|
96
|
+
cmd_parts << executable_prefix if executable_prefix?
|
96
97
|
cmd_parts << rspec_executable
|
97
98
|
cmd_parts << rspec_arguments(paths, options)
|
98
99
|
cmd_parts.compact.join(' ')
|
@@ -171,10 +172,30 @@ module Guard
|
|
171
172
|
@binstubs ||= !!@options[:binstubs]
|
172
173
|
end
|
173
174
|
|
175
|
+
def executable_prefix?
|
176
|
+
zeus? || spring?
|
177
|
+
end
|
178
|
+
|
179
|
+
def executable_prefix
|
180
|
+
prefix = binstubs? ? "#{binstubs}/" : ''
|
181
|
+
if zeus?
|
182
|
+
prefix << 'zeus'
|
183
|
+
elsif spring?
|
184
|
+
prefix << 'spring'
|
185
|
+
else
|
186
|
+
prefix = nil
|
187
|
+
end
|
188
|
+
return prefix
|
189
|
+
end
|
190
|
+
|
174
191
|
def zeus?
|
175
192
|
@options[:zeus] || false
|
176
193
|
end
|
177
194
|
|
195
|
+
def spring?
|
196
|
+
@options[:spring] || false
|
197
|
+
end
|
198
|
+
|
178
199
|
def binstubs
|
179
200
|
@options[:binstubs] == true ? "bin" : @options[:binstubs]
|
180
201
|
end
|
data/lib/guard/rspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
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:
|
12
|
+
date: 2013-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
@@ -86,6 +86,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
86
|
- - ! '>='
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
hash: 359439846919578835
|
89
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
93
|
none: false
|
91
94
|
requirements:
|