Class: AutomationWizard::Generators::Project

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/automation_wizard/generators/project.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



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_cucumber_ymlObject



21
22
23
# File 'lib/automation_wizard/generators/project.rb', line 21

def copy_cucumber_yml
  template "cucumber.yml.tt", "#{name}/cucumber.yml"
end

#copy_envObject



43
44
45
# File 'lib/automation_wizard/generators/project.rb', line 43

def copy_env
  template "env.rb.tt", "#{name}/features/support/env.rb"
end

#copy_gemfileObject



25
26
27
# File 'lib/automation_wizard/generators/project.rb', line 25

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

#copy_hooksObject



47
48
49
# File 'lib/automation_wizard/generators/project.rb', line 47

def copy_hooks
  template "hooks.rb.tt", "#{name}/features/support/hooks.rb" unless no_driver_selected
end

#copy_rakefileObject



29
30
31
# File 'lib/automation_wizard/generators/project.rb', line 29

def copy_rakefile
  copy_file "Rakefile", "#{name}/Rakefile"
end

#copy_readmeObject



33
34
35
# File 'lib/automation_wizard/generators/project.rb', line 33

def copy_readme
  copy_file "Readme.md.tt", "#{name}/Readme.md"
end

#create_cucumber_directoriesObject



37
38
39
40
41
# File 'lib/automation_wizard/generators/project.rb', line 37

def create_cucumber_directories
  empty_directory("#{name}/features")
  empty_directory("#{name}/features/support")
  empty_directory("#{name}/features/step_definitions")
end

#create_pages_directoryObject



51
52
53
# File 'lib/automation_wizard/generators/project.rb', line 51

def create_pages_directory
  empty_directory("#{name}/features/support/pages") unless no_driver_selected
end

#create_top_directoryObject



17
18
19
# File 'lib/automation_wizard/generators/project.rb', line 17

def create_top_directory
  empty_directory(name)
end