rack-insight 0.5.19 → 0.5.20

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  == HEAD
2
2
 
3
+ == 0.5.20 / 2012-09-13 - Peter Boling
4
+
5
+ * Bug Fixes
6
+
7
+ * Fix panel error handling (pboling - Peter Boling)
8
+
3
9
  == 0.5.19 / 2012-09-13 - Peter Boling
4
10
 
5
11
  * Other
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-insight (0.5.17)
4
+ rack-insight (0.5.19)
5
5
  rack
6
6
  sqlite3 (>= 1.3.3)
7
7
  uuidtools (>= 2.1.2)
@@ -147,9 +147,9 @@ module Rack::Insight
147
147
  end
148
148
  end
149
149
 
150
- #def inspect
151
- # "M:#{self.bool_prop(:is_magic?)} T:#{self.bool_prop(:has_table?)} P:#{self.bool_prop(:is_probing?)} C:#{self.bool_prop(:has_custom_probes?)} Name: #{name}"
152
- #end
150
+ def inspect
151
+ "#{self.underscored_name} Magic:#{self.bool_prop(:is_magic?)} Table:#{self.bool_prop(:has_table?)} Probe:#{self.bool_prop(:is_probing?)} Custom:#{self.bool_prop(:has_custom_probes?)}" rescue "XXX inspect failed"
152
+ end
153
153
 
154
154
  def bool_prop(prop)
155
155
  self.send(prop) ? 'Y' : 'N'
@@ -234,13 +234,21 @@ module Rack::Insight
234
234
  heading
235
235
  else
236
236
  num = count(number)
237
- if num == 0
238
- heading
237
+ if num.kind_of?(Numeric)
238
+ if num == 0
239
+ heading
240
+ else
241
+ "#{self.camelized_name} (#{num})"
242
+ end
239
243
  else
240
- "#{self.camelized_name} (#{num})"
244
+ heading
241
245
  end
242
246
  end
243
- rescue 'XXX' # no panel should need this
247
+ rescue Object => ex
248
+ nom = self.name rescue "xxx"
249
+ "Err3: #{nom}
250
+ Panel: #{self.inspect}
251
+ #{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
244
252
  end
245
253
 
246
254
  def content_for_request(number)
@@ -260,16 +268,30 @@ module Rack::Insight
260
268
  else
261
269
  content
262
270
  end
263
- rescue 'XXX' #XXX: no panel should need this
271
+ rescue Object => ex
272
+ nom = self.name rescue "xxx"
273
+ "Err4: #{nom}
274
+ Panel: #{self.inspect}
275
+ #{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
264
276
  end
265
277
 
266
278
  def heading
267
279
  self.camelized_name
280
+ rescue Object => ex
281
+ nom = self.name rescue "xxx"
282
+ "Err1: #{nom}
283
+ Panel: #{self.inspect}
284
+ #{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
268
285
  end
269
286
 
270
287
  def content
271
288
  logger.info("Rack::Insight is using default content for #{self.class}") if verbose(:med)
272
289
  render_template 'no_content', :name => self.camelized_name
290
+ rescue Object => ex
291
+ nom = self.name rescue "xxx"
292
+ "Err2: #{nom}
293
+ Panel: #{self.inspect}
294
+ #{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
273
295
  end
274
296
 
275
297
  # Override in subclasses.
@@ -1,7 +1,7 @@
1
1
  module Rack
2
2
  module Insight
3
3
 
4
- VERSION = '0.5.19'
4
+ VERSION = '0.5.20'
5
5
 
6
6
  end
7
7
  end
@@ -13,7 +13,8 @@
13
13
  </a>
14
14
  <% end %>
15
15
  <% rescue Object => ex %>
16
- Err: <%= panel.name rescue "xxx" %>
16
+ Err5: <%= panel.name rescue "xxx" %>
17
+ <!-- Panel: <%= panel.inspect %> -->
17
18
  <!-- <%= ([ex.class.name, ex.message] + ex.backtrace).join("\n") %> -->
18
19
  <% end %>
19
20
  </li>
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.19
4
+ version: 0.5.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: