gg 0.9.11 → 0.9.12

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.
Files changed (3) hide show
  1. data/lib/gg/core.rb +15 -0
  2. data/lib/gg/version.rb +1 -1
  3. metadata +2 -2
@@ -41,6 +41,10 @@ module Kernel
41
41
  # end
42
42
  end
43
43
 
44
+ def gg_render_error(e)
45
+ e.inspect
46
+ end
47
+
44
48
  end
45
49
 
46
50
  class Object
@@ -62,6 +66,8 @@ class Object
62
66
  )
63
67
  end
64
68
  # Rack::Utils.escape_html( self.inspect )
69
+ rescue => e
70
+ gg_render_error(e)
65
71
  end
66
72
 
67
73
  end
@@ -70,6 +76,8 @@ class Numeric
70
76
 
71
77
  def to_hi_html(history)
72
78
  GG.render('slim/object.slim', object: self, classname: "hi-Numeric")
79
+ rescue => e
80
+ gg_render_error(e)
73
81
  end
74
82
 
75
83
  end
@@ -79,6 +87,8 @@ class String
79
87
  def to_hi_html(history)
80
88
  GG.render('slim/string.slim', self)
81
89
  #Tilt.new( GG.path( 'string.slim' ) ).render( self )
90
+ rescue => e
91
+ gg_render_error(e)
82
92
  end
83
93
 
84
94
  end
@@ -89,6 +99,8 @@ class Array
89
99
  return "...recursive..." if history[self]
90
100
  history[self] = true
91
101
  GG.render('slim/array.slim', object: self, history: history)
102
+ rescue => e
103
+ gg_render_error(e)
92
104
  end
93
105
 
94
106
  end
@@ -99,5 +111,8 @@ class Hash
99
111
  return "...recursive..." if history[self]
100
112
  history[self] = true
101
113
  GG.render('slim/hash.slim', object: self, history: history)
114
+ rescue => e
115
+ gg_render_error(e)
102
116
  end
117
+
103
118
  end
@@ -1,3 +1,3 @@
1
1
  class GG
2
- VERSION = "0.9.11"
2
+ VERSION = "0.9.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.11
4
+ version: 0.9.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-22 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake