Method: Codes::ItunesConnect#initialize
- Defined in:
- lib/codes/itunes_connect/itunes_connect.rb
#initialize ⇒ ItunesConnect
Returns a new instance of ItunesConnect.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/codes/itunes_connect/itunes_connect.rb', line 35 def initialize super return if Helper.is_test? .run_server = false .default_driver = :poltergeist .javascript_driver = :poltergeist .current_driver = :poltergeist .app_host = ITUNESCONNECT_URL # Since Apple has some SSL errors, we have to configure the client properly: # https://github.com/ariya/phantomjs/issues/11239 .register_driver :poltergeist do |a| conf = ['--debug=no', '--ignore-ssl-errors=yes', '--ssl-protocol=TLSv1'] ::Poltergeist::Driver.new(a, { phantomjs: Phantomjs.path, phantomjs_options: conf, phantomjs_logger: File.open("/tmp/poltergeist_log.txt", "a"), js_errors: false, timeout: 90 }) end page.driver.headers = { "Accept-Language" => "en" } login end |