audiosocket 0.3.0 → 0.3.1
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/.gitignore +1 -0
- data/audiosocket.gemspec +1 -1
- data/lib/audiosocket/client.rb +7 -5
- metadata +5 -5
data/.gitignore
CHANGED
data/audiosocket.gemspec
CHANGED
data/lib/audiosocket/client.rb
CHANGED
@@ -40,9 +40,11 @@ module Audiosocket
|
|
40
40
|
def handle res
|
41
41
|
case res.status
|
42
42
|
when 200..299, 422 then JSON.parse res.body
|
43
|
-
when
|
44
|
-
when
|
45
|
-
|
43
|
+
when 401, 403 then raise Audiosocket::Unauthorized
|
44
|
+
when 404 then nil
|
45
|
+
|
46
|
+
else
|
47
|
+
raise "Unexpected response (#{res.status}) from the API:\n#{res.body}"
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
@@ -54,8 +56,8 @@ module Audiosocket
|
|
54
56
|
|
55
57
|
# Send a PUT to the API, handling the response.
|
56
58
|
|
57
|
-
def put *args
|
58
|
-
handle @conn.put *args
|
59
|
+
def put *args
|
60
|
+
handle @conn.put *args
|
59
61
|
end
|
60
62
|
|
61
63
|
def to_s
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: audiosocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-01-11 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
|
-
requirement: &
|
16
|
+
requirement: &70358170796420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0.7'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70358170796420
|
25
25
|
description: An authentication client for the Audiosocket API.
|
26
26
|
email:
|
27
27
|
- tech@audiosocket.com
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
59
|
rubyforge_project:
|
60
|
-
rubygems_version: 1.8.
|
60
|
+
rubygems_version: 1.8.10
|
61
61
|
signing_key:
|
62
62
|
specification_version: 3
|
63
63
|
summary: Helps authenticate users and generate Audiosocket API tokens.
|