-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGuardfile
63 lines (50 loc) · 2.06 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
require 'rbconfig'
WINDOWS = RbConfig::CONFIG['host_os'] =~ /msdos|mswin|win32|mingw/i unless defined?(WINDOWS)
notification :on
# @examples
#
# guard --group specs
# guard --group features
#
group :rspec do
guard 'rspec',
:all_after_pass => false,
:all_on_start => false,
#:cli => '--color --format nested --fail-fast',
:cli => '--color --format nested',
:version => 2 do
watch(%r{^spec/.+_spec\.rb$})
watch('spec/spec_helper.rb') { "spec" }
# ex: lib/app_name/views.rb -> spec/app_name/views_spec.rb
watch(%r{^lib/(.+)/(.+)\.rb$}) { |m| "spec/#{m[1]}/#{m[2]}_spec.rb" }
# ex: lib/app_name/views/view_helper.rb -> spec/app_name/views/view_helper_spec.rb
watch(%r{^lib/(.+)/(.+)/(.+)\.rb$}) { |m| "spec/#{m[1]}/#{m[2]}/#{m[3]}_spec.rb" }
end
end
group :cucumber do
opts = []
opts << ["--color"]
opts << ["--format pretty"]
opts << ["--strict"]
opts << ["-r features"]
opts << ["--no-profile"]
#opts << ["--tags @focus"]
opts << ["--tags ~@wip"]
opts << ["--tags ~@windows"] unless WINDOWS
opts << ["--tags ~@posix"] if WINDOWS
guard 'cucumber',
:cli => opts.join(" "),
:all_after_pass => false,
:all_on_start => false do
watch(%r{^features/.+\.feature$})
# actions
watch(%r{^lib/repoman/actions/(.+)_action.rb$}) { |m| "features/actions/#{m[1]}.feature" }
# assets
watch(%r{^lib/basic_app/assets/.+_asset.rb$}) { |m| "features/assets/configuration.feature features/assets/rendering.feature" }
watch(%r{^lib/basic_app/assets/asset_configuration.rb$}) { |m| "features/assets/configuration.feature" }
watch(%r{^lib/basic_app/assets/asset_accessors.rb$}) { |m| "features/assets/user_attributes.feature" }
# tasks
watch(%r{^lib/repoman/tasks/(.+)/(.+).rb$}) { |m| "features/tasks/#{m[1]}/#{m[2]}.feature" }
watch(%r{^lib/repoman/tasks/task_manager.rb$}) { "features/actions/ph.feature" }
end
end