jpmobile 6.1.2 → 7.0.2
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 +12 -4
- data/.rubocop.yml +104 -1
- data/.ruby-version +1 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +157 -149
- data/README.md +5 -21
- data/Rakefile +1 -1
- data/jpmobile.gemspec +4 -4
- data/lib/jpmobile/datum_conv.rb +7 -7
- data/lib/jpmobile/docomo_guid.rb +2 -2
- data/lib/jpmobile/email.rb +2 -2
- data/lib/jpmobile/fallback_view_selector.rb +2 -2
- data/lib/jpmobile/filter.rb +3 -1
- data/lib/jpmobile/hook_action_view.rb +3 -3
- data/lib/jpmobile/hook_template_details_requested.rb +12 -0
- data/lib/jpmobile/mail.rb +2 -2
- data/lib/jpmobile/mailer.rb +2 -2
- data/lib/jpmobile/mobile/abstract_mobile.rb +1 -1
- data/lib/jpmobile/mobile/android_tablet.rb +1 -1
- data/lib/jpmobile/mobile/au.rb +4 -6
- data/lib/jpmobile/mobile/softbank.rb +3 -1
- data/lib/jpmobile/path_set.rb +10 -36
- data/lib/jpmobile/position.rb +2 -2
- 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 +4 -5
- data/spec/rack/jpmobile/mobile_by_ua_spec.rb +1 -0
- data/spec/unit/decorated_mail_spec.rb +1 -1
- data/spec/unit/mail_spec.rb +2 -2
- data/spec/unit/receive_mail_spec.rb +29 -29
- 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/mailers/decorated_mailer.rb +1 -1
- data/test/rails/overrides/app/views/mobile_spec/mobile_not_exist.html.erb +3 -0
- data/test/rails/overrides/config/routes.rb +3 -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 +25 -30
- 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: 1353f6341c914dfadbe29cdf617506304701dafdbdc826e21a7339b8963d7934
|
4
|
+
data.tar.gz: 6007f9958265cae1eb8e73fdf50fb308b6d5ce086452d6986025244d52e525bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5623190d12407d9f5f6bd8348faf7fa2f81b206dc773d13898acc2a1da354fac16916564883c56692246fc4ebdcd8f40dc7ddd9f39e1d9974bb22abe5bf5d33
|
7
|
+
data.tar.gz: e873923cfcfcfdd0a80211a1197269117f920c905a886ed22cb0fbcadeeb8d6a3065d7dafde6839a053aff7107fff08e4d913f80c7a4fc948314a670f20588ee
|
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.1-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:
|
@@ -29,7 +34,10 @@ jobs:
|
|
29
34
|
|
30
35
|
- run:
|
31
36
|
name: Bundle Install
|
32
|
-
command:
|
37
|
+
command: |
|
38
|
+
bundle config set --local clean true
|
39
|
+
bundle config set --local path vendor/bundle
|
40
|
+
bundle check || bundle install
|
33
41
|
|
34
42
|
# Store bundle cache
|
35
43
|
- save_cache:
|
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/*'
|
@@ -194,3 +194,106 @@ Style/OptionalBooleanParameter:
|
|
194
194
|
Metrics/ParameterLists:
|
195
195
|
Exclude:
|
196
196
|
- 'lib/jpmobile/path_set.rb'
|
197
|
+
|
198
|
+
Gemspec/DateAssignment: # new in 1.10
|
199
|
+
Enabled: true
|
200
|
+
Gemspec/RequireMFA: # new in 1.23
|
201
|
+
Enabled: true
|
202
|
+
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
203
|
+
Enabled: true
|
204
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
205
|
+
Enabled: true
|
206
|
+
Lint/AmbiguousRange: # new in 1.19
|
207
|
+
Enabled: true
|
208
|
+
Lint/DeprecatedConstants: # new in 1.8
|
209
|
+
Enabled: true
|
210
|
+
Lint/EmptyInPattern: # new in 1.16
|
211
|
+
Enabled: true
|
212
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
213
|
+
Enabled: true
|
214
|
+
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
215
|
+
Enabled: true
|
216
|
+
Lint/NumberedParameterAssignment: # new in 1.9
|
217
|
+
Enabled: true
|
218
|
+
Lint/OrAssignmentToConstant: # new in 1.9
|
219
|
+
Enabled: true
|
220
|
+
Lint/RedundantDirGlobSort: # new in 1.8
|
221
|
+
Enabled: true
|
222
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
223
|
+
Enabled: true
|
224
|
+
Lint/SymbolConversion: # new in 1.9
|
225
|
+
Enabled: true
|
226
|
+
Lint/TripleQuotes: # new in 1.9
|
227
|
+
Enabled: true
|
228
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
229
|
+
Enabled: true
|
230
|
+
Naming/BlockForwarding: # new in 1.24
|
231
|
+
Enabled: true
|
232
|
+
Security/IoMethods: # new in 1.22
|
233
|
+
Enabled: true
|
234
|
+
Style/EndlessMethod: # new in 1.8
|
235
|
+
Enabled: true
|
236
|
+
Style/FileRead: # new in 1.24
|
237
|
+
Enabled: true
|
238
|
+
Style/FileWrite: # new in 1.24
|
239
|
+
Enabled: true
|
240
|
+
Style/HashConversion: # new in 1.10
|
241
|
+
Enabled: true
|
242
|
+
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
243
|
+
Enabled: true
|
244
|
+
Style/InPatternThen: # new in 1.16
|
245
|
+
Enabled: true
|
246
|
+
Style/MapToHash: # new in 1.24
|
247
|
+
Enabled: true
|
248
|
+
Style/MultilineInPatternThen: # new in 1.16
|
249
|
+
Enabled: true
|
250
|
+
Style/NumberedParameters: # new in 1.22
|
251
|
+
Enabled: true
|
252
|
+
Style/NumberedParametersLimit: # new in 1.22
|
253
|
+
Enabled: true
|
254
|
+
Style/OpenStructUse: # new in 1.23
|
255
|
+
Enabled: true
|
256
|
+
Style/QuotedSymbols: # new in 1.16
|
257
|
+
Enabled: true
|
258
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
259
|
+
Enabled: true
|
260
|
+
Style/SelectByRegexp: # new in 1.22
|
261
|
+
Enabled: true
|
262
|
+
Style/StringChars: # new in 1.12
|
263
|
+
Enabled: true
|
264
|
+
Performance/AncestorsInclude: # new in 1.7
|
265
|
+
Enabled: true
|
266
|
+
Performance/BigDecimalWithNumericArgument: # new in 1.7
|
267
|
+
Enabled: true
|
268
|
+
Performance/BlockGivenWithExplicitBlock: # new in 1.9
|
269
|
+
Enabled: true
|
270
|
+
Performance/CollectionLiteralInLoop: # new in 1.8
|
271
|
+
Enabled: true
|
272
|
+
Performance/ConcurrentMonotonicTime: # new in 1.12
|
273
|
+
Enabled: true
|
274
|
+
Performance/ConstantRegexp: # new in 1.9
|
275
|
+
Enabled: true
|
276
|
+
Performance/MapCompact: # new in 1.11
|
277
|
+
Enabled: true
|
278
|
+
Performance/MethodObjectAsBlock: # new in 1.9
|
279
|
+
Enabled: true
|
280
|
+
Performance/RedundantEqualityComparisonBlock: # new in 1.10
|
281
|
+
Enabled: true
|
282
|
+
Performance/RedundantSortBlock: # new in 1.7
|
283
|
+
Enabled: true
|
284
|
+
Performance/RedundantSplitRegexpArgument: # new in 1.10
|
285
|
+
Enabled: true
|
286
|
+
Performance/RedundantStringChars: # new in 1.7
|
287
|
+
Enabled: true
|
288
|
+
Performance/ReverseFirst: # new in 1.7
|
289
|
+
Enabled: true
|
290
|
+
Performance/SortReverse: # new in 1.7
|
291
|
+
Enabled: true
|
292
|
+
Performance/Squeeze: # new in 1.7
|
293
|
+
Enabled: true
|
294
|
+
Performance/StringIdentifierArgument: # new in 1.13
|
295
|
+
Enabled: true
|
296
|
+
Performance/StringInclude: # new in 1.7
|
297
|
+
Enabled: false
|
298
|
+
Performance/Sum: # new in 1.8
|
299
|
+
Enabled: true
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.2
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jpmobile (
|
4
|
+
jpmobile (7.0.1)
|
5
5
|
mail (~> 2.7.0)
|
6
6
|
rexml
|
7
7
|
scanf
|
@@ -9,228 +9,236 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actioncable (
|
13
|
-
actionpack (=
|
14
|
-
activesupport (=
|
12
|
+
actioncable (7.0.3)
|
13
|
+
actionpack (= 7.0.3)
|
14
|
+
activesupport (= 7.0.3)
|
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.3)
|
18
|
+
actionpack (= 7.0.3)
|
19
|
+
activejob (= 7.0.3)
|
20
|
+
activerecord (= 7.0.3)
|
21
|
+
activestorage (= 7.0.3)
|
22
|
+
activesupport (= 7.0.3)
|
23
23
|
mail (>= 2.7.1)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
net-imap
|
25
|
+
net-pop
|
26
|
+
net-smtp
|
27
|
+
actionmailer (7.0.3)
|
28
|
+
actionpack (= 7.0.3)
|
29
|
+
actionview (= 7.0.3)
|
30
|
+
activejob (= 7.0.3)
|
31
|
+
activesupport (= 7.0.3)
|
29
32
|
mail (~> 2.5, >= 2.5.4)
|
33
|
+
net-imap
|
34
|
+
net-pop
|
35
|
+
net-smtp
|
30
36
|
rails-dom-testing (~> 2.0)
|
31
|
-
actionpack (
|
32
|
-
actionview (=
|
33
|
-
activesupport (=
|
34
|
-
rack (~> 2.0, >= 2.0
|
37
|
+
actionpack (7.0.3)
|
38
|
+
actionview (= 7.0.3)
|
39
|
+
activesupport (= 7.0.3)
|
40
|
+
rack (~> 2.0, >= 2.2.0)
|
35
41
|
rack-test (>= 0.6.3)
|
36
42
|
rails-dom-testing (~> 2.0)
|
37
43
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
38
|
-
actiontext (
|
39
|
-
actionpack (=
|
40
|
-
activerecord (=
|
41
|
-
activestorage (=
|
42
|
-
activesupport (=
|
44
|
+
actiontext (7.0.3)
|
45
|
+
actionpack (= 7.0.3)
|
46
|
+
activerecord (= 7.0.3)
|
47
|
+
activestorage (= 7.0.3)
|
48
|
+
activesupport (= 7.0.3)
|
49
|
+
globalid (>= 0.6.0)
|
43
50
|
nokogiri (>= 1.8.5)
|
44
|
-
actionview (
|
45
|
-
activesupport (=
|
51
|
+
actionview (7.0.3)
|
52
|
+
activesupport (= 7.0.3)
|
46
53
|
builder (~> 3.1)
|
47
54
|
erubi (~> 1.4)
|
48
55
|
rails-dom-testing (~> 2.0)
|
49
56
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
50
|
-
activejob (
|
51
|
-
activesupport (=
|
57
|
+
activejob (7.0.3)
|
58
|
+
activesupport (= 7.0.3)
|
52
59
|
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 (
|
60
|
+
activemodel (7.0.3)
|
61
|
+
activesupport (= 7.0.3)
|
62
|
+
activerecord (7.0.3)
|
63
|
+
activemodel (= 7.0.3)
|
64
|
+
activesupport (= 7.0.3)
|
65
|
+
activestorage (7.0.3)
|
66
|
+
actionpack (= 7.0.3)
|
67
|
+
activejob (= 7.0.3)
|
68
|
+
activerecord (= 7.0.3)
|
69
|
+
activesupport (= 7.0.3)
|
70
|
+
marcel (~> 1.0)
|
71
|
+
mini_mime (>= 1.1.0)
|
72
|
+
activesupport (7.0.3)
|
66
73
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
67
74
|
i18n (>= 1.6, < 2)
|
68
75
|
minitest (>= 5.1)
|
69
76
|
tzinfo (~> 2.0)
|
70
|
-
|
71
|
-
addressable (2.7.0)
|
72
|
-
public_suffix (>= 2.0.2, < 5.0)
|
73
|
-
ast (2.4.1)
|
77
|
+
ast (2.4.2)
|
74
78
|
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
79
|
coderay (1.1.3)
|
87
|
-
concurrent-ruby (1.1.
|
80
|
+
concurrent-ruby (1.1.10)
|
88
81
|
crass (1.0.6)
|
89
|
-
diff-lcs (1.
|
82
|
+
diff-lcs (1.5.0)
|
83
|
+
digest (3.1.0)
|
90
84
|
erubi (1.10.0)
|
91
85
|
geokit (1.13.1)
|
92
|
-
git (1.
|
86
|
+
git (1.11.0)
|
93
87
|
rchardet (~> 1.8)
|
94
|
-
globalid (0.
|
95
|
-
activesupport (>=
|
88
|
+
globalid (1.0.0)
|
89
|
+
activesupport (>= 5.0)
|
96
90
|
hpricot (0.8.6)
|
97
|
-
i18n (1.
|
91
|
+
i18n (1.10.0)
|
98
92
|
concurrent-ruby (~> 1.0)
|
99
|
-
|
100
|
-
loofah (2.8.0)
|
93
|
+
loofah (2.18.0)
|
101
94
|
crass (~> 1.0.2)
|
102
95
|
nokogiri (>= 1.5.9)
|
103
96
|
mail (2.7.1)
|
104
97
|
mini_mime (>= 0.1.1)
|
105
|
-
marcel (0.
|
106
|
-
mimemagic (~> 0.3.2)
|
98
|
+
marcel (1.0.2)
|
107
99
|
method_source (1.0.0)
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
100
|
+
mini_mime (1.1.2)
|
101
|
+
minitest (5.15.0)
|
102
|
+
net-imap (0.2.3)
|
103
|
+
digest
|
104
|
+
net-protocol
|
105
|
+
strscan
|
106
|
+
net-pop (0.1.1)
|
107
|
+
digest
|
108
|
+
net-protocol
|
109
|
+
timeout
|
110
|
+
net-protocol (0.1.3)
|
111
|
+
timeout
|
112
|
+
net-smtp (0.3.1)
|
113
|
+
digest
|
114
|
+
net-protocol
|
115
|
+
timeout
|
116
|
+
nio4r (2.5.8)
|
117
|
+
nokogiri (1.13.6-arm64-darwin)
|
118
|
+
racc (~> 1.4)
|
119
|
+
nokogiri (1.13.6-x86_64-linux)
|
120
|
+
racc (~> 1.4)
|
121
|
+
parallel (1.22.1)
|
122
|
+
parser (3.1.2.0)
|
117
123
|
ast (~> 2.4.1)
|
118
|
-
pry (0.
|
124
|
+
pry (0.14.1)
|
119
125
|
coderay (~> 1.1)
|
120
126
|
method_source (~> 1.0)
|
121
|
-
|
122
|
-
rack (2.2.3)
|
127
|
+
racc (1.6.0)
|
128
|
+
rack (2.2.3.1)
|
123
129
|
rack-test (1.1.0)
|
124
130
|
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 (=
|
131
|
+
rails (7.0.3)
|
132
|
+
actioncable (= 7.0.3)
|
133
|
+
actionmailbox (= 7.0.3)
|
134
|
+
actionmailer (= 7.0.3)
|
135
|
+
actionpack (= 7.0.3)
|
136
|
+
actiontext (= 7.0.3)
|
137
|
+
actionview (= 7.0.3)
|
138
|
+
activejob (= 7.0.3)
|
139
|
+
activemodel (= 7.0.3)
|
140
|
+
activerecord (= 7.0.3)
|
141
|
+
activestorage (= 7.0.3)
|
142
|
+
activesupport (= 7.0.3)
|
137
143
|
bundler (>= 1.15.0)
|
138
|
-
railties (=
|
139
|
-
sprockets-rails (>= 2.0.0)
|
144
|
+
railties (= 7.0.3)
|
140
145
|
rails-dom-testing (2.0.3)
|
141
146
|
activesupport (>= 4.2.0)
|
142
147
|
nokogiri (>= 1.6)
|
143
|
-
rails-html-sanitizer (1.
|
148
|
+
rails-html-sanitizer (1.4.2)
|
144
149
|
loofah (~> 2.3)
|
145
|
-
railties (
|
146
|
-
actionpack (=
|
147
|
-
activesupport (=
|
150
|
+
railties (7.0.3)
|
151
|
+
actionpack (= 7.0.3)
|
152
|
+
activesupport (= 7.0.3)
|
148
153
|
method_source
|
149
|
-
rake (>=
|
154
|
+
rake (>= 12.2)
|
150
155
|
thor (~> 1.0)
|
151
|
-
|
152
|
-
|
156
|
+
zeitwerk (~> 2.5)
|
157
|
+
rainbow (3.1.1)
|
158
|
+
rake (13.0.6)
|
153
159
|
rchardet (1.8.0)
|
154
|
-
regexp_parser (
|
155
|
-
rexml (3.2.
|
156
|
-
rspec (3.
|
157
|
-
rspec-core (~> 3.
|
158
|
-
rspec-expectations (~> 3.
|
159
|
-
rspec-mocks (~> 3.
|
160
|
-
rspec-core (3.
|
161
|
-
rspec-support (~> 3.
|
162
|
-
rspec-expectations (3.
|
160
|
+
regexp_parser (2.5.0)
|
161
|
+
rexml (3.2.5)
|
162
|
+
rspec (3.11.0)
|
163
|
+
rspec-core (~> 3.11.0)
|
164
|
+
rspec-expectations (~> 3.11.0)
|
165
|
+
rspec-mocks (~> 3.11.0)
|
166
|
+
rspec-core (3.11.0)
|
167
|
+
rspec-support (~> 3.11.0)
|
168
|
+
rspec-expectations (3.11.0)
|
163
169
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
|
-
rspec-support (~> 3.
|
170
|
+
rspec-support (~> 3.11.0)
|
165
171
|
rspec-its (1.3.0)
|
166
172
|
rspec-core (>= 3.0.0)
|
167
173
|
rspec-expectations (>= 3.0.0)
|
168
|
-
rspec-mocks (3.
|
174
|
+
rspec-mocks (3.11.1)
|
169
175
|
diff-lcs (>= 1.2.0, < 2.0)
|
170
|
-
rspec-support (~> 3.
|
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.
|
180
|
-
rubocop (1.
|
176
|
+
rspec-support (~> 3.11.0)
|
177
|
+
rspec-rails (5.1.2)
|
178
|
+
actionpack (>= 5.2)
|
179
|
+
activesupport (>= 5.2)
|
180
|
+
railties (>= 5.2)
|
181
|
+
rspec-core (~> 3.10)
|
182
|
+
rspec-expectations (~> 3.10)
|
183
|
+
rspec-mocks (~> 3.10)
|
184
|
+
rspec-support (~> 3.10)
|
185
|
+
rspec-support (3.11.0)
|
186
|
+
rubocop (1.30.0)
|
181
187
|
parallel (~> 1.10)
|
182
|
-
parser (>=
|
188
|
+
parser (>= 3.1.0.0)
|
183
189
|
rainbow (>= 2.2.2, < 4.0)
|
184
190
|
regexp_parser (>= 1.8, < 3.0)
|
185
|
-
rexml
|
186
|
-
rubocop-ast (>= 1.
|
191
|
+
rexml (>= 3.2.5, < 4.0)
|
192
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
187
193
|
ruby-progressbar (~> 1.7)
|
188
|
-
unicode-display_width (>= 1.4.0, <
|
189
|
-
rubocop-ast (1.
|
190
|
-
parser (>=
|
191
|
-
rubocop-performance (1.
|
192
|
-
rubocop (>=
|
193
|
-
|
194
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
195
|
+
rubocop-ast (1.18.0)
|
196
|
+
parser (>= 3.1.1.0)
|
197
|
+
rubocop-performance (1.14.0)
|
198
|
+
rubocop (>= 1.7.0, < 2.0)
|
199
|
+
rubocop-ast (>= 0.4.0)
|
200
|
+
rubocop-rails (2.14.2)
|
201
|
+
activesupport (>= 4.2.0)
|
202
|
+
rack (>= 1.1)
|
203
|
+
rubocop (>= 1.7.0, < 2.0)
|
204
|
+
rubocop-rspec (2.11.1)
|
205
|
+
rubocop (~> 1.19)
|
206
|
+
ruby-progressbar (1.11.0)
|
194
207
|
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
208
|
sqlite3 (1.4.2)
|
203
209
|
sqlite3-ruby (1.3.3)
|
204
210
|
sqlite3 (>= 1.3.3)
|
205
|
-
|
206
|
-
|
211
|
+
strscan (3.0.3)
|
212
|
+
thor (1.2.1)
|
213
|
+
timeout (0.3.0)
|
214
|
+
tzinfo (2.0.4)
|
207
215
|
concurrent-ruby (~> 1.0)
|
208
|
-
unicode-display_width (1.
|
209
|
-
websocket-driver (0.7.
|
216
|
+
unicode-display_width (2.1.0)
|
217
|
+
websocket-driver (0.7.5)
|
210
218
|
websocket-extensions (>= 0.1.0)
|
211
219
|
websocket-extensions (0.1.5)
|
212
|
-
|
213
|
-
nokogiri (~> 1.8)
|
214
|
-
zeitwerk (2.4.2)
|
220
|
+
zeitwerk (2.5.4)
|
215
221
|
|
216
222
|
PLATFORMS
|
217
|
-
|
218
|
-
|
223
|
+
arm64-darwin-20
|
224
|
+
arm64-darwin-21
|
225
|
+
x86_64-linux
|
219
226
|
|
220
227
|
DEPENDENCIES
|
221
|
-
capybara-webkit
|
222
228
|
geokit
|
223
229
|
git
|
224
230
|
hpricot
|
225
231
|
jpmobile!
|
226
232
|
pry
|
227
|
-
rails (~>
|
233
|
+
rails (~> 7.0.0.alpha2)
|
228
234
|
rspec
|
229
235
|
rspec-its
|
230
236
|
rspec-rails
|
231
237
|
rubocop
|
232
238
|
rubocop-performance
|
239
|
+
rubocop-rails
|
240
|
+
rubocop-rspec
|
233
241
|
sqlite3-ruby
|
234
242
|
|
235
243
|
BUNDLED WITH
|
236
|
-
2.
|
244
|
+
2.3.15
|
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
|
@@ -155,10 +140,9 @@ Rack::Request#mobile.position に位置情報が格納されます。
|
|
155
140
|
@longuitude = request.mobile.position.lon
|
156
141
|
```
|
157
142
|
|
158
|
-
#### [GeoKit](
|
143
|
+
#### [GeoKit](https://github.com/geokit/geokit) との連携
|
159
144
|
|
160
|
-
vendor/plugins/geokit以下にGeoKitがインストールされていると、Jpmobile::PositionにGeoKit::
|
161
|
-
eがincludeされる。したがって、
|
145
|
+
vendor/plugins/geokit以下にGeoKitがインストールされていると、Jpmobile::PositionにGeoKit::Mappableがincludeされる。したがって、
|
162
146
|
|
163
147
|
```ruby
|
164
148
|
request.mobile.position.distance_to('札幌駅')
|
@@ -396,7 +380,7 @@ end
|
|
396
380
|
## jpmobileの開発方法
|
397
381
|
|
398
382
|
jpmobileの開発に関しては
|
399
|
-
[こちら](https://github.com/jpmobile/jpmobile/blob/
|
383
|
+
[こちら](https://github.com/jpmobile/jpmobile/blob/main/CONTRIBUTING.md) へ
|
400
384
|
|
401
385
|
## リンク
|
402
386
|
|
data/Rakefile
CHANGED
@@ -21,7 +21,7 @@ namespace :test do
|
|
21
21
|
'jpmobile-ipaddresses',
|
22
22
|
'jpmobile-terminfo',
|
23
23
|
]
|
24
|
-
github_prefix = '
|
24
|
+
github_prefix = 'https://github.com/jpmobile'
|
25
25
|
vendor_path = Pathname.new(Dir.pwd).join('vendor')
|
26
26
|
FileUtils.mkdir_p(vendor_path)
|
27
27
|
|
data/jpmobile.gemspec
CHANGED
@@ -13,22 +13,22 @@ 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 = '>= 2.
|
19
|
+
gem.required_ruby_version = '>= 2.7.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'
|
33
32
|
gem.add_development_dependency 'sqlite3-ruby'
|
33
|
+
gem.metadata['rubygems_mfa_required'] = 'true'
|
34
34
|
end
|