apple_system_status 1.0.0 → 1.0.1

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: f37e0bc20f096a7bc87993a4fede84c3a65179ce45eeecdef66366247e8ded24
4
- data.tar.gz: '051072148ed47b0d99ef85b8f3dabfa7e7729ea380e7c00ce636811a3e7b0428'
3
+ metadata.gz: fdb02da837139b920ce149ed9c00eb36e1f29e4f947e62e6e44e6a51d91b2948
4
+ data.tar.gz: fe8fb64f2c99690e179b9cb2d7350869381f7ae8977a011a1c0f681117582486
5
5
  SHA512:
6
- metadata.gz: a94a23d2049243bd3bfe2f283a15c1bd46749a22751f901554574319b640ee36ff567378584a36e6f11b1212f00bb3fd93be7d809933e18cbf8cb92c1bb94a07
7
- data.tar.gz: b0398313dbf3df6fef23a1361f43a6e5624e50c67043c0475522fb52b79d67080c74a99a895de6e98eaa7cfe3034e8fa4bf422f544055d539ea5b9aeea1e6986
6
+ metadata.gz: 8ac5ff5d6188ab25320c79612223d51b9311bba5d256eb793183161ffb9efcfa04a981899f0234a8fe36869c06a258ba52b23f86ca75126dd12172049a55e51d
7
+ data.tar.gz: 866a50d5218a4e9d8f4aef626ddb1471b39aeae7dbb8de593c2dc746983da4ec0140dafc695915242ff30081e1e23b6085f05bfcf4935aaa641e21128d01c88c
data/.circleci/config.yml CHANGED
@@ -21,14 +21,6 @@ default: &default
21
21
 
22
22
  working_directory: ~/app
23
23
 
24
- restore_repo_cache_option: &restore_repo_cache_option
25
- key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
26
-
27
- save_repo_cache_option: &save_repo_cache_option
28
- key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
29
- paths:
30
- - ~/app
31
-
32
24
  restore_bundle_cache_option: &restore_bundle_cache_option
33
25
  keys:
34
26
  - v1-bundle-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
@@ -41,8 +33,7 @@ save_bundle_cache_option: &save_bundle_cache_option
41
33
  - ~/app/Gemfile.lock
42
34
 
43
35
  rspec_steps: &rspec_steps
44
- - restore_cache:
45
- <<: *restore_repo_cache_option
36
+ - checkout
46
37
  - restore_cache:
47
38
  <<: *restore_bundle_cache_option
48
39
  - run: ./.circleci/setup.sh
@@ -53,30 +44,12 @@ rspec_steps: &rspec_steps
53
44
  - run: bundle exec codeclimate-test-reporter
54
45
 
55
46
  build_jobs: &build_jobs
56
- - checkout_code
57
- - ruby:2.2:
58
- requires:
59
- - checkout_code
60
- - ruby:2.3:
61
- requires:
62
- - checkout_code
63
- - ruby:2.4:
64
- requires:
65
- - checkout_code
66
- - ruby:2.5:
67
- requires:
68
- - checkout_code
47
+ - ruby:2.2
48
+ - ruby:2.3
49
+ - ruby:2.4
50
+ - ruby:2.5
69
51
 
70
52
  jobs:
71
- checkout_code:
72
- <<: *default
73
-
74
- steps:
75
- - checkout
76
-
77
- - save_cache:
78
- <<: *save_repo_cache_option
79
-
80
53
  ruby:2.2:
81
54
  <<: *default
82
55
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.0.0](https://github.com/sue445/apple_system_status/tree/v1.0.0) (2018-09-22)
4
+ [Full Changelog](https://github.com/sue445/apple_system_status/compare/v0.3.2...v1.0.0)
5
+
6
+ **Closed issues:**
7
+
8
+ - Use chrome headless instead of phantomjs [\#24](https://github.com/sue445/apple_system_status/issues/24)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Drop support ruby 2.1 [\#28](https://github.com/sue445/apple_system_status/pull/28) ([sue445](https://github.com/sue445))
13
+ - Remove activesupport from runtime dependency [\#27](https://github.com/sue445/apple_system_status/pull/27) ([sue445](https://github.com/sue445))
14
+ - Tweak spec [\#26](https://github.com/sue445/apple_system_status/pull/26) ([sue445](https://github.com/sue445))
15
+ - Migrate to Chrome Headless [\#25](https://github.com/sue445/apple_system_status/pull/25) ([sue445](https://github.com/sue445))
16
+ - Fix spec [\#23](https://github.com/sue445/apple_system_status/pull/23) ([sue445](https://github.com/sue445))
17
+ - Tweak gem group for development dependency [\#22](https://github.com/sue445/apple_system_status/pull/22) ([sue445](https://github.com/sue445))
18
+ - CI against ruby 2.5.0 [\#21](https://github.com/sue445/apple_system_status/pull/21) ([sue445](https://github.com/sue445))
19
+ - Fix failed spec [\#20](https://github.com/sue445/apple_system_status/pull/20) ([sue445](https://github.com/sue445))
20
+ - Fix failed spec [\#19](https://github.com/sue445/apple_system_status/pull/19) ([sue445](https://github.com/sue445))
21
+
3
22
  ## [v0.3.2](https://github.com/sue445/apple_system_status/tree/v0.3.2) (2017-08-26)
4
23
  [Full Changelog](https://github.com/sue445/apple_system_status/compare/v0.3.1...v0.3.2)
5
24
 
data/README.md CHANGED
@@ -9,8 +9,8 @@
9
9
  [![Coverage Status](https://coveralls.io/repos/sue445/apple_system_status/badge.svg?branch=master&service=github)](https://coveralls.io/github/sue445/apple_system_status?branch=master)
10
10
 
11
11
  ## Requirements
12
- * Ruby 2.1+
13
- * [Phantomjs](http://phantomjs.org/) (recommended v2.1.1+)
12
+ * Ruby 2.2+
13
+ * Headless CHrome
14
14
 
15
15
  ## Installation
16
16
 
@@ -5,16 +5,25 @@ module AppleSystemStatus
5
5
  class Crawler
6
6
  USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36"
7
7
 
8
+ DEFAULT_CHROME_OPTIONS_ARGS = %W(
9
+ headless
10
+ disable-gpu
11
+ window-size=1280,800
12
+ no-sandbox
13
+ user-agent=#{USER_AGENT}
14
+ ).freeze
15
+
8
16
  MAX_RETRY_COUNT = 5
9
17
 
10
- def initialize
18
+ # @param chrome_options_args [Array<String>]
19
+ def initialize(chrome_options_args: DEFAULT_CHROME_OPTIONS_ARGS)
11
20
  Capybara.register_driver :chrome_headless do |app|
12
21
  client = Selenium::WebDriver::Remote::Http::Default.new
13
22
  client.read_timeout = 120
14
23
 
15
24
  capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
16
25
  chromeOptions: {
17
- args: ["headless", "disable-gpu", "window-size=1280,800", "no-sandbox", "user-agent=#{USER_AGENT}"]
26
+ args: chrome_options_args,
18
27
  }
19
28
  )
20
29
 
@@ -1,3 +1,3 @@
1
1
  module AppleSystemStatus
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
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.0
4
+ version: 1.0.1
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-22 00:00:00.000000000 Z
11
+ date: 2018-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara