magnolia-fan/musicbrainz — pull request #7 by blakink (2012-09-23 11:33:24+00:00)
Title: Allow custom user_agent

Hi, I wanted to customize the user agent as described in http://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting

Btw, I wanted an easier way to play with the configuration.

So, here is my suggestion :

````ruby
MusicBrainz.configure do |config|
config.application = "MyApp"
config.version = MyApp.version
config.contact = "foo@example.com"

config.query_interval = 2
config.tries_limit = 10
end
````

The User-Agent will look like:

````ruby
> MusicBrainz.config.user_agent
=> "MyApp/0.0.0 (foo@example.com) via gem musicbrainz (https://github.com/magnolia-fan/musicbrainz) @ mylaptop.local"
````

Maybe you want to keep the credits, or not…… as you feel.