curly-templates 0.10.1 → 0.10.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.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ### Unreleased
2
2
 
3
+ ### Curly 0.10.2 (July 11, 2013)
4
+
5
+ * Fix a bug that caused non-string presenter method return values to be
6
+ discarded.
7
+
8
+ *Daniel Schierbeck*
9
+
3
10
  ### Curly 0.10.1 (July 11, 2013)
4
11
 
5
12
  * Fix a bug in the compiler that caused some templates to be erroneously HTML
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'curly-templates'
7
- s.version = '0.10.1'
7
+ s.version = '0.10.2'
8
8
  s.date = '2013-07-11'
9
9
 
10
10
  s.summary = "Free your views!"
data/lib/curly.rb CHANGED
@@ -26,7 +26,7 @@
26
26
  # See Curly::Presenter for more information on presenters.
27
27
  #
28
28
  module Curly
29
- VERSION = "0.10.1"
29
+ VERSION = "0.10.2"
30
30
 
31
31
  # Compiles a Curly template to Ruby code.
32
32
  #
@@ -78,7 +78,7 @@ module Curly
78
78
  RUBY
79
79
  end
80
80
 
81
- 'buffer.concat(%s)' % code.strip
81
+ 'buffer.concat(%s.to_s)' % code.strip
82
82
  end
83
83
 
84
84
  def compile_text(text)
@@ -99,6 +99,11 @@ describe Curly::Compiler do
99
99
  evaluate("<div>").should == "<div>"
100
100
  end
101
101
 
102
+ it "treats all values returned from the presenter as strings" do
103
+ presenter.stub(:foo) { 42 }
104
+ evaluate("{{foo}}").should == "42"
105
+ end
106
+
102
107
  it "removes comments from the output" do
103
108
  evaluate("HELO{{! I'm a comment, yo }}WORLD").should == "HELOWORLD"
104
109
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curly-templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -150,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  segments:
152
152
  - 0
153
- hash: 658747487634727033
153
+ hash: -1930897478710122249
154
154
  required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  none: false
156
156
  requirements: