irasutoya 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6c34130f06a3b94e02fedad0c2eaf53a782cd1440f8ad6b045c3f42932b1250
4
- data.tar.gz: c62d42c3fafeacc06854dafa5d153ee4e614f2d341f4b5766da55d3ee72752d5
3
+ metadata.gz: 75db350289e478852d44bc49f07c8ce80fe0146f6e3459ca12aae2391611a7ce
4
+ data.tar.gz: 75ff785b36ec5c2758a2c90c18decb5e2cb82015cc25fbda6db58723a6269a73
5
5
  SHA512:
6
- metadata.gz: 0a13d0edc6f15948dd43057f6f9c154fd2163bf6be5eb9276d421b70e9e124ed85639f8441e0c6b9279ab01ac77f0482720e911ca68b7616cd009f38b709c6d8
7
- data.tar.gz: 79b2ded3f30e0c756d557a6d6a9bfdde1e843663c09aa399af9b97d88004bee627140734848ad71ee37c061eebdbd7a056db561dfc2bde7e12da12a8e1806a69
6
+ metadata.gz: 1bf176997b5ebe306e722d0fa91414d14606354dd51d26ce07164f0f0bad3f700a62db725b867b0dbac025f2ff16803bca9eaee5b10ca63b2dad5f76e4ebaa9f
7
+ data.tar.gz: f3823fc519f716972533216eed6fd9914529bc7bf7204a71d0e5fac7a7d93925ad75bc4f3bdfd4cd154f20e71e597ee9945d666a316c9a53802a0cc9a74ec8d8
@@ -0,0 +1 @@
1
+ * @unhappychoice
data/.rubocop.yml CHANGED
@@ -7,6 +7,6 @@ AllCops:
7
7
  Style/Documentation:
8
8
  Enabled: false
9
9
 
10
- Metrics/LineLength:
10
+ Layout/LineLength:
11
11
  Max: 120
12
12
 
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- irasutoya (2.0.1)
4
+ irasutoya (2.0.3)
5
5
  nokogiri
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (8.0.1)
10
+ activesupport (7.2.3)
11
11
  base64
12
12
  benchmark (>= 0.3)
13
13
  bigdecimal
@@ -19,26 +19,28 @@ GEM
19
19
  minitest (>= 5.1)
20
20
  securerandom (>= 0.3)
21
21
  tzinfo (~> 2.0, >= 2.0.5)
22
- uri (>= 0.13.1)
23
- ast (2.4.2)
24
- base64 (0.2.0)
25
- benchmark (0.4.0)
26
- bigdecimal (3.1.9)
27
- codecov (0.6.0)
28
- simplecov (>= 0.15, < 0.22)
22
+ ast (2.4.3)
23
+ base64 (0.3.0)
24
+ benchmark (0.5.0)
25
+ bigdecimal (4.0.1)
26
+ codecov (0.2.12)
27
+ json
28
+ simplecov
29
29
  coderay (1.1.3)
30
- concurrent-ruby (1.3.4)
31
- connection_pool (2.4.1)
32
- csv (3.3.2)
33
- diff-lcs (1.5.1)
30
+ concurrent-ruby (1.3.6)
31
+ connection_pool (2.5.5)
32
+ csv (3.3.5)
33
+ diff-lcs (1.6.2)
34
34
  docile (1.4.1)
35
- drb (2.2.1)
36
- ffi (1.17.1)
37
- fileutils (1.7.3)
38
- formatador (1.1.0)
39
- guard (2.19.0)
35
+ drb (2.2.3)
36
+ ffi (1.17.3)
37
+ fileutils (1.8.0)
38
+ formatador (1.2.3)
39
+ reline
40
+ guard (2.20.1)
40
41
  formatador (>= 0.2.4)
41
42
  listen (>= 2.7, < 4.0)
43
+ logger (~> 1.6)
42
44
  lumberjack (>= 1.0.12, < 2.0)
43
45
  nenv (~> 0.1)
44
46
  notiffany (~> 0.0)
@@ -53,99 +55,114 @@ GEM
53
55
  guard-rubocop (1.5.0)
54
56
  guard (~> 2.0)
55
57
  rubocop (< 2.0)
56
- i18n (1.14.6)
58
+ i18n (1.14.8)
57
59
  concurrent-ruby (~> 1.0)
58
- json (2.9.1)
59
- language_server-protocol (3.17.0.3)
60
- listen (3.9.0)
60
+ io-console (0.8.2)
61
+ json (2.18.0)
62
+ language_server-protocol (3.17.0.5)
63
+ lint_roller (1.1.0)
64
+ listen (3.10.0)
65
+ logger
61
66
  rb-fsevent (~> 0.10, >= 0.10.3)
62
67
  rb-inotify (~> 0.9, >= 0.9.10)
63
- logger (1.6.4)
64
- lumberjack (1.2.10)
68
+ logger (1.7.0)
69
+ lumberjack (1.4.2)
65
70
  method_source (1.1.0)
66
71
  mini_portile2 (2.8.9)
67
- minitest (5.25.4)
72
+ minitest (5.27.0)
73
+ mutex_m (0.3.0)
68
74
  nenv (0.3.0)
69
- nokogiri (1.18.8)
75
+ nokogiri (1.18.10)
70
76
  mini_portile2 (~> 2.8.2)
71
77
  racc (~> 1.4)
72
78
  notiffany (0.1.3)
73
79
  nenv (~> 0.1)
74
80
  shellany (~> 0.0)
75
- parallel (1.26.3)
76
- parser (3.3.6.0)
81
+ parallel (1.27.0)
82
+ parser (3.3.10.1)
77
83
  ast (~> 2.4.1)
78
84
  racc
79
- pry (0.15.2)
85
+ prism (1.9.0)
86
+ pry (0.16.0)
80
87
  coderay (~> 1.1)
81
88
  method_source (~> 1.0)
89
+ reline (>= 0.6.0)
82
90
  racc (1.8.1)
83
91
  rainbow (3.1.1)
84
- rake (13.2.1)
92
+ rake (13.3.1)
85
93
  rb-fsevent (0.11.2)
86
94
  rb-inotify (0.11.1)
87
95
  ffi (~> 1.0)
88
- rbs (3.8.1)
96
+ rbs (3.10.3)
89
97
  logger
90
- regexp_parser (2.10.0)
91
- rspec (3.13.0)
98
+ tsort
99
+ regexp_parser (2.11.3)
100
+ reline (0.6.3)
101
+ io-console (~> 0.5)
102
+ rspec (3.13.2)
92
103
  rspec-core (~> 3.13.0)
93
104
  rspec-expectations (~> 3.13.0)
94
105
  rspec-mocks (~> 3.13.0)
95
- rspec-core (3.13.2)
106
+ rspec-core (3.13.6)
96
107
  rspec-support (~> 3.13.0)
97
- rspec-expectations (3.13.3)
108
+ rspec-expectations (3.13.5)
98
109
  diff-lcs (>= 1.2.0, < 2.0)
99
110
  rspec-support (~> 3.13.0)
100
- rspec-mocks (3.13.2)
111
+ rspec-mocks (3.13.7)
101
112
  diff-lcs (>= 1.2.0, < 2.0)
102
113
  rspec-support (~> 3.13.0)
103
- rspec-support (3.13.2)
104
- rubocop (1.69.2)
114
+ rspec-support (3.13.7)
115
+ rubocop (1.84.1)
105
116
  json (~> 2.3)
106
- language_server-protocol (>= 3.17.0)
117
+ language_server-protocol (~> 3.17.0.2)
118
+ lint_roller (~> 1.1.0)
107
119
  parallel (~> 1.10)
108
120
  parser (>= 3.3.0.2)
109
121
  rainbow (>= 2.2.2, < 4.0)
110
122
  regexp_parser (>= 2.9.3, < 3.0)
111
- rubocop-ast (>= 1.36.2, < 2.0)
123
+ rubocop-ast (>= 1.49.0, < 2.0)
112
124
  ruby-progressbar (~> 1.7)
113
125
  unicode-display_width (>= 2.4.0, < 4.0)
114
- rubocop-ast (1.37.0)
115
- parser (>= 3.3.1.0)
126
+ rubocop-ast (1.49.0)
127
+ parser (>= 3.3.7.2)
128
+ prism (~> 1.7)
116
129
  ruby-progressbar (1.13.0)
117
130
  securerandom (0.4.1)
118
131
  shellany (0.0.1)
119
- simplecov (0.21.2)
132
+ simplecov (0.22.0)
120
133
  docile (~> 1.1)
121
134
  simplecov-html (~> 0.11)
122
135
  simplecov_json_formatter (~> 0.1)
123
- simplecov-html (0.13.1)
136
+ simplecov-html (0.13.2)
124
137
  simplecov_json_formatter (0.1.4)
125
- steep (1.9.3)
138
+ steep (1.10.0)
126
139
  activesupport (>= 5.1)
127
140
  concurrent-ruby (>= 1.1.10)
128
141
  csv (>= 3.0.9)
129
142
  fileutils (>= 1.1.0)
130
143
  json (>= 2.1.0)
131
- language_server-protocol (>= 3.15, < 4.0)
144
+ language_server-protocol (>= 3.17.0.4, < 4.0)
132
145
  listen (~> 3.0)
133
146
  logger (>= 1.3.0)
147
+ mutex_m (>= 0.3.0)
134
148
  parser (>= 3.1)
135
149
  rainbow (>= 2.2.2, < 4.0)
136
- rbs (~> 3.8)
150
+ rbs (~> 3.9)
137
151
  securerandom (>= 0.1)
138
152
  strscan (>= 1.0.0)
139
- terminal-table (>= 2, < 4)
153
+ terminal-table (>= 2, < 5)
140
154
  uri (>= 0.12.0)
141
- strscan (3.1.2)
142
- terminal-table (3.0.2)
143
- unicode-display_width (>= 1.1.1, < 3)
144
- thor (1.3.2)
155
+ strscan (3.1.7)
156
+ terminal-table (4.0.0)
157
+ unicode-display_width (>= 1.1.1, < 4)
158
+ thor (1.5.0)
159
+ tsort (0.2.0)
145
160
  tzinfo (2.0.6)
146
161
  concurrent-ruby (~> 1.0)
147
- unicode-display_width (2.6.0)
148
- uri (1.0.3)
162
+ unicode-display_width (3.2.0)
163
+ unicode-emoji (~> 4.1)
164
+ unicode-emoji (4.2.0)
165
+ uri (1.1.1)
149
166
 
150
167
  PLATFORMS
151
168
  ruby
@@ -49,7 +49,7 @@ module Irasutoya
49
49
  end
50
50
 
51
51
  def random_url
52
- jsonp = Net::HTTP.get('www.irasutoya.com', random_api_path)
52
+ jsonp = Net::HTTP.get(URI.parse("https://www.irasutoya.com#{random_api_path}"))
53
53
  JSON.parse(jsonp[/{.+}/]) # rubocop:disable Style/SingleArgumentDig
54
54
  .dig('feed', 'entry')
55
55
  .first
@@ -26,7 +26,9 @@ module Irasutoya
26
26
  end
27
27
 
28
28
  def description_from(document:)
29
- document.css('.entry').css('.separator')[1].text.strip
29
+ separators = document.css('.entry .separator')
30
+ target = separators.length > 1 ? separators[1] : separators[0]
31
+ target&.text&.strip || ''
30
32
  end
31
33
 
32
34
  def image_url_from(document:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Irasutoya
4
- VERSION = '2.0.1'
4
+ VERSION = '2.0.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irasutoya
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Ueki
@@ -198,6 +198,7 @@ executables: []
198
198
  extensions: []
199
199
  extra_rdoc_files: []
200
200
  files:
201
+ - ".github/CODEOWNERS"
201
202
  - ".github/dependabot.yml"
202
203
  - ".github/workflows/release.yaml"
203
204
  - ".github/workflows/test.yml"