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 +4 -4
- data/.circleci/config.yml +1 -1
- data/.onkcop-config.yml +5 -5
- data/.rubocop.yml +4 -3
- data/.ruby-version +1 -1
- data/Gemfile +2 -2
- data/Gemfile.lock +137 -127
- data/README.md +2 -2
- data/jpmobile.gemspec +3 -1
- data/lib/jpmobile/hook_test_request.rb +1 -1
- data/lib/jpmobile/rails.rb +6 -6
- data/lib/jpmobile/resolver.rb +1 -1
- data/lib/jpmobile/session/active_record_store.rb +1 -1
- data/lib/jpmobile/session/mem_cache_store.rb +1 -1
- data/lib/jpmobile/trans_sid.rb +1 -1
- data/lib/jpmobile/version.rb +1 -1
- data/lib/tasks/jpmobile_tasks.rake +2 -2
- data/spec/rack/jpmobile/emoticon_spec.rb +48 -48
- data/spec/rack_helper.rb +1 -1
- data/test/rails/overrides/db/migrate/{20190419005447_create_active_storage_tables.active_storage.rb → 20201111033056_create_active_storage_tables.active_storage.rb} +14 -5
- data/test/rails/overrides/db/migrate/{20190419005448_create_action_mailbox_tables.action_mailbox.rb → 20201111033057_create_action_mailbox_tables.action_mailbox.rb} +0 -0
- metadata +37 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bab78dead8150c7f549c51a24def0b6d7542773124441f604f44f26c3149471
|
4
|
+
data.tar.gz: d4dfbd95df916aad34e7aef2d2cb49ac2e5e6255252119532f423633b4721ebd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ba8b8c5b09d7fa8ca65841cdd1bf30e495e28acb1b1b4a7fb17efcea063fee036828ce5d2508827adbe0dce760d4ecb74d9a5462389f93ae3e9f058ebf68b24
|
7
|
+
data.tar.gz: f9438f49c04aae66db70c2839f91ab0fe307fef8e17b74259ae74cfb01f7c5b62fa6819485ea150b96d80d2fd93ff8c998a7f99d1d64628ed34093f66be8c3b7
|
data/.circleci/config.yml
CHANGED
data/.onkcop-config.yml
CHANGED
@@ -29,12 +29,12 @@ Layout/ExtraSpacing:
|
|
29
29
|
# special_inside_parentheses (default) と比べて
|
30
30
|
# * 横に長くなりづらい
|
31
31
|
# * メソッド名の長さが変わったときに diff が少ない
|
32
|
-
Layout/
|
32
|
+
Layout/FirstArrayElementIndentation:
|
33
33
|
EnforcedStyle: consistent
|
34
34
|
|
35
35
|
# ({ と hash を開始した場合に ( の位置にインデントさせる
|
36
36
|
# そもそも {} が必要ない可能性が高いが Style/BracesAroundHashParameters はチェックしないことにしたので
|
37
|
-
Layout/
|
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
|
-
|
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
|
-
|
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/
|
163
|
+
Naming/MethodParameterName:
|
164
164
|
Enabled: false
|
165
165
|
|
166
166
|
#################### Performance ###########################
|
data/.rubocop.yml
CHANGED
@@ -3,7 +3,7 @@ require: rubocop-performance
|
|
3
3
|
inherit_from: './.onkcop-config.yml'
|
4
4
|
|
5
5
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.
|
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
|
-
|
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/
|
125
|
+
Lint/SuppressedException:
|
125
126
|
Exclude:
|
126
127
|
- 'lib/jpmobile/emoticon.rb'
|
127
128
|
- 'lib/jpmobile/fallback_view_selector.rb'
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.2
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,72 +1,78 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jpmobile (6.0.0
|
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.
|
11
|
-
actionpack (= 6.
|
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.
|
15
|
-
actionpack (= 6.
|
16
|
-
activejob (= 6.
|
17
|
-
activerecord (= 6.
|
18
|
-
activestorage (= 6.
|
19
|
-
activesupport (= 6.
|
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.
|
22
|
-
actionpack (= 6.
|
23
|
-
actionview (= 6.
|
24
|
-
activejob (= 6.
|
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.
|
28
|
-
actionview (= 6.
|
29
|
-
activesupport (= 6.
|
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.
|
35
|
-
actionpack (= 6.
|
36
|
-
activerecord (= 6.
|
37
|
-
activestorage (= 6.
|
38
|
-
activesupport (= 6.
|
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.
|
41
|
-
activesupport (= 6.
|
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.
|
47
|
-
activesupport (= 6.
|
50
|
+
activejob (6.1.0)
|
51
|
+
activesupport (= 6.1.0)
|
48
52
|
globalid (>= 0.3.6)
|
49
|
-
activemodel (6.
|
50
|
-
activesupport (= 6.
|
51
|
-
activerecord (6.
|
52
|
-
activemodel (= 6.
|
53
|
-
activesupport (= 6.
|
54
|
-
activestorage (6.
|
55
|
-
actionpack (= 6.
|
56
|
-
activejob (= 6.
|
57
|
-
activerecord (= 6.
|
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
|
-
|
64
|
+
mimemagic (~> 0.3.2)
|
65
|
+
activesupport (6.1.0)
|
60
66
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
61
|
-
i18n (>=
|
62
|
-
minitest (
|
63
|
-
tzinfo (~>
|
64
|
-
zeitwerk (~> 2.
|
65
|
-
addressable (2.
|
66
|
-
public_suffix (>= 2.0.2, <
|
67
|
-
ast (2.4.
|
68
|
-
builder (3.2.
|
69
|
-
capybara (3.
|
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.
|
81
|
-
concurrent-ruby (1.1.
|
82
|
-
crass (1.0.
|
83
|
-
diff-lcs (1.
|
84
|
-
erubi (1.
|
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.
|
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.
|
97
|
+
i18n (1.8.5)
|
91
98
|
concurrent-ruby (~> 1.0)
|
92
|
-
jaro_winkler (1.5.
|
93
|
-
json (2.
|
94
|
-
loofah (2.
|
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.
|
102
|
-
mimemagic (0.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.
|
106
|
-
nio4r (2.4
|
107
|
-
nokogiri (1.10.
|
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.
|
110
|
-
parser (2.
|
111
|
-
ast (~> 2.4.
|
112
|
-
pry (0.
|
113
|
-
coderay (~> 1.1
|
114
|
-
method_source (~>
|
115
|
-
public_suffix (
|
116
|
-
rack (2.
|
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.
|
120
|
-
actioncable (= 6.
|
121
|
-
actionmailbox (= 6.
|
122
|
-
actionmailer (= 6.
|
123
|
-
actionpack (= 6.
|
124
|
-
actiontext (= 6.
|
125
|
-
actionview (= 6.
|
126
|
-
activejob (= 6.
|
127
|
-
activemodel (= 6.
|
128
|
-
activerecord (= 6.
|
129
|
-
activestorage (= 6.
|
130
|
-
activesupport (= 6.
|
131
|
-
bundler (>= 1.
|
132
|
-
railties (= 6.
|
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.
|
138
|
-
loofah (~> 2.
|
139
|
-
railties (6.
|
140
|
-
actionpack (= 6.
|
141
|
-
activesupport (= 6.
|
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 (
|
151
|
+
thor (~> 1.0)
|
145
152
|
rainbow (3.0.0)
|
146
|
-
rake (
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
rspec-
|
152
|
-
|
153
|
-
rspec-
|
154
|
-
rspec-
|
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.
|
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.
|
169
|
+
rspec-mocks (3.10.0)
|
161
170
|
diff-lcs (>= 1.2.0, < 2.0)
|
162
|
-
rspec-support (~> 3.
|
163
|
-
rspec-rails (
|
164
|
-
actionpack (>=
|
165
|
-
activesupport (>=
|
166
|
-
railties (>=
|
167
|
-
rspec-core (~> 3.
|
168
|
-
rspec-expectations (~> 3.
|
169
|
-
rspec-mocks (~> 3.
|
170
|
-
rspec-support (~> 3.
|
171
|
-
rspec-support (3.
|
172
|
-
rubocop (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.
|
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.
|
188
|
+
rubocop-performance (1.5.2)
|
180
189
|
rubocop (>= 0.71.0)
|
181
190
|
ruby-progressbar (1.10.1)
|
182
|
-
|
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.
|
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.
|
199
|
+
sqlite3 (1.4.2)
|
190
200
|
sqlite3-ruby (1.3.3)
|
191
201
|
sqlite3 (>= 1.3.3)
|
192
|
-
thor (0.
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
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.
|
208
|
+
websocket-extensions (0.1.5)
|
200
209
|
xpath (3.2.0)
|
201
210
|
nokogiri (~> 1.8)
|
202
|
-
zeitwerk (2.
|
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.
|
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
|
-
|
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
|
-
```
|
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
|
-
```
|
356
|
+
```
|
357
357
|
|
358
358
|
のようにリンク先を直接指定するとセッションIDは付加されません。
|
359
359
|
|
data/jpmobile.gemspec
CHANGED
@@ -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.
|
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.
|
2
|
+
ActionController::TestRequest.include Jpmobile::RequestWithMobileTesting
|
data/lib/jpmobile/rails.rb
CHANGED
@@ -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.
|
8
|
-
ActionDispatch::Request.
|
9
|
-
ActionController::Base.
|
10
|
-
ActionController::Base.
|
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.
|
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.
|
26
|
+
ActionDispatch::Session::AbstractStore.prepend Jpmobile::ParamsOverCookie
|
27
27
|
else
|
28
28
|
Rails.application.config.jpmobile.mount_session_store
|
29
29
|
end
|
data/lib/jpmobile/resolver.rb
CHANGED
@@ -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
|
6
|
+
def initialize(path)
|
7
7
|
raise ArgumentError, 'path already is a Resolver class' if path.is_a?(Resolver)
|
8
8
|
|
9
9
|
super
|
data/lib/jpmobile/trans_sid.rb
CHANGED
@@ -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
|
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を追加する。
|
data/lib/jpmobile/version.rb
CHANGED
@@ -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.
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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
|
|
data/spec/rack_helper.rb
CHANGED
@@ -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,
|
6
|
-
t.string :filename,
|
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.
|
10
|
-
t.
|
11
|
-
t.
|
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
|
File without changes
|
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.
|
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:
|
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.
|
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.
|
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/
|
387
|
-
- test/rails/overrides/db/migrate/
|
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.
|
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/
|
608
|
-
- test/rails/overrides/db/migrate/
|
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
|