rbrainz 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +5 -1
- data/Rakefile +2 -3
- data/debian/rules +0 -0
- data/examples/getartist.rb +0 -0
- data/examples/getlabel.rb +0 -0
- data/examples/getrelease.rb +0 -0
- data/examples/gettrack.rb +0 -0
- data/examples/getuser.rb +0 -0
- data/examples/searchartists.rb +0 -0
- data/examples/searchlabels.rb +0 -0
- data/examples/searchreleases.rb +0 -0
- data/examples/searchtracks.rb +0 -0
- data/examples/tag.rb +0 -0
- data/lib/rbrainz/version.rb +2 -2
- data/lib/rbrainz/webservice/mbxml.rb +2 -2
- data/lib/rbrainz/webservice/query.rb +6 -6
- data/lib/rbrainz/webservice/webservice.rb +5 -5
- metadata +45 -38
data/CHANGES
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
== 0.4.2 (2008-09-04)
|
4
|
+
* BUG: Fixed proxy authentication
|
5
|
+
* BUG: Fixed raising of ResponseError in Query#get_user_by_name
|
6
|
+
|
3
7
|
== 0.4.1 (2008-04-23)
|
4
8
|
* BUG: Use CGI.escape instead of URI.escape, since URI.escape does not
|
5
9
|
escape URI special characters (?=&)
|
@@ -61,4 +65,4 @@
|
|
61
65
|
== 0.1.0 (2007-05-23)
|
62
66
|
* Initial release
|
63
67
|
|
64
|
-
$Id: CHANGES
|
68
|
+
$Id: CHANGES 219 2008-09-04 18:14:48Z phw $
|
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: Rakefile
|
1
|
+
# $Id: Rakefile 226 2008-09-04 19:51:48Z phw $
|
2
2
|
# Copyright (c) 2007, Philipp Wolfer
|
3
3
|
# All rights reserved.
|
4
4
|
# See LICENSE for permissions.
|
@@ -35,7 +35,6 @@ spec = Gem::Specification.new do |spec|
|
|
35
35
|
spec.name = PKG_NAME
|
36
36
|
spec.version = PKG_VERSION
|
37
37
|
spec.requirements << 'Optional: mb-discid >= 0.1.2 (for calculating disc IDs)'
|
38
|
-
spec.autorequire = spec.name
|
39
38
|
spec.files = PKG_FILES
|
40
39
|
spec.description = <<EOF
|
41
40
|
RBrainz is a Ruby client library to access the MusicBrainz XML
|
@@ -48,7 +47,7 @@ spec = Gem::Specification.new do |spec|
|
|
48
47
|
However, RBrainz differs from python-musicbrainz2 wherever it makes
|
49
48
|
the library more Ruby like or easier to use.
|
50
49
|
EOF
|
51
|
-
spec.
|
50
|
+
spec.authors = ['Philipp Wolfer', 'Nigel Graham']
|
52
51
|
spec.email = 'phw@rubyforge.org'
|
53
52
|
spec.homepage = 'http://rbrainz.rubyforge.org'
|
54
53
|
spec.rubyforge_project = 'rbrainz'
|
data/debian/rules
CHANGED
File without changes
|
data/examples/getartist.rb
CHANGED
File without changes
|
data/examples/getlabel.rb
CHANGED
File without changes
|
data/examples/getrelease.rb
CHANGED
File without changes
|
data/examples/gettrack.rb
CHANGED
File without changes
|
data/examples/getuser.rb
CHANGED
File without changes
|
data/examples/searchartists.rb
CHANGED
File without changes
|
data/examples/searchlabels.rb
CHANGED
File without changes
|
data/examples/searchreleases.rb
CHANGED
File without changes
|
data/examples/searchtracks.rb
CHANGED
File without changes
|
data/examples/tag.rb
CHANGED
File without changes
|
data/lib/rbrainz/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: version.rb
|
1
|
+
# $Id: version.rb 219 2008-09-04 18:14:48Z phw $
|
2
2
|
#
|
3
3
|
# Version information.
|
4
4
|
#
|
@@ -10,6 +10,6 @@
|
|
10
10
|
module MusicBrainz
|
11
11
|
|
12
12
|
# The version of the RBrainz library.
|
13
|
-
RBRAINZ_VERSION = '0.4.
|
13
|
+
RBRAINZ_VERSION = '0.4.2'
|
14
14
|
|
15
15
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: mbxml.rb
|
1
|
+
# $Id: mbxml.rb 218 2008-09-02 07:45:33Z phw $
|
2
2
|
#
|
3
3
|
# Author:: Philipp Wolfer (mailto:phw@rubyforge.org)
|
4
4
|
# Copyright:: Copyright (c) 2007, Nigel Graham, Philipp Wolfer
|
@@ -37,7 +37,7 @@ module MusicBrainz
|
|
37
37
|
begin
|
38
38
|
@document = REXML::Document.new(stream)
|
39
39
|
rescue REXML::ParseException => e
|
40
|
-
raise ParseError
|
40
|
+
raise ParseError, e.to_s
|
41
41
|
end
|
42
42
|
|
43
43
|
# Set the model factory
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: query.rb
|
1
|
+
# $Id: query.rb 218 2008-09-02 07:45:33Z phw $
|
2
2
|
#
|
3
3
|
# Author:: Philipp Wolfer (mailto:phw@rubyforge.org)
|
4
4
|
# Copyright:: Copyright (c) 2007, Nigel Graham, Philipp Wolfer
|
@@ -286,7 +286,7 @@ module MusicBrainz
|
|
286
286
|
xml = @webservice.get(:user, :filter => UserFilter.new(name))
|
287
287
|
collection = MBXML.new(xml).get_entity_list(:user, Model::NS_EXT_1)
|
288
288
|
unless collection and collection.size > 0
|
289
|
-
raise ResponseError
|
289
|
+
raise ResponseError, "response didn't contain user data"
|
290
290
|
else
|
291
291
|
return collection[0].entity
|
292
292
|
end
|
@@ -319,7 +319,7 @@ module MusicBrainz
|
|
319
319
|
# an AuthenticationError is raised. See the example in Query on
|
320
320
|
# how to supply authentication data.
|
321
321
|
#
|
322
|
-
# See:: http://
|
322
|
+
# See:: http://musicbrainz.org/doc/PUID
|
323
323
|
# Raises:: ConnectionError, RequestError, AuthenticationError
|
324
324
|
def submit_puids(tracks2puids)
|
325
325
|
raise RequestError, 'Please supply a client ID' unless @client_id
|
@@ -405,10 +405,10 @@ module MusicBrainz
|
|
405
405
|
begin
|
406
406
|
entity = MBXML.new(stream, @factory).get_entity(entity_type)
|
407
407
|
rescue MBXML::ParseError => e
|
408
|
-
raise ResponseError
|
408
|
+
raise ResponseError, e.to_s
|
409
409
|
end
|
410
410
|
unless entity
|
411
|
-
raise ResponseError
|
411
|
+
raise ResponseError, "server didn't return #{entity_type.to_s} with the MBID #{id.to_s}"
|
412
412
|
else
|
413
413
|
return entity
|
414
414
|
end
|
@@ -422,7 +422,7 @@ module MusicBrainz
|
|
422
422
|
begin
|
423
423
|
collection = MBXML.new(stream, @factory).get_entity_list(entity_type)
|
424
424
|
rescue MBXML::ParseError => e
|
425
|
-
raise ResponseError
|
425
|
+
raise ResponseError, e.to_s
|
426
426
|
end
|
427
427
|
return collection
|
428
428
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: webservice.rb
|
1
|
+
# $Id: webservice.rb 209 2008-06-22 21:53:55Z phw $
|
2
2
|
#
|
3
3
|
# Author:: Philipp Wolfer (mailto:phw@rubyforge.org)
|
4
4
|
# Copyright:: Copyright (c) 2007, Nigel Graham, Philipp Wolfer
|
@@ -121,10 +121,10 @@ module MusicBrainz
|
|
121
121
|
begin
|
122
122
|
response = connection.start do |http|
|
123
123
|
response = http.request(request)
|
124
|
-
if response.is_a?(Net::HTTPProxyAuthenticationRequired) && @proxy[:
|
124
|
+
if response.is_a?(Net::HTTPProxyAuthenticationRequired) && @proxy[:username] && @proxy[:password]
|
125
125
|
request = Net::HTTP::Post.new(url.request_uri)
|
126
126
|
request['User-Agent'] = @user_agent
|
127
|
-
request.proxy_select_auth(
|
127
|
+
request.proxy_select_auth(@proxy[:username], @proxy[:password], response)
|
128
128
|
request.set_form_data(options[:params])
|
129
129
|
response = http.request(request)
|
130
130
|
end
|
@@ -192,10 +192,10 @@ module MusicBrainz
|
|
192
192
|
response = connection.start do |http|
|
193
193
|
response = http.request(request)
|
194
194
|
|
195
|
-
if response.is_a?(Net::HTTPProxyAuthenticationRequired) && @proxy[:
|
195
|
+
if response.is_a?(Net::HTTPProxyAuthenticationRequired) && @proxy[:username] && @proxy[:password]
|
196
196
|
request = Net::HTTP::Post.new(url.request_uri)
|
197
197
|
request['User-Agent'] = @user_agent
|
198
|
-
request.proxy_select_auth(
|
198
|
+
request.proxy_select_auth(@proxy[:username], @proxy[:password], response)
|
199
199
|
request.set_form_data(options[:params])
|
200
200
|
response = http.request(request)
|
201
201
|
end
|
metadata
CHANGED
@@ -1,34 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: rbrainz
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.4.
|
7
|
-
date: 2008-04-23 00:00:00 +02:00
|
8
|
-
summary: Ruby library for the MusicBrainz XML web service.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: phw@rubyforge.org
|
12
|
-
homepage: http://rbrainz.rubyforge.org
|
13
|
-
rubyforge_project: rbrainz
|
14
|
-
description: RBrainz is a Ruby client library to access the MusicBrainz XML web service. RBrainz supports the MusicBrainz XML Metadata Version 1.2, including support for labels and extended release events. RBrainz follows the design of python-musicbrainz2, the reference implementation for a MusicBrainz client library. Developers used to python-musicbrainz2 should already know most of RBrainz' interface. However, RBrainz differs from python-musicbrainz2 wherever it makes the library more Ruby like or easier to use.
|
15
|
-
autorequire: rbrainz
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 0.4.2
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
|
-
-
|
31
|
-
|
7
|
+
- Philipp Wolfer
|
8
|
+
- Nigel Graham
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2008-09-04 00:00:00 +02:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: RBrainz is a Ruby client library to access the MusicBrainz XML web service. RBrainz supports the MusicBrainz XML Metadata Version 1.2, including support for labels and extended release events. RBrainz follows the design of python-musicbrainz2, the reference implementation for a MusicBrainz client library. Developers used to python-musicbrainz2 should already know most of RBrainz' interface. However, RBrainz differs from python-musicbrainz2 wherever it makes the library more Ruby like or easier to use.
|
18
|
+
email: phw@rubyforge.org
|
19
|
+
executables: []
|
20
|
+
|
21
|
+
extensions: []
|
22
|
+
|
23
|
+
extra_rdoc_files:
|
24
|
+
- doc/README.rdoc
|
25
|
+
- LICENSE
|
26
|
+
- TODO
|
27
|
+
- CHANGES
|
32
28
|
files:
|
33
29
|
- Rakefile
|
34
30
|
- LICENSE
|
@@ -170,20 +166,31 @@ files:
|
|
170
166
|
- debian/changelog
|
171
167
|
- debian/copyright
|
172
168
|
- debian/rules
|
173
|
-
|
174
|
-
|
169
|
+
has_rdoc: true
|
170
|
+
homepage: http://rbrainz.rubyforge.org
|
171
|
+
post_install_message:
|
175
172
|
rdoc_options: []
|
176
173
|
|
177
|
-
|
178
|
-
-
|
179
|
-
|
180
|
-
|
181
|
-
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
174
|
+
require_paths:
|
175
|
+
- lib
|
176
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: "0"
|
181
|
+
version:
|
182
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: "0"
|
187
|
+
version:
|
186
188
|
requirements:
|
187
189
|
- "Optional: mb-discid >= 0.1.2 (for calculating disc IDs)"
|
188
|
-
|
190
|
+
rubyforge_project: rbrainz
|
191
|
+
rubygems_version: 1.1.1
|
192
|
+
signing_key:
|
193
|
+
specification_version: 2
|
194
|
+
summary: Ruby library for the MusicBrainz XML web service.
|
195
|
+
test_files: []
|
189
196
|
|