forked from socketry/async-websocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuardfile
29 lines (23 loc) · 829 Bytes
/
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
group :development do
guard :falcon, port: 9292 do
watch('Gemfile.lock')
watch('config.ru')
watch(%r{^config|lib|pages/.*})
notification :off
end
end
group :test do
guard :rspec, cmd: 'rspec' do
# Notifications can get a bit tedious:
# notification :off
# Re-run specs if they are changed:
watch(%r{^spec/.+_spec\.rb$})
watch('spec/spec_helper.rb') {'spec'}
# Run relevent specs if files in `lib/` or `pages/` are changed:
watch(%r{^lib/(.+)\.rb$}) {|match| "spec/lib/#{match[1]}_spec.rb" }
watch(%r{^pages/(.+)\.(rb|xnode)$}) {|match| "spec/pages/#{match[1]}_spec.rb"}
watch(%r{^pages/(.+)controller\.rb$}) {|match| Dir.glob("spec/pages/#{match[1]}*_spec.rb")}
# If any files in pages changes, ensure the website still works:
watch(%r{^pages/.*}) {'spec/website_spec.rb'}
end
end