Sha256: 7080eab35aa2eabce338078a2c3f30ff79f446440a614821006bfec90ed35249

Contents?: true

Size: 843 Bytes

Versions: 2

Compression:

Stored size: 843 Bytes

Contents

module RainforestRubyRuntime
  module Drivers
    class Sauce
      attr_reader :options

      def initialize(options)
        @options = options
      end

      def call
        ::Sauce.config do |c|
          c[:browsers] = browsers
        end
      end

      private

      def browsers
        Array(options[:browsers]).map do |browser|
          {
            'ie8' => ["Windows 7", "Internet Explorer", "8"],
            'ie9' => ["Windows 7", "Internet Explorer", "9"],
            'ie10' => ["Windows 7", "Internet Explorer", "10"],
            'ie11' => ["Windows 7", "Internet Explorer", "11"],
            'chrome' => ["Windows 7", "Chrome", "35"],
            'firefox' => ["Windows 7", "Firefox", "30"],
            'safari' => ["Mavericks", "Safari", "7"],
          }.fetch(browser)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rainforest_ruby_runtime-0.0.2 lib/rainforest_ruby_runtime/drivers/sauce.rb
rainforest_ruby_runtime-0.0.1 lib/rainforest_ruby_runtime/drivers/sauce.rb