Permalink
Browse files

Pluralize resolution for summary.performance

  • Loading branch information...
1 parent 5661218 commit 36ab55779c90396d1661bc696aba6271c18a8665 @duien duien committed Mar 2, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 lib/pingdom-client.rb
  2. +1 −1 lib/pingdom/summary/performance.rb
View
@@ -10,6 +10,7 @@
require 'active_support/core_ext/hash/reverse_merge'
require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/hash/slice'
+require 'active_support/inflector'
require 'pingdom'
require 'pingdom/client'
@@ -23,7 +23,7 @@ class Performance < Base
def self.parse(client, response)
body = super[:summary]
interval = body.keys.detect{ |k| INTERVALS.keys.include?(k.chomp('s').to_s) }.chomp('s').to_sym
- intervals = body[interval]
+ intervals = body[interval.to_s.pluralize]
intervals.map do |perf|
perf[:interval] = interval

0 comments on commit 36ab557

Please sign in to comment.