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 CHANGED
@@ -1 +1 @@
1
- 0.2.4
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-raker}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joel Duffin Justin Ball"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-raker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Duffin Justin Ball