roger 1.6.2 → 1.6.3

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: bc5df3b7198a5c8ae6dca70a00e6a35416fa4056
4
- data.tar.gz: 850c235b8f2426af1772cb02182e749d91557a95
3
+ metadata.gz: 08b47d99903f3d3eead1bac65ee0b5f12d87be52
4
+ data.tar.gz: ac530d446306f7891cae517fe062cef21b4af25a
5
5
  SHA512:
6
- metadata.gz: d4aabffaf1c231cdda88a03a4df296324abf857a9be70ad18273f7a2709ef9e33480e0aa0096bf18b0a377b695eceb629b8d4e1f18c18c57a592981121d95b89
7
- data.tar.gz: 3151091868343c3aaeffa12903b5b331e78b2f7bf941e021c98b6110fa1ff5dd280a0253f0beacc9c15ab468e212907209ffa0cbe48b3fa7f5283f3e5b49c550
6
+ metadata.gz: 25315c6c7e964d202919de443d9d8045379d817737a5cf81b2dcf104ffaffafc128c1b4a183a6d21a03990e1ca7c0ec10586b4c86830ee258c40a381fd151ba3
7
+ data.tar.gz: b40b87fe2d800010d15d23fe2104909f3d3998df83a3c17749faa6cba5f2aa8fd77df16ba154da9bdee38c5671b25d64bd9ce4076012b4a5f56a00b4d264d22e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 1.6.3
4
+ * Fix issue with `render_file` screwing up the current_template nesting stack.
5
+
3
6
  ## Version 1.6.2
4
7
  * Allow for tempalte recursion for up to 10 levels.
5
8
  * Fix issue with missing partials that would screw up the current_template nesting stack.
@@ -154,6 +154,10 @@ module Roger
154
154
  template_nesting.push(template)
155
155
 
156
156
  template.render(options[:locals] || {})
157
+ ensure
158
+ # Only pop the template from the nesting if we actually
159
+ # put it on the nesting stack.
160
+ template_nesting.pop if template
157
161
  end
158
162
 
159
163
  # The current template being rendered
data/lib/roger/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Roger main namespace
2
2
  module Roger
3
- VERSION = "1.6.2"
3
+ VERSION = "1.6.3"
4
4
  end
@@ -42,6 +42,12 @@ module Roger
42
42
  end
43
43
  end
44
44
 
45
+ def test_render_file_pop_nesting
46
+ assert_equal nil, @renderer.current_template
47
+ @renderer.render_file(@base + "html/renderer/file.html.erb")
48
+ assert_equal nil, @renderer.current_template
49
+ end
50
+
45
51
  # Formats
46
52
 
47
53
  def test_render_md
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-09-05 00:00:00.000000000 Z
13
+ date: 2016-10-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor