Sha256: 67cc914f3cacef2db3cba9c126a8a9a0f9baa1eaf10b6a0196f30bd5afeb6ade

Contents?: true

Size: 1.02 KB

Versions: 35

Compression:

Stored size: 1.02 KB

Contents

require_relative './launcher/browser_options'
require_relative './launcher/chrome'
require_relative './launcher/chrome_arg_options'
require_relative './launcher/firefox'
require_relative './launcher/launch_options'

# https://github.com/puppeteer/puppeteer/blob/main/src/node/Launcher.ts
module Puppeteer::Launcher
  # @param project_root [String]
  # @param prefereed_revision [String]
  # @param is_puppeteer_core [String]
  # @param product [String] 'chrome' or 'firefox'
  # @return [Puppeteer::Launcher::Chrome]
  module_function def new(project_root:, preferred_revision:, is_puppeteer_core:, product:)
    unless is_puppeteer_core
      product ||= ENV['PUPPETEER_PRODUCT']
    end

    if product == 'firefox'
      return Firefox.new(
        project_root: project_root,
        preferred_revision: preferred_revision,
        is_puppeteer_core: is_puppeteer_core,
      )
    end

    Chrome.new(
      project_root: project_root,
      preferred_revision: preferred_revision,
      is_puppeteer_core: is_puppeteer_core,
    )
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
puppeteer-ruby-0.45.6 lib/puppeteer/launcher.rb
puppeteer-ruby-0.45.5 lib/puppeteer/launcher.rb
puppeteer-ruby-0.45.4 lib/puppeteer/launcher.rb
puppeteer-ruby-0.45.3 lib/puppeteer/launcher.rb
puppeteer-ruby-0.45.2 lib/puppeteer/launcher.rb
puppeteer-ruby-0.45.2.alpha2 lib/puppeteer/launcher.rb
puppeteer-ruby-0.45.2.alpha1 lib/puppeteer/launcher.rb
puppeteer-ruby-0.45.1 lib/puppeteer/launcher.rb
puppeteer-ruby-0.45.0 lib/puppeteer/launcher.rb
puppeteer-ruby-0.44.3 lib/puppeteer/launcher.rb
puppeteer-ruby-0.44.2 lib/puppeteer/launcher.rb
puppeteer-ruby-0.44.1 lib/puppeteer/launcher.rb
puppeteer-ruby-0.44.0 lib/puppeteer/launcher.rb
puppeteer-ruby-0.43.1 lib/puppeteer/launcher.rb
puppeteer-ruby-0.43.0 lib/puppeteer/launcher.rb
puppeteer-ruby-0.42.0 lib/puppeteer/launcher.rb
puppeteer-ruby-0.41.0 lib/puppeteer/launcher.rb
puppeteer-ruby-0.40.7 lib/puppeteer/launcher.rb
puppeteer-ruby-0.40.6 lib/puppeteer/launcher.rb
puppeteer-ruby-0.40.5 lib/puppeteer/launcher.rb