OSDN Git Service

Use 100% width for note edit form
[wvm/gitlab.git] / Guardfile
1 # A sample Guardfile
2 # More info at https://github.com/guard/guard#readme
3
4 guard 'rspec', :version => 2, :all_on_start => false, :all_after_pass => false do
5   watch(%r{^spec/.+_spec\.rb$})
6   watch(%r{^lib/(.+)\.rb$})     { |m| "spec/lib/#{m[1]}_spec.rb" }
7   watch(%r{^lib/api/(.+)\.rb$})     { |m| "spec/requests/api/#{m[1]}_spec.rb" }
8   watch('spec/spec_helper.rb')  { "spec" }
9
10   # Rails example
11   watch(%r{^app/(.+)\.rb$})                           { |m| "spec/#{m[1]}_spec.rb" }
12   watch(%r{^app/(.*)(\.erb|\.haml)$})                 { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
13   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"] }
14   watch(%r{^spec/support/(.+)\.rb$})                  { "spec" }
15   watch('config/routes.rb')                           { "spec/routing" }
16   watch('app/controllers/application_controller.rb')  { "spec/controllers" }
17
18   # Capybara request specs
19   watch(%r{^app/views/(.+)/.*\.(erb|haml)$})          { |m| "spec/requests/#{m[1]}_spec.rb" }
20 end
21
22 guard 'spinach' do
23   watch(%r|^features/(.*)\.feature|)
24   watch(%r|^features/steps/(.*)([^/]+)\.rb|) do |m|
25     "features/#{m[1]}#{m[2]}.feature"
26   end
27 end