Module: Workarea::Configuration::HeadlessChrome
- Extended by:
- HeadlessChrome
- Included in:
- HeadlessChrome
- Defined in:
- lib/workarea/configuration/headless_chrome.rb
Instance Method Summary collapse
- #args ⇒ Object
- #default_options ⇒ Object
- #env_args ⇒ Object
- #env_options ⇒ Object
-
#load ⇒ Object
TODO v3.5.
- #options ⇒ Object
Instance Method Details
#args ⇒ Object
33 34 35 |
# File 'lib/workarea/configuration/headless_chrome.rb', line 33 def args (Workarea.config.headless_chrome_args + env_args).uniq end |
#default_options ⇒ Object
19 20 21 |
# File 'lib/workarea/configuration/headless_chrome.rb', line 19 def { args: args, w3c: false } end |
#env_args ⇒ Object
37 38 39 |
# File 'lib/workarea/configuration/headless_chrome.rb', line 37 def env_args ENV['WORKAREA_HEADLESS_CHROME_ARGS'].to_s.split end |
#env_options ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/workarea/configuration/headless_chrome.rb', line 23 def parsed = if ENV['WORKAREA_HEADLESS_CHROME_OPTIONS'].blank? {} else JSON.parse(ENV['WORKAREA_HEADLESS_CHROME_OPTIONS']) end parsed.symbolize_keys end |
#load ⇒ Object
TODO v3.5
Allow apps to configure both Chrome options and arguments separately, as any given release to Chrome may require changing these separately.
11 12 13 |
# File 'lib/workarea/configuration/headless_chrome.rb', line 11 def load Workarea.config.headless_chrome_args = Workarea.config. end |
#options ⇒ Object
15 16 17 |
# File 'lib/workarea/configuration/headless_chrome.rb', line 15 def .merge() end |