class MobProject::Generators::Project

Public Class Methods

source_root() click to toggle source
# File lib/mobproject/generators/project.rb, line 11
def self.source_root
  File.dirname(__FILE__) + "/project"
end

Public Instance Methods

copy_base() click to toggle source
# File lib/mobproject/generators/project.rb, line 58
def copy_base
  template "base.rb.tt", "#{name}/features/support/base.rb"
end
copy_capabilities() click to toggle source
# File lib/mobproject/generators/project.rb, line 87
def copy_capabilities
  template "capabilities.rb.tt", "#{name}/features/support/mobile/platform/capabilities.rb"
end
copy_cucumber_yml() click to toggle source
# File lib/mobproject/generators/project.rb, line 23
def copy_cucumber_yml
  template "cucumber.yml.tt", "#{name}/cucumber.yml"
end
copy_env() click to toggle source
# File lib/mobproject/generators/project.rb, line 54
def copy_env
  template "env.rb.tt", "#{name}/features/support/env.rb"
end
copy_gemfile() click to toggle source
# File lib/mobproject/generators/project.rb, line 27
def copy_gemfile
  template "Gemfile.tt", "#{name}/Gemfile"
end
copy_gitignore() click to toggle source
# File lib/mobproject/generators/project.rb, line 19
def copy_gitignore
  template "gitignore.tt", "#{name}/.gitignore"
end
copy_hack() click to toggle source
# File lib/mobproject/generators/project.rb, line 35
def copy_hack
  copy_file 'hack.rb.tt', "#{name}/hack.rb"
end
copy_hooks() click to toggle source
# File lib/mobproject/generators/project.rb, line 62
def copy_hooks
  template "hooks.rb.tt", "#{name}/features/support/hooks.rb"
end
copy_inventory() click to toggle source
# File lib/mobproject/generators/project.rb, line 91
def copy_inventory
  template 'android_devices.yml.tt', "#{name}/features/support/mobile/platform/android/inventory/devices.yml"
  template 'android_emulators.yml.tt', "#{name}/features/support/mobile/platform/android/inventory/emulators.yml"
  template 'android_sauce.yml.tt', "#{name}/features/support/mobile/platform/android/inventory/sauce.yml"
  template 'ios_devices.yml.tt', "#{name}/features/support/mobile/platform/ios/inventory/devices.yml"
  template 'ios_simulators.yml.tt', "#{name}/features/support/mobile/platform/ios/inventory/simulators.yml"
  template 'ios_sauce.yml.tt', "#{name}/features/support/mobile/platform/ios/inventory/sauce.yml"
end
copy_login() click to toggle source
# File lib/mobproject/generators/project.rb, line 100
def copy_login
  template "login.rb.tt", "#{name}/features/support/pages/login.rb"
end
copy_mobtest_feature() click to toggle source
# File lib/mobproject/generators/project.rb, line 79
def copy_mobtest_feature
  template "mobtest.feature.tt", "#{name}/features/mobtest.feature"
end
copy_platforms() click to toggle source
# File lib/mobproject/generators/project.rb, line 83
def copy_platforms
  template "platforms.rb.tt", "#{name}/features/support/mobile/platform/platforms.rb"
end
copy_rakefile() click to toggle source
# File lib/mobproject/generators/project.rb, line 31
def copy_rakefile
  copy_file "Rakefile.tt", "#{name}/Rakefile"
end
copy_settings() click to toggle source
# File lib/mobproject/generators/project.rb, line 66
def copy_settings
  template "android.yml.tt", "#{name}/features/support/settings/android.yml"
  template "ios.yml.tt", "#{name}/features/support/settings/ios.yml"
end
copy_step_definitions() click to toggle source
# File lib/mobproject/generators/project.rb, line 75
def copy_step_definitions
  template "step_definitions.rb.tt", "#{name}/features/step_definitions/step_definitions.rb"
end
copy_utilities() click to toggle source
# File lib/mobproject/generators/project.rb, line 71
def copy_utilities
  template "utilities.rb.tt", "#{name}/features/support/utilities.rb"
end
create_cucumber_directories() click to toggle source
# File lib/mobproject/generators/project.rb, line 39
def create_cucumber_directories
  empty_directory("#{name}/features")
  empty_directory("#{name}/features/support")
  empty_directory("#{name}/features/support/mobile")
  empty_directory("#{name}/features/support/pages")
  empty_directory("#{name}/features/support/pages/common")
  empty_directory("#{name}/features/step_definitions")
  empty_directory("#{name}/features/support/mobile/platform")
  empty_directory("#{name}/features/support/mobile/platform/android")
  empty_directory("#{name}/features/support/mobile/platform/android/inventory")
  empty_directory("#{name}/features/support/mobile/platform/ios")
  empty_directory("#{name}/features/support/mobile/platform/ios/inventory")
  empty_directory("#{name}/features/support/settings")
end
create_top_directory() click to toggle source
# File lib/mobproject/generators/project.rb, line 15
def create_top_directory
  empty_directory(name)
end