tzispa_rig 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/lib/tzispa/rig/engine.rb +5 -7
- data/lib/tzispa/rig/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: facbd14f4e528f79d4860a11db426c6b31e748b1
|
4
|
+
data.tar.gz: ce92598b9f554bc0f6d6d3aba9e8500aabd15fe6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b8b5e8cac668248500ef5010fab8a271c7a09e869ef9c39479706456115ed82ffbbce2ab5aed3cbbc62b5e68f21514e382a2cfa39f3d803e56afa6990b07c97
|
7
|
+
data.tar.gz: 9293bc6aeba603f6ef05c35dafe9a0b96ca512f13442fc2f8e98160ed686459e23273d67f93df955fb62a3d8511d0b3ee0ec552ebc48af0faf8e688b3f66110a
|
data/CHANGELOG.md
CHANGED
@@ -2,8 +2,11 @@ Tzispa Rig
|
|
2
2
|
|
3
3
|
Rig templates implementation
|
4
4
|
|
5
|
+
## 0.3.2
|
6
|
+
- Fix error bad format parameter when engine template cache is disabled
|
7
|
+
|
5
8
|
## 0.3.1
|
6
|
-
- Fix error in engine template cache that was losing template params when a template was recovered
|
9
|
+
- Fix error in engine template cache that was losing template params when a template was recovered from cache
|
7
10
|
|
8
11
|
## 0.3.0
|
9
12
|
- Separate engine class into independant ruby file
|
data/lib/tzispa/rig/engine.rb
CHANGED
@@ -32,28 +32,26 @@ module Tzispa
|
|
32
32
|
def rig_template(name, type, tpl_format, params, parent)
|
33
33
|
if @cache
|
34
34
|
if @mutex.owned?
|
35
|
-
cache_template(name, type, tpl_format,
|
35
|
+
cache_template(name, type, tpl_format, params, parent)
|
36
36
|
else
|
37
37
|
@mutex.synchronize {
|
38
|
-
cache_template(name, type, tpl_format,
|
38
|
+
cache_template(name, type, tpl_format, params, parent)
|
39
39
|
}
|
40
40
|
end
|
41
41
|
else
|
42
|
-
Template.new(name: name, type: type, format:
|
42
|
+
Template.new(name: name, type: type, format: tpl_format, domain: @app.domain, params: params, parent: parent, engine: self).load!.parse!
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
46
|
private
|
47
47
|
|
48
|
-
def cache_template(name, type, tpl_format,
|
48
|
+
def cache_template(name, type, tpl_format, params, parent)
|
49
49
|
ktpl = "#{type}__#{name}".to_sym
|
50
50
|
tpl = @cache.getset(ktpl) {
|
51
51
|
Template.new(name: name, type: type, format: tpl_format, domain: @app.domain, parent: parent, engine: self).load!.parse!
|
52
52
|
}
|
53
53
|
if tpl.modified?
|
54
|
-
@cache[ktpl] =
|
55
|
-
else
|
56
|
-
tpl
|
54
|
+
tpl = @cache[ktpl] = Template.new(name: name, type: type, format: tpl_format, domain: @app.domain, parent: parent, engine: self).load!.parse!
|
57
55
|
end
|
58
56
|
tpl.dup.tap { |ctpl|
|
59
57
|
ctpl.params = params if params
|
data/lib/tzispa/rig/version.rb
CHANGED