Class: Pretest::Structure::Clone
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Pretest::Structure::Clone
- Includes:
- Thor::Actions
- Defined in:
- lib/pretest/structure/clone.rb
Class Method Summary collapse
Instance Method Summary collapse
- #app_installation_hook_clone ⇒ Object
- #app_life_cycle_hooks_clone ⇒ Object
- #cucumber_yml_clone ⇒ Object
- #dry_run_clone ⇒ Object
- #env_clone ⇒ Object
- #feature_clone ⇒ Object
- #first_launch_clone ⇒ Object
- #gemfile_clone ⇒ Object
- #hooks_clone ⇒ Object
- #page_clone ⇒ Object
- #step_definitions_clone ⇒ Object
- #structure_init ⇒ Object
Class Method Details
.source_root ⇒ Object
27 28 29 |
# File 'lib/pretest/structure/clone.rb', line 27 def self.source_root File.dirname(__FILE__) + '/clone' end |
Instance Method Details
#app_installation_hook_clone ⇒ Object
74 75 76 77 78 79 |
# File 'lib/pretest/structure/clone.rb', line 74 def app_installation_hook_clone if android == 'true' template 'app_installation_hook.rb.tt', "#{name}/features/support/app_installation_hook.rb" end end |
#app_life_cycle_hooks_clone ⇒ Object
67 68 69 70 71 72 |
# File 'lib/pretest/structure/clone.rb', line 67 def app_life_cycle_hooks_clone if android == 'true' template 'app_life_cycle_hooks.rb.tt', "#{name}/features/support/app_life_cycle_hooks.rb" end end |
#cucumber_yml_clone ⇒ Object
37 38 39 40 |
# File 'lib/pretest/structure/clone.rb', line 37 def cucumber_yml_clone template 'cucumber.yml.tt', "#{name}/cucumber.yml" end |
#dry_run_clone ⇒ Object
81 82 83 84 85 86 |
# File 'lib/pretest/structure/clone.rb', line 81 def dry_run_clone if ios == 'true' template 'dry_run.rb.tt', "#{name}/features/support/dry_run.rb" end end |
#env_clone ⇒ Object
52 53 54 55 |
# File 'lib/pretest/structure/clone.rb', line 52 def env_clone template 'env.rb.tt', "#{name}/features/support/env.rb" end |
#feature_clone ⇒ Object
62 63 64 65 |
# File 'lib/pretest/structure/clone.rb', line 62 def feature_clone template 'example.feature.tt', "#{name}/features/example.feature" end |
#first_launch_clone ⇒ Object
88 89 90 91 92 93 |
# File 'lib/pretest/structure/clone.rb', line 88 def first_launch_clone if ios == 'true' template 'first_launch.rb.tt', "#{name}/features/support/first_launch.rb" end end |
#gemfile_clone ⇒ Object
42 43 44 45 |
# File 'lib/pretest/structure/clone.rb', line 42 def gemfile_clone template 'Gemfile.tt', "#{name}/Gemfile" end |
#hooks_clone ⇒ Object
47 48 49 50 |
# File 'lib/pretest/structure/clone.rb', line 47 def hooks_clone template 'hooks.rb.tt', "#{name}/features/support/hooks.rb" end |
#page_clone ⇒ Object
95 96 97 98 |
# File 'lib/pretest/structure/clone.rb', line 95 def page_clone template 'example.rb.tt', "#{name}/features/support/pages/example.rb" end |
#step_definitions_clone ⇒ Object
57 58 59 60 |
# File 'lib/pretest/structure/clone.rb', line 57 def step_definitions_clone template 'step_definitions.rb.tt', "#{name}/features/step_definitions/step_definitions.rb" end |
#structure_init ⇒ Object
31 32 33 34 35 |
# File 'lib/pretest/structure/clone.rb', line 31 def structure_init Dir.mkdir(name) unless File.exist?(name) Dir.chdir(name) dir_list end |