Class: Gypsum::CLI
- Inherits:
-
Thor
- Object
- Thor
- Gypsum::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/gypsum/cli.rb
Instance Method Summary collapse
Instance Method Details
#new(project, template_name = "default") ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gypsum/cli.rb', line 16 def new( project , template_name = "default" ) # Require the template runner require "#{Gypsum::GEM_ROOT}/templates/#{template_name}/#{template_name}.rb" # Invoke the template runner invoke "gypsum:templates:#{template_name}:on_invocation" # Execute the template exec(" rails new \#{project} \\\n --template=\#{Gypsum::GEM_ROOT}/templates/\#{template_name}/bootstrap.rb \\\n --skip-test-unit \\\n --skip-prototype\n COMMAND\n\nend\n") |
#version ⇒ Object
35 36 37 |
# File 'lib/gypsum/cli.rb', line 35 def version say "Gypsum version #{Gypsum::VERSION}" end |