Class: Pulsar::InitCommand
- Inherits:
-
UtilsCommand
- Object
- Clamp::Command
- UtilsCommand
- Pulsar::InitCommand
- Defined in:
- lib/pulsar/commands/init.rb
Instance Method Summary collapse
Methods included from Options::Shared
Methods included from Helpers::Clamp
Methods included from Helpers::Path
#capfile_path, #config_app_defaults_path, #config_app_path, #config_app_recipes_path, #config_app_stage_recipes_path, #config_apps_path, #config_base_path, #config_path, #config_stage_path
Methods included from Helpers::Shell
Instance Method Details
#execute ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pulsar/commands/init.rb', line 5 def execute Bundler.with_clean_env do destination_path = File.(configuration_path) pulsar_cmd_path = File.(File.dirname(__FILE__)) init_repo_path = "#{pulsar_cmd_path}/../generators/init_repo" init_repo_path += "/*" if File.directory?(destination_path) run_cmd("cp -r #{init_repo_path} #{destination_path}", :verbose => verbose?) puts "Your starter configuration repo is in #{destination_path.yellow}." puts "Remember to run #{ "bundle install".red } to add the needed Gemfile.lock." end end |