rack-app-front_end 0.8.0 → 0.10.0

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
  SHA1:
3
- metadata.gz: e65f34ac32fa4ce45fb3a47be3cbfb2ef6795f09
4
- data.tar.gz: be1a81641ce17c04aa0d6b17677ad5acf7077ffd
3
+ metadata.gz: dcf5a9dd6e5307c8eb8fc926f8aeddd9f1b49535
4
+ data.tar.gz: bcc3dbffa8b7e148e8c2025ed6519111681b65c7
5
5
  SHA512:
6
- metadata.gz: 980821cc5ab20494f9f00965687f835c2e62dd9fe0704de10030fe2d9e26ef9644f94af0b047b4958bbce89a0e11f0450fdea2f8e99d3c2e703f22bdbad0d719
7
- data.tar.gz: 66309fab9b2573215f60d9899fa6cccff533854c5886096fe9cf64144ba7a81b08c7882b0a6c20f5889c748eb57e05020dd072ad17b0126695237a03bba1a2c3
6
+ metadata.gz: 8245eb48ef9ac27281d5de3711396cc5406500d2387f51b31519025691b2052652f32da0e6a9b30d274f21735022fd1c58b621d6dc122116b903d9ded4893d47
7
+ data.tar.gz: 156849ec6e4458f39acdae7b9b32e4c2cf1f960a9480e3b8347219b06080214f0eae0a411c1e7b03733e7eea3ef7f9ba0c9784c30776aaa70cd2dfee094b35ed
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.10.0
@@ -4,8 +4,7 @@ module Rack::App::FrontEnd::InstanceMethods
4
4
 
5
5
  options = {}
6
6
  options[:layout]= self.class.layout if self.class.respond_to?(:layout)
7
- extended_template_path = Rack::App::Utils.expand_path(template_path)
8
- full_path = File.exist?(extended_template_path) ? extended_template_path : template_path
7
+ full_path = Rack::App::Utils.expand_path(template_path)
9
8
  template = Rack::App::FrontEnd::Template.new(full_path, options)
10
9
 
11
10
  return template.render(self)
@@ -11,4 +11,12 @@ module Rack::App::FrontEnd::SingletonMethods
11
11
  @layout
12
12
  end
13
13
 
14
+ def precache_templates(*template_paths)
15
+ full_paths = template_paths.map { |path| Rack::App::Utils.expand_path(path) }
16
+ full_paths.each do |full_path|
17
+ Rack::App::FrontEnd::Template.cache.fetch(full_path) { Tilt.new(full_path) }
18
+ end
19
+ nil
20
+ end
21
+
14
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-app-front_end
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi