decibel_wrapper 0.0.2 → 0.0.3
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.
- checksums.yaml +8 -8
- data/lib/decibel_wrapper/version.rb +1 -1
- data/lib/wrapper/resources/album.rb +9 -1
- data/lib/wrapper/wrapper.rb +4 -4
- data/spec/wrapper/album_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmIzMTYxNDMzOGNiYmU4MzAzODUxMmE2ZTczNzBhZDkzNWFhZTMyYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTJiNDhlZjk2MWVkMGU5MmRiN2FmMzM3NTRjZWQyMzYwOTIxNWI3ZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTViYWZkZmY1YzA3ZDQ4YjkzMTUzYjY5ZDgwMjE0NTUwNTRjNWVmZWY0MDY3
|
10
|
+
NjJjYmRiZWYyZjg5N2QwYmM0Njc5NzI5NzA1NTE0YjgxZmM0OTE1NThhOTVj
|
11
|
+
NGI1ZTM2MjBjYTUxNDJmNWVmNzQ5NDhiNWU0ODY4MjJkNDVmNTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjhmNzMyN2NhZmZiNzZkNzhjMGIyODQwOWMxOWU0MjU3MDQ2MmNkZDc3ODli
|
14
|
+
NjRkZjcwNDVlOGU4Yzk3YmZkYTExOTRlYWQ5MmY2NGY2ODlhYjM5YmJhYzUz
|
15
|
+
ZmIwMTA4NzFmZjk0Zjc1ZDhiM2UxZmU1NmZkMDcxNzY2ZDUwZDY=
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Decibel::Album
|
2
2
|
|
3
|
-
attr_accessor :Title, :FeaturedArtistString, :IsUnofficial, :Identifiers, :Genres
|
3
|
+
attr_accessor :Title, :FeaturedArtistString, :IsUnofficial, :Identifiers, :Genres, :Tracks
|
4
4
|
|
5
5
|
def initialize args
|
6
6
|
args.each do |k, v|
|
@@ -29,5 +29,13 @@ class Decibel::Album
|
|
29
29
|
end
|
30
30
|
self.Genres = array
|
31
31
|
end
|
32
|
+
|
33
|
+
def tracks_initialize
|
34
|
+
array = []
|
35
|
+
self.Tracks.each do |i|
|
36
|
+
array << Decibel::Recording.new(i)
|
37
|
+
end
|
38
|
+
self.Genres = array
|
39
|
+
end
|
32
40
|
|
33
41
|
end
|
data/lib/wrapper/wrapper.rb
CHANGED
@@ -26,7 +26,7 @@ class Decibel::Wrapper
|
|
26
26
|
if !response.nil?
|
27
27
|
array = []
|
28
28
|
response.each do |a|
|
29
|
-
array << Decibel::Album.new(
|
29
|
+
array << Decibel::Album.new(a)
|
30
30
|
end
|
31
31
|
array
|
32
32
|
end
|
@@ -59,7 +59,7 @@ class Decibel::Wrapper
|
|
59
59
|
if !response.nil?
|
60
60
|
array = []
|
61
61
|
response.each do |a|
|
62
|
-
array << Decibel::Participant.new(
|
62
|
+
array << Decibel::Participant.new(a)
|
63
63
|
end
|
64
64
|
array
|
65
65
|
end
|
@@ -75,7 +75,7 @@ class Decibel::Wrapper
|
|
75
75
|
if !response.nil?
|
76
76
|
array = []
|
77
77
|
response.each do |a|
|
78
|
-
array << Decibel::Recording.new(
|
78
|
+
array << Decibel::Recording.new(a)
|
79
79
|
end
|
80
80
|
array
|
81
81
|
end
|
@@ -95,7 +95,7 @@ class Decibel::Wrapper
|
|
95
95
|
if !response.nil?
|
96
96
|
array = []
|
97
97
|
response.each do |a|
|
98
|
-
array << Decibel::Work.new(
|
98
|
+
array << Decibel::Work.new(a)
|
99
99
|
end
|
100
100
|
array
|
101
101
|
end
|
data/spec/wrapper/album_spec.rb
CHANGED
@@ -11,6 +11,8 @@ describe Decibel::Album do
|
|
11
11
|
it { should respond_to(:FeaturedArtistString) }
|
12
12
|
it { should respond_to(:IsUnofficial) }
|
13
13
|
it { should respond_to(:Identifiers) }
|
14
|
+
it { should respond_to(:Genres) }
|
15
|
+
it { should respond_to(:Tracks) }
|
14
16
|
|
15
17
|
describe "identifiers_initialize" do
|
16
18
|
before { album.identifiers_initialize }
|
@@ -31,5 +33,9 @@ describe Decibel::Album do
|
|
31
33
|
album.Genres[0].should be_an_instance_of Decibel::Genre
|
32
34
|
end
|
33
35
|
end
|
36
|
+
|
37
|
+
describe "tracks_initialize" do
|
38
|
+
|
39
|
+
end
|
34
40
|
|
35
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decibel_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tomallen400
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|