Commit a1ba470e4e0ec5ebbcd47755122878df6d19ad0b
1 parent
b565f334
Exists in
master
and in
4 other branches
Added guard
Showing
3 changed files
with
44 additions
and
0 deletions
Show diff stats
Gemfile
Gemfile.lock
... | ... | @@ -186,6 +186,14 @@ GEM |
186 | 186 | multi_xml |
187 | 187 | rack |
188 | 188 | rack-mount |
189 | + guard (1.3.2) | |
190 | + listen (>= 0.4.2) | |
191 | + thor (>= 0.14.6) | |
192 | + guard-cucumber (1.2.0) | |
193 | + cucumber (>= 1.2.0) | |
194 | + guard (>= 1.1.0) | |
195 | + guard-rspec (1.2.1) | |
196 | + guard (>= 1.1) | |
189 | 197 | haml (3.1.6) |
190 | 198 | haml-rails (0.3.4) |
191 | 199 | actionpack (~> 3.0) |
... | ... | @@ -219,6 +227,7 @@ GEM |
219 | 227 | libv8 (3.3.10.4) |
220 | 228 | libwebsocket (0.1.3) |
221 | 229 | addressable |
230 | + listen (0.5.0) | |
222 | 231 | mail (2.4.4) |
223 | 232 | i18n (>= 0.4.0) |
224 | 233 | mime-types (~> 1.16) |
... | ... | @@ -403,6 +412,8 @@ DEPENDENCIES |
403 | 412 | grack! |
404 | 413 | grape (~> 0.2.1) |
405 | 414 | grit! |
415 | + guard-cucumber | |
416 | + guard-rspec | |
406 | 417 | haml-rails |
407 | 418 | headless |
408 | 419 | httparty | ... | ... |
... | ... | @@ -0,0 +1,30 @@ |
1 | +# A sample Guardfile | |
2 | +# More info at https://github.com/guard/guard#readme | |
3 | + | |
4 | +guard 'rspec', :version => 2 do | |
5 | + watch(%r{^spec/.+_spec\.rb$}) | |
6 | + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
7 | + watch('spec/spec_helper.rb') { "spec" } | |
8 | + | |
9 | + # Rails example | |
10 | + watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
11 | + watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | |
12 | + watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | |
13 | + watch(%r{^spec/support/(.+)\.rb$}) { "spec" } | |
14 | + watch('config/routes.rb') { "spec/routing" } | |
15 | + watch('app/controllers/application_controller.rb') { "spec/controllers" } | |
16 | + | |
17 | + # Capybara request specs | |
18 | + watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } | |
19 | + | |
20 | + # Turnip features and steps | |
21 | + watch(%r{^spec/acceptance/(.+)\.feature$}) | |
22 | + watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } | |
23 | +end | |
24 | + | |
25 | + | |
26 | +guard 'cucumber' do | |
27 | + watch(%r{^features/.+\.feature$}) | |
28 | + watch(%r{^features/support/.+$}) { 'features' } | |
29 | + watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' } | |
30 | +end | ... | ... |