Sha256: 5bd29d7aa7e32e9db11b262114e75196b389cc63ad815d2229ab40f9f119b0ba

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

def awetestlib_mobile_app_setup
  if ARGV[1].nil?
    @proj_dir = "sample_mobile_app"
  else
    @proj_dir = ARGV[1]
  end

  @cucumber_dir = File.join(FileUtils.pwd, @proj_dir)
  @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_mobile_app')

  if File.exists?(@cucumber_dir)
    puts "Mobile app project directory already exists."
    exit 1
  end

  msg("Question") do
    puts "I'm about to create a mobile app project named #{ARGV[1]} in this directory" if ARGV[1]
    puts "I'm about to create a mobile app project named sample_mobile_app in this directory" if ARGV[1].nil?
    puts "Please hit return to confirm that's what you want."
    puts "Enter anything else and hit return to abort."
    puts "NOTE: You may need to run this command as an administrator."
  end
  exit 2 unless STDIN.gets.chomp == ''

  FileUtils.cp_r(@source_dir, @cucumber_dir)

  msg("Info") do
    puts "Configuring files and settings..."
    puts "A skeleton project has been created with a features and step definitions folder"
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
awetestlib-1.2.4-x86-mingw32 bin/awetestlib-mobile-app-setup.rb
awetestlib-0.1.30 bin/awetestlib-mobile-app-setup.rb
awetestlib-0.1.30-x86-mingw32 bin/awetestlib-mobile-app-setup.rb
awetestlib-0.1.29pre4 bin/awetestlib-mobile-app-setup.rb
awetestlib-0.1.29pre4-x86-mingw32 bin/awetestlib-mobile-app-setup.rb