jpmobile 7.2.0 → 8.1.0

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: d72981ae235237ef1bab49c5e4113fe1e4ab0c95ba36767b4483513f3cda1505
4
- data.tar.gz: 44d93b06f4e3c31f300adcaf411d50992b6d07ea5842a8d66525917c647abb2f
3
+ metadata.gz: eeb63b59e947babb76f23181a1d64a8a80c189ff8dfe688300f9f7ad732f823a
4
+ data.tar.gz: 11918a81e675d738cc128629eb1c8a4396f8745865cf9160484f40c6fc696e45
5
5
  SHA512:
6
- metadata.gz: 9083c648760665f1a5960474aceda88081fc2c516c7eeeb50860de8b337c08efdf74a20031887ab1842f77d4e1ef58389847429edd51ad5d1bf3f44480f9bd1d
7
- data.tar.gz: 397cb3b74428ccde97b84b9b6ba07eb99a0b5f2848bfad091714b72b7ec3367fa25a03a8250c41c28915078f9836eb62b3f24a16af9ee1984f29f95d8d85c70e
6
+ metadata.gz: 7f2f0d4de017c2966312bc421a149d0b2d3e51de1d3301491f95717d9f4f0e9b898bdfc4a6799301c8c2c6c314a2882123ab05e0a55c283f6f510fda279c96e9
7
+ data.tar.gz: 7cfa7d6ae82291d8fac57b4899c6ff49b74639cd47ad871bec7050213d10d995fd00d7533fbf88bd19e5491f6ec620768c92f7b65160f0426346fbde8cc20a22
data/.circleci/config.yml CHANGED
@@ -1,18 +1,18 @@
1
1
  version: 2.1
2
2
  orbs:
3
- browser-tools: circleci/browser-tools@1.4.8
3
+ browser-tools: circleci/browser-tools@2.3.2
4
4
  jobs:
5
5
  test-job:
6
6
  working_directory: ~/jpmobile
7
7
  docker:
8
- - image: cimg/ruby:3.3-browsers
8
+ - image: cimg/ruby:3.4.7-browsers
9
9
  environment:
10
10
  BUNDLE_JOBS: 3
11
11
  BUNDLE_RETRY: 3
12
12
  BUNDLE_PATH: vendor/bundle
13
13
  RAILS_ENV: test
14
14
  steps:
15
- - browser-tools/install-browser-tools
15
+ - browser-tools/install_browser_tools
16
16
  - checkout
17
17
 
18
18
  # Install dependent packages
data/.onkcop-config.yml CHANGED
@@ -125,7 +125,7 @@ Metrics/BlockLength:
125
125
  #################### Naming ################################
126
126
 
127
127
  # has_ から始まるメソッドは許可する
128
- Naming/PredicateName:
128
+ Naming/PredicatePrefix:
129
129
  ForbiddenPrefixes:
130
130
  - "is_"
131
131
  - "have_"
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-performance
3
3
 
4
4
  inherit_from: './.onkcop-config.yml'
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.4
1
+ 3.4.7
data/Gemfile CHANGED
@@ -6,10 +6,9 @@ gemspec
6
6
  gem 'geokit'
7
7
  gem 'git'
8
8
  gem 'pry'
9
- gem 'rails', '~> 7.2.0'
9
+ gem 'rails', '~> 8.1.0'
10
10
  gem 'rspec'
11
11
  gem 'rspec-its'
12
12
  gem 'rspec-rails'
13
13
  gem 'rubocop', require: false
14
14
  gem 'rubocop-performance', require: false
15
- gem 'sqlite3-ruby'
data/Gemfile.lock CHANGED
@@ -1,116 +1,122 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jpmobile (7.1.0)
4
+ jpmobile (8.0.0)
5
5
  mail (~> 2.8.0)
6
- rexml
7
6
  scanf
8
7
 
9
8
  GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
12
- actioncable (7.2.0)
13
- actionpack (= 7.2.0)
14
- activesupport (= 7.2.0)
11
+ action_text-trix (2.1.15)
12
+ railties
13
+ actioncable (8.1.1)
14
+ actionpack (= 8.1.1)
15
+ activesupport (= 8.1.1)
15
16
  nio4r (~> 2.0)
16
17
  websocket-driver (>= 0.6.1)
17
18
  zeitwerk (~> 2.6)
18
- actionmailbox (7.2.0)
19
- actionpack (= 7.2.0)
20
- activejob (= 7.2.0)
21
- activerecord (= 7.2.0)
22
- activestorage (= 7.2.0)
23
- activesupport (= 7.2.0)
19
+ actionmailbox (8.1.1)
20
+ actionpack (= 8.1.1)
21
+ activejob (= 8.1.1)
22
+ activerecord (= 8.1.1)
23
+ activestorage (= 8.1.1)
24
+ activesupport (= 8.1.1)
24
25
  mail (>= 2.8.0)
25
- actionmailer (7.2.0)
26
- actionpack (= 7.2.0)
27
- actionview (= 7.2.0)
28
- activejob (= 7.2.0)
29
- activesupport (= 7.2.0)
26
+ actionmailer (8.1.1)
27
+ actionpack (= 8.1.1)
28
+ actionview (= 8.1.1)
29
+ activejob (= 8.1.1)
30
+ activesupport (= 8.1.1)
30
31
  mail (>= 2.8.0)
31
32
  rails-dom-testing (~> 2.2)
32
- actionpack (7.2.0)
33
- actionview (= 7.2.0)
34
- activesupport (= 7.2.0)
33
+ actionpack (8.1.1)
34
+ actionview (= 8.1.1)
35
+ activesupport (= 8.1.1)
35
36
  nokogiri (>= 1.8.5)
36
- racc
37
- rack (>= 2.2.4, < 3.2)
37
+ rack (>= 2.2.4)
38
38
  rack-session (>= 1.0.1)
39
39
  rack-test (>= 0.6.3)
40
40
  rails-dom-testing (~> 2.2)
41
41
  rails-html-sanitizer (~> 1.6)
42
42
  useragent (~> 0.16)
43
- actiontext (7.2.0)
44
- actionpack (= 7.2.0)
45
- activerecord (= 7.2.0)
46
- activestorage (= 7.2.0)
47
- activesupport (= 7.2.0)
43
+ actiontext (8.1.1)
44
+ action_text-trix (~> 2.1.15)
45
+ actionpack (= 8.1.1)
46
+ activerecord (= 8.1.1)
47
+ activestorage (= 8.1.1)
48
+ activesupport (= 8.1.1)
48
49
  globalid (>= 0.6.0)
49
50
  nokogiri (>= 1.8.5)
50
- actionview (7.2.0)
51
- activesupport (= 7.2.0)
51
+ actionview (8.1.1)
52
+ activesupport (= 8.1.1)
52
53
  builder (~> 3.1)
53
54
  erubi (~> 1.11)
54
55
  rails-dom-testing (~> 2.2)
55
56
  rails-html-sanitizer (~> 1.6)
56
- activejob (7.2.0)
57
- activesupport (= 7.2.0)
57
+ activejob (8.1.1)
58
+ activesupport (= 8.1.1)
58
59
  globalid (>= 0.3.6)
59
- activemodel (7.2.0)
60
- activesupport (= 7.2.0)
61
- activerecord (7.2.0)
62
- activemodel (= 7.2.0)
63
- activesupport (= 7.2.0)
60
+ activemodel (8.1.1)
61
+ activesupport (= 8.1.1)
62
+ activerecord (8.1.1)
63
+ activemodel (= 8.1.1)
64
+ activesupport (= 8.1.1)
64
65
  timeout (>= 0.4.0)
65
- activestorage (7.2.0)
66
- actionpack (= 7.2.0)
67
- activejob (= 7.2.0)
68
- activerecord (= 7.2.0)
69
- activesupport (= 7.2.0)
66
+ activestorage (8.1.1)
67
+ actionpack (= 8.1.1)
68
+ activejob (= 8.1.1)
69
+ activerecord (= 8.1.1)
70
+ activesupport (= 8.1.1)
70
71
  marcel (~> 1.0)
71
- activesupport (7.2.0)
72
+ activesupport (8.1.1)
72
73
  base64
73
74
  bigdecimal
74
75
  concurrent-ruby (~> 1.0, >= 1.3.1)
75
76
  connection_pool (>= 2.2.5)
76
77
  drb
77
78
  i18n (>= 1.6, < 2)
79
+ json
78
80
  logger (>= 1.4.2)
79
81
  minitest (>= 5.1)
80
82
  securerandom (>= 0.3)
81
83
  tzinfo (~> 2.0, >= 2.0.5)
82
- addressable (2.8.6)
83
- public_suffix (>= 2.0.2, < 6.0)
84
- ast (2.4.2)
85
- base64 (0.2.0)
86
- bigdecimal (3.1.8)
87
- builder (3.2.4)
84
+ uri (>= 0.13.1)
85
+ addressable (2.8.7)
86
+ public_suffix (>= 2.0.2, < 7.0)
87
+ ast (2.4.3)
88
+ base64 (0.3.0)
89
+ bigdecimal (3.3.1)
90
+ builder (3.3.0)
88
91
  coderay (1.1.3)
89
- concurrent-ruby (1.3.3)
90
- connection_pool (2.4.1)
92
+ concurrent-ruby (1.3.5)
93
+ connection_pool (2.5.4)
91
94
  crass (1.0.6)
92
- date (3.3.4)
93
- diff-lcs (1.5.1)
94
- drb (2.2.1)
95
- erubi (1.12.0)
95
+ date (3.4.1)
96
+ diff-lcs (1.6.2)
97
+ drb (2.2.3)
98
+ erb (5.1.3)
99
+ erubi (1.13.1)
96
100
  geokit (1.14.0)
97
- git (2.1.1)
101
+ git (4.0.5)
98
102
  activesupport (>= 5.0)
99
103
  addressable (~> 2.8)
100
- process_executer (~> 1.1)
101
- rchardet (~> 1.8)
102
- globalid (1.2.1)
104
+ process_executer (~> 4.0)
105
+ rchardet (~> 1.9)
106
+ globalid (1.3.0)
103
107
  activesupport (>= 6.1)
104
- i18n (1.14.5)
108
+ i18n (1.14.7)
105
109
  concurrent-ruby (~> 1.0)
106
- io-console (0.6.0)
107
- irb (1.13.2)
110
+ io-console (0.8.1)
111
+ irb (1.15.2)
112
+ pp (>= 0.6.0)
108
113
  rdoc (>= 4.0.0)
109
114
  reline (>= 0.4.2)
110
- json (2.7.2)
111
- language_server-protocol (3.17.0.3)
112
- logger (1.4.4)
113
- loofah (2.22.0)
115
+ json (2.15.2)
116
+ language_server-protocol (3.17.0.5)
117
+ lint_roller (1.1.0)
118
+ logger (1.7.0)
119
+ loofah (2.24.1)
114
120
  crass (~> 1.0.2)
115
121
  nokogiri (>= 1.12.0)
116
122
  mail (2.8.1)
@@ -118,148 +124,158 @@ GEM
118
124
  net-imap
119
125
  net-pop
120
126
  net-smtp
121
- marcel (1.0.4)
122
- method_source (1.0.0)
127
+ marcel (1.1.0)
128
+ method_source (1.1.0)
123
129
  mini_mime (1.1.5)
124
- mini_portile2 (2.8.7)
125
- minitest (5.23.1)
126
- net-imap (0.4.14)
130
+ minitest (5.26.0)
131
+ net-imap (0.5.12)
127
132
  date
128
133
  net-protocol
129
134
  net-pop (0.1.2)
130
135
  net-protocol
131
136
  net-protocol (0.2.2)
132
137
  timeout
133
- net-smtp (0.4.0.1)
138
+ net-smtp (0.5.1)
134
139
  net-protocol
135
- nio4r (2.7.3)
136
- nokogiri (1.15.6)
137
- mini_portile2 (~> 2.8.2)
140
+ nio4r (2.7.4)
141
+ nokogiri (1.18.10-arm64-darwin)
142
+ racc (~> 1.4)
143
+ nokogiri (1.18.10-x86_64-linux-gnu)
138
144
  racc (~> 1.4)
139
- parallel (1.25.1)
140
- parser (3.3.4.0)
145
+ parallel (1.27.0)
146
+ parser (3.3.10.0)
141
147
  ast (~> 2.4.1)
142
148
  racc
143
- process_executer (1.1.0)
144
- pry (0.14.2)
149
+ pp (0.6.3)
150
+ prettyprint
151
+ prettyprint (0.2.0)
152
+ prism (1.6.0)
153
+ process_executer (4.0.0)
154
+ track_open_instances (~> 0.1)
155
+ pry (0.15.2)
145
156
  coderay (~> 1.1)
146
157
  method_source (~> 1.0)
147
- psych (5.1.2)
158
+ psych (5.2.6)
159
+ date
148
160
  stringio
149
- public_suffix (5.0.5)
150
- racc (1.8.0)
151
- rack (2.2.9)
152
- rack-session (1.0.2)
153
- rack (< 3)
154
- rack-test (2.1.0)
161
+ public_suffix (6.0.2)
162
+ racc (1.8.1)
163
+ rack (3.2.3)
164
+ rack-session (2.1.1)
165
+ base64 (>= 0.1.0)
166
+ rack (>= 3.0.0)
167
+ rack-test (2.2.0)
155
168
  rack (>= 1.3)
156
- rackup (1.0.0)
157
- rack (< 3)
158
- webrick
159
- rails (7.2.0)
160
- actioncable (= 7.2.0)
161
- actionmailbox (= 7.2.0)
162
- actionmailer (= 7.2.0)
163
- actionpack (= 7.2.0)
164
- actiontext (= 7.2.0)
165
- actionview (= 7.2.0)
166
- activejob (= 7.2.0)
167
- activemodel (= 7.2.0)
168
- activerecord (= 7.2.0)
169
- activestorage (= 7.2.0)
170
- activesupport (= 7.2.0)
169
+ rackup (2.2.1)
170
+ rack (>= 3)
171
+ rails (8.1.1)
172
+ actioncable (= 8.1.1)
173
+ actionmailbox (= 8.1.1)
174
+ actionmailer (= 8.1.1)
175
+ actionpack (= 8.1.1)
176
+ actiontext (= 8.1.1)
177
+ actionview (= 8.1.1)
178
+ activejob (= 8.1.1)
179
+ activemodel (= 8.1.1)
180
+ activerecord (= 8.1.1)
181
+ activestorage (= 8.1.1)
182
+ activesupport (= 8.1.1)
171
183
  bundler (>= 1.15.0)
172
- railties (= 7.2.0)
173
- rails-dom-testing (2.2.0)
184
+ railties (= 8.1.1)
185
+ rails-dom-testing (2.3.0)
174
186
  activesupport (>= 5.0.0)
175
187
  minitest
176
188
  nokogiri (>= 1.6)
177
- rails-html-sanitizer (1.6.0)
189
+ rails-html-sanitizer (1.6.2)
178
190
  loofah (~> 2.21)
179
- nokogiri (~> 1.14)
180
- railties (7.2.0)
181
- actionpack (= 7.2.0)
182
- activesupport (= 7.2.0)
191
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
192
+ railties (8.1.1)
193
+ actionpack (= 8.1.1)
194
+ activesupport (= 8.1.1)
183
195
  irb (~> 1.13)
184
196
  rackup (>= 1.0.0)
185
197
  rake (>= 12.2)
186
198
  thor (~> 1.0, >= 1.2.2)
199
+ tsort (>= 0.2)
187
200
  zeitwerk (~> 2.6)
188
201
  rainbow (3.1.1)
189
- rake (13.1.0)
190
- rchardet (1.8.0)
191
- rdoc (6.6.3.1)
202
+ rake (13.3.0)
203
+ rchardet (1.9.0)
204
+ rdoc (6.15.0)
205
+ erb
192
206
  psych (>= 4.0.0)
193
- regexp_parser (2.9.2)
194
- reline (0.4.3)
207
+ tsort
208
+ regexp_parser (2.11.3)
209
+ reline (0.6.2)
195
210
  io-console (~> 0.5)
196
- rexml (3.3.2)
197
- strscan
198
- rspec (3.13.0)
211
+ rspec (3.13.2)
199
212
  rspec-core (~> 3.13.0)
200
213
  rspec-expectations (~> 3.13.0)
201
214
  rspec-mocks (~> 3.13.0)
202
- rspec-core (3.13.0)
215
+ rspec-core (3.13.6)
203
216
  rspec-support (~> 3.13.0)
204
- rspec-expectations (3.13.1)
217
+ rspec-expectations (3.13.5)
205
218
  diff-lcs (>= 1.2.0, < 2.0)
206
219
  rspec-support (~> 3.13.0)
207
- rspec-its (1.3.0)
208
- rspec-core (>= 3.0.0)
209
- rspec-expectations (>= 3.0.0)
210
- rspec-mocks (3.13.1)
220
+ rspec-its (2.0.0)
221
+ rspec-core (>= 3.13.0)
222
+ rspec-expectations (>= 3.13.0)
223
+ rspec-mocks (3.13.6)
211
224
  diff-lcs (>= 1.2.0, < 2.0)
212
225
  rspec-support (~> 3.13.0)
213
- rspec-rails (6.1.3)
214
- actionpack (>= 6.1)
215
- activesupport (>= 6.1)
216
- railties (>= 6.1)
226
+ rspec-rails (8.0.2)
227
+ actionpack (>= 7.2)
228
+ activesupport (>= 7.2)
229
+ railties (>= 7.2)
217
230
  rspec-core (~> 3.13)
218
231
  rspec-expectations (~> 3.13)
219
232
  rspec-mocks (~> 3.13)
220
233
  rspec-support (~> 3.13)
221
- rspec-support (3.13.1)
222
- rubocop (1.65.0)
234
+ rspec-support (3.13.6)
235
+ rubocop (1.81.7)
223
236
  json (~> 2.3)
224
- language_server-protocol (>= 3.17.0)
237
+ language_server-protocol (~> 3.17.0.2)
238
+ lint_roller (~> 1.1.0)
225
239
  parallel (~> 1.10)
226
240
  parser (>= 3.3.0.2)
227
241
  rainbow (>= 2.2.2, < 4.0)
228
- regexp_parser (>= 2.4, < 3.0)
229
- rexml (>= 3.2.5, < 4.0)
230
- rubocop-ast (>= 1.31.1, < 2.0)
242
+ regexp_parser (>= 2.9.3, < 3.0)
243
+ rubocop-ast (>= 1.47.1, < 2.0)
231
244
  ruby-progressbar (~> 1.7)
232
- unicode-display_width (>= 2.4.0, < 3.0)
233
- rubocop-ast (1.31.3)
234
- parser (>= 3.3.1.0)
235
- rubocop-performance (1.21.1)
236
- rubocop (>= 1.48.1, < 2.0)
237
- rubocop-ast (>= 1.31.1, < 2.0)
245
+ unicode-display_width (>= 2.4.0, < 4.0)
246
+ rubocop-ast (1.47.1)
247
+ parser (>= 3.3.7.2)
248
+ prism (~> 1.4)
249
+ rubocop-performance (1.26.1)
250
+ lint_roller (~> 1.1)
251
+ rubocop (>= 1.75.0, < 2.0)
252
+ rubocop-ast (>= 1.47.1, < 2.0)
238
253
  ruby-progressbar (1.13.0)
239
254
  scanf (1.0.0)
240
- securerandom (0.3.1)
241
- sqlite3 (1.6.1)
242
- mini_portile2 (~> 2.8.0)
243
- sqlite3-ruby (1.3.3)
244
- sqlite3 (>= 1.3.3)
245
- stringio (3.0.9)
246
- strscan (3.1.0)
247
- thor (1.3.1)
248
- timeout (0.4.1)
255
+ securerandom (0.4.1)
256
+ stringio (3.1.7)
257
+ thor (1.4.0)
258
+ timeout (0.4.3)
259
+ track_open_instances (0.1.15)
260
+ tsort (0.2.0)
249
261
  tzinfo (2.0.6)
250
262
  concurrent-ruby (~> 1.0)
251
- unicode-display_width (2.5.0)
252
- useragent (0.16.10)
253
- webrick (1.8.1)
254
- websocket-driver (0.7.6)
263
+ unicode-display_width (3.2.0)
264
+ unicode-emoji (~> 4.1)
265
+ unicode-emoji (4.1.0)
266
+ uri (1.0.4)
267
+ useragent (0.16.11)
268
+ websocket-driver (0.8.0)
269
+ base64
255
270
  websocket-extensions (>= 0.1.0)
256
271
  websocket-extensions (0.1.5)
257
- zeitwerk (2.6.16)
272
+ zeitwerk (2.7.3)
258
273
 
259
274
  PLATFORMS
260
275
  arm64-darwin-20
261
276
  arm64-darwin-21
262
277
  arm64-darwin-23
278
+ arm64-darwin-24
263
279
  x86_64-linux
264
280
 
265
281
  DEPENDENCIES
@@ -267,13 +283,12 @@ DEPENDENCIES
267
283
  git
268
284
  jpmobile!
269
285
  pry
270
- rails (~> 7.2.0)
286
+ rails (~> 8.1.0)
271
287
  rspec
272
288
  rspec-its
273
289
  rspec-rails
274
290
  rubocop
275
291
  rubocop-performance
276
- sqlite3-ruby
277
292
 
278
293
  BUNDLED WITH
279
- 2.5.17
294
+ 2.6.2
data/jpmobile.gemspec CHANGED
@@ -21,7 +21,6 @@ Gem::Specification.new do |gem|
21
21
  gem.required_ruby_version = '>= 3.2.0'
22
22
 
23
23
  gem.add_dependency 'mail', '~> 2.8.0'
24
- gem.add_dependency 'rexml'
25
24
  gem.add_dependency 'scanf'
26
25
  gem.metadata['rubygems_mfa_required'] = 'true'
27
26
  end
@@ -5,6 +5,7 @@ class ActionController::Base # :nodoc:
5
5
  class << self
6
6
  def docomo_guid(mode = :docomo)
7
7
  include Jpmobile::DocomoGuid
8
+
8
9
  self.docomo_guid_mode = mode
9
10
  end
10
11
  end
@@ -20,7 +20,7 @@ module Jpmobile
20
20
  UTF8_REGEXP = Regexp.union(*EMOTICON_UNICODES.map {|x| [x].pack('U') }).freeze
21
21
 
22
22
  # for PC conversion "GETA"
23
- CONVERSION_TABLE_TO_PC_EMAIL = Hash[*(CONVERSION_TABLE_TO_SOFTBANK.keys | CONVERSION_TABLE_TO_DOCOMO.keys | CONVERSION_TABLE_TO_AU.keys).map {|k| [k, GETA] }.flatten]
23
+ CONVERSION_TABLE_TO_PC_EMAIL = Hash[*(CONVERSION_TABLE_TO_SOFTBANK.keys | CONVERSION_TABLE_TO_DOCOMO.keys | CONVERSION_TABLE_TO_AU.keys).map {|k| [k, GETA] }.flatten!]
24
24
 
25
25
  SOFTBANK_SJIS_REGEXP = Regexp.union(*SOFTBANK_SJIS_TO_UNICODE.keys.map {|s| Jpmobile::Util.sjis_regexp(s) }).freeze
26
26
  AU_EMAILJIS_REGEXP = Regexp.union(*AU_EMAILJIS_TO_UNICODE.keys.map {|s| Jpmobile::Util.jis_regexp(s) })
@@ -286,7 +286,7 @@ module Jpmobile
286
286
 
287
287
  begin
288
288
  yaml_hash = YAML.load_file(@pc_emoticon_yaml)
289
- @pc_emoticon_hash = Hash[*(yaml_hash.values.inject([]) {|r, v| r += v.to_a.flatten; r })]
289
+ @pc_emoticon_hash = Hash[*yaml_hash.values.inject([]) {|r, v| r += v.to_a.flatten; r }]
290
290
  @pc_emoticon_image_path.chop! if @pc_emoticon_image_path.match?(%r{/$})
291
291
 
292
292
  return true
@@ -2,7 +2,7 @@ require 'jpmobile/lookup_context'
2
2
 
3
3
  module Jpmobile
4
4
  module FallbackViewSelector
5
- def render_to_body(options)
5
+ def _render_template(options)
6
6
  if Jpmobile.config.fallback_view_selector &&
7
7
  lookup_context.mobile.present? && !lookup_context.mobile.empty?
8
8
  begin
@@ -94,7 +94,7 @@ module Jpmobile::Mobile
94
94
  def variants
95
95
  return @_variants if @_variants
96
96
 
97
- @_variants = self.class.ancestors.select {|c| c.to_s =~ /^Jpmobile/ && c.to_s !~ /Emoticon/ }.map do |klass|
97
+ @_variants = self.class.ancestors.select {|c| c.to_s =~ /^Jpmobile/ && c.to_s !~ /Emoticon/ }.map! do |klass|
98
98
  klass = klass.to_s.
99
99
  gsub('Jpmobile::', '').
100
100
  gsub('AbstractMobile::', '').
@@ -108,9 +108,9 @@ module Jpmobile::Mobile
108
108
  end
109
109
 
110
110
  if @_variants.include?('tablet')
111
- @_variants = @_variants.reject {|v| v == 'mobile' }.map {|v| v.gsub('mobile_', 'tablet_') }
111
+ @_variants = @_variants.reject {|v| v == 'mobile' }.map! {|v| v.gsub('mobile_', 'tablet_') }
112
112
  elsif @_variants.include?('smart_phone')
113
- @_variants = @_variants.reject {|v| v == 'mobile' }.map {|v| v.gsub('mobile_', 'smart_phone_') }
113
+ @_variants = @_variants.reject {|v| v == 'mobile' }.map! {|v| v.gsub('mobile_', 'smart_phone_') }
114
114
  end
115
115
 
116
116
  @_variants || []
@@ -29,7 +29,7 @@ module Jpmobile::Mobile
29
29
  return @__posotion = nil if params['lat'].nil? || params['lat'] == '' || params['lon'].nil? || params['lon'] == ''
30
30
 
31
31
  l = Jpmobile::Position.new
32
- l.options = params.select {|x, _| TARGET_PARAMS.include?(x) }
32
+ l.options = params.slice(*TARGET_PARAMS)
33
33
  case params['unit']
34
34
  when '1'
35
35
  l.lat = params['lat'].to_f
@@ -38,7 +38,7 @@ module Jpmobile::Mobile
38
38
  l = Jpmobile::Position.new
39
39
  l.lat = ((Regexp.last_match(1) == 'N') ? 1 : -1) * Jpmobile::Position.dms2deg(Regexp.last_match(2), Regexp.last_match(3), Regexp.last_match(4))
40
40
  l.lon = ((Regexp.last_match(5) == 'E') ? 1 : -1) * Jpmobile::Position.dms2deg(Regexp.last_match(6), Regexp.last_match(7), Regexp.last_match(8))
41
- l.options = params.select {|x, _| TARGET_PARAMS.include?(x) }
41
+ l.options = params.slice(*TARGET_PARAMS)
42
42
 
43
43
  @__position = l
44
44
  end
@@ -13,6 +13,7 @@ module Jpmobile
13
13
  if Object.const_defined?(:GeoKit)
14
14
  # GeoKitが読み込まれている場合はMappableにする
15
15
  include ::GeoKit::Mappable
16
+
16
17
  def self.acts_as_mappable
17
18
  end
18
19
 
@@ -34,7 +34,7 @@ module Jpmobile
34
34
  mobile and !mobile.smart_phone?
35
35
  end
36
36
 
37
- # viewの切り替えをするかどうか
37
+ # スマートフォンであれば +true+を、そうでなければ +false+ を返す。
38
38
  def smart_phone?
39
39
  mobile and mobile.smart_phone?
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module Jpmobile
2
- VERSION = '7.2.0'.freeze
2
+ VERSION = '8.1.0'.freeze
3
3
  end
@@ -8,6 +8,8 @@ module Jpmobile
8
8
  self.view_paths = Jpmobile::PathSet.new(self.view_paths.paths.map(&:path))
9
9
  end
10
10
 
11
+ private
12
+
11
13
  def register_mobile
12
14
  if request.mobile
13
15
  # register mobile
@@ -18,8 +20,6 @@ module Jpmobile
18
20
  def disable_mobile_view!
19
21
  self.lookup_context.mobile = []
20
22
  end
21
-
22
- private :register_mobile, :disable_mobile_view!
23
23
  end
24
24
  Rails::Application::Configuration.include Jpmobile::Configuration::RailsConfiguration
25
25
  end
data/lib/jpmobile.rb CHANGED
@@ -58,7 +58,7 @@ module Jpmobile
58
58
 
59
59
  @all_variants = carriers.map {|carrier|
60
60
  Jpmobile::Mobile.const_get(carrier).new({}, {}).variants
61
- }.flatten.uniq
61
+ }.flatten!.uniq
62
62
  end
63
63
 
64
64
  require 'jpmobile/mobile/abstract_mobile'
@@ -27,13 +27,13 @@ namespace :test do
27
27
  rails_root = 'test/rails/rails_root'
28
28
 
29
29
  puts 'Running tests in Rails'
30
- skip = args.skip == 'true'
30
+ skip = !args.skip.nil?
31
31
 
32
32
  unless skip
33
33
  # generate rails app
34
34
  FileUtils.rm_rf(rails_root)
35
35
  FileUtils.mkdir_p(rails_root)
36
- `rails new #{rails_root} --skip-bundle --skip-bootsnap --skip-webpack-install --skip-git --skip-spring`
36
+ `bundle exec rails new #{rails_root} --skip-bundle --skip-bootsnap --skip-webpack-install --skip-git --skip-spring`
37
37
  end
38
38
 
39
39
  # setup jpmobile
data/renovate.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
3
  "extends": [
4
- "config:base"
4
+ "config:recommended"
5
5
  ]
6
6
  }
@@ -4,7 +4,7 @@ gem 'jpmobile', path: './vendor/jpmobile'
4
4
  gem 'jpmobile-terminfo', path: './vendor/jpmobile-terminfo'
5
5
  gem 'jpmobile-ipaddresses', path: './vendor/jpmobile-ipaddresses'
6
6
 
7
- gem 'activerecord-session_store', git: 'https://github.com/rails/activerecord-session_store.git', ref: 'f188efbc49a522123cc8acc805143824176d01c1'
7
+ gem 'activerecord-session_store'
8
8
 
9
9
  gem 'pry'
10
10
  gem 'pry-byebug'
@@ -40,7 +40,7 @@ describe 'jpmobile integration spec', type: :feature do
40
40
  shared_examples_for '文字コードフィルタが動作しているとき' do
41
41
  it 'response.bodyが空のときは文字コードを変更しないこと' do
42
42
  visit "/#{controller}/empty"
43
- expect(page.response_headers['Content-Type']).to match(/utf-8/i)
43
+ expect(extract_response_header(page, 'Content-Type')).to match(/utf-8/i)
44
44
  end
45
45
  end
46
46
 
@@ -48,13 +48,13 @@ describe 'jpmobile integration spec', type: :feature do
48
48
  it 'はShift_JISで携帯に送出されること' do
49
49
  visit "/#{controller}/abracadabra_utf8"
50
50
  expect(page.body.encode('UTF-8')).to have_content('アブラカダブラ')
51
- expect(page.response_headers['Content-Type']).to match(/Shift_JIS/i)
51
+ expect(extract_response_header(page, 'Content-Type')).to match(/Shift_JIS/i)
52
52
  end
53
53
  it 'はxhtmlでもShift_JISで携帯に送出されること' do
54
54
  visit "/#{controller}/abracadabra_xhtml_utf8"
55
55
 
56
56
  expect(page.body.encode('UTF-8')).to have_content('アブラカダブラ')
57
- expect(page.response_headers['Content-Type']).to match(/Shift_JIS/i)
57
+ expect(extract_response_header(page, 'Content-Type')).to match(/Shift_JIS/i)
58
58
  end
59
59
  it 'はShift_JISで渡されたパラメタがparamsにUTF-8に変換されて格納されること' do
60
60
  visit "/#{controller}/index_zenkaku?q=#{CGI.escape(utf8_to_sjis("アブラカダブラ"))}"
@@ -72,12 +72,12 @@ describe 'jpmobile integration spec', type: :feature do
72
72
  it 'はUTF-8で携帯に送出されること' do
73
73
  visit "/#{controller}/abracadabra_utf8"
74
74
  expect(page.body.encode('UTF-8')).to have_content('アブラカダブラ')
75
- expect(page.response_headers['Content-Type']).to match(/utf-8/i)
75
+ expect(extract_response_header(page, 'Content-Type')).to match(/utf-8/i)
76
76
  end
77
77
  it 'はxhtmlでもUTF-8で携帯に送出されること' do
78
78
  visit "/#{controller}/abracadabra_xhtml_utf8"
79
79
  expect(page.body.encode('UTF-8')).to have_content('アブラカダブラ')
80
- expect(page.response_headers['Content-Type']).to match(/utf-8/i)
80
+ expect(extract_response_header(page, 'Content-Type')).to match(/utf-8/i)
81
81
  end
82
82
  it 'はparamsにUTF-8のまま格納されること' do
83
83
  visit "/#{controller}/index_zenkaku?q=#{CGI.escape("アブラカダブラ")}"
@@ -94,7 +94,7 @@ describe 'jpmobile integration spec', type: :feature do
94
94
  it 'は半角に変換されShift_JISで携帯に送出されること' do
95
95
  visit "/#{controller}/abracadabra_utf8"
96
96
  expect(page.body.encode('UTF-8')).to have_content('アブラカダブラ') # アブラカダブラ半角,SJIS
97
- expect(page.response_headers['Content-Type']).to match(/Shift_JIS/)
97
+ expect(extract_response_header(page, 'Content-Type')).to match(/Shift_JIS/)
98
98
  end
99
99
  it 'はShift_JISで渡されたパラメタがparamsにUTF-8に変換されて格納されること' do
100
100
  visit "/#{controller}/index_zenkaku?q=#{CGI.escape(utf8_to_sjis("アブラカダブラ"))}"
@@ -112,7 +112,7 @@ describe 'jpmobile integration spec', type: :feature do
112
112
  it 'はUTF-8半角で携帯に送出されること' do
113
113
  visit "/#{controller}/abracadabra_utf8"
114
114
  expect(page.body.encode('UTF-8')).to have_content('アブラカダブラ')
115
- expect(page.response_headers['Content-Type']).to match(/utf-8/i)
115
+ expect(extract_response_header(page, 'Content-Type')).to match(/utf-8/i)
116
116
  end
117
117
  it 'はparamsにUTF-8のまま格納されること' do
118
118
  visit "/#{controller}/index_zenkaku?q=#{CGI.escape("アブラカダブラ")}"
@@ -223,7 +223,7 @@ describe 'jpmobile integration spec', type: :feature do
223
223
 
224
224
  it 'Content-Type が UTF-8 であること' do
225
225
  visit "/#{controller}/with_charset"
226
- expect(page.response_headers['Content-Type']).to match(/UTF-8/i)
226
+ expect(extract_response_header(page, 'Content-Type')).to match(/UTF-8/i)
227
227
  end
228
228
  end
229
229
  end
@@ -1,3 +1,7 @@
1
1
  require 'rails_helper'
2
2
 
3
3
  Dir[File.join(__dir__, 'system/support/**/*.rb')].each {|file| require file }
4
+
5
+ def extract_response_header(page, header)
6
+ page.response_headers[header] || page.response_headers[header.downcase]
7
+ end
@@ -8,6 +8,7 @@ require 'jpmobile/sinatra'
8
8
 
9
9
  class SinatraTestHelper
10
10
  include Singleton
11
+
11
12
  attr_accessor :last_app
12
13
  end
13
14
 
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpmobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.0
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shin-ichiro OGAWA
8
8
  - Yoji Shidara
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2024-08-15 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: mail
@@ -25,20 +24,6 @@ dependencies:
25
24
  - - "~>"
26
25
  - !ruby/object:Gem::Version
27
26
  version: 2.8.0
28
- - !ruby/object:Gem::Dependency
29
- name: rexml
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: '0'
42
27
  - !ruby/object:Gem::Dependency
43
28
  name: scanf
44
29
  requirement: !ruby/object:Gem::Requirement
@@ -341,7 +326,6 @@ metadata:
341
326
  source_code_uri: https://github.com/jpmobile/jpmobile
342
327
  documentation_uri: https://github.com/jpmobile/jpmobile
343
328
  rubygems_mfa_required: 'true'
344
- post_install_message:
345
329
  rdoc_options: []
346
330
  require_paths:
347
331
  - lib
@@ -356,8 +340,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
340
  - !ruby/object:Gem::Version
357
341
  version: '0'
358
342
  requirements: []
359
- rubygems_version: 3.5.11
360
- signing_key:
343
+ rubygems_version: 3.6.9
361
344
  specification_version: 4
362
345
  summary: Rails plugin for mobile devices in Japan
363
346
  test_files: []