Sha256: 066fd652e19be6d98aff20a02061fa59a1f1e9058a94cb33e8f335406d2536e7
Contents?: true
Size: 954 Bytes
Versions: 34
Compression:
Stored size: 954 Bytes
Contents
module Workarea module Configuration module HeadlessChrome extend self # TODO v3.5 # # Allow apps to configure both Chrome options and arguments separately, as # any given release to Chrome may require changing these separately. # def load Workarea.config.headless_chrome_args = Workarea.config.headless_chrome_options end def options default_options.merge(env_options) end def default_options { args: args, w3c: false } end def env_options parsed = if ENV['WORKAREA_HEADLESS_CHROME_OPTIONS'].blank? {} else JSON.parse(ENV['WORKAREA_HEADLESS_CHROME_OPTIONS']) end parsed.symbolize_keys end def args (Workarea.config.headless_chrome_args + env_args).uniq end def env_args ENV['WORKAREA_HEADLESS_CHROME_ARGS'].to_s.split end end end end
Version data entries
34 entries across 34 versions & 1 rubygems