dropbox-api 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -1
- data/dropbox-api.gemspec +1 -1
- data/lib/dropbox-api/connection/requests.rb +3 -3
- data/lib/dropbox-api/version.rb +1 -1
- data/lib/dropbox-api.rb +1 -1
- data/spec/spec_helper.rb +4 -0
- metadata +2 -2
data/Gemfile
CHANGED
data/dropbox-api.gemspec
CHANGED
@@ -13,19 +13,19 @@ module Dropbox
|
|
13
13
|
when 401
|
14
14
|
raise Dropbox::API::Error::Unauthorized
|
15
15
|
when 403
|
16
|
-
parsed =
|
16
|
+
parsed = MultiJson.decode(response.body)
|
17
17
|
raise Dropbox::API::Error::Forbidden.new(parsed["error"])
|
18
18
|
when 404
|
19
19
|
raise Dropbox::API::Error::NotFound
|
20
20
|
when 400, 406
|
21
|
-
parsed =
|
21
|
+
parsed = MultiJson.decode(response.body)
|
22
22
|
raise Dropbox::API::Error.new(parsed["error"])
|
23
23
|
when 300..399
|
24
24
|
raise Dropbox::API::Error::Redirect
|
25
25
|
when 500..599
|
26
26
|
raise Dropbox::API::Error
|
27
27
|
else
|
28
|
-
options[:raw] ? response.body :
|
28
|
+
options[:raw] ? response.body : MultiJson.decode(response.body)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
data/lib/dropbox-api/version.rb
CHANGED
data/lib/dropbox-api.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropbox-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ cert_chain: []
|
|
12
12
|
date: 2012-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: multi_json
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|