jpmobile 6.1.0 → 7.0.1
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/.onkcop-config.yml +0 -27
- data/.rubocop.yml +64 -1
- data/.ruby-version +1 -1
- data/Gemfile +4 -2
- data/Gemfile.lock +153 -141
- data/README.md +4 -20
- data/jpmobile.gemspec +5 -4
- data/lib/jpmobile/configuration.rb +7 -3
- data/lib/jpmobile/docomo_guid.rb +4 -4
- data/lib/jpmobile/email.rb +2 -4
- data/lib/jpmobile/emoticon.rb +10 -17
- data/lib/jpmobile/filter.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/mail.rb +4 -4
- data/lib/jpmobile/mailer.rb +2 -2
- data/lib/jpmobile/mobile/abstract_mobile.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 +6 -8
- 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/rack/params_filter.rb +5 -4
- data/lib/jpmobile/rails.rb +3 -35
- 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 +3 -4
- data/lib/jpmobile/version.rb +1 -1
- data/lib/jpmobile/view_selector.rb +25 -0
- data/lib/jpmobile.rb +14 -0
- data/lib/tasks/jpmobile_tasks.rake +2 -1
- data/spec/rack/jpmobile/mobile_by_ua_spec.rb +1 -0
- data/spec/rack_helper.rb +0 -4
- data/spec/unit/email_spec.rb +1 -1
- data/spec/unit/receive_mail_spec.rb +1 -1
- data/test/rails/overrides/Gemfile.jpmobile +5 -1
- 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/docomo_guid_spec.rb +2 -2
- 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/requests/trans_sid_spec.rb +9 -9
- 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 +26 -31
- 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: 3292578aadf3276cb4304224f8b4563fe25244e03b7fa337d2ba7dd3a542f3f1
|
4
|
+
data.tar.gz: 6f472acb84fad3decceaed599afa71397e5dd92d851a0300bb03d595b9f48aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bcc18a422c95df268feb18ddbe7e61d9d94f9481cbacda09edce99990b2cb2f3e909b319a96b411aeeff7e7b995dcc2a794406b80f3c1d2292d991c0bbd72f3
|
7
|
+
data.tar.gz: 802f4a65b7ba13537ec9c548a109eeb13205363ce0afc1bb4f13c0fd228663f33dfc128cf8615f2ca3f6ba6f8f0a3a7a33f05841984d6ada7eb648afe9801bcd
|
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:
|
@@ -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/.onkcop-config.yml
CHANGED
@@ -122,29 +122,6 @@ Metrics/BlockLength:
|
|
122
122
|
- "config/routes/**/*.rb"
|
123
123
|
- "*.gemspec"
|
124
124
|
|
125
|
-
# 6 は強すぎるので緩める
|
126
|
-
Metrics/CyclomaticComplexity:
|
127
|
-
Max: 10
|
128
|
-
|
129
|
-
# * 警告 120文字
|
130
|
-
# * 禁止 160文字
|
131
|
-
# のイメージ
|
132
|
-
Layout/LineLength:
|
133
|
-
Max: 160
|
134
|
-
Exclude:
|
135
|
-
- "db/migrate/*.rb"
|
136
|
-
|
137
|
-
# 20 行超えるのは migration ファイル以外滅多に無い
|
138
|
-
Metrics/MethodLength:
|
139
|
-
Max: 20
|
140
|
-
Exclude:
|
141
|
-
- "db/migrate/*.rb"
|
142
|
-
|
143
|
-
# 分岐の数。ガード句を多用しているとデフォルト 7 だと厳しい
|
144
|
-
Metrics/PerceivedComplexity:
|
145
|
-
Max: 8
|
146
|
-
|
147
|
-
|
148
125
|
#################### Naming ################################
|
149
126
|
|
150
127
|
# has_ から始まるメソッドは許可する
|
@@ -202,10 +179,6 @@ Style/BlockDelimiters:
|
|
202
179
|
Exclude:
|
203
180
|
- "spec/**/*_spec.rb"
|
204
181
|
|
205
|
-
# option 等、明示的にハッシュにした方が分かりやすい場合もある
|
206
|
-
Style/BracesAroundHashParameters:
|
207
|
-
Enabled: false
|
208
|
-
|
209
182
|
# scope が違うとか親 module の存在確認が必要とかデメリットはあるが、
|
210
183
|
# namespace 付きのクラスはかなり頻繁に作るので簡単に書きたい。
|
211
184
|
Style/ClassAndModuleChildren:
|
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:
|
6
|
+
TargetRubyVersion: 3.0
|
7
7
|
Exclude:
|
8
8
|
- 'tmp/**/*'
|
9
9
|
- 'bin/*'
|
@@ -64,16 +64,20 @@ Metrics/AbcSize:
|
|
64
64
|
- 'lib/jpmobile/fallback_view_selector.rb'
|
65
65
|
- 'lib/jpmobile/resolver.rb'
|
66
66
|
- 'lib/jpmobile/rack/filter.rb'
|
67
|
+
- 'lib/jpmobile/trans_sid.rb'
|
67
68
|
|
68
69
|
Metrics/CyclomaticComplexity:
|
70
|
+
Max: 10
|
69
71
|
Exclude:
|
70
72
|
- 'lib/jpmobile/emoticon.rb'
|
71
73
|
- 'lib/jpmobile/helpers.rb'
|
72
74
|
- 'lib/jpmobile/mail.rb'
|
73
75
|
- 'lib/jpmobile/mobile/au.rb'
|
74
76
|
- 'lib/jpmobile/mobile/docomo.rb'
|
77
|
+
- 'lib/jpmobile/mobile/abstract_mobile.rb'
|
75
78
|
|
76
79
|
Metrics/PerceivedComplexity:
|
80
|
+
Max: 8
|
77
81
|
Exclude:
|
78
82
|
- 'lib/jpmobile/emoticon.rb'
|
79
83
|
- 'lib/jpmobile/helpers.rb'
|
@@ -81,8 +85,12 @@ Metrics/PerceivedComplexity:
|
|
81
85
|
- 'lib/jpmobile/mobile/au.rb'
|
82
86
|
- 'lib/jpmobile/mobile/docomo.rb'
|
83
87
|
- 'lib/jpmobile/trans_sid.rb'
|
88
|
+
- 'lib/jpmobile/filter.rb'
|
89
|
+
- 'lib/jpmobile/rack/filter.rb'
|
90
|
+
- 'lib/jpmobile/mobile/abstract_mobile.rb'
|
84
91
|
|
85
92
|
Layout/LineLength:
|
93
|
+
Max: 160
|
86
94
|
Exclude:
|
87
95
|
- '**/*_spec.rb'
|
88
96
|
- 'lib/jpmobile/emoticon/z_combine.rb'
|
@@ -115,6 +123,7 @@ Metrics/ClassLength:
|
|
115
123
|
- 'lib/jpmobile/mobile/docomo.rb'
|
116
124
|
|
117
125
|
Metrics/MethodLength:
|
126
|
+
Max: 20
|
118
127
|
Exclude:
|
119
128
|
- 'lib/jpmobile/emoticon.rb'
|
120
129
|
- 'lib/jpmobile/helpers.rb'
|
@@ -131,3 +140,57 @@ Lint/SuppressedException:
|
|
131
140
|
Lint/Void:
|
132
141
|
Exclude:
|
133
142
|
- 'lib/jpmobile/filter.rb'
|
143
|
+
|
144
|
+
Style/StringConcatenation:
|
145
|
+
Enabled: false
|
146
|
+
|
147
|
+
Layout/SpaceBeforeBrackets: # (new in 1.7)
|
148
|
+
Enabled: true
|
149
|
+
Exclude:
|
150
|
+
- '**/*_controller.rb'
|
151
|
+
- '**/*_spec.rb'
|
152
|
+
Lint/AmbiguousAssignment: # (new in 1.7)
|
153
|
+
Enabled: true
|
154
|
+
Lint/DuplicateBranch: # (new in 1.3)
|
155
|
+
Enabled: true
|
156
|
+
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
|
157
|
+
Enabled: true
|
158
|
+
Lint/EmptyBlock: # (new in 1.1)
|
159
|
+
Enabled: true
|
160
|
+
Lint/EmptyClass: # (new in 1.3)
|
161
|
+
Enabled: true
|
162
|
+
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
|
163
|
+
Enabled: true
|
164
|
+
Lint/ToEnumArguments: # (new in 1.1)
|
165
|
+
Enabled: true
|
166
|
+
Lint/UnexpectedBlockArity: # (new in 1.5)
|
167
|
+
Enabled: true
|
168
|
+
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
|
169
|
+
Enabled: true
|
170
|
+
Style/ArgumentsForwarding: # (new in 1.1)
|
171
|
+
Enabled: true
|
172
|
+
Style/CollectionCompact: # (new in 1.2)
|
173
|
+
Enabled: true
|
174
|
+
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
|
175
|
+
Enabled: true
|
176
|
+
Exclude:
|
177
|
+
- 'lib/jpmobile/path_set.rb'
|
178
|
+
Style/HashExcept: # (new in 1.7)
|
179
|
+
Enabled: true
|
180
|
+
Style/NegatedIfElseCondition: # (new in 1.2)
|
181
|
+
Enabled: true
|
182
|
+
Style/NilLambda: # (new in 1.3)
|
183
|
+
Enabled: true
|
184
|
+
Style/RedundantArgument: # (new in 1.4)
|
185
|
+
Enabled: true
|
186
|
+
Style/SwapValues: # (new in 1.1)
|
187
|
+
Enabled: true
|
188
|
+
|
189
|
+
Style/OptionalBooleanParameter:
|
190
|
+
Exclude:
|
191
|
+
- 'lib/jpmobile/emoticon.rb'
|
192
|
+
- 'lib/jpmobile/path_set.rb'
|
193
|
+
|
194
|
+
Metrics/ParameterLists:
|
195
|
+
Exclude:
|
196
|
+
- 'lib/jpmobile/path_set.rb'
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.3
|
data/Gemfile
CHANGED
@@ -3,5 +3,7 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in jpmobile.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem 'rubocop',
|
7
|
-
gem 'rubocop-performance',
|
6
|
+
gem 'rubocop', require: false
|
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 (
|
4
|
+
jpmobile (7.0.1)
|
5
5
|
mail (~> 2.7.0)
|
6
6
|
rexml
|
7
7
|
scanf
|
@@ -9,225 +9,237 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actioncable (
|
13
|
-
actionpack (=
|
14
|
-
activesupport (=
|
12
|
+
actioncable (7.0.1)
|
13
|
+
actionpack (= 7.0.1)
|
14
|
+
activesupport (= 7.0.1)
|
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.1)
|
18
|
+
actionpack (= 7.0.1)
|
19
|
+
activejob (= 7.0.1)
|
20
|
+
activerecord (= 7.0.1)
|
21
|
+
activestorage (= 7.0.1)
|
22
|
+
activesupport (= 7.0.1)
|
23
23
|
mail (>= 2.7.1)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
net-imap
|
25
|
+
net-pop
|
26
|
+
net-smtp
|
27
|
+
actionmailer (7.0.1)
|
28
|
+
actionpack (= 7.0.1)
|
29
|
+
actionview (= 7.0.1)
|
30
|
+
activejob (= 7.0.1)
|
31
|
+
activesupport (= 7.0.1)
|
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.1)
|
38
|
+
actionview (= 7.0.1)
|
39
|
+
activesupport (= 7.0.1)
|
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.1)
|
45
|
+
actionpack (= 7.0.1)
|
46
|
+
activerecord (= 7.0.1)
|
47
|
+
activestorage (= 7.0.1)
|
48
|
+
activesupport (= 7.0.1)
|
49
|
+
globalid (>= 0.6.0)
|
43
50
|
nokogiri (>= 1.8.5)
|
44
|
-
actionview (
|
45
|
-
activesupport (=
|
51
|
+
actionview (7.0.1)
|
52
|
+
activesupport (= 7.0.1)
|
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.1)
|
58
|
+
activesupport (= 7.0.1)
|
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.1)
|
61
|
+
activesupport (= 7.0.1)
|
62
|
+
activerecord (7.0.1)
|
63
|
+
activemodel (= 7.0.1)
|
64
|
+
activesupport (= 7.0.1)
|
65
|
+
activestorage (7.0.1)
|
66
|
+
actionpack (= 7.0.1)
|
67
|
+
activejob (= 7.0.1)
|
68
|
+
activerecord (= 7.0.1)
|
69
|
+
activesupport (= 7.0.1)
|
70
|
+
marcel (~> 1.0)
|
71
|
+
mini_mime (>= 1.1.0)
|
72
|
+
activesupport (7.0.1)
|
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.9)
|
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.10.2)
|
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.8.
|
91
|
+
i18n (1.8.11)
|
98
92
|
concurrent-ruby (~> 1.0)
|
99
|
-
|
100
|
-
|
101
|
-
loofah (2.8.0)
|
93
|
+
io-wait (0.2.1)
|
94
|
+
loofah (2.13.0)
|
102
95
|
crass (~> 1.0.2)
|
103
96
|
nokogiri (>= 1.5.9)
|
104
97
|
mail (2.7.1)
|
105
98
|
mini_mime (>= 0.1.1)
|
106
|
-
marcel (0.
|
107
|
-
mimemagic (~> 0.3.2)
|
99
|
+
marcel (1.0.2)
|
108
100
|
method_source (1.0.0)
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
101
|
+
mini_mime (1.1.2)
|
102
|
+
minitest (5.15.0)
|
103
|
+
net-imap (0.2.3)
|
104
|
+
digest
|
105
|
+
net-protocol
|
106
|
+
strscan
|
107
|
+
net-pop (0.1.1)
|
108
|
+
digest
|
109
|
+
net-protocol
|
110
|
+
timeout
|
111
|
+
net-protocol (0.1.2)
|
112
|
+
io-wait
|
113
|
+
timeout
|
114
|
+
net-smtp (0.3.1)
|
115
|
+
digest
|
116
|
+
net-protocol
|
117
|
+
timeout
|
118
|
+
nio4r (2.5.8)
|
119
|
+
nokogiri (1.13.0-arm64-darwin)
|
120
|
+
racc (~> 1.4)
|
121
|
+
nokogiri (1.13.0-x86_64-linux)
|
122
|
+
racc (~> 1.4)
|
123
|
+
parallel (1.21.0)
|
124
|
+
parser (3.1.0.0)
|
118
125
|
ast (~> 2.4.1)
|
119
|
-
pry (0.
|
126
|
+
pry (0.14.1)
|
120
127
|
coderay (~> 1.1)
|
121
128
|
method_source (~> 1.0)
|
122
|
-
|
129
|
+
racc (1.6.0)
|
123
130
|
rack (2.2.3)
|
124
131
|
rack-test (1.1.0)
|
125
132
|
rack (>= 1.0, < 3)
|
126
|
-
rails (
|
127
|
-
actioncable (=
|
128
|
-
actionmailbox (=
|
129
|
-
actionmailer (=
|
130
|
-
actionpack (=
|
131
|
-
actiontext (=
|
132
|
-
actionview (=
|
133
|
-
activejob (=
|
134
|
-
activemodel (=
|
135
|
-
activerecord (=
|
136
|
-
activestorage (=
|
137
|
-
activesupport (=
|
133
|
+
rails (7.0.1)
|
134
|
+
actioncable (= 7.0.1)
|
135
|
+
actionmailbox (= 7.0.1)
|
136
|
+
actionmailer (= 7.0.1)
|
137
|
+
actionpack (= 7.0.1)
|
138
|
+
actiontext (= 7.0.1)
|
139
|
+
actionview (= 7.0.1)
|
140
|
+
activejob (= 7.0.1)
|
141
|
+
activemodel (= 7.0.1)
|
142
|
+
activerecord (= 7.0.1)
|
143
|
+
activestorage (= 7.0.1)
|
144
|
+
activesupport (= 7.0.1)
|
138
145
|
bundler (>= 1.15.0)
|
139
|
-
railties (=
|
140
|
-
sprockets-rails (>= 2.0.0)
|
146
|
+
railties (= 7.0.1)
|
141
147
|
rails-dom-testing (2.0.3)
|
142
148
|
activesupport (>= 4.2.0)
|
143
149
|
nokogiri (>= 1.6)
|
144
|
-
rails-html-sanitizer (1.
|
150
|
+
rails-html-sanitizer (1.4.2)
|
145
151
|
loofah (~> 2.3)
|
146
|
-
railties (
|
147
|
-
actionpack (=
|
148
|
-
activesupport (=
|
152
|
+
railties (7.0.1)
|
153
|
+
actionpack (= 7.0.1)
|
154
|
+
activesupport (= 7.0.1)
|
149
155
|
method_source
|
150
|
-
rake (>=
|
156
|
+
rake (>= 12.2)
|
151
157
|
thor (~> 1.0)
|
152
|
-
|
153
|
-
|
158
|
+
zeitwerk (~> 2.5)
|
159
|
+
rainbow (3.1.1)
|
160
|
+
rake (13.0.6)
|
154
161
|
rchardet (1.8.0)
|
155
|
-
regexp_parser (
|
156
|
-
rexml (3.2.
|
162
|
+
regexp_parser (2.2.0)
|
163
|
+
rexml (3.2.5)
|
157
164
|
rspec (3.10.0)
|
158
165
|
rspec-core (~> 3.10.0)
|
159
166
|
rspec-expectations (~> 3.10.0)
|
160
167
|
rspec-mocks (~> 3.10.0)
|
161
|
-
rspec-core (3.10.
|
168
|
+
rspec-core (3.10.1)
|
162
169
|
rspec-support (~> 3.10.0)
|
163
|
-
rspec-expectations (3.10.
|
170
|
+
rspec-expectations (3.10.1)
|
164
171
|
diff-lcs (>= 1.2.0, < 2.0)
|
165
172
|
rspec-support (~> 3.10.0)
|
166
173
|
rspec-its (1.3.0)
|
167
174
|
rspec-core (>= 3.0.0)
|
168
175
|
rspec-expectations (>= 3.0.0)
|
169
|
-
rspec-mocks (3.10.
|
176
|
+
rspec-mocks (3.10.2)
|
170
177
|
diff-lcs (>= 1.2.0, < 2.0)
|
171
178
|
rspec-support (~> 3.10.0)
|
172
|
-
rspec-rails (
|
173
|
-
actionpack (>=
|
174
|
-
activesupport (>=
|
175
|
-
railties (>=
|
176
|
-
rspec-core (~> 3.
|
177
|
-
rspec-expectations (~> 3.
|
178
|
-
rspec-mocks (~> 3.
|
179
|
-
rspec-support (~> 3.
|
180
|
-
rspec-support (3.10.
|
181
|
-
rubocop (
|
182
|
-
jaro_winkler (~> 1.5.1)
|
179
|
+
rspec-rails (5.0.2)
|
180
|
+
actionpack (>= 5.2)
|
181
|
+
activesupport (>= 5.2)
|
182
|
+
railties (>= 5.2)
|
183
|
+
rspec-core (~> 3.10)
|
184
|
+
rspec-expectations (~> 3.10)
|
185
|
+
rspec-mocks (~> 3.10)
|
186
|
+
rspec-support (~> 3.10)
|
187
|
+
rspec-support (3.10.3)
|
188
|
+
rubocop (1.24.1)
|
183
189
|
parallel (~> 1.10)
|
184
|
-
parser (>=
|
190
|
+
parser (>= 3.0.0.0)
|
185
191
|
rainbow (>= 2.2.2, < 4.0)
|
192
|
+
regexp_parser (>= 1.8, < 3.0)
|
193
|
+
rexml
|
194
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
186
195
|
ruby-progressbar (~> 1.7)
|
187
|
-
unicode-display_width (>= 1.4.0, <
|
188
|
-
rubocop-
|
189
|
-
|
190
|
-
|
196
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
197
|
+
rubocop-ast (1.15.1)
|
198
|
+
parser (>= 3.0.1.1)
|
199
|
+
rubocop-performance (1.13.1)
|
200
|
+
rubocop (>= 1.7.0, < 2.0)
|
201
|
+
rubocop-ast (>= 0.4.0)
|
202
|
+
rubocop-rails (2.13.1)
|
203
|
+
activesupport (>= 4.2.0)
|
204
|
+
rack (>= 1.1)
|
205
|
+
rubocop (>= 1.7.0, < 2.0)
|
206
|
+
rubocop-rspec (2.7.0)
|
207
|
+
rubocop (~> 1.19)
|
208
|
+
ruby-progressbar (1.11.0)
|
191
209
|
scanf (1.0.0)
|
192
|
-
sprockets (4.0.2)
|
193
|
-
concurrent-ruby (~> 1.0)
|
194
|
-
rack (> 1, < 3)
|
195
|
-
sprockets-rails (3.2.2)
|
196
|
-
actionpack (>= 4.0)
|
197
|
-
activesupport (>= 4.0)
|
198
|
-
sprockets (>= 3.0.0)
|
199
210
|
sqlite3 (1.4.2)
|
200
211
|
sqlite3-ruby (1.3.3)
|
201
212
|
sqlite3 (>= 1.3.3)
|
202
|
-
|
203
|
-
|
213
|
+
strscan (3.0.1)
|
214
|
+
thor (1.2.1)
|
215
|
+
timeout (0.2.0)
|
216
|
+
tzinfo (2.0.4)
|
204
217
|
concurrent-ruby (~> 1.0)
|
205
|
-
unicode-display_width (1.
|
206
|
-
websocket-driver (0.7.
|
218
|
+
unicode-display_width (2.1.0)
|
219
|
+
websocket-driver (0.7.5)
|
207
220
|
websocket-extensions (>= 0.1.0)
|
208
221
|
websocket-extensions (0.1.5)
|
209
|
-
|
210
|
-
nokogiri (~> 1.8)
|
211
|
-
zeitwerk (2.4.2)
|
222
|
+
zeitwerk (2.5.3)
|
212
223
|
|
213
224
|
PLATFORMS
|
214
|
-
|
215
|
-
x86_64-
|
225
|
+
arm64-darwin-20
|
226
|
+
x86_64-linux
|
216
227
|
|
217
228
|
DEPENDENCIES
|
218
|
-
capybara-webkit
|
219
229
|
geokit
|
220
230
|
git
|
221
231
|
hpricot
|
222
232
|
jpmobile!
|
223
233
|
pry
|
224
|
-
rails (~>
|
234
|
+
rails (~> 7.0.0.alpha2)
|
225
235
|
rspec
|
226
236
|
rspec-its
|
227
237
|
rspec-rails
|
228
|
-
rubocop
|
229
|
-
rubocop-performance
|
238
|
+
rubocop
|
239
|
+
rubocop-performance
|
240
|
+
rubocop-rails
|
241
|
+
rubocop-rspec
|
230
242
|
sqlite3-ruby
|
231
243
|
|
232
244
|
BUNDLED WITH
|
233
|
-
2.2.
|
245
|
+
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
|
@@ -157,8 +142,7 @@ Rack::Request#mobile.position に位置情報が格納されます。
|
|
157
142
|
|
158
143
|
#### [GeoKit](http://geokit.rubyforge.org) との連携
|
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
|
|