Class: Creategem::CLI
- Inherits:
-
Thor
- Object
- Thor
- Creategem::CLI
- Includes:
- Git, Thor::Actions
- Defined in:
- lib/creategem/cli.rb
Instance Attribute Summary collapse
-
#gem_name ⇒ Object
there has to be a method gem_name to use gem_name in the file names in the template directory: %gem_name%.
Class Method Summary collapse
-
.source_root ⇒ Object
this is where the thor generator templates are found.
Instance Method Summary collapse
Methods included from Git
#create_local_git_repository, #create_remote_git_repository, #gem_server_url, #git_repository_user_name
Instance Attribute Details
#gem_name ⇒ Object
there has to be a method gem_name to use gem_name in the file names in the template directory: %gem_name%
12 13 14 |
# File 'lib/creategem/cli.rb', line 12 def gem_name @gem_name end |
Class Method Details
.source_root ⇒ Object
this is where the thor generator templates are found
15 16 17 |
# File 'lib/creategem/cli.rb', line 15 def self.source_root File.('../../../templates', __FILE__) end |
Instance Method Details
#gem(gem_name) ⇒ Object
23 24 25 26 |
# File 'lib/creategem/cli.rb', line 23 def gem(gem_name) create_gem_scaffold(gem_name) initialize_repository(gem_name) end |
#plugin(gem_name) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/creategem/cli.rb', line 34 def plugin(gem_name) @plugin = true @engine = [:engine] || [:mountable] @mountable = [:mountable] create_gem_scaffold(gem_name) create_plugin_scaffold(gem_name) create_engine_scaffold(gem_name) if @engine create_mountable_scaffold(gem_name) if @mountable initialize_repository(gem_name) end |