Class: Pretest::Structure::Clone

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/pretest/structure/clone.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



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_cloneObject



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_cloneObject



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_cloneObject



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_cloneObject



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_cloneObject



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_cloneObject



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_cloneObject



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_cloneObject



42
43
44
45
# File 'lib/pretest/structure/clone.rb', line 42

def gemfile_clone
  template 'Gemfile.tt',
           "#{name}/Gemfile"
end

#hooks_cloneObject



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_cloneObject



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_cloneObject



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_initObject



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