Class: Kitchen::Generator::Init
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Kitchen::Generator::Init
- Includes:
- Thor::Actions
- Defined in:
- lib/kitchen/generator/init.rb
Overview
A project initialization generator, to help prepare a cookbook project for testing with Kitchen.
Instance Method Summary collapse
Instance Method Details
#init ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/kitchen/generator/init.rb', line 52 def init self.class.source_root(Kitchen.source_root.join("templates", "init")) create_kitchen_yaml prepare_rakefile if init_rakefile? prepare_thorfile if init_thorfile? empty_directory "test/integration/default" if init_test_dir? if init_git? append_to_gitignore(".kitchen/") append_to_gitignore(".kitchen.local.yml") end prepare_gemfile if init_gemfile? add_drivers if @display_bundle_msg say "You must run `bundle install' to fetch any new gems.", :red end end |