decibel_wrapper 0.0.6 → 0.0.7
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/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/decibel_wrapper/version.rb +1 -1
- data/lib/wrapper/.DS_Store +0 -0
- data/lib/wrapper/resources/artist.rb +11 -0
- data/lib/wrapper/resources/{recording_participation.rb → participation.rb} +12 -3
- data/lib/wrapper/resources/recording.rb +10 -1
- data/spec/.DS_Store +0 -0
- data/spec/wrapper/{recording_participation_spec.rb → participation_spec.rb} +6 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjY5ZjE1MjFlNWMxZjQwMDdiYzBlZjIxNzM5MGU5MzE3ZGY1YmU2NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGQ0OWFkMTc4Y2JhMjQzNjJmNDE3NGNlYmNlOWU0YjcwYmQ5Njc3OQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTA3OTRmNmQ1MTJjMDI4YWJmNzcxZDk0YWVjMjc3MTQ5MDQ5ZDBmNTQ3Y2E2
|
10
|
+
NDA1NWFlNDNhNGVhMGQzOTA0ODkzZmJmOTRhZmJjNmQyNmU5NWMxMjBhYzQ2
|
11
|
+
Mjg0Njc1MzdhNjNlODUzNjFkZmE4M2MzNjVkZGYzMjliNDYyNjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWYxYWZhM2ViMDJmNzIxZDNjMGU5YzRhZTIyN2IxYjQyNGMxNWZkYjUwMTkx
|
14
|
+
MDExNmY3M2Y5YmJmYzkxZThlNDg2MmMwNmUzOTk4MGU5NzgzYTg0NTVlODNj
|
15
|
+
MTY0ZTZmY2JlYjNhMWU0Y2YxMDA4NDZlMDc0MmU1ZjhkZjYzNGE=
|
data/.DS_Store
CHANGED
Binary file
|
data/lib/.DS_Store
CHANGED
Binary file
|
data/lib/wrapper/.DS_Store
CHANGED
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Decibel::Participation
|
2
2
|
|
3
|
-
attr_accessor :LiteralMainIdentities, :MainIdentities, :LiteralActivity, :Activities
|
3
|
+
attr_accessor :LiteralMainIdentities, :MainIdentities, :LiteralActivity, :Activities, :LiteralArtists, :Artists
|
4
4
|
|
5
5
|
def initialize args
|
6
6
|
args.each do |k, v|
|
@@ -10,8 +10,9 @@ class Decibel::Participation
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def child_initializers
|
13
|
-
self.main_identities_initialize
|
14
|
-
self.
|
13
|
+
self.main_identities_initialize if self.MainIdentities
|
14
|
+
self.artists_initialize if self.Artists
|
15
|
+
self.activities_initialize if self.Activities
|
15
16
|
end
|
16
17
|
|
17
18
|
def main_identities_initialize
|
@@ -30,4 +31,12 @@ class Decibel::Participation
|
|
30
31
|
self.Activities = array
|
31
32
|
end
|
32
33
|
|
34
|
+
def artists_initialize
|
35
|
+
array = []
|
36
|
+
self.Artists.each do |a|
|
37
|
+
array << Decibel::Artist.new(a)
|
38
|
+
end
|
39
|
+
self.Artists = array
|
40
|
+
end
|
41
|
+
|
33
42
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Decibel::Recording
|
2
2
|
|
3
|
-
attr_accessor :Id, :AlbumSequence, :Title, :FeaturedArtistString, :Duration, :FeaturedArtists, :Genres, :Participations, :Authors
|
3
|
+
attr_accessor :Id, :AlbumSequence, :Title, :Artists, :FeaturedArtistString, :Duration, :FeaturedArtists, :Genres, :Participations, :Authors
|
4
4
|
|
5
5
|
def initialize args
|
6
6
|
args.each do |k, v|
|
@@ -14,6 +14,7 @@ class Decibel::Recording
|
|
14
14
|
self.genres_initialize if self.Genres
|
15
15
|
self.participations_initialize if self.Participations
|
16
16
|
self.authors_initialize if self.Authors
|
17
|
+
self.artists_initialize if self.Artists
|
17
18
|
end
|
18
19
|
|
19
20
|
def featured_artists_initialize
|
@@ -48,6 +49,14 @@ class Decibel::Recording
|
|
48
49
|
self.Authors = array
|
49
50
|
end
|
50
51
|
|
52
|
+
def artists_initialize
|
53
|
+
array = []
|
54
|
+
self.Artists.each do |a|
|
55
|
+
array << Decibel::Artist.new(a)
|
56
|
+
end
|
57
|
+
self.Artists = array
|
58
|
+
end
|
59
|
+
|
51
60
|
# Needs looking at for refactoring
|
52
61
|
def child_initializer(object, child_object)
|
53
62
|
array = []
|
data/spec/.DS_Store
CHANGED
Binary file
|
@@ -23,5 +23,11 @@ describe Decibel::Participation do
|
|
23
23
|
it "should set Activities to an array of Decibel::Activity s" do
|
24
24
|
participation.Activities[0].should be_an_instance_of Decibel::Activity
|
25
25
|
end
|
26
|
+
it "should set Activities to an array" do
|
27
|
+
participation.Artists.should be_an_instance_of Array
|
28
|
+
end
|
29
|
+
it "should set Activities to an array of Decibel::Activity s" do
|
30
|
+
participation.Artists[0].should be_an_instance_of Decibel::Activity
|
31
|
+
end
|
26
32
|
|
27
33
|
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.7
|
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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,13 +74,14 @@ files:
|
|
74
74
|
- lib/wrapper/.DS_Store
|
75
75
|
- lib/wrapper/resources/activity.rb
|
76
76
|
- lib/wrapper/resources/album.rb
|
77
|
+
- lib/wrapper/resources/artist.rb
|
77
78
|
- lib/wrapper/resources/featured_artist.rb
|
78
79
|
- lib/wrapper/resources/genre.rb
|
79
80
|
- lib/wrapper/resources/indetifier.rb
|
80
81
|
- lib/wrapper/resources/main_indentity.rb
|
81
82
|
- lib/wrapper/resources/participant.rb
|
83
|
+
- lib/wrapper/resources/participation.rb
|
82
84
|
- lib/wrapper/resources/recording.rb
|
83
|
-
- lib/wrapper/resources/recording_participation.rb
|
84
85
|
- lib/wrapper/resources/work.rb
|
85
86
|
- lib/wrapper/wrapper.rb
|
86
87
|
- spec/.DS_Store
|
@@ -88,7 +89,7 @@ files:
|
|
88
89
|
- spec/spec_helper.rb
|
89
90
|
- spec/wrapper/album_spec.rb
|
90
91
|
- spec/wrapper/participant_spec.rb
|
91
|
-
- spec/wrapper/
|
92
|
+
- spec/wrapper/participation_spec.rb
|
92
93
|
- spec/wrapper/recording_spec.rb
|
93
94
|
- spec/wrapper/work_spec.rb
|
94
95
|
- spec/wrapper/wrapper_spec.rb
|
@@ -122,7 +123,7 @@ test_files:
|
|
122
123
|
- spec/spec_helper.rb
|
123
124
|
- spec/wrapper/album_spec.rb
|
124
125
|
- spec/wrapper/participant_spec.rb
|
125
|
-
- spec/wrapper/
|
126
|
+
- spec/wrapper/participation_spec.rb
|
126
127
|
- spec/wrapper/recording_spec.rb
|
127
128
|
- spec/wrapper/work_spec.rb
|
128
129
|
- spec/wrapper/wrapper_spec.rb
|