jpmobile 5.2.4 → 6.1.1
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 +396 -0
- data/.rubocop.yml +71 -10
- data/.ruby-version +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +157 -129
- data/README.md +2 -2
- data/jpmobile.gemspec +5 -1
- data/lib/jpmobile.rb +1 -0
- data/lib/jpmobile/configuration.rb +7 -3
- data/lib/jpmobile/docomo_guid.rb +2 -2
- data/lib/jpmobile/email.rb +2 -4
- data/lib/jpmobile/emoticon.rb +16 -23
- data/lib/jpmobile/filter.rb +9 -4
- data/lib/jpmobile/hook_action_view.rb +4 -10
- data/lib/jpmobile/hook_test_request.rb +1 -1
- data/lib/jpmobile/mail.rb +7 -7
- data/lib/jpmobile/mailer.rb +1 -1
- data/lib/jpmobile/mobile/abstract_mobile.rb +1 -1
- data/lib/jpmobile/mobile/android.rb +1 -1
- data/lib/jpmobile/mobile/au.rb +2 -2
- data/lib/jpmobile/mobile/black_berry.rb +1 -1
- data/lib/jpmobile/mobile/ddipocket.rb +1 -1
- data/lib/jpmobile/mobile/docomo.rb +6 -8
- data/lib/jpmobile/mobile/emobile.rb +2 -2
- data/lib/jpmobile/mobile/ipad.rb +1 -1
- data/lib/jpmobile/mobile/iphone.rb +1 -1
- data/lib/jpmobile/mobile/softbank.rb +2 -2
- data/lib/jpmobile/mobile/vodafone.rb +2 -2
- data/lib/jpmobile/mobile/willcom.rb +2 -2
- data/lib/jpmobile/mobile/windows_phone.rb +1 -1
- data/lib/jpmobile/rack/params_filter.rb +5 -4
- data/lib/jpmobile/rails.rb +9 -41
- data/lib/jpmobile/resolver.rb +4 -37
- 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/util.rb +4 -5
- data/lib/jpmobile/version.rb +1 -1
- data/lib/tasks/jpmobile_tasks.rake +4 -4
- data/spec/rack/jpmobile/emoticon_spec.rb +48 -48
- data/spec/rack_helper.rb +1 -5
- data/spec/unit/email_spec.rb +1 -1
- data/spec/unit/receive_mail_spec.rb +10 -10
- data/spec/unit/util_spec.rb +4 -4
- data/test/rails/overrides/Gemfile.jpmobile +1 -1
- data/test/rails/overrides/app/controllers/mobile_spec_controller.rb +1 -1
- data/test/rails/overrides/app/mailboxes/application_mailbox.rb +3 -0
- data/test/rails/overrides/app/mailboxes/mobile_mailer_mailbox.rb +5 -0
- data/test/rails/overrides/app/mailers/decorated_mailer.rb +1 -1
- data/test/rails/overrides/db/migrate/20201111033056_create_active_storage_tables.active_storage.rb +36 -0
- data/test/rails/overrides/db/migrate/20201111033057_create_action_mailbox_tables.action_mailbox.rb +14 -0
- data/test/rails/overrides/spec/controllers/docomo_guid_spec.rb +2 -2
- data/test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb +1 -1
- data/test/rails/overrides/spec/controllers/template_path_spec.rb +2 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-attached.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-decomail.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-emoji.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-emoji2.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-emoji5.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/bounced-jp.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/docomo-emoji.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/docomo-gmail-sjis.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/docomo-jis.eml +0 -0
- data/{spec/unit/email-fixtures → test/rails/overrides/spec/fixtures/files/mobile_mailer}/iphone-message.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/no-from.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/non-jp.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/photo.jpg +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-blank.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-emoji-utf8.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-emoji.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-gmail-sjis.eml +0 -0
- data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-gmail-utf8.eml +0 -0
- data/test/rails/overrides/spec/mailboxes/mobile_mailer_mailbox_spec.rb +265 -0
- data/test/rails/overrides/spec/mailers/mobile_mailer_spec.rb +0 -305
- data/test/rails/overrides/spec/requests/emobile_spec.rb +2 -2
- data/test/rails/overrides/spec/requests/trans_sid_spec.rb +9 -9
- metadata +81 -43
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.2
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,193 +1,221 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jpmobile (
|
4
|
+
jpmobile (6.1.1)
|
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 (
|
11
|
-
actionpack (=
|
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
|
-
|
15
|
-
actionpack (=
|
16
|
-
|
17
|
-
|
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)
|
23
|
+
mail (>= 2.7.1)
|
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)
|
18
29
|
mail (~> 2.5, >= 2.5.4)
|
19
30
|
rails-dom-testing (~> 2.0)
|
20
|
-
actionpack (
|
21
|
-
actionview (=
|
22
|
-
activesupport (=
|
23
|
-
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)
|
24
35
|
rack-test (>= 0.6.3)
|
25
36
|
rails-dom-testing (~> 2.0)
|
26
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
27
|
-
|
28
|
-
|
37
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.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)
|
43
|
+
nokogiri (>= 1.8.5)
|
44
|
+
actionview (6.1.0)
|
45
|
+
activesupport (= 6.1.0)
|
29
46
|
builder (~> 3.1)
|
30
47
|
erubi (~> 1.4)
|
31
48
|
rails-dom-testing (~> 2.0)
|
32
|
-
rails-html-sanitizer (~> 1.
|
33
|
-
activejob (
|
34
|
-
activesupport (=
|
49
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
50
|
+
activejob (6.1.0)
|
51
|
+
activesupport (= 6.1.0)
|
35
52
|
globalid (>= 0.3.6)
|
36
|
-
activemodel (
|
37
|
-
activesupport (=
|
38
|
-
activerecord (
|
39
|
-
activemodel (=
|
40
|
-
activesupport (=
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
activerecord (=
|
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)
|
45
63
|
marcel (~> 0.3.1)
|
46
|
-
|
64
|
+
mimemagic (~> 0.3.2)
|
65
|
+
activesupport (6.1.0)
|
47
66
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
48
|
-
i18n (>=
|
49
|
-
minitest (
|
50
|
-
tzinfo (~>
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
ast (2.4.
|
55
|
-
builder (3.2.
|
56
|
-
capybara (3.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)
|
57
76
|
addressable
|
58
77
|
mini_mime (>= 0.1.3)
|
59
78
|
nokogiri (~> 1.8)
|
60
79
|
rack (>= 1.6.0)
|
61
80
|
rack-test (>= 0.6.3)
|
62
|
-
|
63
|
-
|
81
|
+
regexp_parser (~> 1.5)
|
82
|
+
xpath (~> 3.2)
|
83
|
+
capybara-webkit (1.15.1)
|
64
84
|
capybara (>= 2.3, < 4.0)
|
65
85
|
json
|
66
|
-
coderay (1.1.
|
67
|
-
concurrent-ruby (1.1.
|
68
|
-
crass (1.0.
|
69
|
-
diff-lcs (1.
|
70
|
-
erubi (1.
|
71
|
-
geokit (1.
|
72
|
-
git (1.
|
73
|
-
|
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)
|
91
|
+
geokit (1.13.1)
|
92
|
+
git (1.7.0)
|
93
|
+
rchardet (~> 1.8)
|
94
|
+
globalid (0.4.2)
|
74
95
|
activesupport (>= 4.2.0)
|
75
96
|
hpricot (0.8.6)
|
76
|
-
i18n (1.
|
97
|
+
i18n (1.8.5)
|
77
98
|
concurrent-ruby (~> 1.0)
|
78
|
-
json (2.1
|
79
|
-
loofah (2.
|
99
|
+
json (2.3.1)
|
100
|
+
loofah (2.8.0)
|
80
101
|
crass (~> 1.0.2)
|
81
102
|
nokogiri (>= 1.5.9)
|
82
103
|
mail (2.7.1)
|
83
104
|
mini_mime (>= 0.1.1)
|
84
105
|
marcel (0.3.3)
|
85
106
|
mimemagic (~> 0.3.2)
|
86
|
-
method_source (0.
|
87
|
-
mimemagic (0.3.
|
88
|
-
mini_mime (1.0.
|
89
|
-
mini_portile2 (2.
|
90
|
-
minitest (5.
|
91
|
-
nio4r (2.
|
92
|
-
nokogiri (1.
|
93
|
-
mini_portile2 (~> 2.
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
coderay (~> 1.1.0)
|
103
|
-
method_source (~> 0.9.0)
|
104
|
-
public_suffix (3.0.2)
|
105
|
-
rack (2.0.6)
|
107
|
+
method_source (1.0.0)
|
108
|
+
mimemagic (0.3.5)
|
109
|
+
mini_mime (1.0.2)
|
110
|
+
mini_portile2 (2.4.0)
|
111
|
+
minitest (5.14.2)
|
112
|
+
nio4r (2.5.4)
|
113
|
+
nokogiri (1.10.10)
|
114
|
+
mini_portile2 (~> 2.4.0)
|
115
|
+
parallel (1.20.1)
|
116
|
+
parser (3.0.0.0)
|
117
|
+
ast (~> 2.4.1)
|
118
|
+
pry (0.13.1)
|
119
|
+
coderay (~> 1.1)
|
120
|
+
method_source (~> 1.0)
|
121
|
+
public_suffix (4.0.6)
|
122
|
+
rack (2.2.3)
|
106
123
|
rack-test (1.1.0)
|
107
124
|
rack (>= 1.0, < 3)
|
108
|
-
rails (
|
109
|
-
actioncable (=
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
125
|
+
rails (6.1.0)
|
126
|
+
actioncable (= 6.1.0)
|
127
|
+
actionmailbox (= 6.1.0)
|
128
|
+
actionmailer (= 6.1.0)
|
129
|
+
actionpack (= 6.1.0)
|
130
|
+
actiontext (= 6.1.0)
|
131
|
+
actionview (= 6.1.0)
|
132
|
+
activejob (= 6.1.0)
|
133
|
+
activemodel (= 6.1.0)
|
134
|
+
activerecord (= 6.1.0)
|
135
|
+
activestorage (= 6.1.0)
|
136
|
+
activesupport (= 6.1.0)
|
137
|
+
bundler (>= 1.15.0)
|
138
|
+
railties (= 6.1.0)
|
120
139
|
sprockets-rails (>= 2.0.0)
|
121
140
|
rails-dom-testing (2.0.3)
|
122
141
|
activesupport (>= 4.2.0)
|
123
142
|
nokogiri (>= 1.6)
|
124
|
-
rails-html-sanitizer (1.0
|
125
|
-
loofah (~> 2.
|
126
|
-
railties (
|
127
|
-
actionpack (=
|
128
|
-
activesupport (=
|
143
|
+
rails-html-sanitizer (1.3.0)
|
144
|
+
loofah (~> 2.3)
|
145
|
+
railties (6.1.0)
|
146
|
+
actionpack (= 6.1.0)
|
147
|
+
activesupport (= 6.1.0)
|
129
148
|
method_source
|
130
149
|
rake (>= 0.8.7)
|
131
|
-
thor (
|
150
|
+
thor (~> 1.0)
|
132
151
|
rainbow (3.0.0)
|
133
|
-
rake (
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
rspec-
|
140
|
-
|
152
|
+
rake (13.0.1)
|
153
|
+
rchardet (1.8.0)
|
154
|
+
regexp_parser (1.8.2)
|
155
|
+
rexml (3.2.4)
|
156
|
+
rspec (3.10.0)
|
157
|
+
rspec-core (~> 3.10.0)
|
158
|
+
rspec-expectations (~> 3.10.0)
|
159
|
+
rspec-mocks (~> 3.10.0)
|
160
|
+
rspec-core (3.10.0)
|
161
|
+
rspec-support (~> 3.10.0)
|
162
|
+
rspec-expectations (3.10.0)
|
141
163
|
diff-lcs (>= 1.2.0, < 2.0)
|
142
|
-
rspec-support (~> 3.
|
143
|
-
rspec-its (1.
|
164
|
+
rspec-support (~> 3.10.0)
|
165
|
+
rspec-its (1.3.0)
|
144
166
|
rspec-core (>= 3.0.0)
|
145
167
|
rspec-expectations (>= 3.0.0)
|
146
|
-
rspec-mocks (3.
|
168
|
+
rspec-mocks (3.10.0)
|
147
169
|
diff-lcs (>= 1.2.0, < 2.0)
|
148
|
-
rspec-support (~> 3.
|
149
|
-
rspec-rails (
|
150
|
-
actionpack (>=
|
151
|
-
activesupport (>=
|
152
|
-
railties (>=
|
153
|
-
rspec-core (~> 3.
|
154
|
-
rspec-expectations (~> 3.
|
155
|
-
rspec-mocks (~> 3.
|
156
|
-
rspec-support (~> 3.
|
157
|
-
rspec-support (3.
|
158
|
-
rubocop (
|
170
|
+
rspec-support (~> 3.10.0)
|
171
|
+
rspec-rails (4.0.1)
|
172
|
+
actionpack (>= 4.2)
|
173
|
+
activesupport (>= 4.2)
|
174
|
+
railties (>= 4.2)
|
175
|
+
rspec-core (~> 3.9)
|
176
|
+
rspec-expectations (~> 3.9)
|
177
|
+
rspec-mocks (~> 3.9)
|
178
|
+
rspec-support (~> 3.9)
|
179
|
+
rspec-support (3.10.0)
|
180
|
+
rubocop (1.7.0)
|
159
181
|
parallel (~> 1.10)
|
160
|
-
parser (>= 2.5)
|
161
|
-
powerpack (~> 0.1)
|
182
|
+
parser (>= 2.7.1.5)
|
162
183
|
rainbow (>= 2.2.2, < 4.0)
|
184
|
+
regexp_parser (>= 1.8, < 3.0)
|
185
|
+
rexml
|
186
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
163
187
|
ruby-progressbar (~> 1.7)
|
164
|
-
unicode-display_width (
|
165
|
-
rubocop-
|
166
|
-
|
167
|
-
|
168
|
-
|
188
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
189
|
+
rubocop-ast (1.3.0)
|
190
|
+
parser (>= 2.7.1.5)
|
191
|
+
rubocop-performance (1.5.2)
|
192
|
+
rubocop (>= 0.71.0)
|
193
|
+
ruby-progressbar (1.10.1)
|
194
|
+
scanf (1.0.0)
|
195
|
+
sprockets (4.0.2)
|
169
196
|
concurrent-ruby (~> 1.0)
|
170
197
|
rack (> 1, < 3)
|
171
|
-
sprockets-rails (3.2.
|
198
|
+
sprockets-rails (3.2.2)
|
172
199
|
actionpack (>= 4.0)
|
173
200
|
activesupport (>= 4.0)
|
174
201
|
sprockets (>= 3.0.0)
|
175
|
-
sqlite3 (1.
|
202
|
+
sqlite3 (1.4.2)
|
176
203
|
sqlite3-ruby (1.3.3)
|
177
204
|
sqlite3 (>= 1.3.3)
|
178
|
-
thor (0.
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
websocket-driver (0.7.0)
|
205
|
+
thor (1.0.1)
|
206
|
+
tzinfo (2.0.3)
|
207
|
+
concurrent-ruby (~> 1.0)
|
208
|
+
unicode-display_width (1.7.0)
|
209
|
+
websocket-driver (0.7.3)
|
184
210
|
websocket-extensions (>= 0.1.0)
|
185
|
-
websocket-extensions (0.1.
|
186
|
-
xpath (3.
|
211
|
+
websocket-extensions (0.1.5)
|
212
|
+
xpath (3.2.0)
|
187
213
|
nokogiri (~> 1.8)
|
214
|
+
zeitwerk (2.4.2)
|
188
215
|
|
189
216
|
PLATFORMS
|
190
217
|
ruby
|
218
|
+
x86_64-darwin-19
|
191
219
|
|
192
220
|
DEPENDENCIES
|
193
221
|
capybara-webkit
|
@@ -195,14 +223,14 @@ DEPENDENCIES
|
|
195
223
|
git
|
196
224
|
hpricot
|
197
225
|
jpmobile!
|
198
|
-
onkcop
|
199
226
|
pry
|
200
|
-
rails (~>
|
227
|
+
rails (~> 6.1.0)
|
201
228
|
rspec
|
202
229
|
rspec-its
|
203
230
|
rspec-rails
|
204
231
|
rubocop
|
232
|
+
rubocop-performance
|
205
233
|
sqlite3-ruby
|
206
234
|
|
207
235
|
BUNDLED WITH
|
208
|
-
|
236
|
+
2.2.3
|
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
@@ -16,13 +16,17 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
17
17
|
gem.require_paths = ['lib']
|
18
18
|
|
19
|
+
gem.required_ruby_version = '>= 2.5.0'
|
20
|
+
|
19
21
|
gem.add_dependency 'mail', '~> 2.7.0'
|
22
|
+
gem.add_dependency 'rexml'
|
23
|
+
gem.add_dependency 'scanf'
|
20
24
|
gem.add_development_dependency 'capybara-webkit'
|
21
25
|
gem.add_development_dependency 'geokit'
|
22
26
|
gem.add_development_dependency 'git'
|
23
27
|
gem.add_development_dependency 'hpricot'
|
24
28
|
gem.add_development_dependency 'pry'
|
25
|
-
gem.add_development_dependency 'rails', '~>
|
29
|
+
gem.add_development_dependency 'rails', '~> 6.1.0'
|
26
30
|
gem.add_development_dependency 'rspec'
|
27
31
|
gem.add_development_dependency 'rspec-its'
|
28
32
|
gem.add_development_dependency 'rspec-rails'
|
data/lib/jpmobile.rb
CHANGED
@@ -63,6 +63,7 @@ module Jpmobile
|
|
63
63
|
autoload :Mailer, 'jpmobile/mailer'
|
64
64
|
autoload :Resolver, 'jpmobile/resolver'
|
65
65
|
|
66
|
+
autoload :ViewSelector, 'jpmobile/view_selector'
|
66
67
|
autoload :FallbackViewSelector, 'jpmobile/fallback_view_selector'
|
67
68
|
|
68
69
|
autoload :ParamsOverCookie, 'jpmobile/trans_sid'
|
@@ -2,9 +2,7 @@ module Jpmobile
|
|
2
2
|
class Configuration
|
3
3
|
include Singleton
|
4
4
|
|
5
|
-
attr_accessor :form_accept_charset_conversion
|
6
|
-
attr_accessor :smart_phone_emoticon_compatibility
|
7
|
-
attr_accessor :fallback_view_selector
|
5
|
+
attr_accessor :form_accept_charset_conversion, :smart_phone_emoticon_compatibility, :fallback_view_selector
|
8
6
|
|
9
7
|
def initialize
|
10
8
|
@form_accept_charset_conversion = false
|
@@ -23,5 +21,11 @@ module Jpmobile
|
|
23
21
|
def mount_session_store
|
24
22
|
@session_store && @session_store.call
|
25
23
|
end
|
24
|
+
|
25
|
+
module RailsConfiguration
|
26
|
+
def jpmobile
|
27
|
+
@jpmobile ||= ::Jpmobile.config
|
28
|
+
end
|
29
|
+
end
|
26
30
|
end
|
27
31
|
end
|
data/lib/jpmobile/docomo_guid.rb
CHANGED
@@ -30,8 +30,8 @@ module Jpmobile::DocomoGuid #:nodoc:
|
|
30
30
|
return false unless request.mobile.is_a?(Jpmobile::Mobile::Docomo)
|
31
31
|
return false if not_apply_guid_user_agent?
|
32
32
|
|
33
|
-
if docomo_guid_mode == :valid_ip
|
34
|
-
return false
|
33
|
+
if docomo_guid_mode == :valid_ip && !request.mobile.valid_ip?
|
34
|
+
return false
|
35
35
|
end
|
36
36
|
|
37
37
|
true
|