Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

hoptoad-ios reports its API version as 2.1. #128

Merged
merged 1 commit into from

2 participants

Bob Lail Nathan Broadbent
Bob Lail

Small change to handle version /2.[0-2]/ of the Hoptoad/Airbrake API and say as much in the message for ApiVersionError.

Bob Lail boblail hoptoad-ios reports its API version as 2.1. Allow
that. Also improve the message for ApiVersionError.
3a04d97
Nathan Broadbent ndbroadbent merged commit b936ce6 into from
Nathan Broadbent
Owner

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 18, 2011
  1. Bob Lail

    hoptoad-ios reports its API version as 2.1. Allow

    boblail authored
    that. Also improve the message for ApiVersionError.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/hoptoad.rb
7 lib/hoptoad.rb
View
@@ -3,7 +3,7 @@
module Hoptoad
class ApiVersionError < StandardError
def initialize
- super "Wrong API Version: Expecting v2.0"
+ super "Wrong API Version: Expecting 2.0, 2.1, or 2.2"
end
end
@@ -17,9 +17,8 @@ def self.parse_xml!(xml)
private
def self.get_version_processor(version)
case version
- when '2.0'; Hoptoad::V2
- when '2.2'; Hoptoad::V2
- else; raise ApiVersionError
+ when /2\.[012]/; Hoptoad::V2
+ else; raise ApiVersionError
end
end
end
Something went wrong with that request. Please try again.