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 +4 -4
- data/lib/jpmobile/version.rb +1 -1
- data/lib/jpmobile/view_selector.rb +26 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74fa7416fa00515953a733795e73ec1e6588661679d75a1976679c1d504ffcf4
|
4
|
+
data.tar.gz: c5bbfb870db11b2040e7c6071224f15814666205af7d6ab7753d6420f0f1857c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c02221b79367bacdd03b7a9c996a1c13b924f075425e7cefdf92673a7accf790c9ec5b957892f2cbaad040ca5c9feeef19e7f6aa90b6d0ae3a175bb4a1adaeb
|
7
|
+
data.tar.gz: 5ac93c588bc456034de7e1a0dc2d59775a4161ffd9d65046e1e52582d219f9cd17a2ca76b666adcba5243ef6da66379e85aaa00ceac4ad4921a63c991e4d834b
|
data/lib/jpmobile/version.rb
CHANGED
@@ -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.
|
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:
|
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
|