42 lines
845 B
Ruby
Executable File
42 lines
845 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
require 'thor'
|
|
|
|
module CukePack
|
|
class CLI < Thor
|
|
include Thor::Actions
|
|
|
|
def self.source_root
|
|
File.expand_path('../../skel', __FILE__)
|
|
end
|
|
|
|
desc "install", "Install CukePack into the current directory"
|
|
def install
|
|
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
|
|
|
|
CukePack::CLI.start
|
|
|