songdrop 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/songdrop/objects/base.rb +4 -0
- data/lib/songdrop/objects/error.rb +8 -0
- data/lib/songdrop/parser.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9b48a38939efcce74f8b435291db6842e061cc8
|
4
|
+
data.tar.gz: 87b9897d37769ee9c13323f81420a6e329cbcdaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34bdfc40f9ef92ff0f1d8fb6218d5229da5467ffe16dc0e75e9f9e28e11de4f8e8b3f2d562b93fe9ed0553bf5a0d3d6980d8fe4a66deac33ddecf19550ccded5
|
7
|
+
data.tar.gz: 0dd1b1e35f3ccd57bc347a777dd7a8e5bc226a137d1c49b46b6c0a4f06b384e0638098f2cea104d42c3e0b1e578a9c352bda9c2a60791b36c81fe8d882394ae8
|
data/lib/songdrop/parser.rb
CHANGED
@@ -43,14 +43,14 @@ module Songdrop
|
|
43
43
|
|
44
44
|
hash.keys.each do |property|
|
45
45
|
# puts "[Songdrop::Parser] #{property} is a #{property.class}"
|
46
|
-
if hash[property].is_a?
|
46
|
+
if hash[property].is_a?(Array)
|
47
47
|
# puts "[Songdrop::Parser] parsing array #{property}"
|
48
48
|
objects = []
|
49
49
|
hash[property].each do |el|
|
50
50
|
objects << objectize(el['object'], parse_object(el))
|
51
51
|
end
|
52
52
|
properties[property.to_sym] = objects
|
53
|
-
elsif hash[property].is_a?
|
53
|
+
elsif hash[property].is_a?(Hash) and hash[property]['object']
|
54
54
|
# puts "[Songdrop::Parser] parsing hash #{property} of type #{hash[property]['object']}"
|
55
55
|
object = objectize(hash[property]['object'], parse_object(hash[property]))
|
56
56
|
properties[property.to_sym] = object
|
@@ -70,6 +70,7 @@ module Songdrop
|
|
70
70
|
when :mix then Mix.new(properties)
|
71
71
|
when :artist then Artist.new(properties)
|
72
72
|
when :error then Error.new(properties)
|
73
|
+
when :errors then Errors.new(properties)
|
73
74
|
else "[Songdrop::Parser] Don't know how to objectize #{type}"
|
74
75
|
end
|
75
76
|
end
|
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.8
|
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-21 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
|