reward_station 0.0.6 → 0.0.7

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.
@@ -128,12 +128,14 @@ module RewardStation
128
128
 
129
129
  result = response[:"#{method_name}_response"][:"#{method_name}_result"]
130
130
 
131
- unless (error_message = result.delete(:error_message).to_s).nil?
131
+ unless (error_message = result.delete(:error_message).to_s).blank?
132
132
  raise(InvalidToken, error_message) if error_message.start_with?("Invalid Token")
133
133
  raise InvalidAccount if error_message.start_with?("Invalid Account Number")
134
134
  raise InvalidUser if error_message.start_with?("Invalid User")
135
135
  raise(UserAlreadyExists, error_message) if error_message.start_with?("User Name:") && error_message.end_with?("Please enter a different user name.")
136
136
  raise MissingInformation if error_message.start_with?("The following information is missing:")
137
+
138
+ raise(UnknownError, error_message)
137
139
  end
138
140
 
139
141
  result
@@ -25,6 +25,7 @@ module RewardStation
25
25
  class InvalidUser < StandardError; end
26
26
  class UserAlreadyExists < StandardError; end
27
27
  class MissingInformation < StandardError; end
28
+ class UnknownError < StandardError; end
28
29
 
29
30
  class ConnectionError < StandardError
30
31
  include NestingError
@@ -1,3 +1,3 @@
1
1
  module RewardStation
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reward_station
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stepan Filatov
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-29 00:00:00 +04:00
19
+ date: 2011-08-01 00:00:00 +04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency