jpmobile 5.2.5 → 6.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +1 -1
  3. data/.onkcop-config.yml +396 -0
  4. data/.rubocop.yml +71 -10
  5. data/.ruby-version +1 -1
  6. data/Gemfile +1 -1
  7. data/Gemfile.lock +157 -129
  8. data/README.md +2 -2
  9. data/jpmobile.gemspec +5 -1
  10. data/lib/jpmobile.rb +1 -0
  11. data/lib/jpmobile/configuration.rb +7 -3
  12. data/lib/jpmobile/docomo_guid.rb +2 -2
  13. data/lib/jpmobile/email.rb +2 -4
  14. data/lib/jpmobile/emoticon.rb +16 -23
  15. data/lib/jpmobile/filter.rb +9 -4
  16. data/lib/jpmobile/hook_action_view.rb +4 -10
  17. data/lib/jpmobile/hook_test_request.rb +1 -1
  18. data/lib/jpmobile/mail.rb +7 -7
  19. data/lib/jpmobile/mailer.rb +1 -1
  20. data/lib/jpmobile/mobile/abstract_mobile.rb +1 -1
  21. data/lib/jpmobile/mobile/android.rb +1 -1
  22. data/lib/jpmobile/mobile/au.rb +2 -2
  23. data/lib/jpmobile/mobile/black_berry.rb +1 -1
  24. data/lib/jpmobile/mobile/ddipocket.rb +1 -1
  25. data/lib/jpmobile/mobile/docomo.rb +6 -8
  26. data/lib/jpmobile/mobile/emobile.rb +2 -2
  27. data/lib/jpmobile/mobile/ipad.rb +1 -1
  28. data/lib/jpmobile/mobile/iphone.rb +1 -1
  29. data/lib/jpmobile/mobile/softbank.rb +2 -2
  30. data/lib/jpmobile/mobile/vodafone.rb +2 -2
  31. data/lib/jpmobile/mobile/willcom.rb +2 -2
  32. data/lib/jpmobile/mobile/windows_phone.rb +1 -1
  33. data/lib/jpmobile/rack/params_filter.rb +5 -4
  34. data/lib/jpmobile/rails.rb +9 -41
  35. data/lib/jpmobile/resolver.rb +3 -36
  36. data/lib/jpmobile/session/active_record_store.rb +1 -1
  37. data/lib/jpmobile/session/mem_cache_store.rb +1 -1
  38. data/lib/jpmobile/trans_sid.rb +1 -1
  39. data/lib/jpmobile/util.rb +4 -5
  40. data/lib/jpmobile/version.rb +1 -1
  41. data/lib/jpmobile/view_selector.rb +26 -0
  42. data/lib/tasks/jpmobile_tasks.rake +4 -4
  43. data/spec/rack/jpmobile/emoticon_spec.rb +48 -48
  44. data/spec/rack_helper.rb +1 -5
  45. data/spec/unit/email_spec.rb +1 -1
  46. data/spec/unit/receive_mail_spec.rb +10 -10
  47. data/spec/unit/util_spec.rb +4 -4
  48. data/test/rails/overrides/Gemfile.jpmobile +1 -1
  49. data/test/rails/overrides/app/controllers/mobile_spec_controller.rb +1 -1
  50. data/test/rails/overrides/app/mailboxes/application_mailbox.rb +3 -0
  51. data/test/rails/overrides/app/mailboxes/mobile_mailer_mailbox.rb +5 -0
  52. data/test/rails/overrides/app/mailers/decorated_mailer.rb +1 -1
  53. data/test/rails/overrides/db/migrate/20201111033056_create_active_storage_tables.active_storage.rb +36 -0
  54. data/test/rails/overrides/db/migrate/20201111033057_create_action_mailbox_tables.action_mailbox.rb +14 -0
  55. data/test/rails/overrides/spec/controllers/docomo_guid_spec.rb +2 -2
  56. data/test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb +1 -1
  57. data/test/rails/overrides/spec/controllers/template_path_spec.rb +2 -0
  58. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-attached.eml +0 -0
  59. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-decomail.eml +0 -0
  60. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-emoji.eml +0 -0
  61. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-emoji2.eml +0 -0
  62. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/au-emoji5.eml +0 -0
  63. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/bounced-jp.eml +0 -0
  64. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/docomo-emoji.eml +0 -0
  65. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/docomo-gmail-sjis.eml +0 -0
  66. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/docomo-jis.eml +0 -0
  67. data/{spec/unit/email-fixtures → test/rails/overrides/spec/fixtures/files/mobile_mailer}/iphone-message.eml +0 -0
  68. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/no-from.eml +0 -0
  69. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/non-jp.eml +0 -0
  70. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/photo.jpg +0 -0
  71. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-blank.eml +0 -0
  72. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-emoji-utf8.eml +0 -0
  73. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-emoji.eml +0 -0
  74. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-gmail-sjis.eml +0 -0
  75. data/test/rails/overrides/spec/fixtures/{mobile_mailer → files/mobile_mailer}/softbank-gmail-utf8.eml +0 -0
  76. data/test/rails/overrides/spec/mailboxes/mobile_mailer_mailbox_spec.rb +265 -0
  77. data/test/rails/overrides/spec/mailers/mobile_mailer_spec.rb +0 -305
  78. data/test/rails/overrides/spec/requests/emobile_spec.rb +2 -2
  79. data/test/rails/overrides/spec/requests/trans_sid_spec.rb +9 -9
  80. metadata +82 -43
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.1
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 'onkcop', require: false
7
6
  gem 'rubocop', require: false
7
+ gem 'rubocop-performance', require: false
data/Gemfile.lock CHANGED
@@ -1,193 +1,221 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jpmobile (5.2.2)
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 (5.2.2)
11
- actionpack (= 5.2.2)
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
- actionmailer (5.2.2)
15
- actionpack (= 5.2.2)
16
- actionview (= 5.2.2)
17
- activejob (= 5.2.2)
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 (5.2.2)
21
- actionview (= 5.2.2)
22
- activesupport (= 5.2.2)
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.2)
27
- actionview (5.2.2)
28
- activesupport (= 5.2.2)
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.0, >= 1.0.3)
33
- activejob (5.2.2)
34
- activesupport (= 5.2.2)
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 (5.2.2)
37
- activesupport (= 5.2.2)
38
- activerecord (5.2.2)
39
- activemodel (= 5.2.2)
40
- activesupport (= 5.2.2)
41
- arel (>= 9.0)
42
- activestorage (5.2.2)
43
- actionpack (= 5.2.2)
44
- activerecord (= 5.2.2)
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
- activesupport (5.2.2)
64
+ mimemagic (~> 0.3.2)
65
+ activesupport (6.1.0)
47
66
  concurrent-ruby (~> 1.0, >= 1.0.2)
48
- i18n (>= 0.7, < 2)
49
- minitest (~> 5.1)
50
- tzinfo (~> 1.1)
51
- addressable (2.5.2)
52
- public_suffix (>= 2.0.2, < 4.0)
53
- arel (9.0.0)
54
- ast (2.4.0)
55
- builder (3.2.3)
56
- capybara (3.0.1)
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
- xpath (~> 3.0)
63
- capybara-webkit (1.15.0)
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.2)
67
- concurrent-ruby (1.1.3)
68
- crass (1.0.4)
69
- diff-lcs (1.3)
70
- erubi (1.7.1)
71
- geokit (1.11.0)
72
- git (1.3.0)
73
- globalid (0.4.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)
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.1.1)
97
+ i18n (1.8.5)
77
98
  concurrent-ruby (~> 1.0)
78
- json (2.1.0)
79
- loofah (2.2.3)
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.9.2)
87
- mimemagic (0.3.2)
88
- mini_mime (1.0.1)
89
- mini_portile2 (2.3.0)
90
- minitest (5.11.3)
91
- nio4r (2.3.1)
92
- nokogiri (1.8.5)
93
- mini_portile2 (~> 2.3.0)
94
- onkcop (0.53.0.0)
95
- rubocop (~> 0.53.0)
96
- rubocop-rspec (>= 1.24.0)
97
- parallel (1.12.1)
98
- parser (2.5.0.5)
99
- ast (~> 2.4.0)
100
- powerpack (0.1.1)
101
- pry (0.11.3)
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 (5.2.2)
109
- actioncable (= 5.2.2)
110
- actionmailer (= 5.2.2)
111
- actionpack (= 5.2.2)
112
- actionview (= 5.2.2)
113
- activejob (= 5.2.2)
114
- activemodel (= 5.2.2)
115
- activerecord (= 5.2.2)
116
- activestorage (= 5.2.2)
117
- activesupport (= 5.2.2)
118
- bundler (>= 1.3.0)
119
- railties (= 5.2.2)
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.4)
125
- loofah (~> 2.2, >= 2.2.2)
126
- railties (5.2.2)
127
- actionpack (= 5.2.2)
128
- activesupport (= 5.2.2)
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 (>= 0.19.0, < 2.0)
150
+ thor (~> 1.0)
132
151
  rainbow (3.0.0)
133
- rake (12.3.1)
134
- rspec (3.7.0)
135
- rspec-core (~> 3.7.0)
136
- rspec-expectations (~> 3.7.0)
137
- rspec-mocks (~> 3.7.0)
138
- rspec-core (3.7.1)
139
- rspec-support (~> 3.7.0)
140
- rspec-expectations (3.7.0)
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.7.0)
143
- rspec-its (1.2.0)
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.7.0)
168
+ rspec-mocks (3.10.0)
147
169
  diff-lcs (>= 1.2.0, < 2.0)
148
- rspec-support (~> 3.7.0)
149
- rspec-rails (3.7.2)
150
- actionpack (>= 3.0)
151
- activesupport (>= 3.0)
152
- railties (>= 3.0)
153
- rspec-core (~> 3.7.0)
154
- rspec-expectations (~> 3.7.0)
155
- rspec-mocks (~> 3.7.0)
156
- rspec-support (~> 3.7.0)
157
- rspec-support (3.7.1)
158
- rubocop (0.53.0)
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 (~> 1.0, >= 1.0.1)
165
- rubocop-rspec (1.25.0)
166
- rubocop (>= 0.53.0)
167
- ruby-progressbar (1.9.0)
168
- sprockets (3.7.2)
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.1)
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.3.13)
202
+ sqlite3 (1.4.2)
176
203
  sqlite3-ruby (1.3.3)
177
204
  sqlite3 (>= 1.3.3)
178
- thor (0.20.3)
179
- thread_safe (0.3.6)
180
- tzinfo (1.2.5)
181
- thread_safe (~> 0.1)
182
- unicode-display_width (1.3.0)
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.3)
186
- xpath (3.0.0)
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 (~> 5.2.0)
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
- 1.16.4
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
- ```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
 
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', '~> 5.2.0'
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
@@ -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 unless request.mobile.valid_ip?
33
+ if docomo_guid_mode == :valid_ip && !request.mobile.valid_ip?
34
+ return false
35
35
  end
36
36
 
37
37
  true