netdnarws 0.0.1 → 0.1.0
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/README.md +1 -1
- data/VERSION +1 -1
- data/lib/netdnarws/version.rb +1 -1
- data/lib/netdnarws.rb +2 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -17,7 +17,7 @@ It has support for GET, POST, PUT and DELETE ouath signed requests.
|
|
17
17
|
|
18
18
|
Every request can take an optional debug parameter.
|
19
19
|
```ruby
|
20
|
-
api.get("/account.json", debug
|
20
|
+
api.get("/account.json", :debug => true)
|
21
21
|
# Will output
|
22
22
|
# Making GET request to http://rws.netdna.com/myalias/account.json
|
23
23
|
#{... API Returned Stuff ...}
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/lib/netdnarws/version.rb
CHANGED
data/lib/netdnarws.rb
CHANGED
@@ -30,7 +30,8 @@ module NetDNARWS
|
|
30
30
|
response = @client.request method, _get_url(uri), nil, options, attributes
|
31
31
|
begin
|
32
32
|
response_json = JSON.parse(response.body)
|
33
|
-
if response.code
|
33
|
+
if not ((100..399).map { |e| e.to_s }).include? response.code
|
34
|
+
puts response.code
|
34
35
|
error_message = response_json['error']['message']
|
35
36
|
raise Exception.new("#{response.code}: #{error_message}")
|
36
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netdnarws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
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-07-
|
12
|
+
date: 2012-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth
|