meta-spotify 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +7 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/lib/meta-spotify.rb +2 -1
- data/lib/meta-spotify/track.rb +1 -0
- data/meta-spotify.gemspec +9 -8
- data/test/fixtures/album_with_trackdetail.xml +225 -0
- data/test/test_album.rb +15 -0
- data/test/test_artist.rb +1 -0
- data/test/test_track.rb +1 -0
- metadata +6 -5
data/HISTORY
CHANGED
data/Rakefile
CHANGED
@@ -11,8 +11,8 @@ begin
|
|
11
11
|
gem.authors = ["Phil Nash"]
|
12
12
|
gem.add_dependency 'httparty', ">= 0.4.5"
|
13
13
|
gem.add_dependency 'crack', ">= 0.1.4"
|
14
|
-
gem.add_development_dependency "
|
15
|
-
gem.add_development_dependency "fakeweb"
|
14
|
+
gem.add_development_dependency "shoulda", ">= 2.10.2"
|
15
|
+
gem.add_development_dependency "fakeweb", ">= 1.2.4"
|
16
16
|
gem.rubyforge_project = 'meta-spotify'
|
17
17
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
18
18
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/meta-spotify.rb
CHANGED
@@ -49,12 +49,13 @@ module MetaSpotify
|
|
49
49
|
result = get("/lookup/#{API_VERSION}/",:query => query, :format => :xml)
|
50
50
|
raise_errors(result)
|
51
51
|
result.each do |k,v|
|
52
|
+
v.merge!({'href' => uri})
|
52
53
|
case k
|
53
54
|
when "artist"
|
54
55
|
return Artist.new(v)
|
55
56
|
when "album"
|
56
57
|
return Album.new(v)
|
57
|
-
when "track"
|
58
|
+
when "track"
|
58
59
|
return Track.new(v)
|
59
60
|
end
|
60
61
|
end
|
data/lib/meta-spotify/track.rb
CHANGED
data/meta-spotify.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{meta-spotify}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Phil Nash"]
|
12
|
-
s.date = %q{2009-11-
|
12
|
+
s.date = %q{2009-11-19}
|
13
13
|
s.email = %q{philnash@gmail.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
"meta-spotify.gemspec",
|
31
31
|
"test/fixtures/album.xml",
|
32
32
|
"test/fixtures/album_search.xml",
|
33
|
+
"test/fixtures/album_with_trackdetail.xml",
|
33
34
|
"test/fixtures/artist.xml",
|
34
35
|
"test/fixtures/artist_search.xml",
|
35
36
|
"test/fixtures/artist_search_one_result.xml",
|
@@ -62,19 +63,19 @@ Gem::Specification.new do |s|
|
|
62
63
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
63
64
|
s.add_runtime_dependency(%q<httparty>, [">= 0.4.5"])
|
64
65
|
s.add_runtime_dependency(%q<crack>, [">= 0.1.4"])
|
65
|
-
s.add_development_dependency(%q<
|
66
|
-
s.add_development_dependency(%q<fakeweb>, [">=
|
66
|
+
s.add_development_dependency(%q<shoulda>, [">= 2.10.2"])
|
67
|
+
s.add_development_dependency(%q<fakeweb>, [">= 1.2.4"])
|
67
68
|
else
|
68
69
|
s.add_dependency(%q<httparty>, [">= 0.4.5"])
|
69
70
|
s.add_dependency(%q<crack>, [">= 0.1.4"])
|
70
|
-
s.add_dependency(%q<
|
71
|
-
s.add_dependency(%q<fakeweb>, [">=
|
71
|
+
s.add_dependency(%q<shoulda>, [">= 2.10.2"])
|
72
|
+
s.add_dependency(%q<fakeweb>, [">= 1.2.4"])
|
72
73
|
end
|
73
74
|
else
|
74
75
|
s.add_dependency(%q<httparty>, [">= 0.4.5"])
|
75
76
|
s.add_dependency(%q<crack>, [">= 0.1.4"])
|
76
|
-
s.add_dependency(%q<
|
77
|
-
s.add_dependency(%q<fakeweb>, [">=
|
77
|
+
s.add_dependency(%q<shoulda>, [">= 2.10.2"])
|
78
|
+
s.add_dependency(%q<fakeweb>, [">= 1.2.4"])
|
78
79
|
end
|
79
80
|
end
|
80
81
|
|
@@ -0,0 +1,225 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<album xmlns="http://www.spotify.com/ns/music/1">
|
3
|
+
<name>Remedy</name>
|
4
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
5
|
+
<name>Basement Jaxx</name>
|
6
|
+
</artist>
|
7
|
+
<released>1999</released>
|
8
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=10:dpfixqtkld0e">R 426481</id>
|
9
|
+
|
10
|
+
<id type="mbid" href="http://musicbrainz.org/release/3a3685aa-9c4d-42f8-a401-e34a89494041.html">3a3685aa-9c4d-42f8-a401-e34a89494041</id>
|
11
|
+
<id type="upc">634904012922</id>
|
12
|
+
<tracks>
|
13
|
+
<track href="spotify:track:3zBhJBEbDD4a4SO1EaEiBP">
|
14
|
+
<name>Rendez-vu</name>
|
15
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
16
|
+
<name>Basement Jaxx</name>
|
17
|
+
|
18
|
+
</artist>
|
19
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:jifqxvlhldde">T 4201715</id>
|
20
|
+
<id type="mbid" href="http://musicbrainz.org/track/e230c541-78fb-4d08-99c9-ebcb111d7058.html">e230c541-78fb-4d08-99c9-ebcb111d7058</id>
|
21
|
+
<disc-number>1</disc-number>
|
22
|
+
<track-number>1</track-number>
|
23
|
+
<length>345.000000</length>
|
24
|
+
|
25
|
+
<popularity>0.51368</popularity>
|
26
|
+
</track>
|
27
|
+
<track href="spotify:track:6K9S1wuLaO6ADqSCMdDdfZ">
|
28
|
+
<name>Yo Yo</name>
|
29
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
30
|
+
<name>Basement Jaxx</name>
|
31
|
+
</artist>
|
32
|
+
|
33
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:kifqxvlhldde">T 4201716</id>
|
34
|
+
<id type="mbid" href="http://musicbrainz.org/track/53539ebc-1b94-417b-9d28-09a0711ade8d.html">53539ebc-1b94-417b-9d28-09a0711ade8d</id>
|
35
|
+
<disc-number>1</disc-number>
|
36
|
+
<track-number>2</track-number>
|
37
|
+
<length>269.000000</length>
|
38
|
+
<popularity>0.48872</popularity>
|
39
|
+
|
40
|
+
</track>
|
41
|
+
<track href="spotify:track:7BOip2p6QyLq3eW8GYK32T">
|
42
|
+
<name>Jump N’ Shout Featuring Slarta John (radio Edit)</name>
|
43
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
44
|
+
<name>Basement Jaxx</name>
|
45
|
+
</artist>
|
46
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:0ifqxvlhldde">T 4201717</id>
|
47
|
+
|
48
|
+
<id type="mbid" href="http://musicbrainz.org/track/e19fe9a1-32e2-42ab-847c-11964dfff00f.html">e19fe9a1-32e2-42ab-847c-11964dfff00f</id>
|
49
|
+
<disc-number>1</disc-number>
|
50
|
+
<track-number>3</track-number>
|
51
|
+
<length>282.000000</length>
|
52
|
+
<popularity>0.5152</popularity>
|
53
|
+
</track>
|
54
|
+
|
55
|
+
<track href="spotify:track:3N84nR1xt8zDZCKYd4RHQg">
|
56
|
+
<name>U Can’t Stop Me</name>
|
57
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
58
|
+
<name>Basement Jaxx</name>
|
59
|
+
</artist>
|
60
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:aifqxvlhldde">T 4201718</id>
|
61
|
+
<id type="mbid" href="http://musicbrainz.org/track/c9ae8923-ef8d-4c31-905b-e2142956f02f.html">c9ae8923-ef8d-4c31-905b-e2142956f02f</id>
|
62
|
+
|
63
|
+
<disc-number>1</disc-number>
|
64
|
+
<track-number>4</track-number>
|
65
|
+
<length>220.000000</length>
|
66
|
+
<popularity>0.46732</popularity>
|
67
|
+
</track>
|
68
|
+
<track href="spotify:track:2WuDzMnERXnODpno1M9YJ8">
|
69
|
+
<name>Jaxxalude</name>
|
70
|
+
|
71
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
72
|
+
<name>Basement Jaxx</name>
|
73
|
+
</artist>
|
74
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:wifqxvlhldde">T 4201719</id>
|
75
|
+
<id type="mbid" href="http://musicbrainz.org/track/0c6b7b66-2cca-45af-b3ff-371c176a2e3a.html">0c6b7b66-2cca-45af-b3ff-371c176a2e3a</id>
|
76
|
+
<disc-number>1</disc-number>
|
77
|
+
<track-number>5</track-number>
|
78
|
+
|
79
|
+
<length>35.000000</length>
|
80
|
+
<popularity>0.442</popularity>
|
81
|
+
</track>
|
82
|
+
<track href="spotify:track:5BU6Xs6oDgsTvAYW2ULGya">
|
83
|
+
<name>Red Alert</name>
|
84
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
85
|
+
<name>Basement Jaxx</name>
|
86
|
+
|
87
|
+
</artist>
|
88
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:3ifwxvlhldde">T 4201720</id>
|
89
|
+
<id type="mbid" href="http://musicbrainz.org/track/44ecb9c2-b1c8-4b30-b84f-6adde2e49a6f.html">44ecb9c2-b1c8-4b30-b84f-6adde2e49a6f</id>
|
90
|
+
<disc-number>1</disc-number>
|
91
|
+
<track-number>6</track-number>
|
92
|
+
<length>257.000000</length>
|
93
|
+
|
94
|
+
<popularity>0.50162</popularity>
|
95
|
+
</track>
|
96
|
+
<track href="spotify:track:2xbGAbivOgd4r6fuex7UgU">
|
97
|
+
<name>Jazzalude</name>
|
98
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
99
|
+
<name>Basement Jaxx</name>
|
100
|
+
</artist>
|
101
|
+
|
102
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:difwxvlhldde">T 4201721</id>
|
103
|
+
<id type="mbid" href="http://musicbrainz.org/track/3dbc58a9-ee11-4cab-a931-af4639e1d04f.html">3dbc58a9-ee11-4cab-a931-af4639e1d04f</id>
|
104
|
+
<disc-number>1</disc-number>
|
105
|
+
<track-number>7</track-number>
|
106
|
+
<length>23.000000</length>
|
107
|
+
<popularity>0.05035</popularity>
|
108
|
+
|
109
|
+
</track>
|
110
|
+
<track href="spotify:track:50EmQsHyT7QREceJDvhstr">
|
111
|
+
<name>Always Be There</name>
|
112
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
113
|
+
<name>Basement Jaxx</name>
|
114
|
+
</artist>
|
115
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:fifwxvlhldde">T 4201722</id>
|
116
|
+
|
117
|
+
<id type="mbid" href="http://musicbrainz.org/track/edc37f98-bcee-4661-b5f8-791c945297b2.html">edc37f98-bcee-4661-b5f8-791c945297b2</id>
|
118
|
+
<disc-number>1</disc-number>
|
119
|
+
<track-number>8</track-number>
|
120
|
+
<length>384.000000</length>
|
121
|
+
<popularity>0.46201</popularity>
|
122
|
+
</track>
|
123
|
+
|
124
|
+
<track href="spotify:track:0O0e7tVwf3BvPDMc3kvD3e">
|
125
|
+
<name>Sneakalude</name>
|
126
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
127
|
+
<name>Basement Jaxx</name>
|
128
|
+
</artist>
|
129
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:gifwxvlhldde">T 4201723</id>
|
130
|
+
<id type="mbid" href="http://musicbrainz.org/track/24aeb178-32fb-44e3-846a-899d8fab410c.html">24aeb178-32fb-44e3-846a-899d8fab410c</id>
|
131
|
+
|
132
|
+
<disc-number>1</disc-number>
|
133
|
+
<track-number>9</track-number>
|
134
|
+
<length>11.000000</length>
|
135
|
+
<popularity>0.02389</popularity>
|
136
|
+
</track>
|
137
|
+
<track href="spotify:track:4FwhEvZ5HwviSJlMgDIioT">
|
138
|
+
<name>Same Old Show</name>
|
139
|
+
|
140
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
141
|
+
<name>Basement Jaxx</name>
|
142
|
+
</artist>
|
143
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:hifwxvlhldde">T 4201724</id>
|
144
|
+
<id type="mbid" href="http://musicbrainz.org/track/5a84374f-5705-43cb-b6ee-1a8ecfd7668f.html">5a84374f-5705-43cb-b6ee-1a8ecfd7668f</id>
|
145
|
+
<disc-number>1</disc-number>
|
146
|
+
<track-number>10</track-number>
|
147
|
+
|
148
|
+
<length>355.000000</length>
|
149
|
+
<popularity>0.43669</popularity>
|
150
|
+
</track>
|
151
|
+
<track href="spotify:track:1xJW8GKZeugt3hdG1khWzr">
|
152
|
+
<name>Bingo Bango</name>
|
153
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
154
|
+
<name>Basement Jaxx</name>
|
155
|
+
|
156
|
+
</artist>
|
157
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:jifwxvlhldde">T 4201725</id>
|
158
|
+
<id type="mbid" href="http://musicbrainz.org/track/9a157f10-7fc4-427c-bcf9-eb27d1f99fed.html">9a157f10-7fc4-427c-bcf9-eb27d1f99fed</id>
|
159
|
+
<disc-number>1</disc-number>
|
160
|
+
<track-number>11</track-number>
|
161
|
+
<length>358.000000</length>
|
162
|
+
|
163
|
+
<popularity>0.4691</popularity>
|
164
|
+
</track>
|
165
|
+
<track href="spotify:track:0SNCZ71vAXD5cBJqOeTdT3">
|
166
|
+
<name>Gemilude</name>
|
167
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
168
|
+
<name>Basement Jaxx</name>
|
169
|
+
</artist>
|
170
|
+
|
171
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:kifwxvlhldde">T 4201726</id>
|
172
|
+
<id type="mbid" href="http://musicbrainz.org/track/fbf36bbe-4bbc-4ce6-964f-3876771f48f4.html">fbf36bbe-4bbc-4ce6-964f-3876771f48f4</id>
|
173
|
+
<disc-number>1</disc-number>
|
174
|
+
<track-number>12</track-number>
|
175
|
+
<length>47.000000</length>
|
176
|
+
<popularity>0.42168</popularity>
|
177
|
+
|
178
|
+
</track>
|
179
|
+
<track href="spotify:track:2cC8NxlxmxbYLiUMpIdKtx">
|
180
|
+
<name>Stop 4 Love</name>
|
181
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
182
|
+
<name>Basement Jaxx</name>
|
183
|
+
</artist>
|
184
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:0ifwxvlhldde">T 4201727</id>
|
185
|
+
|
186
|
+
<id type="mbid" href="http://musicbrainz.org/track/a844f07b-719b-46ce-865a-38ca22b39fd3.html">a844f07b-719b-46ce-865a-38ca22b39fd3</id>
|
187
|
+
<disc-number>1</disc-number>
|
188
|
+
<track-number>13</track-number>
|
189
|
+
<length>293.000000</length>
|
190
|
+
<popularity>0.43011</popularity>
|
191
|
+
</track>
|
192
|
+
|
193
|
+
<track href="spotify:track:74zYl706xnBU4XOa3TkiGQ">
|
194
|
+
<name>Don’t Give Up</name>
|
195
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
196
|
+
<name>Basement Jaxx</name>
|
197
|
+
</artist>
|
198
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:aifwxvlhldde">T 4201728</id>
|
199
|
+
<id type="mbid" href="http://musicbrainz.org/track/343db7af-5d1d-438f-8ff1-dca5ff647f4b.html">343db7af-5d1d-438f-8ff1-dca5ff647f4b</id>
|
200
|
+
|
201
|
+
<disc-number>1</disc-number>
|
202
|
+
<track-number>14</track-number>
|
203
|
+
<length>314.000000</length>
|
204
|
+
<popularity>0.42621</popularity>
|
205
|
+
</track>
|
206
|
+
<track href="spotify:track:5DI6EbdlFuq1Bf5GHAGe6b">
|
207
|
+
<name>Being With U</name>
|
208
|
+
|
209
|
+
<artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ">
|
210
|
+
<name>Basement Jaxx</name>
|
211
|
+
</artist>
|
212
|
+
<id type="amgid" href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=33:wifwxvlhldde">T 4201729</id>
|
213
|
+
<id type="mbid" href="http://musicbrainz.org/track/a06bc999-e816-4273-80c3-f813f8bf2df4.html">a06bc999-e816-4273-80c3-f813f8bf2df4</id>
|
214
|
+
<disc-number>1</disc-number>
|
215
|
+
<track-number>15</track-number>
|
216
|
+
|
217
|
+
<length>229.000000</length>
|
218
|
+
<popularity>0.42671</popularity>
|
219
|
+
</track>
|
220
|
+
</tracks>
|
221
|
+
<availability>
|
222
|
+
<territories>AD AE AF AG AI AL AM AN AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR ST SV SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW ZZ</territories>
|
223
|
+
</availability>
|
224
|
+
|
225
|
+
</album>
|
data/test/test_album.rb
CHANGED
@@ -48,6 +48,7 @@ class TestAlbum < Test::Unit::TestCase
|
|
48
48
|
should "fetch an album and return an album object" do
|
49
49
|
assert_kind_of MetaSpotify::Album, @result
|
50
50
|
assert_equal "Remedy", @result.name
|
51
|
+
assert_equal ALBUM_URI, @result.uri
|
51
52
|
assert_equal "1999", @result.released
|
52
53
|
assert_equal "634904012922", @result.upc
|
53
54
|
assert_equal "3a3685aa-9c4d-42f8-a401-e34a89494041", @result.musicbrainz_id
|
@@ -65,4 +66,18 @@ class TestAlbum < Test::Unit::TestCase
|
|
65
66
|
end
|
66
67
|
end
|
67
68
|
end
|
69
|
+
context "looking up an album with extra details" do
|
70
|
+
setup do
|
71
|
+
FakeWeb.register_uri(:get,
|
72
|
+
"http://ws.spotify.com/lookup/1/?extras=trackdetail&uri=#{CGI.escape ALBUM_URI}",
|
73
|
+
:body => fixture_file('album_with_trackdetail.xml'))
|
74
|
+
@result = MetaSpotify::Album.lookup(ALBUM_URI, :extras => 'trackdetail')
|
75
|
+
end
|
76
|
+
|
77
|
+
should "fetch an album and return an object with more detailed track information" do
|
78
|
+
assert_kind_of MetaSpotify::Album, @result
|
79
|
+
assert_kind_of MetaSpotify::Track, @result.tracks.first
|
80
|
+
assert_equal 'Rendez-vu', @result.tracks.first.name
|
81
|
+
end
|
82
|
+
end
|
68
83
|
end
|
data/test/test_artist.rb
CHANGED
@@ -55,6 +55,7 @@ class TestArtist < Test::Unit::TestCase
|
|
55
55
|
should "fetch an artist and return an artist object" do
|
56
56
|
assert_kind_of MetaSpotify::Artist, @result
|
57
57
|
assert_equal "Basement Jaxx", @result.name
|
58
|
+
assert_equal ARTIST_URI, @result.uri
|
58
59
|
end
|
59
60
|
should "fail trying to look up an album" do
|
60
61
|
assert_raises MetaSpotify::URIError do
|
data/test/test_track.rb
CHANGED
@@ -45,6 +45,7 @@ class TestTrack < Test::Unit::TestCase
|
|
45
45
|
assert_equal 1, @result.track_number
|
46
46
|
assert_equal 345, @result.length
|
47
47
|
assert_equal 0.51368, @result.popularity
|
48
|
+
assert_equal TRACK_URI, @result.uri
|
48
49
|
end
|
49
50
|
should "create an album object for that track" do
|
50
51
|
assert_kind_of MetaSpotify::Album, @result.album
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta-spotify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phil Nash
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-19 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -33,14 +33,14 @@ dependencies:
|
|
33
33
|
version: 0.1.4
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: shoulda
|
37
37
|
type: :development
|
38
38
|
version_requirement:
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 2.10.2
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: fakeweb
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 1.2.4
|
54
54
|
version:
|
55
55
|
description:
|
56
56
|
email: philnash@gmail.com
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- meta-spotify.gemspec
|
77
77
|
- test/fixtures/album.xml
|
78
78
|
- test/fixtures/album_search.xml
|
79
|
+
- test/fixtures/album_with_trackdetail.xml
|
79
80
|
- test/fixtures/artist.xml
|
80
81
|
- test/fixtures/artist_search.xml
|
81
82
|
- test/fixtures/artist_search_one_result.xml
|