jpmobile 6.1.2 → 7.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +12 -4
  3. data/.rubocop.yml +104 -1
  4. data/.ruby-version +1 -1
  5. data/Gemfile +2 -0
  6. data/Gemfile.lock +157 -149
  7. data/README.md +5 -21
  8. data/Rakefile +1 -1
  9. data/jpmobile.gemspec +4 -4
  10. data/lib/jpmobile/datum_conv.rb +7 -7
  11. data/lib/jpmobile/docomo_guid.rb +2 -2
  12. data/lib/jpmobile/email.rb +2 -2
  13. data/lib/jpmobile/fallback_view_selector.rb +2 -2
  14. data/lib/jpmobile/filter.rb +3 -1
  15. data/lib/jpmobile/hook_action_view.rb +3 -3
  16. data/lib/jpmobile/hook_template_details_requested.rb +12 -0
  17. data/lib/jpmobile/mail.rb +2 -2
  18. data/lib/jpmobile/mailer.rb +2 -2
  19. data/lib/jpmobile/mobile/abstract_mobile.rb +1 -1
  20. data/lib/jpmobile/mobile/android_tablet.rb +1 -1
  21. data/lib/jpmobile/mobile/au.rb +4 -6
  22. data/lib/jpmobile/mobile/softbank.rb +3 -1
  23. data/lib/jpmobile/path_set.rb +10 -36
  24. data/lib/jpmobile/position.rb +2 -2
  25. data/lib/jpmobile/rails.rb +2 -0
  26. data/lib/jpmobile/resolver.rb +44 -6
  27. data/lib/jpmobile/template_details.rb +38 -0
  28. data/lib/jpmobile/trans_sid.rb +1 -1
  29. data/lib/jpmobile/util.rb +1 -1
  30. data/lib/jpmobile/version.rb +1 -1
  31. data/lib/jpmobile/view_selector.rb +5 -6
  32. data/lib/jpmobile.rb +13 -0
  33. data/lib/tasks/jpmobile_tasks.rake +4 -5
  34. data/spec/rack/jpmobile/mobile_by_ua_spec.rb +1 -0
  35. data/spec/unit/decorated_mail_spec.rb +1 -1
  36. data/spec/unit/mail_spec.rb +2 -2
  37. data/spec/unit/receive_mail_spec.rb +29 -29
  38. data/test/rails/overrides/Gemfile.jpmobile +4 -0
  39. data/test/rails/overrides/app/controllers/mobile_spec_controller.rb +1 -1
  40. data/test/rails/overrides/app/controllers/template_path_controller.rb +3 -0
  41. data/test/rails/overrides/app/mailers/decorated_mailer.rb +1 -1
  42. data/test/rails/overrides/app/views/mobile_spec/mobile_not_exist.html.erb +3 -0
  43. data/test/rails/overrides/config/routes.rb +3 -1
  44. data/test/rails/overrides/spec/controllers/mobile_spec_controller_spec.rb +3 -3
  45. data/test/rails/overrides/spec/rails_helper.rb +1 -1
  46. data/test/rails/overrides/spec/requests/filter_spec.rb +106 -0
  47. data/test/rails/overrides/spec/requests/template_path_spec.rb +1 -1
  48. data/test/rails/overrides/spec/{features → system}/admin/top_spec.rb +2 -2
  49. data/test/rails/overrides/spec/{features → system}/filter_spec.rb +2 -7
  50. data/test/rails/overrides/spec/system/support/cuprite_setup.rb +14 -0
  51. data/test/rails/overrides/spec/system_helper.rb +3 -0
  52. metadata +25 -30
  53. 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: 74fa7416fa00515953a733795e73ec1e6588661679d75a1976679c1d504ffcf4
4
- data.tar.gz: c5bbfb870db11b2040e7c6071224f15814666205af7d6ab7753d6420f0f1857c
3
+ metadata.gz: 1353f6341c914dfadbe29cdf617506304701dafdbdc826e21a7339b8963d7934
4
+ data.tar.gz: 6007f9958265cae1eb8e73fdf50fb308b6d5ce086452d6986025244d52e525bb
5
5
  SHA512:
6
- metadata.gz: 1c02221b79367bacdd03b7a9c996a1c13b924f075425e7cefdf92673a7accf790c9ec5b957892f2cbaad040ca5c9feeef19e7f6aa90b6d0ae3a175bb4a1adaeb
7
- data.tar.gz: 5ac93c588bc456034de7e1a0dc2d59775a4161ffd9d65046e1e52582d219f9cd17a2ca76b666adcba5243ef6da66379e85aaa00ceac4ad4921a63c991e4d834b
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: circleci/ruby:2.7-node-browsers
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: sudo apt-get install -y cmake qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
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: bundle check || bundle install --path vendor/bundler
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.5
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
- 2.7.2
1
+ 3.1.2
data/Gemfile CHANGED
@@ -5,3 +5,5 @@ gemspec
5
5
 
6
6
  gem 'rubocop', require: false
7
7
  gem 'rubocop-performance', require: false
8
+ gem 'rubocop-rails', require: false
9
+ gem 'rubocop-rspec', require: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jpmobile (6.1.1)
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 (6.1.0)
13
- actionpack (= 6.1.0)
14
- activesupport (= 6.1.0)
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 (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)
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
- actionmailer (6.1.0)
25
- actionpack (= 6.1.0)
26
- actionview (= 6.1.0)
27
- activejob (= 6.1.0)
28
- activesupport (= 6.1.0)
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 (6.1.0)
32
- actionview (= 6.1.0)
33
- activesupport (= 6.1.0)
34
- rack (~> 2.0, >= 2.0.9)
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 (6.1.0)
39
- actionpack (= 6.1.0)
40
- activerecord (= 6.1.0)
41
- activestorage (= 6.1.0)
42
- activesupport (= 6.1.0)
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 (6.1.0)
45
- activesupport (= 6.1.0)
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 (6.1.0)
51
- activesupport (= 6.1.0)
57
+ activejob (7.0.3)
58
+ activesupport (= 7.0.3)
52
59
  globalid (>= 0.3.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)
63
- marcel (~> 0.3.1)
64
- mimemagic (~> 0.3.2)
65
- activesupport (6.1.0)
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
- zeitwerk (~> 2.3)
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.7)
80
+ concurrent-ruby (1.1.10)
88
81
  crass (1.0.6)
89
- diff-lcs (1.4.4)
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.7.0)
86
+ git (1.11.0)
93
87
  rchardet (~> 1.8)
94
- globalid (0.4.2)
95
- activesupport (>= 4.2.0)
88
+ globalid (1.0.0)
89
+ activesupport (>= 5.0)
96
90
  hpricot (0.8.6)
97
- i18n (1.8.5)
91
+ i18n (1.10.0)
98
92
  concurrent-ruby (~> 1.0)
99
- json (2.3.1)
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.3.3)
106
- mimemagic (~> 0.3.2)
98
+ marcel (1.0.2)
107
99
  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)
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.13.1)
124
+ pry (0.14.1)
119
125
  coderay (~> 1.1)
120
126
  method_source (~> 1.0)
121
- public_suffix (4.0.6)
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 (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)
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 (= 6.1.0)
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.3.0)
148
+ rails-html-sanitizer (1.4.2)
144
149
  loofah (~> 2.3)
145
- railties (6.1.0)
146
- actionpack (= 6.1.0)
147
- activesupport (= 6.1.0)
150
+ railties (7.0.3)
151
+ actionpack (= 7.0.3)
152
+ activesupport (= 7.0.3)
148
153
  method_source
149
- rake (>= 0.8.7)
154
+ rake (>= 12.2)
150
155
  thor (~> 1.0)
151
- rainbow (3.0.0)
152
- rake (13.0.1)
156
+ zeitwerk (~> 2.5)
157
+ rainbow (3.1.1)
158
+ rake (13.0.6)
153
159
  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)
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.10.0)
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.10.0)
174
+ rspec-mocks (3.11.1)
169
175
  diff-lcs (>= 1.2.0, < 2.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)
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 (>= 2.7.1.5)
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.2.0, < 2.0)
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, < 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
+ 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
- thor (1.0.1)
206
- tzinfo (2.0.3)
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.7.0)
209
- websocket-driver (0.7.3)
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
- xpath (3.2.0)
213
- nokogiri (~> 1.8)
214
- zeitwerk (2.4.2)
220
+ zeitwerk (2.5.4)
215
221
 
216
222
  PLATFORMS
217
- ruby
218
- x86_64-darwin-19
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 (~> 6.1.0)
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.2.3
244
+ 2.3.15
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
- [![CircleCI](https://circleci.com/gh/jpmobile/jpmobile/tree/master.svg?style=svg)](https://circleci.com/gh/jpmobile/jpmobile/tree/master)
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 5.0 や Rack middleware で利用するためのプラグイン。 以下の機能を備える。
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](http://geokit.rubyforge.org) との連携
143
+ #### [GeoKit](https://github.com/geokit/geokit) との連携
159
144
 
160
- vendor/plugins/geokit以下にGeoKitがインストールされていると、Jpmobile::PositionにGeoKit::Mappabl
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/master/CONTRIBUTING.md) へ
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 = 'git://github.com/jpmobile'
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|features)/})
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.5.0'
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', '~> 6.1.0'
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