apple_system_status 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96f3ba68166cff411f26f1100e70c3b9219fe1fd005539d6786b32d3d1bcbf5c
4
- data.tar.gz: 527f8709f191cc4eeb63d147e1c1bce9bc9cc5be992d2125dc1cbcbeb82abc9e
3
+ metadata.gz: 97b708703fd16f253c9959156444c83c1f250aa617a6ec2627cae7623e0371b4
4
+ data.tar.gz: e009875f53bca759343f6854ad4df86f784b9ce8b916fca1c1f8c333b0cf7963
5
5
  SHA512:
6
- metadata.gz: 7dd980d5edeec7f104d07728c1da04361295be48a8a09659cd6b6ba2f86d35e0ae67a4f535f2afa3baf12007e8633a5371d9ea0148f32d1d324f90e7457e767f
7
- data.tar.gz: 0b84a0cb7bdd33836309237cdd212ddccecf839bdf8ead7298ecbd23f4839037c0bbff7e5b36560f7d3d3d9e09c186ace2b8ff7440a0094ca404a3af0b975798
6
+ metadata.gz: ecfda672babc08284e5a7095dba62c20b30ee2672f361defc6b2eb9cd5d9a10f986a4d0d8e5713f9c032230f17c85639c95ff7d18f90f109ef82f4675fb3cb2f
7
+ data.tar.gz: 35cad0a7546f1a55e88595c370b630c96b3735c80a2da6a54623fb428f0bc73508d4323911d04a4ace553b9c89b778732fd435440363d9b1284f0c11d6d56e80
data/CHANGELOG.md CHANGED
@@ -1,13 +1,16 @@
1
1
  # Change Log
2
2
 
3
- ## [Unreleased](https://github.com/sue445/apple_system_status/tree/HEAD)
4
-
5
- [Full Changelog](https://github.com/sue445/apple_system_status/compare/v1.0.1...HEAD)
3
+ ## [v1.0.2](https://github.com/sue445/apple_system_status/tree/v1.0.2) (2018-09-23)
4
+ [Full Changelog](https://github.com/sue445/apple_system_status/compare/v1.0.1...v1.0.2)
6
5
 
7
6
  **Closed issues:**
8
7
 
9
8
  - Add chrome\_options\_args to Crawler\#initialize [\#30](https://github.com/sue445/apple_system_status/issues/30)
10
9
 
10
+ **Merged pull requests:**
11
+
12
+ - Add chrome\_options\_args to Crawler.perform [\#32](https://github.com/sue445/apple_system_status/pull/32) ([sue445](https://github.com/sue445))
13
+
11
14
  ## [v1.0.1](https://github.com/sue445/apple_system_status/tree/v1.0.1) (2018-09-23)
12
15
  [Full Changelog](https://github.com/sue445/apple_system_status/compare/v1.0.0...v1.0.1)
13
16
 
@@ -16,16 +16,16 @@ module AppleSystemStatus
16
16
  MAX_RETRY_COUNT = 5
17
17
 
18
18
  # @param chrome_options_args [Array<String>]
19
- def initialize(chrome_options_args: DEFAULT_CHROME_OPTIONS_ARGS)
19
+ # @param chrome_options_binary [String]
20
+ def initialize(chrome_options_args: DEFAULT_CHROME_OPTIONS_ARGS, chrome_options_binary: nil)
20
21
  Capybara.register_driver :chrome_headless do |app|
21
22
  client = Selenium::WebDriver::Remote::Http::Default.new
22
23
  client.read_timeout = 120
23
24
 
24
- capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
25
- chromeOptions: {
26
- args: chrome_options_args,
27
- }
28
- )
25
+ chrome_options = { args: chrome_options_args }
26
+ chrome_options[:binary] = chrome_options_binary if chrome_options_binary
27
+
28
+ capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: chrome_options)
29
29
 
30
30
  Capybara::Selenium::Driver.new(
31
31
  app,
@@ -95,6 +95,7 @@ module AppleSystemStatus
95
95
  # @param country [String] country code. (e.g. jp, ca, fr. default. us)
96
96
  # @param title [String] If specified, narrow the service title
97
97
  # @param chrome_options_args [Array<String>]
98
+ # @param chrome_options_binary [String]
98
99
  # @return [Hash]
99
100
  # @example response format
100
101
  # {
@@ -104,8 +105,8 @@ module AppleSystemStatus
104
105
  # ]
105
106
  # }
106
107
  # @link https://github.com/teampoltergeist/poltergeist#memory-leak
107
- def self.perform(country: nil, title: nil, chrome_options_args: DEFAULT_CHROME_OPTIONS_ARGS)
108
- crawler = AppleSystemStatus::Crawler.new(chrome_options_args: chrome_options_args)
108
+ def self.perform(country: nil, title: nil, chrome_options_args: DEFAULT_CHROME_OPTIONS_ARGS, chrome_options_binary: nil)
109
+ crawler = AppleSystemStatus::Crawler.new(chrome_options_args: chrome_options_args, chrome_options_binary: chrome_options_binary)
109
110
  crawler.perform(country: country, title: title)
110
111
  ensure
111
112
  crawler.quit!
@@ -1,3 +1,3 @@
1
1
  module AppleSystemStatus
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apple_system_status
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-23 00:00:00.000000000 Z
11
+ date: 2018-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara