-
Notifications
You must be signed in to change notification settings - Fork 1
/
Guardfile
37 lines (33 loc) · 1.17 KB
/
Guardfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
group :backend do
guard :rspec, bundler: false do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
# Capybara request specs
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/integration/#{m[1]}_spec.rb" }
end
end
group :frontend do
guard :pow do
watch('.powrc')
watch('.powenv')
watch('.rvmrc')
watch('config.ru')
watch('Gemfile')
watch('Gemfile.lock')
# watch('config/application.rb')
watch(%r{app/views/.+})
watch(%r{app/helpers/.+})
watch(%r{spec/internal/app/.+})
end
guard :livereload, host: 'sublime-video-layout.dev' do
watch(%r{(app|spec/internal/app)/views/.+\.(erb|haml|slim)})
watch(%r{(app|spec/internal/app)/helpers/.+\.rb})
watch(%r{spec/internal/public/.+\.(css|js|html)})
# Rails Assets Pipeline
watch(%r{(app|vendor)/assets/\w+/(.+\.(css|js|html)).*}) { |m| "/assets/#{m[2]}" }
end
end