scrobbler-ng 2.0.8 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +2 -2
- data/lib/scrobbler/base.rb +7 -2
- data/scrobbler-ng.gemspec +19 -20
- data/tasks/jeweler.rake +1 -1
- data/test/unit/album_spec.rb +1 -1
- data/test/unit/artist_spec.rb +1 -1
- data/test/unit/authentication_spec.rb +1 -1
- data/test/unit/event_spec.rb +1 -1
- data/test/unit/geo_spec.rb +2 -2
- data/test/unit/library_spec.rb +1 -1
- data/test/unit/playlist_spec.rb +1 -1
- data/test/unit/radio_spec.rb +1 -1
- data/test/unit/tag_spec.rb +1 -1
- data/test/unit/track_spec.rb +1 -1
- data/test/unit/user_spec.rb +1 -1
- data/test/unit/venue_spec.rb +1 -1
- metadata +31 -32
- data/.gitignore +0 -16
data/VERSION.yml
CHANGED
data/lib/scrobbler/base.rb
CHANGED
@@ -78,7 +78,7 @@ module Scrobbler
|
|
78
78
|
# @todo Try to make the best out of it
|
79
79
|
end
|
80
80
|
end
|
81
|
-
end
|
81
|
+
end unless doc.root.nil? || doc.root.children.nil?
|
82
82
|
elements
|
83
83
|
end
|
84
84
|
|
@@ -223,12 +223,17 @@ module Scrobbler
|
|
223
223
|
options = {:all => true}.merge options
|
224
224
|
result = []
|
225
225
|
if options.delete(:all)
|
226
|
-
doc = Base.request(method, options)
|
226
|
+
doc = Base.request(method, options.merge(:page => 1))
|
227
227
|
root = nil
|
228
228
|
doc.root.children.each do |child|
|
229
229
|
next unless child.name == parent.to_s
|
230
230
|
root = child
|
231
231
|
end
|
232
|
+
if root.nil? then
|
233
|
+
# Sometimes Last.fm returns an empty file if we query for sth not known
|
234
|
+
return []
|
235
|
+
end
|
236
|
+
#return nil if root.nil? # Sometimes Last.fm returns an empty XML file if there were no artists
|
232
237
|
total_pages = root['totalPages'].to_i
|
233
238
|
root.children.each do |child|
|
234
239
|
next unless child.name == element.to_s.sub("Scrobbler::","").downcase
|
data/scrobbler-ng.gemspec
CHANGED
@@ -5,19 +5,18 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{scrobbler-ng}
|
8
|
-
s.version = "2.0.
|
8
|
+
s.version = "2.0.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["John Nunemaker", "Jonathan Rudenberg", "Uwe L. Korn"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-18}
|
13
13
|
s.description = %q{A ruby library for accessing the Last.fm 2.0 API. It is higly optimized so that it uses less memory and parses XML (through Nokogiri) than other implementations.}
|
14
14
|
s.email = %q{uwelk@xhochy.org}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
|
-
"
|
20
|
-
"MIT-LICENSE",
|
19
|
+
"MIT-LICENSE",
|
21
20
|
"README.rdoc",
|
22
21
|
"Rakefile",
|
23
22
|
"VERSION.yml",
|
@@ -59,30 +58,30 @@ Gem::Specification.new do |s|
|
|
59
58
|
s.rubygems_version = %q{1.3.7}
|
60
59
|
s.summary = %q{A ruby library for accessing the last.fm v2 webservices}
|
61
60
|
s.test_files = [
|
62
|
-
"test/
|
63
|
-
"test/unit/
|
64
|
-
"test/unit/album_spec.rb",
|
61
|
+
"test/spec_helper.rb",
|
62
|
+
"test/unit/user_spec.rb",
|
65
63
|
"test/unit/radio_spec.rb",
|
66
|
-
"test/unit/
|
64
|
+
"test/unit/tag_spec.rb",
|
65
|
+
"test/unit/geo_spec.rb",
|
67
66
|
"test/unit/venue_spec.rb",
|
68
|
-
"test/unit/user_spec.rb",
|
69
|
-
"test/unit/artist_spec.rb",
|
70
|
-
"test/unit/playing_test.rb",
|
71
67
|
"test/unit/simpleauth_test.rb",
|
72
|
-
"test/unit/
|
73
|
-
"test/unit/library_spec.rb",
|
68
|
+
"test/unit/playlist_spec.rb",
|
74
69
|
"test/unit/track_spec.rb",
|
70
|
+
"test/unit/artist_spec.rb",
|
71
|
+
"test/unit/event_spec.rb",
|
72
|
+
"test/unit/album_spec.rb",
|
75
73
|
"test/unit/authentication_spec.rb",
|
76
|
-
"test/
|
77
|
-
"test/
|
78
|
-
"test/mocks/library.rb",
|
74
|
+
"test/unit/playing_test.rb",
|
75
|
+
"test/unit/library_spec.rb",
|
79
76
|
"test/mocks/rest.rb",
|
80
|
-
"
|
77
|
+
"test/mocks/library.rb",
|
78
|
+
"test/test_helper.rb",
|
81
79
|
"examples/track.rb",
|
82
|
-
"examples/
|
80
|
+
"examples/album.rb",
|
83
81
|
"examples/artist.rb",
|
84
|
-
"examples/
|
85
|
-
"examples/
|
82
|
+
"examples/tag.rb",
|
83
|
+
"examples/user.rb",
|
84
|
+
"examples/scrobble.rb"
|
86
85
|
]
|
87
86
|
|
88
87
|
if s.respond_to? :specification_version then
|
data/tasks/jeweler.rake
CHANGED
data/test/unit/album_spec.rb
CHANGED
data/test/unit/artist_spec.rb
CHANGED
data/test/unit/event_spec.rb
CHANGED
data/test/unit/geo_spec.rb
CHANGED
data/test/unit/library_spec.rb
CHANGED
data/test/unit/playlist_spec.rb
CHANGED
data/test/unit/radio_spec.rb
CHANGED
data/test/unit/tag_spec.rb
CHANGED
data/test/unit/track_spec.rb
CHANGED
data/test/unit/user_spec.rb
CHANGED
data/test/unit/venue_spec.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrobbler-ng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 9
|
10
|
+
version: 2.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Nunemaker
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-09-18 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -89,7 +89,6 @@ extensions: []
|
|
89
89
|
extra_rdoc_files:
|
90
90
|
- README.rdoc
|
91
91
|
files:
|
92
|
-
- .gitignore
|
93
92
|
- MIT-LICENSE
|
94
93
|
- README.rdoc
|
95
94
|
- Rakefile
|
@@ -125,24 +124,24 @@ files:
|
|
125
124
|
- tasks/rdoc.rake
|
126
125
|
- tasks/tests.rake
|
127
126
|
- tasks/yardoc.rake
|
128
|
-
- test/
|
129
|
-
- test/unit/
|
130
|
-
- test/unit/album_spec.rb
|
127
|
+
- test/spec_helper.rb
|
128
|
+
- test/unit/user_spec.rb
|
131
129
|
- test/unit/radio_spec.rb
|
132
|
-
- test/unit/
|
130
|
+
- test/unit/tag_spec.rb
|
131
|
+
- test/unit/geo_spec.rb
|
133
132
|
- test/unit/venue_spec.rb
|
134
|
-
- test/unit/user_spec.rb
|
135
|
-
- test/unit/artist_spec.rb
|
136
|
-
- test/unit/playing_test.rb
|
137
133
|
- test/unit/simpleauth_test.rb
|
138
|
-
- test/unit/
|
139
|
-
- test/unit/library_spec.rb
|
134
|
+
- test/unit/playlist_spec.rb
|
140
135
|
- test/unit/track_spec.rb
|
136
|
+
- test/unit/artist_spec.rb
|
137
|
+
- test/unit/event_spec.rb
|
138
|
+
- test/unit/album_spec.rb
|
141
139
|
- test/unit/authentication_spec.rb
|
142
|
-
- test/
|
143
|
-
- test/
|
144
|
-
- test/mocks/library.rb
|
140
|
+
- test/unit/playing_test.rb
|
141
|
+
- test/unit/library_spec.rb
|
145
142
|
- test/mocks/rest.rb
|
143
|
+
- test/mocks/library.rb
|
144
|
+
- test/test_helper.rb
|
146
145
|
has_rdoc: true
|
147
146
|
homepage: http://github.com/xhochy/scrobbler
|
148
147
|
licenses: []
|
@@ -178,27 +177,27 @@ signing_key:
|
|
178
177
|
specification_version: 3
|
179
178
|
summary: A ruby library for accessing the last.fm v2 webservices
|
180
179
|
test_files:
|
181
|
-
- test/
|
182
|
-
- test/unit/
|
183
|
-
- test/unit/album_spec.rb
|
180
|
+
- test/spec_helper.rb
|
181
|
+
- test/unit/user_spec.rb
|
184
182
|
- test/unit/radio_spec.rb
|
185
|
-
- test/unit/
|
183
|
+
- test/unit/tag_spec.rb
|
184
|
+
- test/unit/geo_spec.rb
|
186
185
|
- test/unit/venue_spec.rb
|
187
|
-
- test/unit/user_spec.rb
|
188
|
-
- test/unit/artist_spec.rb
|
189
|
-
- test/unit/playing_test.rb
|
190
186
|
- test/unit/simpleauth_test.rb
|
191
|
-
- test/unit/
|
192
|
-
- test/unit/library_spec.rb
|
187
|
+
- test/unit/playlist_spec.rb
|
193
188
|
- test/unit/track_spec.rb
|
189
|
+
- test/unit/artist_spec.rb
|
190
|
+
- test/unit/event_spec.rb
|
191
|
+
- test/unit/album_spec.rb
|
194
192
|
- test/unit/authentication_spec.rb
|
195
|
-
- test/
|
196
|
-
- test/
|
197
|
-
- test/mocks/library.rb
|
193
|
+
- test/unit/playing_test.rb
|
194
|
+
- test/unit/library_spec.rb
|
198
195
|
- test/mocks/rest.rb
|
199
|
-
-
|
196
|
+
- test/mocks/library.rb
|
197
|
+
- test/test_helper.rb
|
200
198
|
- examples/track.rb
|
201
|
-
- examples/
|
199
|
+
- examples/album.rb
|
202
200
|
- examples/artist.rb
|
201
|
+
- examples/tag.rb
|
202
|
+
- examples/user.rb
|
203
203
|
- examples/scrobble.rb
|
204
|
-
- examples/album.rb
|