Class: Horsee::CLI
- Inherits:
-
Thor
- Object
- Thor
- Horsee::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/horsee/cli.rb
Instance Method Summary collapse
Instance Method Details
#new(app_path, template_name = "default") ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/horsee/cli.rb', line 20 def new(app_path, template_name = "default") # Require the template require "#{Horsee::GEM_ROOT}/bootstrap/#{template_name}/#{template_name}.rb" # Invoke the template invoke "horsee:bootstrap:#{template_name}:on_invocation" # Execute the template exec(<<-COMMAND) rails new #{app_path} \ --template=#{Horsee::GEM_ROOT}/bootstrap/#{template_name}/templates/bootstrap.rb \ --database=mysql \ --javascript=jquery \ --skip-test-unit \ --skip-bundle COMMAND end |