songdrop 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/songdrop.rb +1 -0
- data/lib/songdrop/client.rb +1 -1
- data/lib/songdrop/client/methods.rb +1 -1
- data/lib/songdrop/http/bubblewrap.rb +2 -7
- data/lib/songdrop/json/bubblewrap.rb +4 -2
- data/lib/songdrop/json/json.rb +3 -1
- data/lib/songdrop/parser.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1635e165e3d9d321d7c04590e52d06ad9786fb
|
4
|
+
data.tar.gz: a2254f352f6d67f51a6f21d0b97ad466a8d28af6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fdf8914e9901929622dc9a41986f74e1ab9421dd0f7ff11c17abfe3a185e5d68bcc3b686575d9c39d2d89ee19cdd68087044ddf3e574c7b3ff58eae87a106d9
|
7
|
+
data.tar.gz: 73ab81fcc7f07d05bddbb28617280296d353b20b757e2ca3b9c6f4951013d37c67f0822805d1438c1510f52dd4b597bac7ddb2bac52e32cebe9084820dadade4
|
data/lib/songdrop.rb
CHANGED
@@ -24,6 +24,7 @@ else
|
|
24
24
|
require_relative './songdrop/objects/song'
|
25
25
|
require_relative './songdrop/objects/mix'
|
26
26
|
require_relative './songdrop/objects/artist'
|
27
|
+
require_relative './songdrop/objects/error'
|
27
28
|
require_relative './songdrop/http/rest-client'
|
28
29
|
require_relative './songdrop/json/json'
|
29
30
|
end
|
data/lib/songdrop/client.rb
CHANGED
@@ -25,14 +25,9 @@ module Songdrop
|
|
25
25
|
|
26
26
|
BubbleWrap::HTTP.send(method, url, bw_options) do |response|
|
27
27
|
if response.ok?
|
28
|
-
|
29
|
-
json = BubbleWrap::JSON.parse(response.body.to_str)
|
30
|
-
block.call response, json
|
31
|
-
rescue
|
32
|
-
block.call response, nil
|
33
|
-
end
|
28
|
+
block.call response.body.to_str, nil
|
34
29
|
else
|
35
|
-
block.call
|
30
|
+
block.call nil, response.body.to_str
|
36
31
|
end
|
37
32
|
end
|
38
33
|
end
|
data/lib/songdrop/json/json.rb
CHANGED
data/lib/songdrop/parser.rb
CHANGED