class Sauce::Generators::InstallGenerator

Public Instance Methods

configure_credentials() click to toggle source
# 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_tasks() click to toggle source
# File lib/generators/sauce/install/install_generator.rb, line 11
def copy_rake_tasks
  copy_file "sauce.rake", "lib/tasks/sauce.rake"
end
setup_spec() click to toggle source
# 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_test() click to toggle source
# 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

Private Instance Methods

generate_config() click to toggle source
# File lib/generators/sauce/install/install_generator.rb, line 37
      def generate_config
        return <<-CONFIG

require 'sauce'

Sauce.config do |conf|
    conf[:browsers] = [
        ["Windows 2003", "firefox", "3.6."]
    ]
    conf[:application_host] = "127.0.0.1"
    conf[:application_port] = "3001"
    conf[:browser_url] = "http://localhost:3001/"
end
          CONFIG
      end