lib/gondola/suiterunner.rb
# Function to collect configuration data from various
# sources so that the test can run properly
Function to collect configuration data from various
sources so that the test can run properly
Function to collect configuration data from various sources so that the test can run properly
def aggregate_data(file, opts)
      converter = nil
      if File.extname(file) == '.html'
        converter = Gondola::HtmlConverter.new(file)
      elsif File.extname(file) == '.rb'
        converter = Gondola::Converter.new(file)
      end
      conf = config_from_file(file)
      conf.merge! opts
      global = {}
      global[:job_name] = converter.name
      if conf[:project_name]
        global[:job_name] = "#{conf[:project_name]} - #{global[:job_name]}"
      end
      global.merge! conf.reject { |k,v| !([:username, :access_key].include?(k)) }
      global[:browser_url] = conf[:base_url]
      return [converter, global, conf[:browsers]]
    end
def aggregate_data ( file , opts ) converter = nil if File . extname ( file ) == '.html' converter = Gondola :: HtmlConverter . new ( file ) elsif File . extname ( file ) == '.rb' converter = Gondola :: Converter . new ( file ) end conf = config_from_file ( file ) conf . merge! opts global = { } global [ :job_name ] = converter . name if conf [ :project_name ] global [ :job_name ] = "#{conf[:project_name]} - #{global[:job_name]}" end global . merge! conf . reject { | k , v | ! ( [ :username , :access_key ] . include? ( k ) ) } global [ :browser_url ] = conf [ :base_url ] return [ converter , global , conf [ :browsers ] ] end
Function to collect configuration data from various
sources so that the test can run properly
Function to collect configuration data from various sources so that the test can run properly
# Initialize a converter object based on filetype # Load file config data # Merge in user-supplied data # Set global information
file
<not_specific>
opts
<not_specific>