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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b1464a9fd319fa56702a54567f45ff6a0d00275
4
- data.tar.gz: 969265c272c7eee232fcbfd4c5f224db95419362
3
+ metadata.gz: facbd14f4e528f79d4860a11db426c6b31e748b1
4
+ data.tar.gz: ce92598b9f554bc0f6d6d3aba9e8500aabd15fe6
5
5
  SHA512:
6
- metadata.gz: 2a4391839a2537d75c974374b292c4b952285f8c64ca0312f149d59a5a5e90c177a5a1e0d93fbf382c0b698998cf073007d54f4b47736b510b8b5cc4bb6d61f7
7
- data.tar.gz: c5c030ed0ee930be9ddeadc8ad1613d6011d574041fbac399553ed12c8a2cba61410f8a2ef0c1786bcbff0bfee70875a2efd37aba01dd18d6fa7d14704b9898d
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 form cache
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
@@ -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, parent, params)
35
+ cache_template(name, type, tpl_format, params, parent)
36
36
  else
37
37
  @mutex.synchronize {
38
- cache_template(name, type, tpl_format, parent, params)
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: format, domain: @app.domain, params: params, parent: parent, engine: self).load!.parse!
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, parent, params)
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] = tpl.load!.parse!
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
@@ -3,7 +3,7 @@
3
3
  module Tzispa
4
4
  module Rig
5
5
 
6
- VERSION = '0.3.1'
6
+ VERSION = '0.3.2'
7
7
  GEM_NAME = 'tzispa_rig'
8
8
 
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzispa_rig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Antonio Piñero