mime_fallback 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mime_fallback/resolver.rb +3 -3
- data/lib/mime_fallback/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c66d5e629a49b33e4ad6d93e67f7b2e20be1364
|
4
|
+
data.tar.gz: d4e15307d92576108ee241671eaeac7b021af911
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c15bbb695ebdfebc33bdb3bc3f54890c8d74f472577f31e8e53b0769f83b2cd73e3f59f71f3061951d96ec8b6fe34fd8b6fd4acf362efdf0fc3e37984cbdd337
|
7
|
+
data.tar.gz: ed521e22904619e4a0e7525dfe8af045b43dda3aad1f1c4c2b435dce260fa5b3d19f07d6abd845419ae890741711bcfd53202edee75061a422b6036dbc8b3063
|
@@ -3,16 +3,16 @@ module MimeFallback
|
|
3
3
|
|
4
4
|
private
|
5
5
|
|
6
|
-
def find_templates(name, prefix, partial, details)
|
6
|
+
def find_templates(name, prefix, partial, details, outside_app_allowed = false)
|
7
7
|
format = Array(details[:formats]).first
|
8
8
|
fallbacks ||= MimeFallback::Type.fallbacks(format).dup
|
9
9
|
if fallbacks.present?
|
10
10
|
fallback_details = details.dup
|
11
11
|
fallback_details[:formats] = Array(format.to_sym) + fallbacks.map(&:to_sym)
|
12
12
|
path = build_path(name, prefix, partial)
|
13
|
-
query(path, fallback_details.select {|key| EXTENSIONS.include?(key)}, fallback_details[:formats])
|
13
|
+
query(path, fallback_details.select {|key| EXTENSIONS.include?(key)}, fallback_details[:formats], outside_app_allowed)
|
14
14
|
else
|
15
|
-
super(name, prefix, partial, details)
|
15
|
+
super(name, prefix, partial, details, outside_app_allowed)
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mime_fallback
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Ching
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.2.5.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 4.2.5.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
118
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.
|
119
|
+
rubygems_version: 2.4.8
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Format fallbacks for rendering partials
|