zipmark 0.0.1.beta.3 → 0.0.1.beta.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -85,8 +85,13 @@ module Zipmark
85
85
  private
86
86
  def load_resources
87
87
  hash = {}
88
- response = JSON.parse(get("/").body)
89
- response["vendor_root"]["links"].each {|link| hash[link["rel"]] = Resource.new({ :client => self }.merge(link)) }
88
+ response = get("/")
89
+ object = JSON.parse(response.body)
90
+ if successful?(response)
91
+ object["vendor_root"]["links"].each {|link| hash[link["rel"]] = Resource.new({ :client => self }.merge(link)) }
92
+ else
93
+ raise Zipmark::Error.new(object)
94
+ end
90
95
  hash
91
96
  end
92
97
  end
@@ -1,3 +1,3 @@
1
1
  module Zipmark
2
- VERSION = '0.0.1.beta.3'
2
+ VERSION = '0.0.1.beta.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta.3
4
+ version: 0.0.1.beta.5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-22 00:00:00.000000000 Z
12
+ date: 2012-11-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Simple Client Library to connect to the Zipmark API
15
15
  email: jake@zipmark.com
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  version: 1.3.1
58
58
  requirements: []
59
59
  rubyforge_project:
60
- rubygems_version: 1.8.15
60
+ rubygems_version: 1.8.24
61
61
  signing_key:
62
62
  specification_version: 3
63
63
  summary: Zipmark API Client Library