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 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 206 2008-04-23 19:42:00Z phw $
68
+ $Id: CHANGES 219 2008-09-04 18:14:48Z phw $
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- # $Id: Rakefile 195 2007-12-17 21:44:45Z phw $
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.author = ['Philipp Wolfer', 'Nigel Graham']
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'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- # $Id: version.rb 206 2008-04-23 19:42:00Z phw $
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.1'
13
+ RBRAINZ_VERSION = '0.4.2'
14
14
 
15
15
  end
@@ -1,4 +1,4 @@
1
- # $Id: mbxml.rb 202 2008-03-09 21:11:49Z phw $
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.new(e.to_s)
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 202 2008-03-09 21:11:49Z phw $
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("response didn't contain user data")
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://test.musicbrainz.org/doc/PUID
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.new(e.to_s)
408
+ raise ResponseError, e.to_s
409
409
  end
410
410
  unless entity
411
- raise ResponseError.new("server didn't return #{entity_type.to_s} with the MBID #{id.to_s}")
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.new(e.to_s)
425
+ raise ResponseError, e.to_s
426
426
  end
427
427
  return collection
428
428
  end
@@ -1,4 +1,4 @@
1
- # $Id: webservice.rb 203 2008-03-17 11:00:15Z phw $
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[:user] && @proxy[:password]
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( @username, @password, response)
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[:user] && @proxy[:password]
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( @username, @password, response)
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.1
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
- - - Philipp Wolfer
31
- - Nigel Graham
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
- test_files: []
174
-
169
+ has_rdoc: true
170
+ homepage: http://rbrainz.rubyforge.org
171
+ post_install_message:
175
172
  rdoc_options: []
176
173
 
177
- extra_rdoc_files:
178
- - doc/README.rdoc
179
- - LICENSE
180
- - TODO
181
- - CHANGES
182
- executables: []
183
-
184
- extensions: []
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
- dependencies: []
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