inversion 0.11.2 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +6 -0
- data/lib/inversion/renderstate.rb +3 -0
- data/lib/inversion.rb +4 -3
- data/spec/inversion/renderstate_spec.rb +11 -0
- data.tar.gz.sig +0 -0
- metadata +33 -31
- metadata.gz.sig +0 -0
data/History.rdoc
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
== v0.12.0 [2013-03-01] Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
- Make exceptions rendered as comments include the backtrace if
|
4
|
+
debugging comments are enabled.
|
5
|
+
|
6
|
+
|
1
7
|
== v0.11.2 [2012-09-17] Michael Granger <ged@FaerieMUD.org>
|
2
8
|
|
3
9
|
- [bugfix] Don't cast enumerated values in for tags to Arrays.
|
@@ -374,6 +374,9 @@ class Inversion::RenderState
|
|
374
374
|
when 'comment'
|
375
375
|
self.log.debug " rendering error as a comment"
|
376
376
|
msg = "%s: %s" % [ exception.class.name, exception.message ]
|
377
|
+
if self.options[:debugging_comments]
|
378
|
+
exception.backtrace.each {|line| msg << "\n" << line }
|
379
|
+
end
|
377
380
|
return self.make_comment( msg )
|
378
381
|
|
379
382
|
when 'propagate'
|
data/lib/inversion.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
# -*- ruby -*-
|
2
|
+
#encoding: utf-8
|
2
3
|
# vim: set noet nosta sw=4 ts=4 :
|
3
4
|
|
4
5
|
require 'loggability'
|
@@ -25,10 +26,10 @@ module Inversion
|
|
25
26
|
warn ">>> Inversion requires Ruby 1.9.2 or later. <<<" if RUBY_VERSION < '1.9.2'
|
26
27
|
|
27
28
|
# Library version constant
|
28
|
-
VERSION = '0.
|
29
|
+
VERSION = '0.12.0'
|
29
30
|
|
30
31
|
# Version-control revision constant
|
31
|
-
REVISION = %q$Revision:
|
32
|
+
REVISION = %q$Revision: 9005ff6f9ec4 $
|
32
33
|
|
33
34
|
|
34
35
|
### Get the Inversion version.
|
@@ -267,6 +267,17 @@ describe Inversion::RenderState do
|
|
267
267
|
state.to_s.should == "<!-- NoMethodError: undefined method `klang' for nil:NilClass -->"
|
268
268
|
end
|
269
269
|
|
270
|
+
it "includes a backtrace when rendering errors in 'comment' mode with 'debugging_comments' enabled" do
|
271
|
+
node = Inversion::Template::AttrTag.new( 'boom.klang' )
|
272
|
+
state = Inversion::RenderState.new( {}, :on_render_error => :comment, :debugging_comments => true )
|
273
|
+
|
274
|
+
state << node
|
275
|
+
output = state.to_s
|
276
|
+
|
277
|
+
output.should include( "<!-- NoMethodError: undefined method `klang' for nil:NilClass" )
|
278
|
+
output.should include( "#{__FILE__}:#{__LINE__ - 4}" )
|
279
|
+
end
|
280
|
+
|
270
281
|
it "re-raises errors while rendering appended nodes in 'propagate' mode" do
|
271
282
|
node = Inversion::Template::AttrTag.new( 'boom.klang' )
|
272
283
|
state = Inversion::RenderState.new( {}, :on_render_error => :propagate )
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inversion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,33 +11,35 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain:
|
13
13
|
- !binary |-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
14
|
+
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURiRENDQWxTZ0F3SUJB
|
15
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VZERnUVdCQlNaMGhDVgpxb0hyMTIyZkdLZWxxZmZ6RVFCaHN6
|
31
|
+
QWNCZ05WSFJFRUZUQVRnUkZuWldSQVJtRmxjbWxsVFZWRUxtOXlaekFjCkJn
|
32
|
+
TlZIUklFRlRBVGdSRm5aV1JBUm1GbGNtbGxUVlZFTG05eVp6QU5CZ2txaGtp
|
33
|
+
Rzl3MEJBUVVGQUFPQ0FRRUEKVmxjZnlxNkd3eUU4aTBRdUZQQ2VWT3dKYW5l
|
34
|
+
U3Zjd3gzMTZEQXBqeTkvdHQyWUQySG9tTGJ0cFh0amk1UVhvcgpPTjZvbG40
|
35
|
+
dFdCSUIzS2xicjNzenE1b1IzUmMxRDAyU2FCVGFseFNuZHA0TTZVa1c5aFJG
|
36
|
+
dTVqbjk4cERCNGZxCjVsOHdNTVUwWGRtcXgxVll2eXNWQWpWRlZDL1c0Tk52
|
37
|
+
bG1nKzJtRWdTVlpQNUs2VGM5cURoM2VNUUlub1l3NmgKdDFZQTZSc1VKSHA1
|
38
|
+
dkdReWhQMXgzNFlwTEFhbHk4aWNibnMvOFBxT2Y3T3NuOXp0bWc4Yk9NSkNl
|
39
|
+
YjMyZVFMago2bUtDd2pwZWd5dEUwb2lmWGZGOGs3NUE5MTA1Y0JuTmlNWk9l
|
40
|
+
MXRYaXFZYy9leENnV3ZiZ2d1cnpET2NSa1p1Ci9ZU3VzYWlEWEhLVTJPM0Fr
|
41
|
+
YzNodEE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
42
|
+
date: 2013-03-01 00:00:00.000000000 Z
|
41
43
|
dependencies:
|
42
44
|
- !ruby/object:Gem::Dependency
|
43
45
|
name: loggability
|
@@ -270,7 +272,7 @@ dependencies:
|
|
270
272
|
requirements:
|
271
273
|
- - ~>
|
272
274
|
- !ruby/object:Gem::Version
|
273
|
-
version: '3.
|
275
|
+
version: '3.5'
|
274
276
|
type: :development
|
275
277
|
prerelease: false
|
276
278
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -278,7 +280,7 @@ dependencies:
|
|
278
280
|
requirements:
|
279
281
|
- - ~>
|
280
282
|
- !ruby/object:Gem::Version
|
281
|
-
version: '3.
|
283
|
+
version: '3.5'
|
282
284
|
description: ! 'Inversion is a templating system for Ruby. It uses the "Inversion
|
283
285
|
of Control"
|
284
286
|
|
@@ -404,7 +406,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
404
406
|
version: '0'
|
405
407
|
requirements: []
|
406
408
|
rubyforge_project: inversion
|
407
|
-
rubygems_version: 1.8.
|
409
|
+
rubygems_version: 1.8.25
|
408
410
|
signing_key:
|
409
411
|
specification_version: 3
|
410
412
|
summary: Inversion is a templating system for Ruby
|
metadata.gz.sig
CHANGED
Binary file
|