jpmobile 6.1.1 → 6.1.2

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: 5d4fa2229a3c13898fc8b6606af673742dab9805d73e18805060a6eb107948a7
4
- data.tar.gz: '0518495a8dc82eb71a58aa6623aeb1255920bcc602f0434b0a978f183c43f3ef'
3
+ metadata.gz: 74fa7416fa00515953a733795e73ec1e6588661679d75a1976679c1d504ffcf4
4
+ data.tar.gz: c5bbfb870db11b2040e7c6071224f15814666205af7d6ab7753d6420f0f1857c
5
5
  SHA512:
6
- metadata.gz: 0f7102eefe118ccfb639a7f914b2fae3b904450b5a19e33ad3113b86b0fbeaf0be5932cffaae7f5b99d9ab1cdf07175ecc573043ebcf365f68ef97050e765a16
7
- data.tar.gz: 13803d46396d2a0aec370b888566168b6399ab0ffc667e6600ce127bd1e9a7b1c6d563f42395c599ec891714d9dbb199ca860463b65c2145339f5c39ebdb635a
6
+ metadata.gz: 1c02221b79367bacdd03b7a9c996a1c13b924f075425e7cefdf92673a7accf790c9ec5b957892f2cbaad040ca5c9feeef19e7f6aa90b6d0ae3a175bb4a1adaeb
7
+ data.tar.gz: 5ac93c588bc456034de7e1a0dc2d59775a4161ffd9d65046e1e52582d219f9cd17a2ca76b666adcba5243ef6da66379e85aaa00ceac4ad4921a63c991e4d834b
@@ -1,3 +1,3 @@
1
1
  module Jpmobile
2
- VERSION = '6.1.1'.freeze
2
+ VERSION = '6.1.2'.freeze
3
3
  end
@@ -0,0 +1,26 @@
1
+ module Jpmobile
2
+ module ViewSelector
3
+ def self.included(base)
4
+ base.class_eval do
5
+ before_action :register_mobile
6
+
7
+ self._view_paths = self._view_paths.dup
8
+ self.view_paths.unshift(*self.view_paths.map {|resolver| Jpmobile::Resolver.new(resolver.to_path) })
9
+ end
10
+ end
11
+
12
+ def register_mobile
13
+ if request.mobile
14
+ # register mobile
15
+ self.lookup_context.mobile = request.mobile.variants
16
+ end
17
+ end
18
+
19
+ def disable_mobile_view!
20
+ self.lookup_context.mobile = []
21
+ end
22
+
23
+ private :register_mobile, :disable_mobile_view!
24
+ end
25
+ Rails::Application::Configuration.include Jpmobile::Configuration::RailsConfiguration
26
+ 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: 6.1.1
4
+ version: 6.1.2
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: 2020-12-28 00:00:00.000000000 Z
12
+ date: 2021-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mail
@@ -268,6 +268,7 @@ files:
268
268
  - lib/jpmobile/trans_sid.rb
269
269
  - lib/jpmobile/util.rb
270
270
  - lib/jpmobile/version.rb
271
+ - lib/jpmobile/view_selector.rb
271
272
  - lib/tasks/jpmobile_tasks.rake
272
273
  - spec/rack/jpmobile/android_spec.rb
273
274
  - spec/rack/jpmobile/au_spec.rb