mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Update selenium on rails using 'official' git repo
git://github.com/paytonrules/selenium-on-rails.git
This commit is contained in:
parent
198f3240b8
commit
9b504b3e47
159 changed files with 16409 additions and 11794 deletions
|
|
@ -1,22 +1,26 @@
|
|||
require 'yaml'
|
||||
|
||||
class SeleniumOnRailsConfig
|
||||
@@defaults = {:environments => ['test']}
|
||||
def self.get var, default = nil
|
||||
value = configs[var.to_s]
|
||||
value ||= @@defaults[var]
|
||||
value ||= default
|
||||
value ||= yield if block_given?
|
||||
value
|
||||
end
|
||||
|
||||
private
|
||||
def self.configs
|
||||
unless defined? @@configs
|
||||
file = File.expand_path(File.dirname(__FILE__) + '/../config.yml')
|
||||
@@configs = File.exist?(file) ? YAML.load_file(file) : {}
|
||||
end
|
||||
@@configs
|
||||
end
|
||||
|
||||
end
|
||||
require 'yaml'
|
||||
|
||||
class SeleniumOnRailsConfig
|
||||
attr_accessor :configs
|
||||
|
||||
def initialize
|
||||
@defaults = {:environments => ['test']}
|
||||
initialize_configs
|
||||
end
|
||||
|
||||
def get var, default = nil
|
||||
value = @configs[var.to_s]
|
||||
value ||= @defaults[var]
|
||||
value ||= default
|
||||
value ||= yield if block_given?
|
||||
value
|
||||
end
|
||||
|
||||
def initialize_configs
|
||||
@configs = {}
|
||||
files = [File.expand_path(File.dirname(__FILE__) + '/../config.yml')]
|
||||
files << File.join(RAILS_ROOT, 'config', 'selenium.yml')
|
||||
files.each { |file| @configs = YAML.load_file(file) if File.exist?(file) }
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue