Class: New
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- New
- Includes:
- Thor::Actions
- Defined in:
- lib/gemmy/new.rb
Overview
The New generator
Usage
gemmy new GEMNAME
Class Method Summary collapse
Instance Method Summary collapse
- #create_gemspec_file ⇒ Object
- #create_lib_files ⇒ Object
- #create_test_files ⇒ Object
- #work_out_options ⇒ Object
Class Method Details
.source_root ⇒ Object
11 12 13 |
# File 'lib/gemmy/new.rb', line 11 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#create_gemspec_file ⇒ Object
29 30 31 |
# File 'lib/gemmy/new.rb', line 29 def create_gemspec_file template("templates/gemspec.tt", "#{name}/#{name}.gemspec") end |
#create_lib_files ⇒ Object
20 21 22 23 |
# File 'lib/gemmy/new.rb', line 20 def create_lib_files template("templates/newgem.tt", "#{name}/lib/#{name}.rb") empty_directory "#{name}/lib/#{name}" end |
#create_test_files ⇒ Object
25 26 27 |
# File 'lib/gemmy/new.rb', line 25 def create_test_files template("templates/spec_helper.tt", "#{name}/spec/spec_helper.rb") end |
#work_out_options ⇒ Object
15 16 17 18 |
# File 'lib/gemmy/new.rb', line 15 def @using_executables = yes? "Are you using using executables in your project" @using_rspec = true end |