Debian Codegraph @

Guardfile

raw
1 # A sample Guardfile
2 # More info at https://github.com/guard/guard#readme
3
4 guard 'rspec', :cmd => 'rspec -c' do
5 watch(%r{^spec/.+_spec\.rb$})
6 watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
7 watch('spec/spec_helper.rb') { "spec" }
8 end
9
10 guard 'livereload' do
11 watch('index.html')
12 end
13
14 guard 'cucumber' do
15 watch(%r{^features/.+\.feature$})
16 watch(%r{^features/support/.+$}) { 'features' }
17 end
18
19 guard :bundler do
20 require 'guard/bundler'
21 require 'guard/bundler/verify'
22 helper = Guard::Bundler::Verify.new
23
24 files = ['Gemfile']
25 files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
26
27 # Assume files are symlinked from somewhere
28 files.each { |file| watch(helper.real_path(file)) }
29 end