diff --git a/bin/cuke-pack b/bin/cuke-pack index d634769..ebf0e10 100755 --- a/bin/cuke-pack +++ b/bin/cuke-pack @@ -15,6 +15,24 @@ module CukePack directory '.', '.' 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 end end