rack-insight 0.5.20 → 0.5.21

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,10 @@
1
1
  == HEAD
2
2
 
3
+ == 0.5.21 / 2012-09-13 - Peter Boling
4
+
5
+ * Attempting to handle values that get stored in the sqlite db, but which can't be re-marshalled, without failing the entire panel
6
+ * Much nicer error handling output in panel heading and panel content areas
7
+
3
8
  == 0.5.20 / 2012-09-13 - Peter Boling
4
9
 
5
10
  * Bug Fixes
@@ -190,7 +190,7 @@ module Rack::Insight
190
190
  end
191
191
 
192
192
  def decode_value(value)
193
- YAML.load(Base64.decode64(value))
193
+ YAML.load(Base64.decode64(value)) rescue "Unable to decode"
194
194
  end
195
195
 
196
196
  def retrieve(key_sql)
@@ -246,9 +246,11 @@ module Rack::Insight
246
246
  end
247
247
  rescue Object => ex
248
248
  nom = self.name rescue "xxx"
249
- "Err3: #{nom}
250
- Panel: #{self.inspect}
251
- #{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
249
+ msg = ["Failed to create heading_for_request for #{nom}","#{ex.class}: #{ex.message}"] + ex.backtrace
250
+ logger.error(msg.join("\n"))
251
+ "Err3: #{nom}
252
+ <!-- Panel: #{self.inspect}\n
253
+ #{msg.join("\n")} -->"
252
254
  end
253
255
 
254
256
  def content_for_request(number)
@@ -270,18 +272,22 @@ module Rack::Insight
270
272
  end
271
273
  rescue Object => ex
272
274
  nom = self.name rescue "xxx"
273
- "Err4: #{nom}
274
- Panel: #{self.inspect}
275
- #{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
275
+ msg = ["Failed to create content_for_request for #{nom}","#{ex.class}: #{ex.message}"] + ex.backtrace
276
+ logger.error(msg.join("\n"))
277
+ "Err4: #{nom}
278
+ <!-- Panel: #{self.inspect}\n
279
+ #{msg.join("\n")} -->"
276
280
  end
277
281
 
278
282
  def heading
279
283
  self.camelized_name
280
284
  rescue Object => ex
281
285
  nom = self.name rescue "xxx"
282
- "Err1: #{nom}
283
- Panel: #{self.inspect}
284
- #{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
286
+ msg = ["Failed to create heading for #{nom}","#{ex.class}: #{ex.message}"] + ex.backtrace
287
+ logger.error(msg.join("\n"))
288
+ "Err1: #{nom}
289
+ <!-- Panel: #{self.inspect}\n
290
+ #{msg.join("\n")} -->"
285
291
  end
286
292
 
287
293
  def content
@@ -289,9 +295,11 @@ module Rack::Insight
289
295
  render_template 'no_content', :name => self.camelized_name
290
296
  rescue Object => ex
291
297
  nom = self.name rescue "xxx"
292
- "Err2: #{nom}
293
- Panel: #{self.inspect}
294
- #{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
298
+ msg = ["Failed to create content for #{nom}","#{ex.class}: #{ex.message}"] + ex.backtrace
299
+ logger.error(msg.join("\n"))
300
+ "Err2: #{nom}
301
+ <!-- Panel: #{self.inspect}\n
302
+ #{msg.join("\n")} -->"
295
303
  end
296
304
 
297
305
  # Override in subclasses.
@@ -1,7 +1,7 @@
1
1
  module Rack
2
2
  module Insight
3
3
 
4
- VERSION = '0.5.20'
4
+ VERSION = '0.5.21'
5
5
 
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-insight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.20
4
+ version: 0.5.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: