alephant-renderer 1.0.5 → 2.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/alephant/renderer.rb +8 -2
- data/lib/alephant/renderer/version.rb +1 -1
- data/lib/alephant/renderer/view_mapper.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dc2445aab6179e6e2c3fc1ed79e1c17b055a2bc
|
4
|
+
data.tar.gz: a98f86afc093a361aeb89519fc725cce56c2b4c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc67f75357294559513972310120b57f598babfe37ace92169e1dbc29bc16672921d30d76d0356f8b6f101eef22f6cce4f67da02d669b9e3f94c1396db740406
|
7
|
+
data.tar.gz: b1ff43f4af1f40af127c4054a67f7d07a724ad027ddb93bd8d4ebae4eae5e14e62721e56bbc26a8e2bccea49cb63e13138d05b6c117649c533ff5e467481e687
|
data/lib/alephant/renderer.rb
CHANGED
@@ -25,11 +25,17 @@ module Alephant
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def mapper
|
28
|
-
logger.info "Renderer#mapper: renderer id '#{config[:renderer_id]}', view path '#{config[:view_path]}'"
|
29
28
|
@mapper ||= ViewMapper.new(
|
30
29
|
config[:renderer_id],
|
31
30
|
config[:view_path]
|
32
|
-
)
|
31
|
+
).tap do
|
32
|
+
logger.info(
|
33
|
+
"event" => "ViewMapperCreated",
|
34
|
+
"rendererId" => config[:renderer_id],
|
35
|
+
"viewPath" => config[:view_path],
|
36
|
+
"method" => "#{self.class}#mapper"
|
37
|
+
)
|
38
|
+
end
|
33
39
|
end
|
34
40
|
end
|
35
41
|
end
|
@@ -32,8 +32,14 @@ module Alephant
|
|
32
32
|
private
|
33
33
|
|
34
34
|
def raise_error(path)
|
35
|
-
|
36
|
-
|
35
|
+
raise("Invalid path: '#{path}'").tap do
|
36
|
+
logger.metric("ViewMapperInvalidPath")
|
37
|
+
logger.error(
|
38
|
+
"event" => "ViewMapperBasePathInvalidFound",
|
39
|
+
"path" => path,
|
40
|
+
"method" => "#{self.class}#raise_error"
|
41
|
+
)
|
42
|
+
end
|
37
43
|
end
|
38
44
|
|
39
45
|
def model(view_id, data)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-renderer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BBC News
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|