Class: Sauce::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/sauce/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#configure_credentialsObject



15
16
17
18
19
# File 'lib/generators/sauce/install/install_generator.rb', line 15

def configure_credentials
  if username
    system("sauce config #{username} #{api_key}")
  end
end

#copy_rake_tasksObject



11
12
13
# File 'lib/generators/sauce/install/install_generator.rb', line 11

def copy_rake_tasks
  copy_file "sauce.rake", "lib/tasks/sauce.rake"
end

#setup_specObject



21
22
23
24
25
26
# File 'lib/generators/sauce/install/install_generator.rb', line 21

def setup_spec
  if File.directory? 'spec'
    empty_directory "spec/selenium"
    append_file "spec/spec_helper.rb", generate_config
  end
end

#setup_testObject



28
29
30
31
32
33
# File 'lib/generators/sauce/install/install_generator.rb', line 28

def setup_test
  if File.directory? 'test'
    empty_directory "test/selenium"
    append_file "test/test_helper.rb", generate_config
  end
end