Class: Structure::GrapevineSkeleton
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Structure::GrapevineSkeleton
- Includes:
- Thor::Actions
- Defined in:
- lib/grapevine/structure/grapevine_skeleton.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create_app ⇒ Object
- #create_db_structure ⇒ Object
- #create_spec_helper ⇒ Object
- #return_to_initial_path ⇒ Object
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/grapevine/structure/grapevine_skeleton.rb', line 7 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#create_app ⇒ Object
14 15 16 17 |
# File 'lib/grapevine/structure/grapevine_skeleton.rb', line 14 def create_app exist_directory! create_directory('grapevine_structure', app_directory) end |
#create_db_structure ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/grapevine/structure/grapevine_skeleton.rb', line 23 def create_db_structure unless withdb.empty? create_template('env.sample', '.env.sample') create_directory("#{templates_directory}/db", "#{app_directory}/db") create_db_structure_for(withdb) end end |
#create_spec_helper ⇒ Object
19 20 21 |
# File 'lib/grapevine/structure/grapevine_skeleton.rb', line 19 def create_spec_helper create_template('spec_helper.rb', 'spec/spec_helper.rb') end |
#return_to_initial_path ⇒ Object
33 34 35 36 |
# File 'lib/grapevine/structure/grapevine_skeleton.rb', line 33 def return_to_initial_path p "You can start developing #{app_directory} service ;)" p "Don't forget to configure your .env file" end |