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(" rails new \#{app_path} \\\n --template=\#{Horsee::GEM_ROOT}/bootstrap/\#{template_name}/templates/bootstrap.rb \\\n --database=mysql \\\n --javascript=jquery \\\n --skip-test-unit \\\n --skip-bundle\n COMMAND\nend\n") |
#version ⇒ Object
12 13 14 |
# File 'lib/horsee/cli.rb', line 12 def version say "Horsee version #{Horsee::VERSION}" end |