jpmobile 5.2.0 → 5.2.1
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/CONTRIBUTING.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/jpmobile/filter.rb +20 -6
- data/lib/jpmobile/version.rb +1 -1
- data/test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb +14 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c63e7fa07c75ad2c17c00a4e406ad9728ff256398ac9e2e981f698081451e623
|
|
4
|
+
data.tar.gz: 6a6a72213b870c5b563a55264a5b7932dfa3ddea60cf7cbcd1de49d3e17ccf96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c03beec28f2f055cbab2112455cbf703256fb1e51233eeb5670c027eb713f14c54199fe89b2be9a726cadb653ad6c42d4521bb7956b72d8835459c9d46718b3b
|
|
7
|
+
data.tar.gz: de647d201b7fa7d9910fb271c2595e0f3c07b8ee5d7cfbf7963036632a1c113545845eb38a9fea5f2f249dbc648ce6f395b71318894fb5971b4d2b2ad2a02991
|
data/CONTRIBUTING.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/jpmobile/filter.rb
CHANGED
|
@@ -164,12 +164,26 @@ module Jpmobile
|
|
|
164
164
|
end
|
|
165
165
|
|
|
166
166
|
def convert_parameters(params)
|
|
167
|
-
params.each
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
return to_internal(params) unless params.respond_to?(:each)
|
|
168
|
+
|
|
169
|
+
case params
|
|
170
|
+
when Array
|
|
171
|
+
params.map do |v|
|
|
172
|
+
if v.respond_to?(:each)
|
|
173
|
+
convert_parameters(v)
|
|
174
|
+
else
|
|
175
|
+
to_internal(v)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
else
|
|
179
|
+
params.each do |k, v|
|
|
180
|
+
params[k] =
|
|
181
|
+
if v.respond_to?(:each)
|
|
182
|
+
convert_parameters(v)
|
|
183
|
+
else
|
|
184
|
+
to_internal(v)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
173
187
|
end
|
|
174
188
|
end
|
|
175
189
|
end
|
data/lib/jpmobile/version.rb
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require 'rails_helper'
|
|
2
|
+
|
|
3
|
+
describe Jpmobile::HankakuFilterController, type: :controller do
|
|
4
|
+
describe '#index' do
|
|
5
|
+
let(:params) { { prefecture_ids: ['1', '2'] } }
|
|
6
|
+
|
|
7
|
+
it 'should be successful' do
|
|
8
|
+
request.user_agent = 'DoCoMo/2.0 P05C(c500;TB;W24H16)'
|
|
9
|
+
get 'index', params: params
|
|
10
|
+
expect(response).to be_successful
|
|
11
|
+
expect(request.mobile?).to be_truthy
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jpmobile
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.
|
|
4
|
+
version: 5.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shin-ichiro OGAWA
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-04-
|
|
12
|
+
date: 2018-04-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: mail
|
|
@@ -382,6 +382,7 @@ files:
|
|
|
382
382
|
- test/rails/overrides/db/migrate/001_add_sessions_table.rb
|
|
383
383
|
- test/rails/overrides/db/migrate/20100824062306_create_users.rb
|
|
384
384
|
- test/rails/overrides/spec/controllers/docomo_guid_spec.rb
|
|
385
|
+
- test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb
|
|
385
386
|
- test/rails/overrides/spec/controllers/helpers_spec.rb
|
|
386
387
|
- test/rails/overrides/spec/controllers/mobile_spec_controller_spec.rb
|
|
387
388
|
- test/rails/overrides/spec/controllers/template_path_spec.rb
|
|
@@ -598,6 +599,7 @@ test_files:
|
|
|
598
599
|
- test/rails/overrides/db/migrate/001_add_sessions_table.rb
|
|
599
600
|
- test/rails/overrides/db/migrate/20100824062306_create_users.rb
|
|
600
601
|
- test/rails/overrides/spec/controllers/docomo_guid_spec.rb
|
|
602
|
+
- test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb
|
|
601
603
|
- test/rails/overrides/spec/controllers/helpers_spec.rb
|
|
602
604
|
- test/rails/overrides/spec/controllers/mobile_spec_controller_spec.rb
|
|
603
605
|
- test/rails/overrides/spec/controllers/template_path_spec.rb
|