1
0
Fork 0

Updated readme, travis file

This commit is contained in:
Gregory Eremin 2012-10-17 18:24:16 +04:00
parent 5c519506c0
commit b22e45c65a
2 changed files with 26 additions and 10 deletions

View File

@ -1,3 +1,5 @@
rvm:
- 1.9.2
- 1.9.3
- 2.0.0dev
script: "bundle exec rspec"

View File

@ -1,7 +1,11 @@
## MusicBrainz Web Service wrapper [![Travis CI](https://secure.travis-ci.org/magnolia-fan/musicbrainz.png)](http://travis-ci.org/magnolia-fan/musicbrainz)
## Ruby Version
*IMPORTANT!*
Ruby version 1.9+ required. No support for 1.8.7 anymore.
### Installation
```bash
```
gem install musicbrainz
```
or add this line to your Gemfile
@ -23,11 +27,21 @@ require "musicbrainz"
# Use them like ActiveRecord models
@empire_tracks = @kasabian.release_groups[8].releases.first.tracks
# Setting a cache path enables caching of requests
MusicBrainz::Tools::Cache.cache_path = "tmp/cache"
# Configuring
MusicBrainz.configure do |c|
# Application identity (required)
c.app_name = "My Music App"
c.app_version = "1.0"
c.contact = "support@mymusicapp.com"
# Configuring request interval
MusicBrainz::Tools::Proxy.query_interval = 1.2 # seconds
# Cache config (optional)
c.cache_path = "/tmp/musicbrainz-cache"
c.perform_caching = true
# Querying config (optional)
c.query_interval = 1.2 # seconds
c.tries_limit = 2
end
```
### Api
@ -77,13 +91,13 @@ MusicBrainz::Track
```
### Testing
```bash
bundle rake spec
```
bundle exec rspec
```
### Debug console
```bash
bundle rake console
```
bundle exec irb -r musicbrainz
```
### Contributing
@ -91,7 +105,7 @@ bundle rake console
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Start a feature/bugfix branch (*IMPORTANT*)
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.