apple_system_status 1.0.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +54 -89
- data/CHANGELOG.md +32 -2
- data/Gemfile +0 -5
- data/README.md +1 -1
- data/apple_system_status.gemspec +5 -6
- data/lib/apple_system_status/crawler.rb +11 -9
- data/lib/apple_system_status/version.rb +1 -1
- metadata +24 -40
- data/.circleci/setup.sh +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0c39a9d2fa98813ff80849b8b7f5fb3043046f0d3bd42e90599f0fea4d08c4f
|
4
|
+
data.tar.gz: 232875e169733db8fe91201850af2e0396303f751aea602d5d332f4b4c60bc8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6676c728fb5e9f6083642b534c33a41e89322a991d4f86dae6d0040602eb330526bce96207bf8cbd9620be540b563fb7b89337b1ef5ae0b1eda25245368d6e47
|
7
|
+
data.tar.gz: 7aeaa606798953f7770cd659f758ef76f6032204f5efe560cbaf0c2433a329117e2952d11b142d215ed2c83f34064a06a558b68615db0ea7da431836af0c6437
|
data/.circleci/config.yml
CHANGED
@@ -1,94 +1,59 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
BUNDLE_JOBS: 4
|
14
|
-
CODECLIMATE_REPO_TOKEN: 89b665462d69ce4c873ee8165d496c4a97b9afaaf48e375c1bc3200e4b45b1e7
|
15
|
-
|
16
|
-
default: &default
|
17
|
-
docker:
|
18
|
-
- image: circleci/ruby
|
19
|
-
environment:
|
20
|
-
<<: *environment
|
21
|
-
|
22
|
-
working_directory: ~/app
|
23
|
-
|
24
|
-
restore_bundle_cache_option: &restore_bundle_cache_option
|
25
|
-
keys:
|
26
|
-
- v1-bundle-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
|
27
|
-
- v1-bundle-{{ .Environment.CIRCLE_JOB }}
|
28
|
-
|
29
|
-
save_bundle_cache_option: &save_bundle_cache_option
|
30
|
-
key: v1-bundle-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
|
31
|
-
paths:
|
32
|
-
- ~/app/vendor/bundle
|
33
|
-
- ~/app/Gemfile.lock
|
34
|
-
|
35
|
-
rspec_steps: &rspec_steps
|
36
|
-
- checkout
|
37
|
-
- restore_cache:
|
38
|
-
<<: *restore_bundle_cache_option
|
39
|
-
- run: ./.circleci/setup.sh
|
40
|
-
- save_cache:
|
41
|
-
<<: *save_bundle_cache_option
|
42
|
-
|
43
|
-
- run: bundle exec rspec
|
44
|
-
- run: bundle exec codeclimate-test-reporter
|
45
|
-
|
46
|
-
build_jobs: &build_jobs
|
47
|
-
- ruby:2.2
|
48
|
-
- ruby:2.3
|
49
|
-
- ruby:2.4
|
50
|
-
- ruby:2.5
|
51
|
-
|
52
|
-
jobs:
|
53
|
-
ruby:2.2:
|
54
|
-
<<: *default
|
55
|
-
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
orbs:
|
4
|
+
browser-tools: circleci/browser-tools@volatile
|
5
|
+
codeclimate: sue445/codeclimate@volatile
|
6
|
+
slack: circleci/slack@3
|
7
|
+
|
8
|
+
executors:
|
9
|
+
ruby:
|
10
|
+
parameters:
|
11
|
+
version:
|
12
|
+
type: string
|
56
13
|
docker:
|
57
|
-
- image:
|
58
|
-
|
59
|
-
|
14
|
+
- image: cimg/ruby:<< parameters.version >>-browsers
|
15
|
+
environment:
|
16
|
+
# c.f. https://github.com/ffaker/ffaker/issues/277#issuecomment-263519146
|
17
|
+
LANG: en_US.UTF-8
|
18
|
+
LANGUAGE: en_US.UTF-8
|
19
|
+
LC_ALL: C.UTF-8
|
20
|
+
|
21
|
+
BUNDLE_PATH: vendor/bundle
|
22
|
+
BUNDLE_JOBS: 4
|
23
|
+
CC_TEST_REPORTER_ID: 89b665462d69ce4c873ee8165d496c4a97b9afaaf48e375c1bc3200e4b45b1e7
|
24
|
+
working_directory: ~/app
|
60
25
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
ruby:2.5:
|
84
|
-
<<: *default
|
85
|
-
|
86
|
-
docker:
|
87
|
-
- image: circleci/ruby:2.5-node-browsers
|
88
|
-
environment:
|
89
|
-
<<: *environment
|
26
|
+
jobs:
|
27
|
+
rspec:
|
28
|
+
parameters:
|
29
|
+
version:
|
30
|
+
type: string
|
31
|
+
executor:
|
32
|
+
name: ruby
|
33
|
+
version: << parameters.version >>
|
34
|
+
steps:
|
35
|
+
- browser-tools/install-browser-tools
|
36
|
+
- checkout
|
37
|
+
- run: bundle --version
|
38
|
+
- run: gem --version
|
39
|
+
- run: google-chrome --version
|
40
|
+
- run: chromedriver --version
|
41
|
+
- run: bundle config --local path vendor/bundle
|
42
|
+
- run: bundle install --jobs=4 --retry=3
|
43
|
+
- codeclimate/with-cc-test-reporter:
|
44
|
+
after_build_args: "--coverage-input-type simplecov"
|
45
|
+
steps:
|
46
|
+
- run: bundle exec rspec
|
47
|
+
- slack/notify-on-failure
|
90
48
|
|
91
|
-
|
49
|
+
build_jobs: &build_jobs
|
50
|
+
- rspec:
|
51
|
+
matrix:
|
52
|
+
parameters:
|
53
|
+
version:
|
54
|
+
- "2.6"
|
55
|
+
- "2.7"
|
56
|
+
- "3.0"
|
92
57
|
|
93
58
|
workflows:
|
94
59
|
version: 2
|
@@ -99,7 +64,7 @@ workflows:
|
|
99
64
|
weekly_build:
|
100
65
|
triggers:
|
101
66
|
- schedule:
|
102
|
-
cron: "00
|
67
|
+
cron: "00 10 * * 5" # JST 19:00 (Fri)
|
103
68
|
filters:
|
104
69
|
branches:
|
105
70
|
only: master
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,43 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [v3.0.0](https://github.com/sue445/apple_system_status/tree/v3.0.0) (2021-10-16)
|
4
|
+
[Full Changelog](https://github.com/sue445/apple_system_status/compare/v2.0.0...v3.0.0)
|
4
5
|
|
5
|
-
[
|
6
|
+
* :bomb: **[BREAKING CHANGE]** Requires selenium-webdriver v4+ and Ruby 2.6+
|
7
|
+
* https://github.com/sue445/apple_system_status/pull/66
|
8
|
+
|
9
|
+
## [v2.0.0](https://github.com/sue445/apple_system_status/tree/v2.0.0) (2021-10-16)
|
10
|
+
[Full Changelog](https://github.com/sue445/apple_system_status/compare/v1.0.4...v2.0.0)
|
11
|
+
|
12
|
+
* :bomb: **[BREAKING CHANGE]** Drop support ruby < 2.5
|
13
|
+
* https://github.com/sue445/apple_system_status/pull/65
|
14
|
+
* Don't use selenium-webdriver v4
|
15
|
+
* https://github.com/sue445/apple_system_status/pull/63
|
16
|
+
|
17
|
+
## [v1.0.4](https://github.com/sue445/apple_system_status/tree/v1.0.4) (2019-06-19)
|
18
|
+
[Full Changelog](https://github.com/sue445/apple_system_status/compare/v1.0.3...v1.0.4)
|
19
|
+
|
20
|
+
* Disable w3c for chrome75+
|
21
|
+
* https://github.com/sue445/apple_system_status/pull/43
|
22
|
+
|
23
|
+
## [v1.0.3](https://github.com/sue445/apple_system_status/tree/v1.0.3) (2018-10-27)
|
24
|
+
[Full Changelog](https://github.com/sue445/apple_system_status/compare/v1.0.2...v1.0.3)
|
25
|
+
|
26
|
+
**Merged pull requests:**
|
27
|
+
|
28
|
+
- Add chrome\_options\_binary arg [\#33](https://github.com/sue445/apple_system_status/pull/33) ([sue445](https://github.com/sue445))
|
29
|
+
|
30
|
+
## [v1.0.2](https://github.com/sue445/apple_system_status/tree/v1.0.2) (2018-09-23)
|
31
|
+
[Full Changelog](https://github.com/sue445/apple_system_status/compare/v1.0.1...v1.0.2)
|
6
32
|
|
7
33
|
**Closed issues:**
|
8
34
|
|
9
35
|
- Add chrome\_options\_args to Crawler\#initialize [\#30](https://github.com/sue445/apple_system_status/issues/30)
|
10
36
|
|
37
|
+
**Merged pull requests:**
|
38
|
+
|
39
|
+
- Add chrome\_options\_args to Crawler.perform [\#32](https://github.com/sue445/apple_system_status/pull/32) ([sue445](https://github.com/sue445))
|
40
|
+
|
11
41
|
## [v1.0.1](https://github.com/sue445/apple_system_status/tree/v1.0.1) (2018-09-23)
|
12
42
|
[Full Changelog](https://github.com/sue445/apple_system_status/compare/v1.0.0...v1.0.1)
|
13
43
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
data/apple_system_status.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = "https://github.com/sue445/apple_system_status"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
-
spec.required_ruby_version = ">= 2.
|
17
|
+
spec.required_ruby_version = ">= 2.6"
|
18
18
|
|
19
19
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
20
20
|
# delete this section to allow pushing this gem to any host.
|
@@ -30,16 +30,15 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
32
|
spec.add_dependency "capybara"
|
33
|
-
spec.add_dependency "selenium-webdriver"
|
33
|
+
spec.add_dependency "selenium-webdriver", ">= 4.0.0"
|
34
34
|
spec.add_dependency "thor"
|
35
35
|
|
36
36
|
spec.add_development_dependency "bundler"
|
37
|
-
spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
|
38
37
|
spec.add_development_dependency "coveralls"
|
39
|
-
spec.add_development_dependency "
|
40
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
38
|
+
spec.add_development_dependency "rake"
|
41
39
|
spec.add_development_dependency "rspec"
|
42
40
|
spec.add_development_dependency "rspec-parameterized"
|
43
|
-
spec.add_development_dependency "simplecov"
|
41
|
+
spec.add_development_dependency "simplecov", "< 0.18.0"
|
42
|
+
spec.add_development_dependency "unparser", ">= 0.4.5"
|
44
43
|
spec.add_development_dependency "yard"
|
45
44
|
end
|
@@ -16,21 +16,22 @@ module AppleSystemStatus
|
|
16
16
|
MAX_RETRY_COUNT = 5
|
17
17
|
|
18
18
|
# @param chrome_options_args [Array<String>]
|
19
|
-
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
chrome_options = { args: chrome_options_args }
|
26
|
+
chrome_options[:binary] = chrome_options_binary if chrome_options_binary
|
27
|
+
|
28
|
+
opts = Selenium::WebDriver::Chrome::Options.new(profile: nil, **chrome_options)
|
29
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
29
30
|
|
30
31
|
Capybara::Selenium::Driver.new(
|
31
32
|
app,
|
32
33
|
browser: :chrome,
|
33
|
-
|
34
|
+
capabilities: [capabilities, opts],
|
34
35
|
http_client: client,
|
35
36
|
)
|
36
37
|
end
|
@@ -95,6 +96,7 @@ module AppleSystemStatus
|
|
95
96
|
# @param country [String] country code. (e.g. jp, ca, fr. default. us)
|
96
97
|
# @param title [String] If specified, narrow the service title
|
97
98
|
# @param chrome_options_args [Array<String>]
|
99
|
+
# @param chrome_options_binary [String]
|
98
100
|
# @return [Hash]
|
99
101
|
# @example response format
|
100
102
|
# {
|
@@ -104,8 +106,8 @@ module AppleSystemStatus
|
|
104
106
|
# ]
|
105
107
|
# }
|
106
108
|
# @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)
|
109
|
+
def self.perform(country: nil, title: nil, chrome_options_args: DEFAULT_CHROME_OPTIONS_ARGS, chrome_options_binary: nil)
|
110
|
+
crawler = AppleSystemStatus::Crawler.new(chrome_options_args: chrome_options_args, chrome_options_binary: chrome_options_binary)
|
109
111
|
crawler.perform(country: country, title: title)
|
110
112
|
ensure
|
111
113
|
crawler.quit!
|
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:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 4.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 4.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: thor
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: codeclimate-test-reporter
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0.0
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 1.0.0
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: coveralls
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +81,7 @@ dependencies:
|
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: rake
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
@@ -109,21 +95,21 @@ dependencies:
|
|
109
95
|
- !ruby/object:Gem::Version
|
110
96
|
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
98
|
+
name: rspec
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
|
-
- - "
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
103
|
+
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
|
-
- - "
|
108
|
+
- - ">="
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
110
|
+
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: rspec
|
112
|
+
name: rspec-parameterized
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
115
|
- - ">="
|
@@ -137,33 +123,33 @@ dependencies:
|
|
137
123
|
- !ruby/object:Gem::Version
|
138
124
|
version: '0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
126
|
+
name: simplecov
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
|
-
- - "
|
129
|
+
- - "<"
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
131
|
+
version: 0.18.0
|
146
132
|
type: :development
|
147
133
|
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
|
-
- - "
|
136
|
+
- - "<"
|
151
137
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
138
|
+
version: 0.18.0
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
140
|
+
name: unparser
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
156
142
|
requirements:
|
157
143
|
- - ">="
|
158
144
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
145
|
+
version: 0.4.5
|
160
146
|
type: :development
|
161
147
|
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
149
|
requirements:
|
164
150
|
- - ">="
|
165
151
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
152
|
+
version: 0.4.5
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
154
|
name: yard
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,7 +173,6 @@ extensions: []
|
|
187
173
|
extra_rdoc_files: []
|
188
174
|
files:
|
189
175
|
- ".circleci/config.yml"
|
190
|
-
- ".circleci/setup.sh"
|
191
176
|
- ".coveralls.yml"
|
192
177
|
- ".gitignore"
|
193
178
|
- ".rspec"
|
@@ -210,7 +195,7 @@ licenses:
|
|
210
195
|
- MIT
|
211
196
|
metadata:
|
212
197
|
allowed_push_host: https://rubygems.org
|
213
|
-
post_install_message:
|
198
|
+
post_install_message:
|
214
199
|
rdoc_options: []
|
215
200
|
require_paths:
|
216
201
|
- lib
|
@@ -218,16 +203,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
203
|
requirements:
|
219
204
|
- - ">="
|
220
205
|
- !ruby/object:Gem::Version
|
221
|
-
version: '2.
|
206
|
+
version: '2.6'
|
222
207
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
208
|
requirements:
|
224
209
|
- - ">="
|
225
210
|
- !ruby/object:Gem::Version
|
226
211
|
version: '0'
|
227
212
|
requirements: []
|
228
|
-
|
229
|
-
|
230
|
-
signing_key:
|
213
|
+
rubygems_version: 3.2.22
|
214
|
+
signing_key:
|
231
215
|
specification_version: 4
|
232
216
|
summary: Apple System Status scraping library
|
233
217
|
test_files: []
|