Class: AutomationWizard::Generators::Project
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- AutomationWizard::Generators::Project
- Includes:
- Thor::Actions
- Defined in:
- lib/automation_wizard/generators/project.rb
Class Method Summary collapse
Instance Method Summary collapse
- #copy_gemfile ⇒ Object
- #copy_models ⇒ Object
- #copy_pages ⇒ Object
- #copy_rakefile ⇒ Object
- #copy_readme ⇒ Object
- #copy_rspec ⇒ Object
- #copy_specs ⇒ Object
- #create_project_structure ⇒ Object
Class Method Details
.source_root ⇒ Object
13 14 15 |
# File 'lib/automation_wizard/generators/project.rb', line 13 def self.source_root File.dirname(__FILE__) + '/project' end |
Instance Method Details
#copy_gemfile ⇒ Object
29 30 31 |
# File 'lib/automation_wizard/generators/project.rb', line 29 def copy_gemfile template 'Gemfile', "#{name}/Gemfile" end |
#copy_models ⇒ Object
50 51 52 |
# File 'lib/automation_wizard/generators/project.rb', line 50 def copy_models template 'model_loblaws_search.rb.tt', "#{name}/lib/models/model_loblaws_search.rb" end |
#copy_pages ⇒ Object
46 47 48 |
# File 'lib/automation_wizard/generators/project.rb', line 46 def copy_pages template 'loblaws_home.rb.tt', "#{name}/lib/pages/loblaws_home.rb" end |
#copy_rakefile ⇒ Object
33 34 35 |
# File 'lib/automation_wizard/generators/project.rb', line 33 def copy_rakefile copy_file 'Rakefile', "#{name}/Rakefile" end |
#copy_readme ⇒ Object
37 38 39 |
# File 'lib/automation_wizard/generators/project.rb', line 37 def copy_readme copy_file 'Readme.md.tt', "#{name}/README.md" end |
#copy_rspec ⇒ Object
25 26 27 |
# File 'lib/automation_wizard/generators/project.rb', line 25 def copy_rspec template '.rspec', "#{name}/.rspec" end |
#copy_specs ⇒ Object
41 42 43 44 |
# File 'lib/automation_wizard/generators/project.rb', line 41 def copy_specs copy_file 'spec_helper.rb', "#{name}/spec/spec_helper.rb" template 'loblaws_search_spec.rb.tt', "#{name}/spec/loblaws_search_spec.rb" end |
#create_project_structure ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/automation_wizard/generators/project.rb', line 17 def create_project_structure empty_directory(name) empty_directory("#{name}/spec") empty_directory("#{name}/lib") empty_directory("#{name}/lib/models") empty_directory("#{name}/lib/pages") end |