jpmobile 5.2.0 → 5.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a3282bc38e1341f5732641f7fbcb39a45f6067ea93796d9ddf39d17198b8efa
4
- data.tar.gz: 8ec05a3964dee4fd9a731ff61f38f946ca0a06049dc8d5709a8dec89ea701ff1
3
+ metadata.gz: c63e7fa07c75ad2c17c00a4e406ad9728ff256398ac9e2e981f698081451e623
4
+ data.tar.gz: 6a6a72213b870c5b563a55264a5b7932dfa3ddea60cf7cbcd1de49d3e17ccf96
5
5
  SHA512:
6
- metadata.gz: cb4b41c43846247d7f2462793925ba8ac7313490f9f019145122c7e0e91d6574b862bcd81ef0d2d44be80e34e58f62c52b776995a0a4df31dc46e2f7d678fdce
7
- data.tar.gz: 92b5f532f143b28226b949b1cb384d4fc7d382c268ba102ee0700580f0f49ec37f83496b1b5c40f3e87273b2f222c8e3ee2b71d6840099663a50d2c4faa40547
6
+ metadata.gz: c03beec28f2f055cbab2112455cbf703256fb1e51233eeb5670c027eb713f14c54199fe89b2be9a726cadb653ad6c42d4521bb7956b72d8835459c9d46718b3b
7
+ data.tar.gz: de647d201b7fa7d9910fb271c2595e0f3c07b8ee5d7cfbf7963036632a1c113545845eb38a9fea5f2f249dbc648ce6f395b71318894fb5971b4d2b2ad2a02991
@@ -28,3 +28,9 @@ export MAILTRAP_PASSWORD=YYYYYYYYYYYYYY
28
28
  $ bundle exec rake test
29
29
  $ bundle exec rubocop
30
30
  ```
31
+
32
+ ### Railsでのテスト
33
+
34
+ ```
35
+ $ bundle exec rake test:rails
36
+ ```
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jpmobile (5.2.0.beta1)
4
+ jpmobile (5.2.1)
5
5
  mail (~> 2.7.0)
6
6
 
7
7
  GEM
@@ -164,12 +164,26 @@ module Jpmobile
164
164
  end
165
165
 
166
166
  def convert_parameters(params)
167
- params.each do |k, v|
168
- params[k] = if params[k].respond_to?(:each)
169
- convert_parameters(params[k])
170
- else
171
- to_internal(v)
172
- end
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
@@ -1,3 +1,3 @@
1
1
  module Jpmobile
2
- VERSION = '5.2.0'.freeze
2
+ VERSION = '5.2.1'.freeze
3
3
  end
@@ -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.0
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-10 00:00:00.000000000 Z
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