muck-raker 0.2.4 → 0.2.5
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/VERSION +1 -1
- data/app/models/amazon.rb +2 -0
- data/app/models/amazon_request.rb +2 -2
- data/muck-raker.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/app/models/amazon.rb
CHANGED
@@ -27,6 +27,8 @@ class Amazon
|
|
27
27
|
:us => 'http://xml-us.amznxslt.com/onca/xml'
|
28
28
|
}
|
29
29
|
|
30
|
+
class AmazonResultError < StandardError; end
|
31
|
+
|
30
32
|
# Sign an amazon query
|
31
33
|
# Requires openssl and that GlobalConfig.amazon_secret_access_key be defined.
|
32
34
|
# Based on ruby-aaws and documentation here
|
@@ -71,9 +71,9 @@ class AmazonRequest
|
|
71
71
|
result.each_pair do |key, value|
|
72
72
|
if key == 'Errors'
|
73
73
|
if value['Error'].is_a?(Array)
|
74
|
-
raise value['Error'].collect{|error| error['Message']}.join(' ')
|
74
|
+
raise Amazon::AmazonResultError, value['Error'].collect{|error| error['Message']}.join(' ')
|
75
75
|
else
|
76
|
-
raise value['Error']['Message']
|
76
|
+
raise Amazon::AmazonResultError, value['Error']['Message']
|
77
77
|
end
|
78
78
|
elsif value.is_a?(Hash)
|
79
79
|
check_errors(value)
|
data/muck-raker.gemspec
CHANGED