also write to guardfile

This commit is contained in:
John Bintz 2012-06-04 15:13:03 -04:00
parent 7c843ee688
commit 5c0f40a01c
1 changed files with 18 additions and 0 deletions

View File

@ -15,6 +15,24 @@ module CukePack
directory '.', '.' directory '.', '.'
end end
desc "wip-guard", "Add the WIP guard to your Guardfile"
def wip_guard
FileUtils.touch 'Guardfile'
append_file 'Guardfile', <<-RB
# added by cuke-pack
group :wip do
guard 'cucumber', :env => :cucumber, :cli => '-p wip' do
watch(%r{^features/.+\.feature$})
watch(%r{^(app|lib).*}) { 'features' }
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)\.rb$}) { 'features' }
end
end
RB
end
default_task :install default_task :install
end end
end end