dusty_rails_renderer 0.2.8 → 0.3.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: c63d91ae1f33f54302a00b077a127ce6da3eab85
4
- data.tar.gz: 0c66084140e6850ce95eb0247801780faac61d44
3
+ metadata.gz: 139fb7b50dad615102937ff4d3cc9b20900066a1
4
+ data.tar.gz: 055e5f73b577b7f3a80aa7b28e729cadc282cc3d
5
5
  SHA512:
6
- metadata.gz: 25df37614cc80c1d02c325435367887f3c7f411476539ec777d9a1a75826fecdff5d4720bac64fed6381a38e234d8fe837a143c427b0b5cd66505ed0ce2d4df7
7
- data.tar.gz: 5f12f05a48f4e1b7f9a70b6b8fc839f4d2d6bb9c192fb7b800f531e0759a29484274924c35554caaa581b7519d41aa7370fc962589e050c887f872d71fc15770
6
+ metadata.gz: 75fe700c3a7f8979f83464079427e4bac45aba15b37d5a9e086a6b4c9d4ddcf3ad2d7e2561b3bb5abd4614f6b5a9592ec74b597010076b6275e47bef58d62349
7
+ data.tar.gz: 6f04d42036c6ee16566456b8d19b20f8b2629e8903d1142d73c3f44840152b8ad259180631be9433abb5ac469818d663d2cd78880ff767159e9760ce25c979fb
@@ -1,3 +1,3 @@
1
1
  module DustyRailsRenderer
2
- VERSION = "0.2.8"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -11,6 +11,7 @@ module DustyRailsRenderer
11
11
  @dust_config = YAML.load_file(self.configuration.dust_config_path)
12
12
  @dust_library = File.read(self.configuration.dust_js_library_path)
13
13
  @precompiled_templates = Hash.new
14
+ @last_modification_hash = Hash.new
14
15
  @context = V8::Context.new
15
16
  @context.eval(@dust_library, 'dustjs')
16
17
 
@@ -35,8 +36,14 @@ module DustyRailsRenderer
35
36
  #Read in and register Dust.js templates
36
37
  def read_dust_files
37
38
  @dust_config.each do |template, info|
38
- file_url = self.configuration.dust_template_base_path + info["file_path"]
39
- template_name = info["name"]
39
+ file_url = self.configuration.dust_template_base_path + info["file_path"]
40
+ template_name = info["name"]
41
+
42
+ if @last_modification_hash[template_name] == File.mtime(file_url)
43
+ next
44
+ else
45
+ @last_modification_hash[template_name] = File.mtime(file_url)
46
+ end
40
47
 
41
48
  if self.configuration.logging
42
49
  puts "file url = #{file_url}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dusty_rails_renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis Ellis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-15 00:00:00.000000000 Z
11
+ date: 2015-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler