cure_line 0.1.3 → 1.0.0

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: c9ac141576d782cdd949643b5f838d7daff89719d52757e8a2ec05ce13da39ea
4
- data.tar.gz: a3dc3a65ebe5486c64ab0b2fac80cf70eca863335cade13030c26ef8df204dca
3
+ metadata.gz: b74cb3ba2d7121cbc943e48a69d492eda7d95a71d1a8340292d4d56e5ba24a52
4
+ data.tar.gz: a78f9145a4f5f4bb4bf8295341ab5da55d621355f6161604afff6d21c455bb34
5
5
  SHA512:
6
- metadata.gz: c1c6e7851d17f11310e31d33e7f8f00feb6563b6dbc0ea547e4567172ab588592b94fee7c2351a26e93e16ea452550f4516295684a46d01ec5f086598b26f5e7
7
- data.tar.gz: 171a4e2e5d68d55e3493f1ddfbf28725b7651a077c90c01478e8f786895d497ddbc6ad5d87cfc2c13dc2181bf3f78a93e98332de3c66a296dbb11d5a347323ff
6
+ metadata.gz: a14e2d42cdccb539cb1f12919ff1bea1080c7c327c528cf858a8c72b0d069b1bf3e31dc556b0fb87afe757bb10b12e8bca6ebae3b35a9ea8f99b5293ed0b169e
7
+ data.tar.gz: 82bcb8c975ccd158f4e98761b5b349d09524a0ee0a5f8ab7a70628bf18727db510b4f5f977c4eae1ec0a842ba4c7941e57c8146a1900639cc1f643d952e57e96
@@ -0,0 +1,138 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ schedule:
6
+ - cron: "0 10 * * 4" # JST 19:00 (Fri)
7
+
8
+ env:
9
+ CI: "true"
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ${{ matrix.runner }}
14
+
15
+ strategy:
16
+ fail-fast: false
17
+
18
+ matrix:
19
+ ruby:
20
+ - 2.5.0
21
+ - 2.6.0
22
+ - 2.7.0
23
+ - 2.8.0-dev
24
+ include:
25
+ - ruby: 2.5.0
26
+ runner: ubuntu-latest
27
+ - ruby: 2.6.0
28
+ runner: ubuntu-latest
29
+ - ruby: 2.7.0
30
+ runner: ubuntu-latest
31
+ - ruby: 2.8.0-dev
32
+ runner: ubuntu-latest
33
+
34
+ steps:
35
+ - uses: actions/checkout@v2
36
+
37
+ - name: Set up rbenv
38
+ uses: masa-iwasaki/setup-rbenv@1.1.0
39
+
40
+ - name: Cache RBENV_ROOT
41
+ uses: actions/cache@v1
42
+ id: cache_rbenv
43
+ with:
44
+ path: ~/.rbenv/versions
45
+ key: v1-rbenv-${{ runner.os }}-${{ matrix.ruby }}
46
+ if: "!endsWith(matrix.ruby, '-dev')"
47
+
48
+ - name: Reinstall libssl-dev
49
+ run: |
50
+ set -xe
51
+ sudo apt-get remove -y libssl-dev
52
+ sudo apt-get install -y libssl-dev=1.0.2g-1ubuntu4.15
53
+ if: matrix.runner == 'ubuntu-16.04'
54
+
55
+ - name: Install Ruby
56
+ run: |
57
+ set -xe
58
+ eval "$(rbenv init -)"
59
+ rbenv install -s $RBENV_VERSION
60
+
61
+ gem install bundler --no-document -v 1.17.3 || true
62
+ env:
63
+ RBENV_VERSION: ${{ matrix.ruby }}
64
+ continue-on-error: ${{ endsWith(matrix.ruby, '-dev') }}
65
+
66
+ - name: Generate unique cache key
67
+ run: uuidgen > uuid.txt
68
+
69
+ - name: Cache vendor/bundle
70
+ uses: actions/cache@v1
71
+ id: cache_gem
72
+ with:
73
+ path: vendor/bundle
74
+ key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles('uuid.txt') }}
75
+ restore-keys: |
76
+ v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
77
+ continue-on-error: ${{ endsWith(matrix.ruby, '-dev') }}
78
+
79
+ - name: bundle update
80
+ run: |
81
+ set -xe
82
+ eval "$(rbenv init -)"
83
+ bundle config path vendor/bundle
84
+ bundle update --jobs $(nproc) --retry 3
85
+ env:
86
+ RBENV_VERSION: ${{ matrix.ruby }}
87
+ continue-on-error: ${{ endsWith(matrix.ruby, '-dev') }}
88
+
89
+ - name: Setup Code Climate Test Reporter
90
+ uses: aktions/codeclimate-test-reporter@v1
91
+ with:
92
+ codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
93
+ command: before-build
94
+ continue-on-error: ${{ endsWith(matrix.ruby, '-dev') }}
95
+
96
+ - name: Run test
97
+ run: |
98
+ set -xe
99
+ eval "$(rbenv init -)"
100
+ bundle exec rspec
101
+ env:
102
+ RBENV_VERSION: ${{ matrix.ruby }}
103
+ continue-on-error: ${{ endsWith(matrix.ruby, '-dev') }}
104
+
105
+ - name: Teardown Code Climate Test Reporter
106
+ uses: aktions/codeclimate-test-reporter@v1
107
+ with:
108
+ codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
109
+ command: after-build
110
+ if: always()
111
+ continue-on-error: ${{ endsWith(matrix.ruby, '-dev') }}
112
+
113
+ - name: Slack Notification (not success)
114
+ uses: homoluctus/slatify@v2.0.0
115
+ if: "! success()"
116
+ with:
117
+ job_name: ${{ format('*build* ({0})', matrix.ruby) }}
118
+ type: ${{ job.status }}
119
+ icon_emoji: ":octocat:"
120
+ url: ${{ secrets.SLACK_WEBHOOK }}
121
+ token: ${{ secrets.GITHUB_TOKEN }}
122
+
123
+ notify:
124
+ needs:
125
+ - test
126
+
127
+ runs-on: ubuntu-latest
128
+
129
+ steps:
130
+ - name: Slack Notification (success)
131
+ uses: homoluctus/slatify@v2.0.0
132
+ if: always()
133
+ with:
134
+ job_name: '*build*'
135
+ type: ${{ job.status }}
136
+ icon_emoji: ":octocat:"
137
+ url: ${{ secrets.SLACK_WEBHOOK }}
138
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,5 +1,16 @@
1
1
  ## Unreleased
2
- [full changelog](http://github.com/sue445/cure_line/compare/v0.1.3...master)
2
+ [full changelog](http://github.com/sue445/cure_line/compare/v1.0.0...master)
3
+
4
+ ## v1.0.0
5
+ [full changelog](http://github.com/sue445/cure_line/compare/v0.1.3...v1.0.0)
6
+
7
+ ### BREAKING CHANGES :bomb:
8
+ * Drop support ruby 2.3 and 2.4
9
+ * https://github.com/sue445/cure_line/pull/19
10
+
11
+ ### Refactorings
12
+ * [Resolved] Deprecated warning on Ruby 2.7
13
+ * https://github.com/sue445/cure_line/pull/18
3
14
 
4
15
  ## v0.1.3
5
16
  [full changelog](http://github.com/sue445/cure_line/compare/v0.1.2...v0.1.3)
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [LINE TIMELINE](https://timeline.line.me/) scraping tool
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/cure_line.svg)](https://badge.fury.io/rb/cure_line)
5
- [![Build Status](https://travis-ci.org/sue445/cure_line.svg?branch=master)](https://travis-ci.org/sue445/cure_line)
5
+ [![Build Status](https://github.com/sue445/cure_line/workflows/test/badge.svg?branch=master)](https://github.com/sue445/cure_line/actions?query=workflow%3Atest)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/25259e188e96c1b78164/maintainability)](https://codeclimate.com/github/sue445/cure_line/maintainability)
7
7
  [![Coverage Status](https://coveralls.io/repos/github/sue445/cure_line/badge.svg?branch=master)](https://coveralls.io/github/sue445/cure_line?branch=master)
8
8
 
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = "https://github.com/sue445/cure_line"
15
15
  spec.license = "MIT"
16
16
 
17
- spec.required_ruby_version = ">= 2.3.0"
17
+ spec.required_ruby_version = ">= 2.5.0"
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
20
  f.match(%r{^(test|spec|features)/})
@@ -25,8 +25,7 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_dependency "hashie"
27
27
 
28
- spec.add_development_dependency "bundler", "~> 1.16"
29
- spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
28
+ spec.add_development_dependency "bundler", ">= 1.16"
30
29
  spec.add_development_dependency "coveralls"
31
30
  spec.add_development_dependency "pry-byebug"
32
31
  spec.add_development_dependency "rake", "~> 10.0"
@@ -39,7 +39,7 @@ module CureLine
39
39
  options["User-Agent"] = CureLine.config.user_agent if CureLine.config.user_agent
40
40
 
41
41
  url = "https://timeline.line.me/user/#{user_id}"
42
- html = open(url, options).read
42
+ html = URI.open(url, options).read
43
43
 
44
44
  m = html.match(%r{<script id="init_data" type="application/json">({.+})</script>})
45
45
  raise %Q(Not Found <script id="init_data" type="application/json"> in #{url}) unless m
@@ -1,3 +1,3 @@
1
1
  module CureLine
2
- VERSION = "0.1.3"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cure_line
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2020-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -28,30 +28,16 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.16'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.16'
41
- - !ruby/object:Gem::Dependency
42
- name: codeclimate-test-reporter
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 1.0.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 1.0.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: coveralls
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -158,9 +144,9 @@ extensions: []
158
144
  extra_rdoc_files: []
159
145
  files:
160
146
  - ".coveralls.yml"
147
+ - ".github/workflows/test.yml"
161
148
  - ".gitignore"
162
149
  - ".rspec"
163
- - ".travis.yml"
164
150
  - CHANGELOG.md
165
151
  - Gemfile
166
152
  - LICENSE.txt
@@ -189,15 +175,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
175
  requirements:
190
176
  - - ">="
191
177
  - !ruby/object:Gem::Version
192
- version: 2.3.0
178
+ version: 2.5.0
193
179
  required_rubygems_version: !ruby/object:Gem::Requirement
194
180
  requirements:
195
181
  - - ">="
196
182
  - !ruby/object:Gem::Version
197
183
  version: '0'
198
184
  requirements: []
199
- rubyforge_project:
200
- rubygems_version: 2.7.6
185
+ rubygems_version: 3.1.2
201
186
  signing_key:
202
187
  specification_version: 4
203
188
  summary: LINE TIMELINE scraping tool
@@ -1,27 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.3
4
- - 2.4.1
5
- - 2.5.0
6
- - ruby-head
7
- bundler_args: "--jobs=4"
8
- cache: bundler
9
- before_install:
10
- - gem update --system --no-document
11
- - gem install bundler -v 1.16.1 --no-document
12
- before_script:
13
- - export CODECLIMATE_REPO_TOKEN=29bb92272b70024f792a291432c81de6da73524199d344128630289f14367f9b
14
- script:
15
- - bundle exec rspec
16
- - bundle exec codeclimate-test-reporter
17
- branches:
18
- only:
19
- - master
20
- notifications:
21
- email: false
22
- slack:
23
- secure: u7fcioS9qrq1phAZ2sr6kueIwyIsZCLHWvrdY75Fc/+0STnSwYEVQ24rX1yY2A+ThJdfOcqriUb4txpH1QmGQaf4GgddMdhslr+uBA5ISQuBgI4QZ5ePb8w7CyJGGkZB6+61QMY5InorWuNxOcTcOhne40KTkdieH0HP2QIu2vRZlxWNrCZ3dlkIsVt5ndPRT5/+0RPicJthj/cSlcsavr/W68XV8qWx9xFZmVmxLRMuoo6fR2SH6qAn2xfrvuG0NUVnZWsoMaB7J4A3qZaeZmq5vbYlP6rdp+VyBZpDl84VpbCEGtXXMS0vE+qyRPUWQGWATGlnP3inp6dZ6wumiutDRDVkSH3zFGJfL3q6dXJRFiYFAP8H9vVBMKvQYqPBfRv1mOmdA9hyRTlkGbOogh4lv/+NCs8kbfvoTQ9ywSR9QWgfc6U066+SwXJ7PKgaRs+gYLi9H5TOprwhEgSSmrHD2kIepQwDdAttLM84msAoz+FNx2Uwt1tvvvfjfKanTlqQjZQed7cTxlevA0SHS/EM0MoGHPHrwmWA8LPgHxAGYdPKLFfQxNJNpLBi/WDnVFYE5xVxyXklJcAsjWXu4lDPOT/FurovsJSk+SpNOINAnvaD50RJDQCDwdv5qGuucb0dldJDaDC/wp6GDNecZWo6cUo7lnUbt/odrl/d6k0=
24
- matrix:
25
- allow_failures:
26
- - rvm: ruby-head
27
- sudo: false