jpmobile 7.0.4 → 7.1.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: 8acb3fe12055999174dfcc30d0921aa35a248e22d9fb64540114e41bded0672e
4
- data.tar.gz: dba26d765bb314423d84acbad508f79ba7b2d0169a5c58c2e5b2613231ae50b2
3
+ metadata.gz: d1bf5ac7b8990ee2a93e32ae73d0c17e4d885a6a54ab638afdbfa00702a3ff92
4
+ data.tar.gz: edeffe639d9688089207d519641fe3ee1ee64009f5be1599ac1e4f98f055c870
5
5
  SHA512:
6
- metadata.gz: c466981bb59f0bbae858d9c798d6f9376ba55a3d7c614619b9ac8741480f7518c5e6690ba905c7db032d8ed9ee915fdf0ee54ac09211c037517f4b99f022ec43
7
- data.tar.gz: 0b20fa2cccb7cdd57c5505029c8300bc8d1e0f0851da5e0251dea95dc34e7c0b6aaf6af4e4f20f7e452888f5f1dd4ecff392469301df644133cc000f83a55daa
6
+ metadata.gz: 6ce5bad75caf0768608ca2c1ff7e82a2acac24ed986c2bca3a7e06e3dddc14b59b3d3fcb140c308c0951e6e7fbd7b93b93bfc53c7519e90dcedf60184b7fb7d0
7
+ data.tar.gz: a4ee5011bd2eb575e0fc1bc3d7cf502ac5abe6aeeb8f2c2d1101b0f73c3bd3ddaccaa55d82afbe790e37b50b2fa91f6ccfbe8e44282d3f4c2f919775de1d9095
data/.circleci/config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  version: 2.1
2
2
  orbs:
3
- browser-tools: circleci/browser-tools@1.4.1
3
+ browser-tools: circleci/browser-tools@1.4.6
4
4
  jobs:
5
5
  test-job:
6
6
  working_directory: ~/jpmobile
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.1
1
+ 3.2.2
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gem 'geokit'
7
7
  gem 'git'
8
8
  gem 'hpricot'
9
9
  gem 'pry'
10
- gem 'rails', '~> 7.0.0'
10
+ gem 'rails', '~> 7.1.0'
11
11
  gem 'rspec'
12
12
  gem 'rspec-its'
13
13
  gem 'rspec-rails'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jpmobile (7.0.3)
4
+ jpmobile (7.0.4)
5
5
  mail (~> 2.7.0)
6
6
  rexml
7
7
  scanf
@@ -9,221 +9,261 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (7.0.4.3)
13
- actionpack (= 7.0.4.3)
14
- activesupport (= 7.0.4.3)
12
+ actioncable (7.1.0)
13
+ actionpack (= 7.1.0)
14
+ activesupport (= 7.1.0)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailbox (7.0.4.3)
18
- actionpack (= 7.0.4.3)
19
- activejob (= 7.0.4.3)
20
- activerecord (= 7.0.4.3)
21
- activestorage (= 7.0.4.3)
22
- activesupport (= 7.0.4.3)
17
+ zeitwerk (~> 2.6)
18
+ actionmailbox (7.1.0)
19
+ actionpack (= 7.1.0)
20
+ activejob (= 7.1.0)
21
+ activerecord (= 7.1.0)
22
+ activestorage (= 7.1.0)
23
+ activesupport (= 7.1.0)
23
24
  mail (>= 2.7.1)
24
25
  net-imap
25
26
  net-pop
26
27
  net-smtp
27
- actionmailer (7.0.4.3)
28
- actionpack (= 7.0.4.3)
29
- actionview (= 7.0.4.3)
30
- activejob (= 7.0.4.3)
31
- activesupport (= 7.0.4.3)
28
+ actionmailer (7.1.0)
29
+ actionpack (= 7.1.0)
30
+ actionview (= 7.1.0)
31
+ activejob (= 7.1.0)
32
+ activesupport (= 7.1.0)
32
33
  mail (~> 2.5, >= 2.5.4)
33
34
  net-imap
34
35
  net-pop
35
36
  net-smtp
36
- rails-dom-testing (~> 2.0)
37
- actionpack (7.0.4.3)
38
- actionview (= 7.0.4.3)
39
- activesupport (= 7.0.4.3)
40
- rack (~> 2.0, >= 2.2.0)
37
+ rails-dom-testing (~> 2.2)
38
+ actionpack (7.1.0)
39
+ actionview (= 7.1.0)
40
+ activesupport (= 7.1.0)
41
+ nokogiri (>= 1.8.5)
42
+ rack (>= 2.2.4)
43
+ rack-session (>= 1.0.1)
41
44
  rack-test (>= 0.6.3)
42
- rails-dom-testing (~> 2.0)
43
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
44
- actiontext (7.0.4.3)
45
- actionpack (= 7.0.4.3)
46
- activerecord (= 7.0.4.3)
47
- activestorage (= 7.0.4.3)
48
- activesupport (= 7.0.4.3)
45
+ rails-dom-testing (~> 2.2)
46
+ rails-html-sanitizer (~> 1.6)
47
+ actiontext (7.1.0)
48
+ actionpack (= 7.1.0)
49
+ activerecord (= 7.1.0)
50
+ activestorage (= 7.1.0)
51
+ activesupport (= 7.1.0)
49
52
  globalid (>= 0.6.0)
50
53
  nokogiri (>= 1.8.5)
51
- actionview (7.0.4.3)
52
- activesupport (= 7.0.4.3)
54
+ actionview (7.1.0)
55
+ activesupport (= 7.1.0)
53
56
  builder (~> 3.1)
54
- erubi (~> 1.4)
55
- rails-dom-testing (~> 2.0)
56
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
57
- activejob (7.0.4.3)
58
- activesupport (= 7.0.4.3)
57
+ erubi (~> 1.11)
58
+ rails-dom-testing (~> 2.2)
59
+ rails-html-sanitizer (~> 1.6)
60
+ activejob (7.1.0)
61
+ activesupport (= 7.1.0)
59
62
  globalid (>= 0.3.6)
60
- activemodel (7.0.4.3)
61
- activesupport (= 7.0.4.3)
62
- activerecord (7.0.4.3)
63
- activemodel (= 7.0.4.3)
64
- activesupport (= 7.0.4.3)
65
- activestorage (7.0.4.3)
66
- actionpack (= 7.0.4.3)
67
- activejob (= 7.0.4.3)
68
- activerecord (= 7.0.4.3)
69
- activesupport (= 7.0.4.3)
63
+ activemodel (7.1.0)
64
+ activesupport (= 7.1.0)
65
+ activerecord (7.1.0)
66
+ activemodel (= 7.1.0)
67
+ activesupport (= 7.1.0)
68
+ timeout (>= 0.4.0)
69
+ activestorage (7.1.0)
70
+ actionpack (= 7.1.0)
71
+ activejob (= 7.1.0)
72
+ activerecord (= 7.1.0)
73
+ activesupport (= 7.1.0)
70
74
  marcel (~> 1.0)
71
- mini_mime (>= 1.1.0)
72
- activesupport (7.0.4.3)
75
+ activesupport (7.1.0)
76
+ base64
77
+ bigdecimal
73
78
  concurrent-ruby (~> 1.0, >= 1.0.2)
79
+ connection_pool (>= 2.2.5)
80
+ drb
74
81
  i18n (>= 1.6, < 2)
75
82
  minitest (>= 5.1)
83
+ mutex_m
76
84
  tzinfo (~> 2.0)
77
85
  addressable (2.8.1)
78
86
  public_suffix (>= 2.0.2, < 6.0)
79
87
  ast (2.4.2)
88
+ base64 (0.1.1)
89
+ bigdecimal (3.1.4)
80
90
  builder (3.2.4)
81
91
  coderay (1.1.3)
82
92
  concurrent-ruby (1.2.2)
93
+ connection_pool (2.4.1)
83
94
  crass (1.0.6)
95
+ date (3.3.3)
84
96
  diff-lcs (1.5.0)
85
- digest (3.1.1)
97
+ drb (2.1.1)
98
+ ruby2_keywords
86
99
  erubi (1.12.0)
87
100
  geokit (1.14.0)
88
101
  git (1.18.0)
89
102
  addressable (~> 2.8)
90
103
  rchardet (~> 1.8)
91
- globalid (1.0.1)
92
- activesupport (>= 5.0)
104
+ globalid (1.2.1)
105
+ activesupport (>= 6.1)
93
106
  hpricot (0.8.6)
94
- i18n (1.12.0)
107
+ i18n (1.14.1)
95
108
  concurrent-ruby (~> 1.0)
109
+ io-console (0.6.0)
110
+ irb (1.8.1)
111
+ rdoc
112
+ reline (>= 0.3.8)
96
113
  json (2.6.3)
97
- loofah (2.19.1)
114
+ language_server-protocol (3.17.0.3)
115
+ loofah (2.21.3)
98
116
  crass (~> 1.0.2)
99
- nokogiri (>= 1.5.9)
117
+ nokogiri (>= 1.12.0)
100
118
  mail (2.7.1)
101
119
  mini_mime (>= 0.1.1)
102
120
  marcel (1.0.2)
103
121
  method_source (1.0.0)
104
- mini_mime (1.1.2)
105
- minitest (5.18.0)
106
- net-imap (0.2.3)
107
- digest
122
+ mini_mime (1.1.5)
123
+ minitest (5.20.0)
124
+ mutex_m (0.1.2)
125
+ net-imap (0.4.0)
126
+ date
108
127
  net-protocol
109
- strscan
110
128
  net-pop (0.1.2)
111
129
  net-protocol
112
- net-protocol (0.1.3)
130
+ net-protocol (0.2.1)
113
131
  timeout
114
- net-smtp (0.3.3)
132
+ net-smtp (0.4.0)
115
133
  net-protocol
116
- nio4r (2.5.8)
117
- nokogiri (1.14.2-arm64-darwin)
134
+ nio4r (2.5.9)
135
+ nokogiri (1.14.5-arm64-darwin)
118
136
  racc (~> 1.4)
119
- nokogiri (1.14.2-x86_64-linux)
137
+ nokogiri (1.14.5-x86_64-linux)
120
138
  racc (~> 1.4)
121
- parallel (1.22.1)
122
- parser (3.2.1.1)
139
+ parallel (1.23.0)
140
+ parser (3.2.2.3)
123
141
  ast (~> 2.4.1)
142
+ racc
124
143
  pry (0.14.2)
125
144
  coderay (~> 1.1)
126
145
  method_source (~> 1.0)
146
+ psych (5.1.0)
147
+ stringio
127
148
  public_suffix (5.0.1)
128
- racc (1.6.2)
129
- rack (2.2.6.4)
149
+ racc (1.7.1)
150
+ rack (2.2.8)
151
+ rack-session (1.0.1)
152
+ rack (< 3)
130
153
  rack-test (2.1.0)
131
154
  rack (>= 1.3)
132
- rails (7.0.4.3)
133
- actioncable (= 7.0.4.3)
134
- actionmailbox (= 7.0.4.3)
135
- actionmailer (= 7.0.4.3)
136
- actionpack (= 7.0.4.3)
137
- actiontext (= 7.0.4.3)
138
- actionview (= 7.0.4.3)
139
- activejob (= 7.0.4.3)
140
- activemodel (= 7.0.4.3)
141
- activerecord (= 7.0.4.3)
142
- activestorage (= 7.0.4.3)
143
- activesupport (= 7.0.4.3)
155
+ rackup (1.0.0)
156
+ rack (< 3)
157
+ webrick
158
+ rails (7.1.0)
159
+ actioncable (= 7.1.0)
160
+ actionmailbox (= 7.1.0)
161
+ actionmailer (= 7.1.0)
162
+ actionpack (= 7.1.0)
163
+ actiontext (= 7.1.0)
164
+ actionview (= 7.1.0)
165
+ activejob (= 7.1.0)
166
+ activemodel (= 7.1.0)
167
+ activerecord (= 7.1.0)
168
+ activestorage (= 7.1.0)
169
+ activesupport (= 7.1.0)
144
170
  bundler (>= 1.15.0)
145
- railties (= 7.0.4.3)
146
- rails-dom-testing (2.0.3)
147
- activesupport (>= 4.2.0)
171
+ railties (= 7.1.0)
172
+ rails-dom-testing (2.2.0)
173
+ activesupport (>= 5.0.0)
174
+ minitest
148
175
  nokogiri (>= 1.6)
149
- rails-html-sanitizer (1.5.0)
150
- loofah (~> 2.19, >= 2.19.1)
151
- railties (7.0.4.3)
152
- actionpack (= 7.0.4.3)
153
- activesupport (= 7.0.4.3)
154
- method_source
176
+ rails-html-sanitizer (1.6.0)
177
+ loofah (~> 2.21)
178
+ nokogiri (~> 1.14)
179
+ railties (7.1.0)
180
+ actionpack (= 7.1.0)
181
+ activesupport (= 7.1.0)
182
+ irb
183
+ rackup (>= 1.0.0)
155
184
  rake (>= 12.2)
156
- thor (~> 1.0)
157
- zeitwerk (~> 2.5)
185
+ thor (~> 1.0, >= 1.2.2)
186
+ zeitwerk (~> 2.6)
158
187
  rainbow (3.1.1)
159
188
  rake (13.0.6)
160
189
  rchardet (1.8.0)
161
- regexp_parser (2.7.0)
162
- rexml (3.2.5)
190
+ rdoc (6.5.0)
191
+ psych (>= 4.0.0)
192
+ regexp_parser (2.8.1)
193
+ reline (0.3.9)
194
+ io-console (~> 0.5)
195
+ rexml (3.2.6)
163
196
  rspec (3.12.0)
164
197
  rspec-core (~> 3.12.0)
165
198
  rspec-expectations (~> 3.12.0)
166
199
  rspec-mocks (~> 3.12.0)
167
- rspec-core (3.12.1)
200
+ rspec-core (3.12.2)
168
201
  rspec-support (~> 3.12.0)
169
- rspec-expectations (3.12.2)
202
+ rspec-expectations (3.12.3)
170
203
  diff-lcs (>= 1.2.0, < 2.0)
171
204
  rspec-support (~> 3.12.0)
172
205
  rspec-its (1.3.0)
173
206
  rspec-core (>= 3.0.0)
174
207
  rspec-expectations (>= 3.0.0)
175
- rspec-mocks (3.12.4)
208
+ rspec-mocks (3.12.5)
176
209
  diff-lcs (>= 1.2.0, < 2.0)
177
210
  rspec-support (~> 3.12.0)
178
- rspec-rails (6.0.1)
211
+ rspec-rails (6.0.3)
179
212
  actionpack (>= 6.1)
180
213
  activesupport (>= 6.1)
181
214
  railties (>= 6.1)
182
- rspec-core (~> 3.11)
183
- rspec-expectations (~> 3.11)
184
- rspec-mocks (~> 3.11)
185
- rspec-support (~> 3.11)
186
- rspec-support (3.12.0)
187
- rubocop (1.48.1)
215
+ rspec-core (~> 3.12)
216
+ rspec-expectations (~> 3.12)
217
+ rspec-mocks (~> 3.12)
218
+ rspec-support (~> 3.12)
219
+ rspec-support (3.12.1)
220
+ rubocop (1.56.4)
221
+ base64 (~> 0.1.1)
188
222
  json (~> 2.3)
223
+ language_server-protocol (>= 3.17.0)
189
224
  parallel (~> 1.10)
190
- parser (>= 3.2.0.0)
225
+ parser (>= 3.2.2.3)
191
226
  rainbow (>= 2.2.2, < 4.0)
192
227
  regexp_parser (>= 1.8, < 3.0)
193
228
  rexml (>= 3.2.5, < 4.0)
194
- rubocop-ast (>= 1.26.0, < 2.0)
229
+ rubocop-ast (>= 1.28.1, < 2.0)
195
230
  ruby-progressbar (~> 1.7)
196
231
  unicode-display_width (>= 2.4.0, < 3.0)
197
- rubocop-ast (1.27.0)
232
+ rubocop-ast (1.29.0)
198
233
  parser (>= 3.2.1.0)
199
- rubocop-capybara (2.17.1)
234
+ rubocop-capybara (2.19.0)
200
235
  rubocop (~> 1.41)
201
- rubocop-performance (1.16.0)
236
+ rubocop-factory_bot (2.24.0)
237
+ rubocop (~> 1.33)
238
+ rubocop-performance (1.19.1)
202
239
  rubocop (>= 1.7.0, < 2.0)
203
240
  rubocop-ast (>= 0.4.0)
204
- rubocop-rails (2.18.0)
241
+ rubocop-rails (2.21.2)
205
242
  activesupport (>= 4.2.0)
206
243
  rack (>= 1.1)
207
244
  rubocop (>= 1.33.0, < 2.0)
208
- rubocop-rspec (2.19.0)
245
+ rubocop-rspec (2.24.1)
209
246
  rubocop (~> 1.33)
210
247
  rubocop-capybara (~> 2.17)
248
+ rubocop-factory_bot (~> 2.22)
211
249
  ruby-progressbar (1.13.0)
250
+ ruby2_keywords (0.0.5)
212
251
  scanf (1.0.0)
213
252
  sqlite3 (1.6.1-arm64-darwin)
214
253
  sqlite3 (1.6.1-x86_64-linux)
215
254
  sqlite3-ruby (1.3.3)
216
255
  sqlite3 (>= 1.3.3)
217
- strscan (3.0.6)
218
- thor (1.2.1)
219
- timeout (0.3.2)
256
+ stringio (3.0.8)
257
+ thor (1.2.2)
258
+ timeout (0.4.0)
220
259
  tzinfo (2.0.6)
221
260
  concurrent-ruby (~> 1.0)
222
261
  unicode-display_width (2.4.2)
223
- websocket-driver (0.7.5)
262
+ webrick (1.8.1)
263
+ websocket-driver (0.7.6)
224
264
  websocket-extensions (>= 0.1.0)
225
265
  websocket-extensions (0.1.5)
226
- zeitwerk (2.6.7)
266
+ zeitwerk (2.6.11)
227
267
 
228
268
  PLATFORMS
229
269
  arm64-darwin-20
@@ -236,7 +276,7 @@ DEPENDENCIES
236
276
  hpricot
237
277
  jpmobile!
238
278
  pry
239
- rails (~> 7.0.0)
279
+ rails (~> 7.1.0)
240
280
  rspec
241
281
  rspec-its
242
282
  rspec-rails
@@ -247,4 +287,4 @@ DEPENDENCIES
247
287
  sqlite3-ruby
248
288
 
249
289
  BUNDLED WITH
250
- 2.3.15
290
+ 2.4.19
data/lib/jpmobile/mail.rb CHANGED
@@ -202,7 +202,7 @@ module Mail
202
202
  end
203
203
 
204
204
  unless self.header['Content-Type'].sub_type == 'mixed'
205
- self.header['Content-Type'] = self.content_type.gsub(/#{self.header['Content-Type'].sub_type}/, 'mixed')
205
+ self.header['Content-Type'] = self.content_type.gsub(/#{self.header["Content-Type"].sub_type}/, 'mixed')
206
206
  end
207
207
  self.parts.clear
208
208
  self.body = nil
@@ -6,8 +6,7 @@ Jpmobile::Email.japanese_mail_address_regexp = Regexp.new(/\.jp(?:[^a-zA-Z.-]|$)
6
6
  module Jpmobile
7
7
  module Mailer
8
8
  class Base < ActionMailer::Base
9
- self._view_paths = self._view_paths.dup
10
- self.view_paths.unshift(Jpmobile::Resolver.new(File.join(::Rails.root, 'app/views')))
9
+ self.prepend_view_path(Jpmobile::Resolver.new(File.join(::Rails.root, 'app/views')))
11
10
 
12
11
  def mail(headers = {}, &block)
13
12
  tos = headers[:to] || self.default_params[:to]
@@ -14,10 +14,13 @@ module Jpmobile
14
14
 
15
15
  class PathParser < ::ActionView::Resolver::PathParser
16
16
  def build_path_regex
17
- handlers = ::ActionView::Template::Handlers.extensions.map {|x| Regexp.escape(x) }.join('|')
18
- formats = ::ActionView::Template::Types.symbols.map {|x| Regexp.escape(x) }.join('|')
19
- locales = '[a-z]{2}(?:-[A-Z]{2})?'
17
+ handlers = Regexp.union(::ActionView::Template::Handlers.extensions.map(&:to_s))
18
+ formats = Regexp.union(::ActionView::Template::Types.symbols.map(&:to_s))
19
+ available_locales = I18n.available_locales.map(&:to_s)
20
+ regular_locales = [/[a-z]{2}(?:[-_][A-Z]{2})?/]
21
+ locales = Regexp.union(available_locales + regular_locales)
20
22
  variants = '[^.]*'
23
+
21
24
  mobile = Jpmobile::Mobile.all_variants.map {|x| Regexp.escape(x) }.join('|')
22
25
 
23
26
  %r{
@@ -1,3 +1,3 @@
1
1
  module Jpmobile
2
- VERSION = '7.0.4'.freeze
2
+ VERSION = '7.1.0'.freeze
3
3
  end
@@ -21,8 +21,9 @@ describe 'Method-less mobile template only action', type: :request do
21
21
  end
22
22
 
23
23
  context 'when accessed with non-mobile User-Agent' do
24
- it 'raises AbstractController::ActionNotFound' do
25
- expect { subject }.to raise_error(AbstractController::ActionNotFound)
24
+ it 'retuens 404 status' do
25
+ subject
26
+ expect(response).to have_http_status(404)
26
27
  end
27
28
  end
28
29
  end
@@ -19,8 +19,9 @@ describe 'PCからのアクセスの場合', type: :request do
19
19
  end
20
20
 
21
21
  context 'routesが存在しない場合' do
22
- it 'ActionController::RoutingErrorをraiseする' do
23
- expect { get '/not_exist', params: {}, env: @headers }.to raise_error ActionController::RoutingError
22
+ it '404を返す' do
23
+ get '/not_exist', params: {}, env: @headers
24
+ expect(response).to have_http_status(404)
24
25
  end
25
26
  end
26
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpmobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.4
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shin-ichiro OGAWA
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-01 00:00:00.000000000 Z
12
+ date: 2023-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mail
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  - !ruby/object:Gem::Version
360
360
  version: '0'
361
361
  requirements: []
362
- rubygems_version: 3.4.6
362
+ rubygems_version: 3.4.10
363
363
  signing_key:
364
364
  specification_version: 4
365
365
  summary: Rails plugin for mobile devices in Japan