jpmobile 6.1.2 → 7.0.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 +8 -3
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +119 -138
- data/README.md +3 -18
- data/jpmobile.gemspec +3 -4
- data/lib/jpmobile/docomo_guid.rb +2 -2
- data/lib/jpmobile/hook_action_view.rb +3 -3
- data/lib/jpmobile/hook_template_details_requested.rb +12 -0
- data/lib/jpmobile/mailer.rb +1 -1
- data/lib/jpmobile/mobile/android.rb +1 -1
- data/lib/jpmobile/mobile/android_tablet.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 +2 -2
- 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/path_set.rb +10 -36
- data/lib/jpmobile/rails.rb +2 -0
- data/lib/jpmobile/resolver.rb +44 -6
- data/lib/jpmobile/template_details.rb +38 -0
- data/lib/jpmobile/trans_sid.rb +1 -1
- data/lib/jpmobile/util.rb +1 -1
- data/lib/jpmobile/version.rb +1 -1
- data/lib/jpmobile/view_selector.rb +5 -6
- data/lib/jpmobile.rb +13 -0
- data/lib/tasks/jpmobile_tasks.rake +2 -1
- data/spec/rack/jpmobile/mobile_by_ua_spec.rb +1 -0
- data/test/rails/overrides/Gemfile.jpmobile +4 -0
- data/test/rails/overrides/app/controllers/mobile_spec_controller.rb +1 -1
- data/test/rails/overrides/app/controllers/template_path_controller.rb +3 -0
- data/test/rails/overrides/app/views/mobile_spec/mobile_not_exist.html.erb +3 -0
- data/test/rails/overrides/config/routes.rb +1 -1
- data/test/rails/overrides/spec/controllers/mobile_spec_controller_spec.rb +3 -3
- data/test/rails/overrides/spec/rails_helper.rb +1 -1
- data/test/rails/overrides/spec/requests/filter_spec.rb +106 -0
- data/test/rails/overrides/spec/requests/template_path_spec.rb +1 -1
- data/test/rails/overrides/spec/{features → system}/admin/top_spec.rb +2 -2
- data/test/rails/overrides/spec/{features → system}/filter_spec.rb +2 -7
- data/test/rails/overrides/spec/system/support/cuprite_setup.rb +14 -0
- data/test/rails/overrides/spec/system_helper.rb +3 -0
- metadata +23 -29
- data/test/rails/overrides/app/views/mobile_spec/no_mobile.html.erb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23fd23b1c3355357f297fbfbcd1ccd9bd673a7cd32ac0de550ed5222b9cbe2d1
|
4
|
+
data.tar.gz: f2432b9a47332debe6dde7bb42b5dc175a6ffa7c0ac70f80ca40ab3a4613a1f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57bf348d59ec1f6b520d363a1b5e8b798a033c10a75d88ca88c8b8539530b436a9711a9882571f21371e1c547654c92c16db1ac50fae9164f4cd0a818b19d262
|
7
|
+
data.tar.gz: 86b3585c886a0e4ba2a5a94f736b45d3adc8c4c2924572acc477986d8cecb8edf34eed5e06c3fbb2a4f071f2c7f431b9f7e3d5cb1f4f29cb680b5a42d2be2c8b
|
data/.circleci/config.yml
CHANGED
@@ -1,21 +1,26 @@
|
|
1
|
-
version: 2
|
1
|
+
version: 2.1
|
2
|
+
orbs:
|
3
|
+
browser-tools: circleci/browser-tools@1.1
|
2
4
|
jobs:
|
3
5
|
test-job:
|
4
6
|
working_directory: ~/jpmobile
|
5
7
|
docker:
|
6
|
-
- image:
|
8
|
+
- image: cimg/ruby:3.0-browsers
|
7
9
|
environment:
|
8
10
|
BUNDLE_JOBS: 3
|
9
11
|
BUNDLE_RETRY: 3
|
10
12
|
BUNDLE_PATH: vendor/bundle
|
11
13
|
RAILS_ENV: test
|
12
14
|
steps:
|
15
|
+
- browser-tools/install-browser-tools
|
13
16
|
- checkout
|
14
17
|
|
15
18
|
# Install dependent packages
|
16
19
|
- run:
|
17
20
|
name: Install dependent packages
|
18
|
-
command:
|
21
|
+
command: |
|
22
|
+
sudo apt update
|
23
|
+
sudo apt install -y cmake libsqlite3-dev
|
19
24
|
|
20
25
|
# Which version of bundler?
|
21
26
|
- run:
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.3
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jpmobile (6.1.
|
4
|
+
jpmobile (6.1.2)
|
5
5
|
mail (~> 2.7.0)
|
6
6
|
rexml
|
7
7
|
scanf
|
@@ -9,228 +9,209 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actioncable (
|
13
|
-
actionpack (=
|
14
|
-
activesupport (=
|
12
|
+
actioncable (7.0.0)
|
13
|
+
actionpack (= 7.0.0)
|
14
|
+
activesupport (= 7.0.0)
|
15
15
|
nio4r (~> 2.0)
|
16
16
|
websocket-driver (>= 0.6.1)
|
17
|
-
actionmailbox (
|
18
|
-
actionpack (=
|
19
|
-
activejob (=
|
20
|
-
activerecord (=
|
21
|
-
activestorage (=
|
22
|
-
activesupport (=
|
17
|
+
actionmailbox (7.0.0)
|
18
|
+
actionpack (= 7.0.0)
|
19
|
+
activejob (= 7.0.0)
|
20
|
+
activerecord (= 7.0.0)
|
21
|
+
activestorage (= 7.0.0)
|
22
|
+
activesupport (= 7.0.0)
|
23
23
|
mail (>= 2.7.1)
|
24
|
-
actionmailer (
|
25
|
-
actionpack (=
|
26
|
-
actionview (=
|
27
|
-
activejob (=
|
28
|
-
activesupport (=
|
24
|
+
actionmailer (7.0.0)
|
25
|
+
actionpack (= 7.0.0)
|
26
|
+
actionview (= 7.0.0)
|
27
|
+
activejob (= 7.0.0)
|
28
|
+
activesupport (= 7.0.0)
|
29
29
|
mail (~> 2.5, >= 2.5.4)
|
30
30
|
rails-dom-testing (~> 2.0)
|
31
|
-
actionpack (
|
32
|
-
actionview (=
|
33
|
-
activesupport (=
|
34
|
-
rack (~> 2.0, >= 2.0
|
31
|
+
actionpack (7.0.0)
|
32
|
+
actionview (= 7.0.0)
|
33
|
+
activesupport (= 7.0.0)
|
34
|
+
rack (~> 2.0, >= 2.2.0)
|
35
35
|
rack-test (>= 0.6.3)
|
36
36
|
rails-dom-testing (~> 2.0)
|
37
37
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
38
|
-
actiontext (
|
39
|
-
actionpack (=
|
40
|
-
activerecord (=
|
41
|
-
activestorage (=
|
42
|
-
activesupport (=
|
38
|
+
actiontext (7.0.0)
|
39
|
+
actionpack (= 7.0.0)
|
40
|
+
activerecord (= 7.0.0)
|
41
|
+
activestorage (= 7.0.0)
|
42
|
+
activesupport (= 7.0.0)
|
43
|
+
globalid (>= 0.6.0)
|
43
44
|
nokogiri (>= 1.8.5)
|
44
|
-
actionview (
|
45
|
-
activesupport (=
|
45
|
+
actionview (7.0.0)
|
46
|
+
activesupport (= 7.0.0)
|
46
47
|
builder (~> 3.1)
|
47
48
|
erubi (~> 1.4)
|
48
49
|
rails-dom-testing (~> 2.0)
|
49
50
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
50
|
-
activejob (
|
51
|
-
activesupport (=
|
51
|
+
activejob (7.0.0)
|
52
|
+
activesupport (= 7.0.0)
|
52
53
|
globalid (>= 0.3.6)
|
53
|
-
activemodel (
|
54
|
-
activesupport (=
|
55
|
-
activerecord (
|
56
|
-
activemodel (=
|
57
|
-
activesupport (=
|
58
|
-
activestorage (
|
59
|
-
actionpack (=
|
60
|
-
activejob (=
|
61
|
-
activerecord (=
|
62
|
-
activesupport (=
|
63
|
-
marcel (~> 0
|
64
|
-
|
65
|
-
activesupport (
|
54
|
+
activemodel (7.0.0)
|
55
|
+
activesupport (= 7.0.0)
|
56
|
+
activerecord (7.0.0)
|
57
|
+
activemodel (= 7.0.0)
|
58
|
+
activesupport (= 7.0.0)
|
59
|
+
activestorage (7.0.0)
|
60
|
+
actionpack (= 7.0.0)
|
61
|
+
activejob (= 7.0.0)
|
62
|
+
activerecord (= 7.0.0)
|
63
|
+
activesupport (= 7.0.0)
|
64
|
+
marcel (~> 1.0)
|
65
|
+
mini_mime (>= 1.1.0)
|
66
|
+
activesupport (7.0.0)
|
66
67
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
67
68
|
i18n (>= 1.6, < 2)
|
68
69
|
minitest (>= 5.1)
|
69
70
|
tzinfo (~> 2.0)
|
70
|
-
|
71
|
-
addressable (2.7.0)
|
72
|
-
public_suffix (>= 2.0.2, < 5.0)
|
73
|
-
ast (2.4.1)
|
71
|
+
ast (2.4.2)
|
74
72
|
builder (3.2.4)
|
75
|
-
capybara (3.34.0)
|
76
|
-
addressable
|
77
|
-
mini_mime (>= 0.1.3)
|
78
|
-
nokogiri (~> 1.8)
|
79
|
-
rack (>= 1.6.0)
|
80
|
-
rack-test (>= 0.6.3)
|
81
|
-
regexp_parser (~> 1.5)
|
82
|
-
xpath (~> 3.2)
|
83
|
-
capybara-webkit (1.15.1)
|
84
|
-
capybara (>= 2.3, < 4.0)
|
85
|
-
json
|
86
73
|
coderay (1.1.3)
|
87
|
-
concurrent-ruby (1.1.
|
74
|
+
concurrent-ruby (1.1.9)
|
88
75
|
crass (1.0.6)
|
89
76
|
diff-lcs (1.4.4)
|
90
77
|
erubi (1.10.0)
|
91
78
|
geokit (1.13.1)
|
92
|
-
git (1.
|
79
|
+
git (1.9.1)
|
93
80
|
rchardet (~> 1.8)
|
94
|
-
globalid (0.
|
95
|
-
activesupport (>=
|
81
|
+
globalid (1.0.0)
|
82
|
+
activesupport (>= 5.0)
|
96
83
|
hpricot (0.8.6)
|
97
|
-
i18n (1.8.
|
84
|
+
i18n (1.8.11)
|
98
85
|
concurrent-ruby (~> 1.0)
|
99
|
-
|
100
|
-
loofah (2.8.0)
|
86
|
+
loofah (2.13.0)
|
101
87
|
crass (~> 1.0.2)
|
102
88
|
nokogiri (>= 1.5.9)
|
103
89
|
mail (2.7.1)
|
104
90
|
mini_mime (>= 0.1.1)
|
105
|
-
marcel (0.
|
106
|
-
mimemagic (~> 0.3.2)
|
91
|
+
marcel (1.0.2)
|
107
92
|
method_source (1.0.0)
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
parallel (1.20.1)
|
116
|
-
parser (3.0.0.0)
|
93
|
+
mini_mime (1.1.2)
|
94
|
+
minitest (5.15.0)
|
95
|
+
nio4r (2.5.8)
|
96
|
+
nokogiri (1.12.5-arm64-darwin)
|
97
|
+
racc (~> 1.4)
|
98
|
+
parallel (1.21.0)
|
99
|
+
parser (3.0.3.2)
|
117
100
|
ast (~> 2.4.1)
|
118
|
-
pry (0.
|
101
|
+
pry (0.14.1)
|
119
102
|
coderay (~> 1.1)
|
120
103
|
method_source (~> 1.0)
|
121
|
-
|
104
|
+
racc (1.6.0)
|
122
105
|
rack (2.2.3)
|
123
106
|
rack-test (1.1.0)
|
124
107
|
rack (>= 1.0, < 3)
|
125
|
-
rails (
|
126
|
-
actioncable (=
|
127
|
-
actionmailbox (=
|
128
|
-
actionmailer (=
|
129
|
-
actionpack (=
|
130
|
-
actiontext (=
|
131
|
-
actionview (=
|
132
|
-
activejob (=
|
133
|
-
activemodel (=
|
134
|
-
activerecord (=
|
135
|
-
activestorage (=
|
136
|
-
activesupport (=
|
108
|
+
rails (7.0.0)
|
109
|
+
actioncable (= 7.0.0)
|
110
|
+
actionmailbox (= 7.0.0)
|
111
|
+
actionmailer (= 7.0.0)
|
112
|
+
actionpack (= 7.0.0)
|
113
|
+
actiontext (= 7.0.0)
|
114
|
+
actionview (= 7.0.0)
|
115
|
+
activejob (= 7.0.0)
|
116
|
+
activemodel (= 7.0.0)
|
117
|
+
activerecord (= 7.0.0)
|
118
|
+
activestorage (= 7.0.0)
|
119
|
+
activesupport (= 7.0.0)
|
137
120
|
bundler (>= 1.15.0)
|
138
|
-
railties (=
|
139
|
-
sprockets-rails (>= 2.0.0)
|
121
|
+
railties (= 7.0.0)
|
140
122
|
rails-dom-testing (2.0.3)
|
141
123
|
activesupport (>= 4.2.0)
|
142
124
|
nokogiri (>= 1.6)
|
143
|
-
rails-html-sanitizer (1.
|
125
|
+
rails-html-sanitizer (1.4.2)
|
144
126
|
loofah (~> 2.3)
|
145
|
-
railties (
|
146
|
-
actionpack (=
|
147
|
-
activesupport (=
|
127
|
+
railties (7.0.0)
|
128
|
+
actionpack (= 7.0.0)
|
129
|
+
activesupport (= 7.0.0)
|
148
130
|
method_source
|
149
|
-
rake (>=
|
131
|
+
rake (>= 12.2)
|
150
132
|
thor (~> 1.0)
|
133
|
+
zeitwerk (~> 2.5)
|
151
134
|
rainbow (3.0.0)
|
152
|
-
rake (13.0.
|
135
|
+
rake (13.0.6)
|
153
136
|
rchardet (1.8.0)
|
154
|
-
regexp_parser (
|
155
|
-
rexml (3.2.
|
137
|
+
regexp_parser (2.2.0)
|
138
|
+
rexml (3.2.5)
|
156
139
|
rspec (3.10.0)
|
157
140
|
rspec-core (~> 3.10.0)
|
158
141
|
rspec-expectations (~> 3.10.0)
|
159
142
|
rspec-mocks (~> 3.10.0)
|
160
|
-
rspec-core (3.10.
|
143
|
+
rspec-core (3.10.1)
|
161
144
|
rspec-support (~> 3.10.0)
|
162
|
-
rspec-expectations (3.10.
|
145
|
+
rspec-expectations (3.10.1)
|
163
146
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
147
|
rspec-support (~> 3.10.0)
|
165
148
|
rspec-its (1.3.0)
|
166
149
|
rspec-core (>= 3.0.0)
|
167
150
|
rspec-expectations (>= 3.0.0)
|
168
|
-
rspec-mocks (3.10.
|
151
|
+
rspec-mocks (3.10.2)
|
169
152
|
diff-lcs (>= 1.2.0, < 2.0)
|
170
153
|
rspec-support (~> 3.10.0)
|
171
|
-
rspec-rails (
|
172
|
-
actionpack (>=
|
173
|
-
activesupport (>=
|
174
|
-
railties (>=
|
175
|
-
rspec-core (~> 3.
|
176
|
-
rspec-expectations (~> 3.
|
177
|
-
rspec-mocks (~> 3.
|
178
|
-
rspec-support (~> 3.
|
179
|
-
rspec-support (3.10.
|
180
|
-
rubocop (1.
|
154
|
+
rspec-rails (5.0.2)
|
155
|
+
actionpack (>= 5.2)
|
156
|
+
activesupport (>= 5.2)
|
157
|
+
railties (>= 5.2)
|
158
|
+
rspec-core (~> 3.10)
|
159
|
+
rspec-expectations (~> 3.10)
|
160
|
+
rspec-mocks (~> 3.10)
|
161
|
+
rspec-support (~> 3.10)
|
162
|
+
rspec-support (3.10.3)
|
163
|
+
rubocop (1.23.0)
|
181
164
|
parallel (~> 1.10)
|
182
|
-
parser (>=
|
165
|
+
parser (>= 3.0.0.0)
|
183
166
|
rainbow (>= 2.2.2, < 4.0)
|
184
167
|
regexp_parser (>= 1.8, < 3.0)
|
185
168
|
rexml
|
186
|
-
rubocop-ast (>= 1.
|
169
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
187
170
|
ruby-progressbar (~> 1.7)
|
188
|
-
unicode-display_width (>= 1.4.0, <
|
189
|
-
rubocop-ast (1.
|
190
|
-
parser (>=
|
191
|
-
rubocop-performance (1.
|
192
|
-
rubocop (>=
|
193
|
-
|
171
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
172
|
+
rubocop-ast (1.15.0)
|
173
|
+
parser (>= 3.0.1.1)
|
174
|
+
rubocop-performance (1.12.0)
|
175
|
+
rubocop (>= 1.7.0, < 2.0)
|
176
|
+
rubocop-ast (>= 0.4.0)
|
177
|
+
rubocop-rails (2.12.4)
|
178
|
+
activesupport (>= 4.2.0)
|
179
|
+
rack (>= 1.1)
|
180
|
+
rubocop (>= 1.7.0, < 2.0)
|
181
|
+
rubocop-rspec (2.6.0)
|
182
|
+
rubocop (~> 1.19)
|
183
|
+
ruby-progressbar (1.11.0)
|
194
184
|
scanf (1.0.0)
|
195
|
-
sprockets (4.0.2)
|
196
|
-
concurrent-ruby (~> 1.0)
|
197
|
-
rack (> 1, < 3)
|
198
|
-
sprockets-rails (3.2.2)
|
199
|
-
actionpack (>= 4.0)
|
200
|
-
activesupport (>= 4.0)
|
201
|
-
sprockets (>= 3.0.0)
|
202
185
|
sqlite3 (1.4.2)
|
203
186
|
sqlite3-ruby (1.3.3)
|
204
187
|
sqlite3 (>= 1.3.3)
|
205
|
-
thor (1.0
|
206
|
-
tzinfo (2.0.
|
188
|
+
thor (1.1.0)
|
189
|
+
tzinfo (2.0.4)
|
207
190
|
concurrent-ruby (~> 1.0)
|
208
|
-
unicode-display_width (1.
|
209
|
-
websocket-driver (0.7.
|
191
|
+
unicode-display_width (2.1.0)
|
192
|
+
websocket-driver (0.7.5)
|
210
193
|
websocket-extensions (>= 0.1.0)
|
211
194
|
websocket-extensions (0.1.5)
|
212
|
-
|
213
|
-
nokogiri (~> 1.8)
|
214
|
-
zeitwerk (2.4.2)
|
195
|
+
zeitwerk (2.5.1)
|
215
196
|
|
216
197
|
PLATFORMS
|
217
|
-
|
218
|
-
x86_64-darwin-19
|
198
|
+
arm64-darwin-20
|
219
199
|
|
220
200
|
DEPENDENCIES
|
221
|
-
capybara-webkit
|
222
201
|
geokit
|
223
202
|
git
|
224
203
|
hpricot
|
225
204
|
jpmobile!
|
226
205
|
pry
|
227
|
-
rails (~>
|
206
|
+
rails (~> 7.0.0.alpha2)
|
228
207
|
rspec
|
229
208
|
rspec-its
|
230
209
|
rspec-rails
|
231
210
|
rubocop
|
232
211
|
rubocop-performance
|
212
|
+
rubocop-rails
|
213
|
+
rubocop-rspec
|
233
214
|
sqlite3-ruby
|
234
215
|
|
235
216
|
BUNDLED WITH
|
236
|
-
2.2.
|
217
|
+
2.2.32
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
[![CircleCI](https://circleci.com/gh/jpmobile/jpmobile/tree/
|
1
|
+
[![CircleCI](https://circleci.com/gh/jpmobile/jpmobile/tree/main.svg?style=svg)](https://circleci.com/gh/jpmobile/jpmobile/tree/main)
|
2
2
|
[![Code Climate](https://codeclimate.com/github/jpmobile/jpmobile/badges/gpa.svg)](https://codeclimate.com/github/jpmobile/jpmobile)
|
3
3
|
|
4
4
|
# jpmobile: A Rails plugin for Japanese mobile-phones
|
5
5
|
|
6
6
|
## jpmobileとは
|
7
|
-
携帯電話特有の機能を Rails
|
7
|
+
携帯電話特有の機能を Rails や Rack middleware で利用するためのプラグイン。 以下の機能を備える。
|
8
8
|
|
9
9
|
* 携帯電話のキャリア判別
|
10
10
|
* 端末位置情報の取得
|
@@ -38,21 +38,6 @@ Rails](https://github.com/jpmobile/jpmobile/wiki/Version-:-Jpmobile-vs-Rails)
|
|
38
38
|
を参照。
|
39
39
|
|
40
40
|
## インストール
|
41
|
-
### Rails pluginとしてインストールする場合
|
42
|
-
```shell
|
43
|
-
% rails plugin install git://github.com/jpmobile/jpmobile.git
|
44
|
-
```
|
45
|
-
|
46
|
-
#### IPアドレス検証が必要な場合
|
47
|
-
```shell
|
48
|
-
% rails plugin install git://github.com/jpmobile/jpmobile-ipaddresses.git
|
49
|
-
```
|
50
|
-
|
51
|
-
#### ディスプレイ情報を取得する必要がある場合
|
52
|
-
```shell
|
53
|
-
% rails plugin install git://github.com/jpmobile/jpmobile-terminfo.git
|
54
|
-
```
|
55
|
-
|
56
41
|
### gemでインストールする場合
|
57
42
|
```shell
|
58
43
|
% gem install jpmobile
|
@@ -396,7 +381,7 @@ end
|
|
396
381
|
## jpmobileの開発方法
|
397
382
|
|
398
383
|
jpmobileの開発に関しては
|
399
|
-
[こちら](https://github.com/jpmobile/jpmobile/blob/
|
384
|
+
[こちら](https://github.com/jpmobile/jpmobile/blob/main/CONTRIBUTING.md) へ
|
400
385
|
|
401
386
|
## リンク
|
402
387
|
|
data/jpmobile.gemspec
CHANGED
@@ -13,20 +13,19 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.license = 'MIT'
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
16
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|
|
16
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|system)/})
|
17
17
|
gem.require_paths = ['lib']
|
18
18
|
|
19
|
-
gem.required_ruby_version = '>=
|
19
|
+
gem.required_ruby_version = '>= 3.0.0'
|
20
20
|
|
21
21
|
gem.add_dependency 'mail', '~> 2.7.0'
|
22
22
|
gem.add_dependency 'rexml'
|
23
23
|
gem.add_dependency 'scanf'
|
24
|
-
gem.add_development_dependency 'capybara-webkit'
|
25
24
|
gem.add_development_dependency 'geokit'
|
26
25
|
gem.add_development_dependency 'git'
|
27
26
|
gem.add_development_dependency 'hpricot'
|
28
27
|
gem.add_development_dependency 'pry'
|
29
|
-
gem.add_development_dependency 'rails', '~>
|
28
|
+
gem.add_development_dependency 'rails', '~> 7.0.0.alpha2'
|
30
29
|
gem.add_development_dependency 'rspec'
|
31
30
|
gem.add_development_dependency 'rspec-its'
|
32
31
|
gem.add_development_dependency 'rspec-rails'
|
data/lib/jpmobile/docomo_guid.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# DoCoMoの時guid=onの付与
|
2
|
-
class ActionController::Base
|
2
|
+
class ActionController::Base # :nodoc:
|
3
3
|
class_attribute :docomo_guid_mode
|
4
4
|
|
5
5
|
class << self
|
@@ -10,7 +10,7 @@ class ActionController::Base #:nodoc:
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
module Jpmobile::DocomoGuid
|
13
|
+
module Jpmobile::DocomoGuid # :nodoc:
|
14
14
|
protected
|
15
15
|
|
16
16
|
def default_url_options
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# :stopdoc:
|
2
2
|
# helperを追加
|
3
3
|
# ActionView で trans_sid を有効にする
|
4
4
|
ActionView::Base.class_eval do
|
@@ -6,7 +6,7 @@ ActionView::Base.class_eval do
|
|
6
6
|
|
7
7
|
delegate :default_url_options, to: :controller unless respond_to?(:default_url_options)
|
8
8
|
end
|
9
|
-
|
9
|
+
# :startdoc:
|
10
10
|
|
11
11
|
# :stopdoc:
|
12
12
|
# accept-charset に charset を変更できるようにする
|
@@ -19,4 +19,4 @@ module Jpmobile
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
|
22
|
+
# :startdoc:
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Jpmobile
|
2
|
+
module HookTemplateDetailsRequested
|
3
|
+
attr_reader :mobile, :mobile_idx
|
4
|
+
|
5
|
+
def initialize(locale:, handlers:, formats:, variants:, mobile:)
|
6
|
+
super(locale: locale, handlers: handlers, formats: formats, variants: variants)
|
7
|
+
|
8
|
+
@mobile = mobile.map(&:to_sym)
|
9
|
+
@mobile_idx = build_idx_hash(@mobile)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/jpmobile/mailer.rb
CHANGED
@@ -6,6 +6,6 @@ module Jpmobile::Mobile
|
|
6
6
|
include Jpmobile::Mobile::GoogleEmoticon
|
7
7
|
|
8
8
|
# 対応するUser-Agentの正規表現
|
9
|
-
USER_AGENT_REGEXP = Regexp.union(
|
9
|
+
USER_AGENT_REGEXP = Regexp.union(/^(?!.+Mobile).+(?=Android).+$/, /Android.+SC-01C/)
|
10
10
|
end
|
11
11
|
end
|
data/lib/jpmobile/mobile/au.rb
CHANGED
@@ -6,9 +6,9 @@ module Jpmobile::Mobile
|
|
6
6
|
class Au < AbstractMobile
|
7
7
|
# 対応するUser-Agentの正規表現
|
8
8
|
# User-Agent文字列中に "UP.Browser" を含むVodafoneの端末があるので注意が必要
|
9
|
-
USER_AGENT_REGEXP = %r{^(?:KDDI|UP.Browser/.+?)-(.+?) }
|
9
|
+
USER_AGENT_REGEXP = %r{^(?:KDDI|UP.Browser/.+?)-(.+?) }
|
10
10
|
# 対応するメールアドレスの正規表現
|
11
|
-
MAIL_ADDRESS_REGEXP = /.+@ezweb\.ne\.jp
|
11
|
+
MAIL_ADDRESS_REGEXP = /.+@ezweb\.ne\.jp/
|
12
12
|
# 簡易位置情報取得に対応していないデバイスID
|
13
13
|
# http://www.au.kddi.com/ezfactory/tec/spec/eznavi.html
|
14
14
|
LOCATION_UNSUPPORTED_DEVICE_ID = %w[PT21 TS25 KCTE TST9 KCU1 SYT5 KCTD TST8 TST7 KCTC SYT4 KCTB KCTA TST6 KCT9 TST5 TST4 KCT8 SYT3 KCT7 MIT1 MAT3 KCT6 TST3 KCT5 KCT4 SYT2 MAT1 MAT2 TST2 KCT3 KCT2 KCT1 TST1 SYT1].freeze
|
@@ -4,7 +4,7 @@ module Jpmobile::Mobile
|
|
4
4
|
# スーパクラスはWillcom。
|
5
5
|
class Ddipocket < Willcom
|
6
6
|
# 対応するUser-Agentの正規表現
|
7
|
-
USER_AGENT_REGEXP = %r{^Mozilla/3.0\(DDIPOCKET}
|
7
|
+
USER_AGENT_REGEXP = %r{^Mozilla/3.0\(DDIPOCKET}
|
8
8
|
|
9
9
|
MAIL_ADDRESS_REGEXP = nil # DdipocketはEmail判定だとWillcomと判定させたい
|
10
10
|
end
|
@@ -4,9 +4,9 @@ module Jpmobile::Mobile
|
|
4
4
|
# ==DoCoMo携帯電話
|
5
5
|
class Docomo < AbstractMobile
|
6
6
|
# 対応するUser-Agentの正規表現
|
7
|
-
USER_AGENT_REGEXP = /^DoCoMo
|
7
|
+
USER_AGENT_REGEXP = /^DoCoMo/
|
8
8
|
# 対応するメールアドレスの正規表現
|
9
|
-
MAIL_ADDRESS_REGEXP = /.+@docomo\.ne\.jp
|
9
|
+
MAIL_ADDRESS_REGEXP = /.+@docomo\.ne\.jp/
|
10
10
|
# メールのデフォルトのcharset
|
11
11
|
MAIL_CHARSET = 'Shift_JIS'.freeze
|
12
12
|
# テキスト部分の content-transfer-encoding
|
@@ -3,9 +3,9 @@
|
|
3
3
|
module Jpmobile::Mobile
|
4
4
|
# ==EMOBILE携帯電話
|
5
5
|
class Emobile < AbstractMobile
|
6
|
-
USER_AGENT_REGEXP = %r{^emobile/|^Mozilla/5.0 \(H11T; like Gecko; OpenBrowser\) NetFront/3.4$|^Mozilla/4.0 \(compatible; MSIE 6.0; Windows CE; IEMobile 7.7\) S11HT$}
|
6
|
+
USER_AGENT_REGEXP = %r{^emobile/|^Mozilla/5.0 \(H11T; like Gecko; OpenBrowser\) NetFront/3.4$|^Mozilla/4.0 \(compatible; MSIE 6.0; Windows CE; IEMobile 7.7\) S11HT$}
|
7
7
|
# 対応するメールアドレスの正規表現
|
8
|
-
MAIL_ADDRESS_REGEXP = /.+@emnet\.ne\.jp
|
8
|
+
MAIL_ADDRESS_REGEXP = /.+@emnet\.ne\.jp/
|
9
9
|
# EMnet対応端末から通知されるユニークなユーザIDを取得する。
|
10
10
|
def em_uid
|
11
11
|
@request.env['HTTP_X_EM_UID']
|
data/lib/jpmobile/mobile/ipad.rb
CHANGED
@@ -5,9 +5,9 @@ module Jpmobile::Mobile
|
|
5
5
|
# Vodafoneのスーパクラス。
|
6
6
|
class Softbank < AbstractMobile
|
7
7
|
# 対応するuser-agentの正規表現
|
8
|
-
USER_AGENT_REGEXP = /^(?:SoftBank|Semulator)
|
8
|
+
USER_AGENT_REGEXP = /^(?:SoftBank|Semulator)/
|
9
9
|
# 対応するメールアドレスの正規表現 ディズニーモバイル対応
|
10
|
-
MAIL_ADDRESS_REGEXP = /.+@(?:softbank\.ne\.jp|disney\.ne\.jp)
|
10
|
+
MAIL_ADDRESS_REGEXP = /.+@(?:softbank\.ne\.jp|disney\.ne\.jp)/
|
11
11
|
# メールのデフォルトのcharset
|
12
12
|
MAIL_CHARSET = 'Shift_JIS'.freeze
|
13
13
|
# テキスト部分の content-transfer-encoding
|