songdrop 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/songdrop/client.rb +2 -0
- data/lib/songdrop/parser.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1d26b0298ab987e8c13dcedc093a362952556c8
|
4
|
+
data.tar.gz: 4962b9cac1f1795c9cd4b02ddaccc3eaa280e7c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38b0930b2acbbb230ab3677b3c78004b7b3e60f9330a133cf3f06de2e2da8481aedcbe7e57db11cac83a175d522067fee912977a5939497fb21c85412e4fbf83
|
7
|
+
data.tar.gz: 5a54528f834d61f0c507400184c17537fe0db7aa5e26e251b81b43f649a60f7aa794090675b3a8015bff0bbb2fb3b2fa8a86bfae89fed46818f554efb87bfa97
|
data/lib/songdrop/client.rb
CHANGED
@@ -47,12 +47,14 @@ module Songdrop
|
|
47
47
|
|
48
48
|
def handle_response(response, error, &block)
|
49
49
|
target = response || error
|
50
|
+
res = nil
|
50
51
|
JSON.parse(target) do |obj|
|
51
52
|
res = Parser.parse(obj)
|
52
53
|
res = res.first if res.is_a? Array and res.size == 1
|
53
54
|
block.call res if block
|
54
55
|
res
|
55
56
|
end
|
57
|
+
res
|
56
58
|
end
|
57
59
|
|
58
60
|
end
|
data/lib/songdrop/parser.rb
CHANGED
@@ -38,7 +38,7 @@ module Songdrop
|
|
38
38
|
# puts "[Songdrop::Parser] parsing array #{property}"
|
39
39
|
objects = []
|
40
40
|
hash[property].each do |el|
|
41
|
-
objects << parse_object(el)
|
41
|
+
objects << objectize(el['object'], parse_object(el))
|
42
42
|
end
|
43
43
|
properties[property.to_sym] = objects
|
44
44
|
elsif hash[property].is_a? Hash
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: songdrop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: songdrop is a Ruby & RubyMotion client for the Songdrop.com API.
|
14
14
|
email: moomerman@gmail.com
|
@@ -34,7 +34,7 @@ files:
|
|
34
34
|
- lib/songdrop/objects/mix.rb
|
35
35
|
- lib/songdrop/objects/song.rb
|
36
36
|
- lib/songdrop/objects/user.rb
|
37
|
-
homepage: https://
|
37
|
+
homepage: https://github.com/moomerman/songdrop_ruby
|
38
38
|
licenses:
|
39
39
|
- MIT
|
40
40
|
metadata: {}
|