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 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
- #!/usr/bin/env ruby
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.11.2'
29
+ VERSION = '0.12.0'
29
30
 
30
31
  # Version-control revision constant
31
- REVISION = %q$Revision: b4d374fa78a0 $
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.11.2
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
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURMRENDQWhTZ0F3SUJB
15
- Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREE4TVF3d0NnWURWUVFEREFOblpX
16
- UXgKRnpBVkJnb0praWFKay9Jc1pBRVpGZ2RmWVdWeWFXVmZNUk13RVFZS0Na
17
- SW1pWlB5TEdRQkdSWURiM0puTUI0WApEVEV3TURreE5qRTBORGcxTVZvWERU
18
- RXhNRGt4TmpFME5EZzFNVm93UERFTU1Bb0dBMVVFQXd3RFoyVmtNUmN3CkZR
19
- WUtDWkltaVpQeUxHUUJHUllIWDJGbGNtbGxYekVUTUJFR0NnbVNKb21UOGl4
20
- a0FSa1dBMjl5WnpDQ0FTSXcKRFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURD
21
- Q0FRb0NnZ0VCQUx5Ly9CRnhDMWYvY1BTbnd0SkJXb0ZpRnJpcgpoN1JpY0kr
22
- am9xL29jVlhRcUk0VERXUHlGLzh0cWt2dCtyRDk5WDlxczJZZVI4Q1UvWWlJ
23
- cExXclFPWVNUNzBKCnZEbjdVdmhiMm11RlZxcTYrdm9iZVRrSUxCRU82cGlv
24
- bldERzhqU2JvM3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0hyMTIyZkdLZWxxZmZ6RVFCaHN6
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.0'
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.0'
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.24
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