Class: KnifeTable::TableSet
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- KnifeTable::TableSet
- Includes:
- Helpers
- Defined in:
- lib/chef/knife/table_set.rb
Instance Method Summary collapse
Methods included from Helpers
#cookbook_path, #discover_changed, #git
Instance Method Details
#run ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/chef/knife/table_set.rb', line 30 def run ui.msg ui.highline.color("#{' ' * 10}** Knife Table: New place setting **", [HighLine::GREEN, HighLine::BOLD]) if(name_args.empty?) ui.fatal "Feature description must be provided" exit 1 end check_current_branch! check_up_to_date! branch_name = "#{config[:branch_prefix]}#{name_args.join('_').downcase}" check_branch_conflict!(branch_name) ui.highline.say "Creating new work branch (#{branch_name}): " git.branch(branch_name).create ui.highline.say "done" git.checkout(branch_name) unless(@cookbooks.empty?) bumper = KnifeSpork::SporkBump.new @cookbooks.each do |cookbook| bumper.patch(cookbook_path, cookbook, config[:bump_type]) end end end |