alephant 0.0.9.3-java → 0.0.9.4-java

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: e6dc76b8cc1c76b5f53dcdbe76187e8b8f58890c
4
- data.tar.gz: 65c218b1833ce6a974c5cc7d06b9f82799dcb594
3
+ metadata.gz: 98d28a299fab7719ea632572af42ae1f2f98f2db
4
+ data.tar.gz: 5755b09e03f8c22e2b74143cfc4087294fd1c659
5
5
  SHA512:
6
- metadata.gz: 61c20b91c1106efd4603cc11450ae45f5285efad6ccacb6cc4a940001d170de750c382db7d93b4e90536a253d4a470dc999f058b19b255c5169beb94da4aea75
7
- data.tar.gz: 30651f164621030b1173534dcd275a30b0a3e7b40865ebbbf8decc7cf5f11ee6da96526fa86f805e24bbd1c2986b3609766d7e1d8851ae4deb7a584e63accadf
6
+ metadata.gz: c81c82b522a200e57089a8d5772ddcd67d1c07c24c32a80427c0fbbfabcd6fa4bc37b975da236b565fa71846548f40611388bbf17581a3c96eef514ab7624618
7
+ data.tar.gz: 6c3c36f8171852955553d5c950545d73a873969ea8dee1ad14327fe861597df3e0fa285134d0b2267a7618c5a30606c48174f421286bfdfe7f44027e671440f2
@@ -19,6 +19,7 @@ module Alephant
19
19
  def render(data)
20
20
  template_locations.reduce({}) do |obj, file|
21
21
  template_id = template_id_for file
22
+ @logger.info("MultiRenderer.render: attempting to render #{template_id}")
22
23
 
23
24
  obj.tap do |o|
24
25
  o[template_id.to_sym] = render_template(
@@ -30,6 +31,7 @@ module Alephant
30
31
  end
31
32
 
32
33
  def render_template(template_file, data)
34
+ @logger.info("MultiRenderer.render_template: rendering template #{template_file} (base_path: #{base_path})")
33
35
  renderer(
34
36
  template_file,
35
37
  base_path,
@@ -45,7 +47,7 @@ module Alephant
45
47
  begin
46
48
  create_model(template_file, data)
47
49
  rescue Exception => e
48
- @logger.error("Renderer.model: exeception #{e.message}")
50
+ @logger.error("MultiRenderer.create_instance: exeception #{e.message}")
49
51
  raise Errors::ViewModelNotFound
50
52
  end
51
53
  end
@@ -55,19 +57,22 @@ module Alephant
55
57
  require model_location_for template_file
56
58
  klass = Views.get_registered_class("#{@component_id}_#{template_file}")
57
59
 
58
- @logger.info("Renderer.model: creating new klass #{klass}")
60
+ @logger.info("MultiRenderer.create_model: creating new klass #{klass}")
59
61
  klass.new(data)
60
62
  end
61
63
 
62
64
  def model_location_for(template_file)
65
+ @logger.info("MultiRenderer.model_location_for(#{template_file})")
63
66
  File.join(base_path, 'models', "#{template_file}.rb")
64
67
  end
65
68
 
66
69
  def template_locations
70
+ @logger.info("MultiRenderer.template_locations: locating templates in '#{base_path}/templates/*'")
67
71
  Dir.glob("#{base_path}/templates/*")
68
72
  end
69
73
 
70
74
  def template_id_for(template_location)
75
+ @logger.info("MultiRenderer.template_id_for(#{template_location})")
71
76
  template_location.split('/').last.sub(/\.mustache/, '')
72
77
  end
73
78
 
@@ -1,3 +1,3 @@
1
1
  module Alephant
2
- VERSION = "0.0.9.3"
2
+ VERSION = "0.0.9.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9.3
4
+ version: 0.0.9.4
5
5
  platform: java
6
6
  authors:
7
7
  - Robert Kenny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-06 00:00:00.000000000 Z
11
+ date: 2014-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec