-
Notifications
You must be signed in to change notification settings - Fork 41
/
Guardfile
35 lines (30 loc) · 1.03 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
# Guard requires terminal-notifier-guard
# https://github.com/Codaisseur/terminal-notifier-guard
# TL;DR:
# $ brew install terminal-notifier-guard
notification :terminal_notifier, sticky: false, priority: 0 if `uname` =~ /Darwin/
logger level: :info
clearing :on
guard 'bundler' do
watch('Gemfile')
watch(/^.+\.gemspec/)
end
# NOTE: This Guardfile only watches unit specs.
# Automatically running the integration specs would repeatedly launch the
# simulator, stealing screen focus and making everyone cranky.
options =
{
cmd: 'bundle exec rspec',
spec_paths: ['spec/lib'],
failed_mode: :focus,
all_after_pass: true,
all_on_start: true
}
guard(:rspec, options) do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/run_loop/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('lib/run_loop.rb') { 'spec/lib' }
watch('spec/spec_helper.rb') { 'spec/lib' }
watch('spec/resources.rb') { 'spec/lib' }
watch('spec/resources/instruments_output') { 'spec/lib' }
end