jpmobile 6.1.2 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +12 -4
- data/.rubocop.yml +174 -1
- data/.ruby-version +1 -1
- data/Gemfile +11 -0
- data/Gemfile.lock +220 -166
- data/README.md +27 -21
- data/Rakefile +1 -1
- data/jpmobile.gemspec +6 -13
- 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 +4 -2
- data/lib/jpmobile/hook_action_view.rb +3 -3
- data/lib/jpmobile/hook_template_details_requested.rb +12 -0
- data/lib/jpmobile/mail.rb +3 -3
- data/lib/jpmobile/mailer.rb +4 -5
- data/lib/jpmobile/method_less_action_support.rb +11 -0
- 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 +6 -6
- data/lib/jpmobile/rails.rb +8 -2
- data/lib/jpmobile/resolver.rb +47 -6
- data/lib/jpmobile/template_details.rb +38 -0
- data/lib/jpmobile/trans_sid.rb +2 -2
- 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/renovate.json +6 -0
- data/spec/rack/jpmobile/mobile_by_ua_spec.rb +1 -0
- data/spec/rack/jpmobile/params_filter_spec.rb +6 -6
- data/spec/unit/decorated_mail_spec.rb +1 -1
- data/spec/unit/email_spec.rb +1 -1
- data/spec/unit/mail_spec.rb +4 -4
- data/spec/unit/receive_mail_spec.rb +30 -30
- data/spec/unit/util_spec.rb +1 -1
- data/test/rails/overrides/Gemfile.jpmobile +4 -0
- data/test/rails/overrides/app/controllers/method_less_action_support_controller.rb +3 -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/method_less_action_support/index_smart_phone.html.erb +0 -0
- data/test/rails/overrides/app/views/mobile_spec/mobile_not_exist.html.erb +3 -0
- data/test/rails/overrides/config/routes.rb +5 -1
- data/test/rails/overrides/spec/controllers/mobile_spec_controller_spec.rb +3 -3
- data/test/rails/overrides/spec/rails_helper.rb +2 -2
- data/test/rails/overrides/spec/requests/filter_spec.rb +106 -0
- data/test/rails/overrides/spec/requests/method_less_action_support_spec.rb +29 -0
- data/test/rails/overrides/spec/requests/pc_spec.rb +3 -2
- 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 +12 -0
- data/test/rails/overrides/spec/system_helper.rb +3 -0
- data/test/sinatra/guestbook.rb +0 -1
- metadata +26 -342
- 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: d1bf5ac7b8990ee2a93e32ae73d0c17e4d885a6a54ab638afdbfa00702a3ff92
|
4
|
+
data.tar.gz: edeffe639d9688089207d519641fe3ee1ee64009f5be1599ac1e4f98f055c870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ce5bad75caf0768608ca2c1ff7e82a2acac24ed986c2bca3a7e06e3dddc14b59b3d3fcb140c308c0951e6e7fbd7b93b93bfc53c7519e90dcedf60184b7fb7d0
|
7
|
+
data.tar.gz: a4ee5011bd2eb575e0fc1bc3d7cf502ac5abe6aeeb8f2c2d1101b0f73c3bd3ddaccaa55d82afbe790e37b50b2fa91f6ccfbe8e44282d3f4c2f919775de1d9095
|
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.4.6
|
2
4
|
jobs:
|
3
5
|
test-job:
|
4
6
|
working_directory: ~/jpmobile
|
5
7
|
docker:
|
6
|
-
- image:
|
8
|
+
- image: cimg/ruby:3.2-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/*'
|
@@ -107,6 +107,7 @@ Metrics/ModuleLength:
|
|
107
107
|
Metrics/BlockLength:
|
108
108
|
Exclude:
|
109
109
|
- '**/*_spec.rb'
|
110
|
+
- 'jpmobile.gemspec'
|
110
111
|
- 'lib/jpmobile/emoticon.rb'
|
111
112
|
- 'lib/tasks/jpmobile_tasks.rake'
|
112
113
|
- 'test/rails/overrides/config/routes.rb'
|
@@ -140,6 +141,7 @@ Lint/SuppressedException:
|
|
140
141
|
Lint/Void:
|
141
142
|
Exclude:
|
142
143
|
- 'lib/jpmobile/filter.rb'
|
144
|
+
- 'lib/jpmobile/util.rb'
|
143
145
|
|
144
146
|
Style/StringConcatenation:
|
145
147
|
Enabled: false
|
@@ -194,3 +196,174 @@ Style/OptionalBooleanParameter:
|
|
194
196
|
Metrics/ParameterLists:
|
195
197
|
Exclude:
|
196
198
|
- 'lib/jpmobile/path_set.rb'
|
199
|
+
|
200
|
+
Gemspec/DeprecatedAttributeAssignment: # new in 1.10
|
201
|
+
Enabled: true
|
202
|
+
Gemspec/RequireMFA: # new in 1.23
|
203
|
+
Enabled: true
|
204
|
+
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
205
|
+
Enabled: true
|
206
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
207
|
+
Enabled: true
|
208
|
+
Lint/AmbiguousRange: # new in 1.19
|
209
|
+
Enabled: true
|
210
|
+
Lint/DeprecatedConstants: # new in 1.8
|
211
|
+
Enabled: true
|
212
|
+
Lint/EmptyInPattern: # new in 1.16
|
213
|
+
Enabled: true
|
214
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
215
|
+
Enabled: true
|
216
|
+
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
217
|
+
Enabled: true
|
218
|
+
Lint/NumberedParameterAssignment: # new in 1.9
|
219
|
+
Enabled: true
|
220
|
+
Lint/OrAssignmentToConstant: # new in 1.9
|
221
|
+
Enabled: true
|
222
|
+
Lint/RedundantDirGlobSort: # new in 1.8
|
223
|
+
Enabled: true
|
224
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
225
|
+
Enabled: true
|
226
|
+
Lint/SymbolConversion: # new in 1.9
|
227
|
+
Enabled: true
|
228
|
+
Lint/TripleQuotes: # new in 1.9
|
229
|
+
Enabled: true
|
230
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
231
|
+
Enabled: true
|
232
|
+
Naming/BlockForwarding: # new in 1.24
|
233
|
+
Enabled: true
|
234
|
+
Security/IoMethods: # new in 1.22
|
235
|
+
Enabled: true
|
236
|
+
Style/EndlessMethod: # new in 1.8
|
237
|
+
Enabled: true
|
238
|
+
Style/FileRead: # new in 1.24
|
239
|
+
Enabled: true
|
240
|
+
Style/FileWrite: # new in 1.24
|
241
|
+
Enabled: true
|
242
|
+
Style/HashConversion: # new in 1.10
|
243
|
+
Enabled: true
|
244
|
+
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
245
|
+
Enabled: true
|
246
|
+
Style/InPatternThen: # new in 1.16
|
247
|
+
Enabled: true
|
248
|
+
Style/MapToHash: # new in 1.24
|
249
|
+
Enabled: true
|
250
|
+
Style/MultilineInPatternThen: # new in 1.16
|
251
|
+
Enabled: true
|
252
|
+
Style/NumberedParameters: # new in 1.22
|
253
|
+
Enabled: true
|
254
|
+
Style/NumberedParametersLimit: # new in 1.22
|
255
|
+
Enabled: true
|
256
|
+
Style/OpenStructUse: # new in 1.23
|
257
|
+
Enabled: true
|
258
|
+
Style/QuotedSymbols: # new in 1.16
|
259
|
+
Enabled: true
|
260
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
261
|
+
Enabled: true
|
262
|
+
Style/SelectByRegexp: # new in 1.22
|
263
|
+
Enabled: true
|
264
|
+
Style/StringChars: # new in 1.12
|
265
|
+
Enabled: true
|
266
|
+
Performance/AncestorsInclude: # new in 1.7
|
267
|
+
Enabled: true
|
268
|
+
Performance/BigDecimalWithNumericArgument: # new in 1.7
|
269
|
+
Enabled: true
|
270
|
+
Performance/BlockGivenWithExplicitBlock: # new in 1.9
|
271
|
+
Enabled: true
|
272
|
+
Performance/CollectionLiteralInLoop: # new in 1.8
|
273
|
+
Enabled: true
|
274
|
+
Performance/ConcurrentMonotonicTime: # new in 1.12
|
275
|
+
Enabled: true
|
276
|
+
Performance/ConstantRegexp: # new in 1.9
|
277
|
+
Enabled: true
|
278
|
+
Performance/MapCompact: # new in 1.11
|
279
|
+
Enabled: true
|
280
|
+
Performance/MethodObjectAsBlock: # new in 1.9
|
281
|
+
Enabled: true
|
282
|
+
Performance/RedundantEqualityComparisonBlock: # new in 1.10
|
283
|
+
Enabled: true
|
284
|
+
Performance/RedundantSortBlock: # new in 1.7
|
285
|
+
Enabled: true
|
286
|
+
Performance/RedundantSplitRegexpArgument: # new in 1.10
|
287
|
+
Enabled: true
|
288
|
+
Performance/RedundantStringChars: # new in 1.7
|
289
|
+
Enabled: true
|
290
|
+
Performance/ReverseFirst: # new in 1.7
|
291
|
+
Enabled: true
|
292
|
+
Performance/SortReverse: # new in 1.7
|
293
|
+
Enabled: true
|
294
|
+
Performance/Squeeze: # new in 1.7
|
295
|
+
Enabled: true
|
296
|
+
Performance/StringIdentifierArgument: # new in 1.13
|
297
|
+
Enabled: true
|
298
|
+
Performance/StringInclude: # new in 1.7
|
299
|
+
Enabled: false
|
300
|
+
Performance/Sum: # new in 1.8
|
301
|
+
Enabled: true
|
302
|
+
|
303
|
+
Layout/LineContinuationLeadingSpace: # new in 1.31
|
304
|
+
Enabled: true
|
305
|
+
Layout/LineContinuationSpacing: # new in 1.31
|
306
|
+
Enabled: true
|
307
|
+
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
308
|
+
Enabled: true
|
309
|
+
Lint/NonAtomicFileOperation: # new in 1.31
|
310
|
+
Enabled: true
|
311
|
+
Lint/RefinementImportMethods: # new in 1.27
|
312
|
+
Enabled: true
|
313
|
+
Lint/RequireRangeParentheses: # new in 1.32
|
314
|
+
Enabled: true
|
315
|
+
Security/CompoundHash: # new in 1.28
|
316
|
+
Enabled: true
|
317
|
+
Style/EmptyHeredoc: # new in 1.32
|
318
|
+
Enabled: true
|
319
|
+
Style/EnvHome: # new in 1.29
|
320
|
+
Enabled: true
|
321
|
+
Style/FetchEnvVar: # new in 1.28
|
322
|
+
Enabled: true
|
323
|
+
Style/MagicCommentFormat: # new in 1.35
|
324
|
+
Enabled: true
|
325
|
+
Style/MapCompactWithConditionalBlock: # new in 1.30
|
326
|
+
Enabled: true
|
327
|
+
Style/NestedFileDirname: # new in 1.26
|
328
|
+
Enabled: true
|
329
|
+
Style/ObjectThen: # new in 1.28
|
330
|
+
Enabled: true
|
331
|
+
Style/RedundantInitialize: # new in 1.27
|
332
|
+
Enabled: true
|
333
|
+
|
334
|
+
Gemspec/DevelopmentDependencies: # new in 1.44
|
335
|
+
Enabled: true
|
336
|
+
Lint/DuplicateMagicComment: # new in 1.37
|
337
|
+
Enabled: true
|
338
|
+
Lint/UselessRescue: # new in 1.43
|
339
|
+
Enabled: true
|
340
|
+
Metrics/CollectionLiteralLength: # new in 1.47
|
341
|
+
Enabled: true
|
342
|
+
Exclude:
|
343
|
+
- 'lib/jpmobile/emoticon/*.rb'
|
344
|
+
Style/ArrayIntersect: # new in 1.40
|
345
|
+
Enabled: true
|
346
|
+
Style/ComparableClamp: # new in 1.44
|
347
|
+
Enabled: true
|
348
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
349
|
+
Enabled: true
|
350
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
351
|
+
Enabled: true
|
352
|
+
Style/RedundantEach: # new in 1.38
|
353
|
+
Enabled: true
|
354
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
355
|
+
Enabled: true
|
356
|
+
Style/RedundantStringEscape: # new in 1.37
|
357
|
+
Enabled: true
|
358
|
+
Style/DirEmpty: # new in 1.48
|
359
|
+
Enabled: true
|
360
|
+
Style/FileEmpty: # new in 1.48
|
361
|
+
Enabled: true
|
362
|
+
Style/MapToSet: # new in 1.42
|
363
|
+
Enabled: true
|
364
|
+
Style/MinMaxComparison: # new in 1.42
|
365
|
+
Enabled: true
|
366
|
+
Style/OperatorMethodCall: # new in 1.37
|
367
|
+
Enabled: true
|
368
|
+
Style/RedundantConstantBase: # new in 1.40
|
369
|
+
Enabled: true
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
3.2.2
|
data/Gemfile
CHANGED
@@ -3,5 +3,16 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in jpmobile.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
+
gem 'geokit'
|
7
|
+
gem 'git'
|
8
|
+
gem 'hpricot'
|
9
|
+
gem 'pry'
|
10
|
+
gem 'rails', '~> 7.1.0'
|
11
|
+
gem 'rspec'
|
12
|
+
gem 'rspec-its'
|
13
|
+
gem 'rspec-rails'
|
6
14
|
gem 'rubocop', require: false
|
7
15
|
gem 'rubocop-performance', require: false
|
16
|
+
gem 'rubocop-rails', require: false
|
17
|
+
gem 'rubocop-rspec', require: false
|
18
|
+
gem 'sqlite3-ruby'
|