<commit_before>require 'capybara'
require 'selenium-webdriver'
require "capybara-ios-emulation-driver/version"
require "capybara-ios-emulation-driver/user_agent"
require "capybara-ios-emulation-driver/profile/chrome"
require "capybara-ios-emulation-driver/profile/firefox"

module Capybara::Selenium::Driver::Ios
  def self.chrome_driver params = {}
    options = {
      :ios_version => 7,
      :ios_device  => :iphone, 
      :app         => nil
    }.update(params)

    ::Capybara::Selenium::Driver.new(options[:app], Profile::Chrome.driver_options(options).merge(:browser => :chrome))
  end

  def self.firefox_driver params = {}
    options = {
      :ios_version => 7,
      :ios_device  => :iphone, 
      :app         => nil
    }.update(params)

    ::Capybara::Selenium::Driver.new(options[:app], Profile::Firefox.driver_options(options).merge(:browser => :firefox))
  end
end

module Capybara::RackTest::Driver::Ios
  def self.rack_test_driver params = {}
    options = {
      :ios_version => 7,
      :ios_device  => :iphone, 
      :app         => nil,
      :rack_test_options => {}
    }.update(params)

    ua = ::Capybara::IosEmulationDriver::UserAgent.of(:ios => options[:ios_version], :device => options[:ios_device])
    driver = Class.new(::Capybara::RackTest::Driver)
    driver.module_eval %|
      def env 
        super.merge('HTTP_USER_AGENT' => "#{ua}")
      end
    |
    driver.new(options[:app], options[:rack_test_options])
  end
end
<commit_msg>bumping driver default ios version to 8<commit_after>require 'capybara'
require 'selenium-webdriver'
require "capybara-ios-emulation-driver/version"
require "capybara-ios-emulation-driver/user_agent"
require "capybara-ios-emulation-driver/profile/chrome"
require "capybara-ios-emulation-driver/profile/firefox"

module Capybara::Selenium::Driver::Ios
  def self.chrome_driver params = {}
    options = {
      :ios_version => 8,
      :ios_device  => :iphone,
      :app         => nil
    }.update(params)

    ::Capybara::Selenium::Driver.new(options[:app], Profile::Chrome.driver_options(options).merge(:browser => :chrome))
  end

  def self.firefox_driver params = {}
    options = {
      :ios_version => 8,
      :ios_device  => :iphone,
      :app         => nil
    }.update(params)

    ::Capybara::Selenium::Driver.new(options[:app], Profile::Firefox.driver_options(options).merge(:browser => :firefox))
  end
end

module Capybara::RackTest::Driver::Ios
  def self.rack_test_driver params = {}
    options = {
      :ios_version => 8,
      :ios_device  => :iphone,
      :app         => nil,
      :rack_test_options => {}
    }.update(params)

    ua = ::Capybara::IosEmulationDriver::UserAgent.of(:ios => options[:ios_version], :device => options[:ios_device])
    driver = Class.new(::Capybara::RackTest::Driver)
    driver.module_eval %|
      def env
        super.merge('HTTP_USER_AGENT' => "#{ua}")
      end
    |
    driver.new(options[:app], options[:rack_test_options])
  end
end

{'fraction_non_alphanumeric': 0.15214477211796246, 'fraction_numerical': 0.0023458445040214475, 'mean_word_length': 3.571209800918836, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2539286', 'n_tokens_mistral': 1027, 'n_tokens_neox': 992, 'n_words': 158}