-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guardfile
32 lines (24 loc) · 931 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
30
31
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
# Add files and commands to this file, like the example:
# watch(%r{file/path}) { `command(s)` }
#
require 'blinky_tape_test_status/guard'
notification :file, :path => '.guard_result'
guard :shell do
watch('.guard_result') { @blinky_tape.set_status! }
callback(:start_begin) {
@blinky_tape = BlinkyTapeTestStatus::Guard.new :filename => File.expand_path('.guard_result')
@blinky_tape.rainbow!
}
callback(:reload_begin) { @blinky_tape.rainbow! }
callback(:stop_begin) { @blinky_tape.shutdown! }
end
guard :rspec do
watch(%r{^spec/.+_spec\.rb$})
watch('spec/spec_helper.rb') { "spec" }
callback(:run_all_begin) { @blinky_tape.pulse! }
callback(:run_all_end) { @blinky_tape.set_status! }
callback(:run_on_modifications_begin) { @blinky_tape.flash! }
callback(:run_on_modifications_end) { @blinky_tape.set_status! }
end