jpmobile 6.0.0 → 6.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: f2ac72dc53112eb5d8babd6b44194602d93c7f8f6b5940d4e5c15f950e27f611
4
- data.tar.gz: 835cccb90c737865a0db753be8f0b1883ba4c420aafe2d2a75ad27e139817692
3
+ metadata.gz: 6bab78dead8150c7f549c51a24def0b6d7542773124441f604f44f26c3149471
4
+ data.tar.gz: d4dfbd95df916aad34e7aef2d2cb49ac2e5e6255252119532f423633b4721ebd
5
5
  SHA512:
6
- metadata.gz: 2bf6ee36acf3766c0ffb1c709e8de2a51921a686c5ddbf9ba0041551637284551f72eb7983f79ece9f5837ec21c92d22b2c0e0605a29f8800cd080c9237f84e2
7
- data.tar.gz: beb1c38b73a123652ca6a2f41091efd108f824844824cfe6eaae187f213b79627f4c5ddff77fc0f0ea4c0232c5bd7d2488c60868ca50d42bd324a145b6e32623
6
+ metadata.gz: 8ba8b8c5b09d7fa8ca65841cdd1bf30e495e28acb1b1b4a7fb17efcea063fee036828ce5d2508827adbe0dce760d4ecb74d9a5462389f93ae3e9f058ebf68b24
7
+ data.tar.gz: f9438f49c04aae66db70c2839f91ab0fe307fef8e17b74259ae74cfb01f7c5b62fa6819485ea150b96d80d2fd93ff8c998a7f99d1d64628ed34093f66be8c3b7
@@ -3,7 +3,7 @@ jobs:
3
3
  test-job:
4
4
  working_directory: ~/jpmobile
5
5
  docker:
6
- - image: circleci/ruby:2.6-node-browsers
6
+ - image: circleci/ruby:2.7-node-browsers
7
7
  environment:
8
8
  BUNDLE_JOBS: 3
9
9
  BUNDLE_RETRY: 3
@@ -29,12 +29,12 @@ Layout/ExtraSpacing:
29
29
  # special_inside_parentheses (default) と比べて
30
30
  # * 横に長くなりづらい
31
31
  # * メソッド名の長さが変わったときに diff が少ない
32
- Layout/IndentFirstArrayElement:
32
+ Layout/FirstArrayElementIndentation:
33
33
  EnforcedStyle: consistent
34
34
 
35
35
  # ({ と hash を開始した場合に ( の位置にインデントさせる
36
36
  # そもそも {} が必要ない可能性が高いが Style/BracesAroundHashParameters はチェックしないことにしたので
37
- Layout/IndentFirstHashElement:
37
+ Layout/FirstHashElementIndentation:
38
38
  EnforcedStyle: consistent
39
39
 
40
40
  # private/protected は一段深くインデントする
@@ -129,7 +129,7 @@ Metrics/CyclomaticComplexity:
129
129
  # * 警告 120文字
130
130
  # * 禁止 160文字
131
131
  # のイメージ
132
- Metrics/LineLength:
132
+ Layout/LineLength:
133
133
  Max: 160
134
134
  Exclude:
135
135
  - "db/migrate/*.rb"
@@ -149,7 +149,7 @@ Metrics/PerceivedComplexity:
149
149
 
150
150
  # has_ から始まるメソッドは許可する
151
151
  Naming/PredicateName:
152
- NamePrefixBlacklist:
152
+ ForbiddenPrefixes:
153
153
  - "is_"
154
154
  - "have_"
155
155
  NamePrefix:
@@ -160,7 +160,7 @@ Naming/PredicateName:
160
160
  # n(umber) といった 1 文字変数は頻出するし、前置詞(by, to, ...)や
161
161
  # よく知られた省略語 (op: operator とか pk: primary key とか) も妥当。
162
162
  # 変数 s にどんな文字列かを形容したい場合と、不要な場合とがある=無効
163
- Naming/UncommunicativeMethodParamName:
163
+ Naming/MethodParameterName:
164
164
  Enabled: false
165
165
 
166
166
  #################### Performance ###########################
@@ -3,7 +3,7 @@ require: rubocop-performance
3
3
  inherit_from: './.onkcop-config.yml'
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.6
6
+ TargetRubyVersion: 2.7
7
7
  Exclude:
8
8
  - 'tmp/**/*'
9
9
  - 'bin/*'
@@ -82,7 +82,7 @@ Metrics/PerceivedComplexity:
82
82
  - 'lib/jpmobile/mobile/docomo.rb'
83
83
  - 'lib/jpmobile/trans_sid.rb'
84
84
 
85
- Metrics/LineLength:
85
+ Layout/LineLength:
86
86
  Exclude:
87
87
  - '**/*_spec.rb'
88
88
  - 'lib/jpmobile/emoticon/z_combine.rb'
@@ -120,8 +120,9 @@ Metrics/MethodLength:
120
120
  - 'lib/jpmobile/helpers.rb'
121
121
  - 'lib/jpmobile/mail.rb'
122
122
  - 'lib/jpmobile/resolver.rb'
123
+ - 'test/rails/overrides/db/migrate/*'
123
124
 
124
- Lint/HandleExceptions:
125
+ Lint/SuppressedException:
125
126
  Exclude:
126
127
  - 'lib/jpmobile/emoticon.rb'
127
128
  - 'lib/jpmobile/fallback_view_selector.rb'
@@ -1 +1 @@
1
- 2.6.3
1
+ 2.7.2
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in jpmobile.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rubocop', require: false
7
- gem 'rubocop-performance', require: false
6
+ gem 'rubocop', '0.79.0', require: false
7
+ gem 'rubocop-performance', '1.5.2', require: false
@@ -1,72 +1,78 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jpmobile (6.0.0.beta)
4
+ jpmobile (6.0.0)
5
5
  mail (~> 2.7.0)
6
+ rexml
7
+ scanf
6
8
 
7
9
  GEM
8
10
  remote: https://rubygems.org/
9
11
  specs:
10
- actioncable (6.0.0)
11
- actionpack (= 6.0.0)
12
+ actioncable (6.1.0)
13
+ actionpack (= 6.1.0)
14
+ activesupport (= 6.1.0)
12
15
  nio4r (~> 2.0)
13
16
  websocket-driver (>= 0.6.1)
14
- actionmailbox (6.0.0)
15
- actionpack (= 6.0.0)
16
- activejob (= 6.0.0)
17
- activerecord (= 6.0.0)
18
- activestorage (= 6.0.0)
19
- activesupport (= 6.0.0)
17
+ actionmailbox (6.1.0)
18
+ actionpack (= 6.1.0)
19
+ activejob (= 6.1.0)
20
+ activerecord (= 6.1.0)
21
+ activestorage (= 6.1.0)
22
+ activesupport (= 6.1.0)
20
23
  mail (>= 2.7.1)
21
- actionmailer (6.0.0)
22
- actionpack (= 6.0.0)
23
- actionview (= 6.0.0)
24
- activejob (= 6.0.0)
24
+ actionmailer (6.1.0)
25
+ actionpack (= 6.1.0)
26
+ actionview (= 6.1.0)
27
+ activejob (= 6.1.0)
28
+ activesupport (= 6.1.0)
25
29
  mail (~> 2.5, >= 2.5.4)
26
30
  rails-dom-testing (~> 2.0)
27
- actionpack (6.0.0)
28
- actionview (= 6.0.0)
29
- activesupport (= 6.0.0)
30
- rack (~> 2.0)
31
+ actionpack (6.1.0)
32
+ actionview (= 6.1.0)
33
+ activesupport (= 6.1.0)
34
+ rack (~> 2.0, >= 2.0.9)
31
35
  rack-test (>= 0.6.3)
32
36
  rails-dom-testing (~> 2.0)
33
37
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
- actiontext (6.0.0)
35
- actionpack (= 6.0.0)
36
- activerecord (= 6.0.0)
37
- activestorage (= 6.0.0)
38
- activesupport (= 6.0.0)
38
+ actiontext (6.1.0)
39
+ actionpack (= 6.1.0)
40
+ activerecord (= 6.1.0)
41
+ activestorage (= 6.1.0)
42
+ activesupport (= 6.1.0)
39
43
  nokogiri (>= 1.8.5)
40
- actionview (6.0.0)
41
- activesupport (= 6.0.0)
44
+ actionview (6.1.0)
45
+ activesupport (= 6.1.0)
42
46
  builder (~> 3.1)
43
47
  erubi (~> 1.4)
44
48
  rails-dom-testing (~> 2.0)
45
49
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
- activejob (6.0.0)
47
- activesupport (= 6.0.0)
50
+ activejob (6.1.0)
51
+ activesupport (= 6.1.0)
48
52
  globalid (>= 0.3.6)
49
- activemodel (6.0.0)
50
- activesupport (= 6.0.0)
51
- activerecord (6.0.0)
52
- activemodel (= 6.0.0)
53
- activesupport (= 6.0.0)
54
- activestorage (6.0.0)
55
- actionpack (= 6.0.0)
56
- activejob (= 6.0.0)
57
- activerecord (= 6.0.0)
53
+ activemodel (6.1.0)
54
+ activesupport (= 6.1.0)
55
+ activerecord (6.1.0)
56
+ activemodel (= 6.1.0)
57
+ activesupport (= 6.1.0)
58
+ activestorage (6.1.0)
59
+ actionpack (= 6.1.0)
60
+ activejob (= 6.1.0)
61
+ activerecord (= 6.1.0)
62
+ activesupport (= 6.1.0)
58
63
  marcel (~> 0.3.1)
59
- activesupport (6.0.0)
64
+ mimemagic (~> 0.3.2)
65
+ activesupport (6.1.0)
60
66
  concurrent-ruby (~> 1.0, >= 1.0.2)
61
- i18n (>= 0.7, < 2)
62
- minitest (~> 5.1)
63
- tzinfo (~> 1.1)
64
- zeitwerk (~> 2.1, >= 2.1.8)
65
- addressable (2.6.0)
66
- public_suffix (>= 2.0.2, < 4.0)
67
- ast (2.4.0)
68
- builder (3.2.3)
69
- capybara (3.28.0)
67
+ i18n (>= 1.6, < 2)
68
+ minitest (>= 5.1)
69
+ tzinfo (~> 2.0)
70
+ zeitwerk (~> 2.3)
71
+ addressable (2.7.0)
72
+ public_suffix (>= 2.0.2, < 5.0)
73
+ ast (2.4.1)
74
+ builder (3.2.4)
75
+ capybara (3.34.0)
70
76
  addressable
71
77
  mini_mime (>= 0.1.3)
72
78
  nokogiri (~> 1.8)
@@ -77,132 +83,136 @@ GEM
77
83
  capybara-webkit (1.15.1)
78
84
  capybara (>= 2.3, < 4.0)
79
85
  json
80
- coderay (1.1.2)
81
- concurrent-ruby (1.1.5)
82
- crass (1.0.4)
83
- diff-lcs (1.3)
84
- erubi (1.8.0)
86
+ coderay (1.1.3)
87
+ concurrent-ruby (1.1.7)
88
+ crass (1.0.6)
89
+ diff-lcs (1.4.4)
90
+ erubi (1.10.0)
85
91
  geokit (1.13.1)
86
- git (1.5.0)
92
+ git (1.7.0)
93
+ rchardet (~> 1.8)
87
94
  globalid (0.4.2)
88
95
  activesupport (>= 4.2.0)
89
96
  hpricot (0.8.6)
90
- i18n (1.6.0)
97
+ i18n (1.8.5)
91
98
  concurrent-ruby (~> 1.0)
92
- jaro_winkler (1.5.3)
93
- json (2.2.0)
94
- loofah (2.2.3)
99
+ jaro_winkler (1.5.4)
100
+ json (2.3.1)
101
+ loofah (2.8.0)
95
102
  crass (~> 1.0.2)
96
103
  nokogiri (>= 1.5.9)
97
104
  mail (2.7.1)
98
105
  mini_mime (>= 0.1.1)
99
106
  marcel (0.3.3)
100
107
  mimemagic (~> 0.3.2)
101
- method_source (0.9.2)
102
- mimemagic (0.3.3)
108
+ method_source (1.0.0)
109
+ mimemagic (0.3.5)
103
110
  mini_mime (1.0.2)
104
111
  mini_portile2 (2.4.0)
105
- minitest (5.11.3)
106
- nio4r (2.4.0)
107
- nokogiri (1.10.4)
112
+ minitest (5.14.2)
113
+ nio4r (2.5.4)
114
+ nokogiri (1.10.10)
108
115
  mini_portile2 (~> 2.4.0)
109
- parallel (1.17.0)
110
- parser (2.6.3.0)
111
- ast (~> 2.4.0)
112
- pry (0.12.2)
113
- coderay (~> 1.1.0)
114
- method_source (~> 0.9.0)
115
- public_suffix (3.1.1)
116
- rack (2.0.7)
116
+ parallel (1.20.1)
117
+ parser (2.7.2.0)
118
+ ast (~> 2.4.1)
119
+ pry (0.13.1)
120
+ coderay (~> 1.1)
121
+ method_source (~> 1.0)
122
+ public_suffix (4.0.6)
123
+ rack (2.2.3)
117
124
  rack-test (1.1.0)
118
125
  rack (>= 1.0, < 3)
119
- rails (6.0.0)
120
- actioncable (= 6.0.0)
121
- actionmailbox (= 6.0.0)
122
- actionmailer (= 6.0.0)
123
- actionpack (= 6.0.0)
124
- actiontext (= 6.0.0)
125
- actionview (= 6.0.0)
126
- activejob (= 6.0.0)
127
- activemodel (= 6.0.0)
128
- activerecord (= 6.0.0)
129
- activestorage (= 6.0.0)
130
- activesupport (= 6.0.0)
131
- bundler (>= 1.3.0)
132
- railties (= 6.0.0)
126
+ rails (6.1.0)
127
+ actioncable (= 6.1.0)
128
+ actionmailbox (= 6.1.0)
129
+ actionmailer (= 6.1.0)
130
+ actionpack (= 6.1.0)
131
+ actiontext (= 6.1.0)
132
+ actionview (= 6.1.0)
133
+ activejob (= 6.1.0)
134
+ activemodel (= 6.1.0)
135
+ activerecord (= 6.1.0)
136
+ activestorage (= 6.1.0)
137
+ activesupport (= 6.1.0)
138
+ bundler (>= 1.15.0)
139
+ railties (= 6.1.0)
133
140
  sprockets-rails (>= 2.0.0)
134
141
  rails-dom-testing (2.0.3)
135
142
  activesupport (>= 4.2.0)
136
143
  nokogiri (>= 1.6)
137
- rails-html-sanitizer (1.2.0)
138
- loofah (~> 2.2, >= 2.2.2)
139
- railties (6.0.0)
140
- actionpack (= 6.0.0)
141
- activesupport (= 6.0.0)
144
+ rails-html-sanitizer (1.3.0)
145
+ loofah (~> 2.3)
146
+ railties (6.1.0)
147
+ actionpack (= 6.1.0)
148
+ activesupport (= 6.1.0)
142
149
  method_source
143
150
  rake (>= 0.8.7)
144
- thor (>= 0.20.3, < 2.0)
151
+ thor (~> 1.0)
145
152
  rainbow (3.0.0)
146
- rake (12.3.3)
147
- regexp_parser (1.6.0)
148
- rspec (3.8.0)
149
- rspec-core (~> 3.8.0)
150
- rspec-expectations (~> 3.8.0)
151
- rspec-mocks (~> 3.8.0)
152
- rspec-core (3.8.2)
153
- rspec-support (~> 3.8.0)
154
- rspec-expectations (3.8.4)
153
+ rake (13.0.1)
154
+ rchardet (1.8.0)
155
+ regexp_parser (1.8.2)
156
+ rexml (3.2.4)
157
+ rspec (3.10.0)
158
+ rspec-core (~> 3.10.0)
159
+ rspec-expectations (~> 3.10.0)
160
+ rspec-mocks (~> 3.10.0)
161
+ rspec-core (3.10.0)
162
+ rspec-support (~> 3.10.0)
163
+ rspec-expectations (3.10.0)
155
164
  diff-lcs (>= 1.2.0, < 2.0)
156
- rspec-support (~> 3.8.0)
165
+ rspec-support (~> 3.10.0)
157
166
  rspec-its (1.3.0)
158
167
  rspec-core (>= 3.0.0)
159
168
  rspec-expectations (>= 3.0.0)
160
- rspec-mocks (3.8.1)
169
+ rspec-mocks (3.10.0)
161
170
  diff-lcs (>= 1.2.0, < 2.0)
162
- rspec-support (~> 3.8.0)
163
- rspec-rails (3.8.2)
164
- actionpack (>= 3.0)
165
- activesupport (>= 3.0)
166
- railties (>= 3.0)
167
- rspec-core (~> 3.8.0)
168
- rspec-expectations (~> 3.8.0)
169
- rspec-mocks (~> 3.8.0)
170
- rspec-support (~> 3.8.0)
171
- rspec-support (3.8.2)
172
- rubocop (0.74.0)
171
+ rspec-support (~> 3.10.0)
172
+ rspec-rails (4.0.1)
173
+ actionpack (>= 4.2)
174
+ activesupport (>= 4.2)
175
+ railties (>= 4.2)
176
+ rspec-core (~> 3.9)
177
+ rspec-expectations (~> 3.9)
178
+ rspec-mocks (~> 3.9)
179
+ rspec-support (~> 3.9)
180
+ rspec-support (3.10.0)
181
+ rubocop (0.79.0)
173
182
  jaro_winkler (~> 1.5.1)
174
183
  parallel (~> 1.10)
175
- parser (>= 2.6)
184
+ parser (>= 2.7.0.1)
176
185
  rainbow (>= 2.2.2, < 4.0)
177
186
  ruby-progressbar (~> 1.7)
178
187
  unicode-display_width (>= 1.4.0, < 1.7)
179
- rubocop-performance (1.4.1)
188
+ rubocop-performance (1.5.2)
180
189
  rubocop (>= 0.71.0)
181
190
  ruby-progressbar (1.10.1)
182
- sprockets (3.7.2)
191
+ scanf (1.0.0)
192
+ sprockets (4.0.2)
183
193
  concurrent-ruby (~> 1.0)
184
194
  rack (> 1, < 3)
185
- sprockets-rails (3.2.1)
195
+ sprockets-rails (3.2.2)
186
196
  actionpack (>= 4.0)
187
197
  activesupport (>= 4.0)
188
198
  sprockets (>= 3.0.0)
189
- sqlite3 (1.4.1)
199
+ sqlite3 (1.4.2)
190
200
  sqlite3-ruby (1.3.3)
191
201
  sqlite3 (>= 1.3.3)
192
- thor (0.20.3)
193
- thread_safe (0.3.6)
194
- tzinfo (1.2.5)
195
- thread_safe (~> 0.1)
196
- unicode-display_width (1.6.0)
197
- websocket-driver (0.7.1)
202
+ thor (1.0.1)
203
+ tzinfo (2.0.3)
204
+ concurrent-ruby (~> 1.0)
205
+ unicode-display_width (1.6.1)
206
+ websocket-driver (0.7.3)
198
207
  websocket-extensions (>= 0.1.0)
199
- websocket-extensions (0.1.4)
208
+ websocket-extensions (0.1.5)
200
209
  xpath (3.2.0)
201
210
  nokogiri (~> 1.8)
202
- zeitwerk (2.1.9)
211
+ zeitwerk (2.4.2)
203
212
 
204
213
  PLATFORMS
205
214
  ruby
215
+ x86_64-darwin-19
206
216
 
207
217
  DEPENDENCIES
208
218
  capybara-webkit
@@ -211,13 +221,13 @@ DEPENDENCIES
211
221
  hpricot
212
222
  jpmobile!
213
223
  pry
214
- rails (~> 6.0.0)
224
+ rails (~> 6.1.0)
215
225
  rspec
216
226
  rspec-its
217
227
  rspec-rails
218
- rubocop
219
- rubocop-performance
228
+ rubocop (= 0.79.0)
229
+ rubocop-performance (= 1.5.2)
220
230
  sqlite3-ruby
221
231
 
222
232
  BUNDLED WITH
223
- 1.17.2
233
+ 2.2.2
data/README.md CHANGED
@@ -316,7 +316,7 @@ end
316
316
 
317
317
  ```ruby
318
318
  <%= get_position_link_to("位置情報を取得する", :action=>:gps) %>
319
- ```ruby
319
+ ```
320
320
 
321
321
  ### セッションIDの付与(Trans SID)
322
322
  #### Cookie非対応携帯だけに付与する
@@ -353,7 +353,7 @@ Rails.application.config.session_options = {:cookie_only => false}
353
353
 
354
354
  ```ruby
355
355
  link_to "hoge", "/controller/action/id"
356
- ```ruby
356
+ ```
357
357
 
358
358
  のようにリンク先を直接指定するとセッションIDは付加されません。
359
359
 
@@ -17,12 +17,14 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ['lib']
18
18
 
19
19
  gem.add_dependency 'mail', '~> 2.7.0'
20
+ gem.add_dependency 'scanf'
21
+ gem.add_dependency 'rexml'
20
22
  gem.add_development_dependency 'capybara-webkit'
21
23
  gem.add_development_dependency 'geokit'
22
24
  gem.add_development_dependency 'git'
23
25
  gem.add_development_dependency 'hpricot'
24
26
  gem.add_development_dependency 'pry'
25
- gem.add_development_dependency 'rails', '~> 6.0.0'
27
+ gem.add_development_dependency 'rails', '~> 6.1.0'
26
28
  gem.add_development_dependency 'rspec'
27
29
  gem.add_development_dependency 'rspec-its'
28
30
  gem.add_development_dependency 'rspec-rails'
@@ -1,2 +1,2 @@
1
1
  require 'action_controller/test_case'
2
- ActionController::TestRequest.send :include, Jpmobile::RequestWithMobileTesting
2
+ ActionController::TestRequest.include Jpmobile::RequestWithMobileTesting
@@ -4,10 +4,10 @@ ActiveSupport.on_load(:action_controller) do
4
4
  require 'jpmobile/helpers'
5
5
  require 'jpmobile/trans_sid'
6
6
  require 'jpmobile/hook_test_request'
7
- ActionDispatch::Request.send :prepend, Jpmobile::Encoding
8
- ActionDispatch::Request.send :include, Jpmobile::RequestWithMobile
9
- ActionController::Base.send :prepend, Jpmobile::FallbackViewSelector
10
- ActionController::Base.send :prepend, Jpmobile::TransSidRedirecting
7
+ ActionDispatch::Request.prepend Jpmobile::Encoding
8
+ ActionDispatch::Request.include Jpmobile::RequestWithMobile
9
+ ActionController::Base.prepend Jpmobile::FallbackViewSelector
10
+ ActionController::Base.prepend Jpmobile::TransSidRedirecting
11
11
  end
12
12
 
13
13
  ActiveSupport.on_load(:action_view) do
@@ -20,10 +20,10 @@ ActiveSupport.on_load(:after_initialize) do
20
20
  case Rails.application.config.session_store.to_s
21
21
  when 'ActionDispatch::Session::MemCacheStore'
22
22
  require 'jpmobile/session/mem_cache_store'
23
- ActionDispatch::Session::MemCacheStore.send :prepend, Jpmobile::ParamsOverCookie
23
+ ActionDispatch::Session::MemCacheStore.prepend Jpmobile::ParamsOverCookie
24
24
  when 'ActionDispatch::Session::ActiveRecordStore'
25
25
  require 'jpmobile/session/active_record_store'
26
- ActionDispatch::Session::AbstractStore.send :prepend, Jpmobile::ParamsOverCookie
26
+ ActionDispatch::Session::AbstractStore.prepend Jpmobile::ParamsOverCookie
27
27
  else
28
28
  Rails.application.config.jpmobile.mount_session_store
29
29
  end
@@ -3,7 +3,7 @@ module Jpmobile
3
3
  EXTENSIONS = [:locale, :formats, :handlers, :mobile].freeze
4
4
  DEFAULT_PATTERN = ':prefix/:action{_:mobile,}{.:locale,}{.:formats,}{+:variants,}{.:handlers,}'.freeze
5
5
 
6
- def initialize(path, pattern = nil)
6
+ def initialize(path)
7
7
  raise ArgumentError, 'path already is a Resolver class' if path.is_a?(Resolver)
8
8
 
9
9
  super
@@ -8,4 +8,4 @@ module Jpmobile
8
8
  end
9
9
  end
10
10
 
11
- ActionDispatch::Session::ActiveRecordStore.send :prepend, Jpmobile::ActiveRecordStoreRegenerateSessionId
11
+ ActionDispatch::Session::ActiveRecordStore.prepend Jpmobile::ActiveRecordStoreRegenerateSessionId
@@ -8,4 +8,4 @@ module Jpmobile
8
8
  end
9
9
  end
10
10
 
11
- ActionDispatch::Session::MemCacheStore.send :prepend, Jpmobile::MemCacheStoreRegenerateSessionId
11
+ ActionDispatch::Session::MemCacheStore.prepend Jpmobile::MemCacheStoreRegenerateSessionId
@@ -51,7 +51,7 @@ module Jpmobile
51
51
 
52
52
  # session_idを埋め込むためのhidden fieldを出力する。
53
53
  def sid_hidden_field_tag
54
- "<input type=\"hidden\" name=\"#{CGI.escapeHTML session_key}\" value=\"#{CGI.escapeHTML jpmobile_session_id}\" />"
54
+ "<input type=\"hidden\" name=\"#{CGI.escapeHTML(session_key.to_s)}\" value=\"#{CGI.escapeHTML(jpmobile_session_id.to_s)}\" />"
55
55
  end
56
56
 
57
57
  # formにsession_idを追加する。
@@ -1,3 +1,3 @@
1
1
  module Jpmobile
2
- VERSION = '6.0.0'.freeze
2
+ VERSION = '6.1.0'.freeze
3
3
  end
@@ -33,7 +33,7 @@ namespace :test do
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`
36
+ `rails new #{rails_root} --skip-bundle --skip-bootsnap --skip-webpack-install --skip-git --skip-spring`
37
37
  end
38
38
 
39
39
  # setup jpmobile
@@ -104,7 +104,7 @@ namespace :test do
104
104
 
105
105
  # run tests in rails
106
106
  Dir.chdir(rails_root) do
107
- Bundler.with_clean_env do
107
+ Bundler.with_unbundled_env do
108
108
  original_env = ENV.to_hash
109
109
 
110
110
  ENV.update('RBENV_VERSION' => nil)
@@ -28,23 +28,23 @@ describe '絵文字が' do
28
28
  end
29
29
 
30
30
  it 'docomo 絵文字が変換されないこと' do
31
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)[2]
31
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)
32
32
  expect(response_body(response)).to eq(@docomo_cr)
33
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)[2]
33
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)
34
34
  expect(response_body(response)).to eq(@docomo_utf8)
35
35
  end
36
36
 
37
37
  it 'au 絵文字が変換されないこと' do
38
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)[2]
38
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)
39
39
  expect(response_body(response)).to eq(@au_cr)
40
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)[2]
40
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)
41
41
  expect(response_body(response)).to eq(@au_utf8)
42
42
  end
43
43
 
44
44
  it 'softbank 絵文字が変換されないこと' do
45
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)[2]
45
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)
46
46
  expect(response_body(response)).to eq(@softbank_cr)
47
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)[2]
47
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)
48
48
  expect(response_body(response)).to eq(@softbank_utf8)
49
49
  end
50
50
  end
@@ -72,38 +72,38 @@ describe '絵文字が' do
72
72
  end
73
73
 
74
74
  it 'docomo 絵文字が画像に変換されること' do
75
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)[2]
75
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)
76
76
  expect(response_body(response)).to eq("<img src=\"#{@path}/sun.gif\" alt=\"sun\" />")
77
77
  end
78
78
 
79
79
  it 'docomo 絵文字コードが画像に変換されること' do
80
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)[2]
80
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)
81
81
  expect(response_body(response)).to eq("<img src=\"#{@path}/sun.gif\" alt=\"sun\" />")
82
82
  end
83
83
 
84
84
  it 'au 絵文字が画像に変換されること' do
85
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)[2]
85
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)
86
86
  expect(response_body(response)).to eq("<img src=\"#{@path}/sun.gif\" alt=\"sun\" />")
87
87
  end
88
88
 
89
89
  it 'au 絵文字コードが画像に変換されること' do
90
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)[2]
90
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)
91
91
  expect(response_body(response)).to eq("<img src=\"#{@path}/sun.gif\" alt=\"sun\" />")
92
92
  end
93
93
 
94
94
  it 'softbank 絵文字が画像に変換されること' do
95
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)[2]
95
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)
96
96
  expect(response_body(response)).to eq("<img src=\"#{@path}/sun.gif\" alt=\"sun\" />")
97
97
  end
98
98
 
99
99
  it 'softbank 絵文字コードが画像に変換されること' do
100
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)[2]
100
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)
101
101
  expect(response_body(response)).to eq("<img src=\"#{@path}/sun.gif\" alt=\"sun\" />")
102
102
  end
103
103
 
104
104
  it 'Content-Type が変換できないものである場合には変換しないこと' do
105
105
  @res = Rack::MockRequest.env_for('/', 'Content-Type' => 'image/jpeg')
106
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)[2]
106
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)
107
107
  expect(response_body(response)).to eq(@softbank_utf8)
108
108
  end
109
109
  end
@@ -118,26 +118,26 @@ describe '絵文字が' do
118
118
  end
119
119
 
120
120
  it 'docomo 絵文字が変換されること' do
121
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)[2]
121
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)
122
122
  expect(response_body(response)).to eq(sjis("\xf8\x9f"))
123
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)[2]
123
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)
124
124
  expect(response_body(response)).to eq(sjis("\xf8\x9f"))
125
125
 
126
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_docomopoint))).call(@res)[2]
126
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_docomopoint))).call(@res)
127
127
  expect(response_body(response)).to eq(sjis("\xf9\x79"))
128
128
  end
129
129
 
130
130
  it 'au 絵文字が変換されること' do
131
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)[2]
131
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)
132
132
  expect(response_body(response)).to eq(sjis("\xf8\x9f"))
133
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)[2]
133
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)
134
134
  expect(response_body(response)).to eq(sjis("\xf8\x9f"))
135
135
  end
136
136
 
137
137
  it 'softbank 絵文字が変換されること' do
138
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)[2]
138
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)
139
139
  expect(response_body(response)).to eq(sjis("\xf8\x9f"))
140
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)[2]
140
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)
141
141
  expect(response_body(response)).to eq(sjis("\xf8\x9f"))
142
142
  end
143
143
 
@@ -167,26 +167,26 @@ describe '絵文字が' do
167
167
  end
168
168
 
169
169
  it 'docomo 絵文字が変換されること' do
170
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)[2]
170
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)
171
171
  expect(response_body(response)).to eq(sjis("\xf6\x60"))
172
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)[2]
172
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)
173
173
  expect(response_body(response)).to eq(sjis("\xf6\x60"))
174
174
 
175
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_docomopoint))).call(@res)[2]
175
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_docomopoint))).call(@res)
176
176
  expect(response_body(response)).to eq(utf8_to_sjis('[ドコモポイント]'))
177
177
  end
178
178
 
179
179
  it 'au 絵文字が変換されること' do
180
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)[2]
180
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)
181
181
  expect(response_body(response)).to eq(sjis("\xf6\x60"))
182
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)[2]
182
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)
183
183
  expect(response_body(response)).to eq(sjis("\xf6\x60"))
184
184
  end
185
185
 
186
186
  it 'softbank 絵文字が変換されること' do
187
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)[2]
187
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)
188
188
  expect(response_body(response)).to eq(sjis("\xf6\x60"))
189
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)[2]
189
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)
190
190
  expect(response_body(response)).to eq(sjis("\xf6\x60"))
191
191
  end
192
192
 
@@ -216,26 +216,26 @@ describe '絵文字が' do
216
216
  end
217
217
 
218
218
  it 'docomo 絵文字が変換されること' do
219
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)[2]
219
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_cr))).call(@res)
220
220
  expect(response_body(response)).to eq([0xe04a].pack('U'))
221
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)[2]
221
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_utf8))).call(@res)
222
222
  expect(response_body(response)).to eq([0xe04a].pack('U'))
223
223
 
224
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_docomopoint))).call(@res)[2]
224
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@docomo_docomopoint))).call(@res)
225
225
  expect(response_body(response)).to eq('[ドコモポイント]')
226
226
  end
227
227
 
228
228
  it 'au 絵文字が変換されること' do
229
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)[2]
229
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_cr))).call(@res)
230
230
  expect(response_body(response)).to eq([0xe04a].pack('U'))
231
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)[2]
231
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@au_utf8))).call(@res)
232
232
  expect(response_body(response)).to eq([0xe04a].pack('U'))
233
233
  end
234
234
 
235
235
  it 'softbank 絵文字が変換されること' do
236
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)[2]
236
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)
237
237
  expect(response_body(response)).to eq([0xe04a].pack('U'))
238
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)[2]
238
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)
239
239
  expect(response_body(response)).to eq([0xe04a].pack('U'))
240
240
  end
241
241
 
@@ -265,9 +265,9 @@ describe '絵文字が' do
265
265
  end
266
266
 
267
267
  it 'softbank 絵文字が変換されること' do
268
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)[2]
268
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)
269
269
  expect(response_body(response)).to eq([0xe04a].pack('U'))
270
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)[2]
270
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)
271
271
  expect(response_body(response)).to eq([0xe04a].pack('U'))
272
272
  end
273
273
 
@@ -298,9 +298,9 @@ describe '絵文字が' do
298
298
  end
299
299
 
300
300
  it 'should convert Softbank emoticon' do
301
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)[2]
301
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_cr))).call(@res)
302
302
  expect(response_body(response)).to eq([0xe04a].pack('U'))
303
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)[2]
303
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@softbank_utf8))).call(@res)
304
304
  expect(response_body(response)).to eq([0xe04a].pack('U'))
305
305
  end
306
306
 
@@ -320,7 +320,7 @@ describe '絵文字が' do
320
320
  end
321
321
 
322
322
  it 'should not convert 〓' do
323
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new('〓'))).call(@res)[2]
323
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new('〓'))).call(@res)
324
324
  expect(response_body(response)).to eq('〓')
325
325
  end
326
326
  end
@@ -337,9 +337,9 @@ describe '絵文字が' do
337
337
  end
338
338
 
339
339
  it 'should convert Unicode emoticon' do
340
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@unicode_single))).call(@res)[2]
340
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@unicode_single))).call(@res)
341
341
  expect(response_body(response)).to eq([0x2600].pack('U*'))
342
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@unicode_multi))).call(@res)[2]
342
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@unicode_multi))).call(@res)
343
343
  expect(response_body(response)).to eq([0x26C5].pack('U*'))
344
344
  end
345
345
 
@@ -359,7 +359,7 @@ describe '絵文字が' do
359
359
  end
360
360
 
361
361
  it 'should not convert 〓' do
362
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new('〓'))).call(@res)[2]
362
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new('〓'))).call(@res)
363
363
  expect(response_body(response)).to eq('〓')
364
364
  end
365
365
  end
@@ -381,9 +381,9 @@ describe '絵文字が' do
381
381
  end
382
382
 
383
383
  it 'should convert Google emoticon' do
384
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@google_single))).call(@res)[2]
384
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@google_single))).call(@res)
385
385
  expect(response_body(response)).to eq([0xFE000].pack('U*'))
386
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@google_multi))).call(@res)[2]
386
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@google_multi))).call(@res)
387
387
  expect(response_body(response)).to eq([0xFE00F].pack('U*'))
388
388
  end
389
389
 
@@ -403,7 +403,7 @@ describe '絵文字が' do
403
403
  end
404
404
 
405
405
  it 'should not convert 〓' do
406
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new('〓'))).call(@res)[2]
406
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new('〓'))).call(@res)
407
407
  expect(response_body(response)).to eq('〓')
408
408
  end
409
409
  end
@@ -418,9 +418,9 @@ describe '絵文字が' do
418
418
  end
419
419
 
420
420
  it 'should convert Google emoticon' do
421
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@google_single))).call(@res)[2]
421
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@google_single))).call(@res)
422
422
  expect(response_body(response)).to eq([0xFE000].pack('U*'))
423
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@google_multi))).call(@res)[2]
423
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new(@google_multi))).call(@res)
424
424
  expect(response_body(response)).to eq([0xFE00F].pack('U*'))
425
425
  end
426
426
 
@@ -440,7 +440,7 @@ describe '絵文字が' do
440
440
  end
441
441
 
442
442
  it 'should not convert 〓' do
443
- response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new('〓'))).call(@res)[2]
443
+ response = Jpmobile::MobileCarrier.new(Jpmobile::Filter.new(UnitApplication.new('〓'))).call(@res)
444
444
  expect(response_body(response)).to eq('〓')
445
445
  end
446
446
 
@@ -74,7 +74,7 @@ module Jpmobile::RackHelper
74
74
  def response_body(res)
75
75
  body = case res
76
76
  when Array
77
- res[2].body
77
+ res[2]
78
78
  when String
79
79
  res.body
80
80
  else
@@ -2,13 +2,14 @@
2
2
  class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
3
3
  def change
4
4
  create_table :active_storage_blobs do |t|
5
- t.string :key, null: false
6
- t.string :filename, null: false
5
+ t.string :key, null: false
6
+ t.string :filename, null: false
7
7
  t.string :content_type
8
8
  t.text :metadata
9
- t.bigint :byte_size, null: false
10
- t.string :checksum, null: false
11
- t.datetime :created_at, null: false
9
+ t.string :service_name, null: false
10
+ t.bigint :byte_size, null: false
11
+ t.string :checksum, null: false
12
+ t.datetime :created_at, null: false
12
13
 
13
14
  t.index [:key], unique: true
14
15
  end
@@ -23,5 +24,13 @@ class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
23
24
  t.index [:record_type, :record_id, :name, :blob_id], name: 'index_active_storage_attachments_uniqueness', unique: true
24
25
  t.foreign_key :active_storage_blobs, column: :blob_id
25
26
  end
27
+
28
+ create_table :active_storage_variant_records do |t|
29
+ t.belongs_to :blob, null: false, index: false
30
+ t.string :variation_digest, null: false
31
+
32
+ t.index %i[blob_id variation_digest], name: 'index_active_storage_variant_records_uniqueness', unique: true
33
+ t.foreign_key :active_storage_blobs, column: :blob_id
34
+ end
26
35
  end
27
36
  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: 6.0.0
4
+ version: 6.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: 2019-08-18 00:00:00.000000000 Z
12
+ date: 2020-12-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mail
@@ -25,6 +25,34 @@ dependencies:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: 2.7.0
28
+ - !ruby/object:Gem::Dependency
29
+ name: scanf
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
+ - !ruby/object:Gem::Dependency
43
+ name: rexml
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
28
56
  - !ruby/object:Gem::Dependency
29
57
  name: capybara-webkit
30
58
  requirement: !ruby/object:Gem::Requirement
@@ -101,14 +129,14 @@ dependencies:
101
129
  requirements:
102
130
  - - "~>"
103
131
  - !ruby/object:Gem::Version
104
- version: 6.0.0
132
+ version: 6.1.0
105
133
  type: :development
106
134
  prerelease: false
107
135
  version_requirements: !ruby/object:Gem::Requirement
108
136
  requirements:
109
137
  - - "~>"
110
138
  - !ruby/object:Gem::Version
111
- version: 6.0.0
139
+ version: 6.1.0
112
140
  - !ruby/object:Gem::Dependency
113
141
  name: rspec
114
142
  requirement: !ruby/object:Gem::Requirement
@@ -383,8 +411,8 @@ files:
383
411
  - test/rails/overrides/config/routes.rb
384
412
  - test/rails/overrides/db/migrate/001_add_sessions_table.rb
385
413
  - test/rails/overrides/db/migrate/20100824062306_create_users.rb
386
- - test/rails/overrides/db/migrate/20190419005447_create_active_storage_tables.active_storage.rb
387
- - test/rails/overrides/db/migrate/20190419005448_create_action_mailbox_tables.action_mailbox.rb
414
+ - test/rails/overrides/db/migrate/20201111033056_create_active_storage_tables.active_storage.rb
415
+ - test/rails/overrides/db/migrate/20201111033057_create_action_mailbox_tables.action_mailbox.rb
388
416
  - test/rails/overrides/spec/controllers/docomo_guid_spec.rb
389
417
  - test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb
390
418
  - test/rails/overrides/spec/controllers/helpers_spec.rb
@@ -457,7 +485,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
457
485
  - !ruby/object:Gem::Version
458
486
  version: '0'
459
487
  requirements: []
460
- rubygems_version: 3.0.3
488
+ rubygems_version: 3.1.4
461
489
  signing_key:
462
490
  specification_version: 4
463
491
  summary: Rails plugin for mobile devices in Japan
@@ -604,8 +632,8 @@ test_files:
604
632
  - test/rails/overrides/config/routes.rb
605
633
  - test/rails/overrides/db/migrate/001_add_sessions_table.rb
606
634
  - test/rails/overrides/db/migrate/20100824062306_create_users.rb
607
- - test/rails/overrides/db/migrate/20190419005447_create_active_storage_tables.active_storage.rb
608
- - test/rails/overrides/db/migrate/20190419005448_create_action_mailbox_tables.action_mailbox.rb
635
+ - test/rails/overrides/db/migrate/20201111033056_create_active_storage_tables.active_storage.rb
636
+ - test/rails/overrides/db/migrate/20201111033057_create_action_mailbox_tables.action_mailbox.rb
609
637
  - test/rails/overrides/spec/controllers/docomo_guid_spec.rb
610
638
  - test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb
611
639
  - test/rails/overrides/spec/controllers/helpers_spec.rb