This repository has been archived by the owner on Apr 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guardfile
70 lines (59 loc) · 2.23 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
64
65
66
67
68
69
70
# More info at https://github.com/guard/guard#readme
notification :tmux,
:display_message => true,
:timeout => 5, # in seconds
:default_message_format => '%s >> %s',
# the first %s will show the title, the second the message
# Alternately you can also configure *success_message_format*,
# *pending_message_format*, *failed_message_format*
:line_separator => ' > ', # since we are single line we need a separator
:color_location => 'status-left-bg' # to customize which tmux element will change color
brakeman_opts = {
:output_file => 'tmp/donkey.html',
:run_on_start => true,
:min_confidence => 3,
:chatty => true
}
group :frontend do
guard :coffeescript, :output => 'public/javascripts/compiled' do
watch(%r{^app/coffeescripts/.+\.coffee$})
end
guard :bundler do
watch('Gemfile')
end
guard :livereload do
watch(%r{^app/.+\.(erb|haml)})
watch(%r{^app/helpers/.+\.rb})
watch(%r{^public/.+\.(css|js|html)})
watch(%r{^config/locales/.+\.yml})
end
end
group :backend do
end
guard 'spork' do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.*\.rb$})
watch(%r{^config/initializers/.*\.rb$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
watch('test/test_helper.rb') { :test_unit }
watch(%r{features/support/}) { :cucumber }
end
guard 'rspec' do
watch('spec/spec_helper.rb') { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
end
# guard 'brakeman', brakeman_opts do
# watch(%r{^app/.+\.(erb|haml|rhtml|rb)$})
# watch(%r{^config/.+\.rb$})
# watch(%r{^lib/.+\.rb$})
# watch('Gemfile')
# end