rapgenius 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5774eb3c5cf310838d23e2d1f75edc1f344fa73b
4
- data.tar.gz: 16cfb10f58eecf93d6e631092514460610beaae5
3
+ metadata.gz: 49d2a75888cab784e125d546bd00a1a4679e2c7e
4
+ data.tar.gz: d0af868132d15dd99eb641a1334df3e368d7a008
5
5
  SHA512:
6
- metadata.gz: b7dfce6f3a65a584ad8e4283aa47c8d0c48e5e6cf2872968a85c000e4924e28563653e91de3187f292ef3c214d4a2299905b3715818ca9c6e825dea3f0584f69
7
- data.tar.gz: 365ccc48ad15cbc2984df20db6f30d46f407b2db4fe4365dbad7e9246a8b0736134eb1665bc2aaeec132c6431ef740ce82554f3fc5910d06cacda13de848505f
6
+ metadata.gz: 87ea2f40881d158f9b9d41a61ccc28bf296b09e549cb49d671cae27c9f176f2c5a0f8e20416f976101d95af1feb55d71db0cef7c4d0f3ffea10d9bfffb50be85
7
+ data.tar.gz: 5ee75b7e8fd7645d160d1623e9437384d023b53b26e95aa5dc2fa3cf294a60bb44b858b99b7891ed08b6fda22373facf10b22fbf1770c5d491d41ec567fa69cf
@@ -31,4 +31,8 @@ __v1.0.1__ (1st February 2014)
31
31
  __v1.0.2__ (2nd February 2014)
32
32
 
33
33
  * Defines a specific `RapGenius::NotFoundError` for when requests to the API
34
- return a 404
34
+ return a 404
35
+
36
+ __v1.0.3__ (2nd February 2014)
37
+
38
+ * Adds `#id` accessor to Artist
data/README.md CHANGED
@@ -16,7 +16,7 @@ a private API, which this gem makes use of.
16
16
  Install the gem, and you're ready to go. Simply add the following to your
17
17
  Gemfile:
18
18
 
19
- `gem "rapgenius", "~> 1.0.0"`
19
+ `gem "rapgenius", "~> 1.0.3"`
20
20
 
21
21
  ## Usage
22
22
 
@@ -136,6 +136,11 @@ artist.songs(page: 2)
136
136
  # => [#<RapGenius::Song:0x007fccdb884398...]
137
137
  ```
138
138
 
139
+ ## Examples
140
+
141
+ I've built a game called "Guess The Track" using the gem - find out more, grab
142
+ the source or play for yourself [here](https://github.com/timrogers/rapgenius/blob/master/examples/guess_the_track.md).
143
+
139
144
  ## Contributing
140
145
 
141
146
  If you'd like to contribute anything else, go ahead or better still, make an issue and we can talk it over and spec it out! A few quick tips:
@@ -150,6 +155,4 @@ Copyright (c) 2013-2014 Tim Rogers. See LICENSE for details.
150
155
 
151
156
  ## Get in touch
152
157
 
153
- [timrogers](https://github.com/timrogers) and [tsigo](https://github.com/tsigo) are the gem's primary contributors.
154
-
155
158
  Any questions, thoughts or comments? Email me at <me@timrogers.co.uk> or create an issue.
@@ -0,0 +1,7 @@
1
+ I've built "Guess The Track", a Ruby on Rails based game where you guess
2
+ the names of your favorite artist's tracks just from the lyrics.
3
+
4
+ Check out the source [here](https://github.com/timrogers/guess-the-track), or
5
+ play at <https://guess-the-track.herokuapp.com>.
6
+
7
+ ![Screenshot](http://i.imgur.com/8vFa8Le.png)
@@ -3,6 +3,8 @@ module RapGenius
3
3
  class Artist
4
4
  include RapGenius::Client
5
5
 
6
+ attr_reader :id
7
+
6
8
  def self.find(id)
7
9
  self.new(id: id).tap { |artist| artist.document }
8
10
  end
@@ -2,6 +2,7 @@
2
2
  module RapGenius
3
3
  class Song
4
4
  include RapGenius::Client
5
+
5
6
  attr_reader :id
6
7
 
7
8
  def self.find(id)
@@ -1,3 +1,3 @@
1
1
  module RapGenius
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -7,6 +7,7 @@ module RapGenius
7
7
 
8
8
  its(:url) { should eq "http://rapgenius.com/artists/Drake" }
9
9
  its(:name) { should eq "Drake" }
10
+ its(:id) { should eq 130 }
10
11
  its(:image) { should eq "http://images.rapgenius.com/2b3fa8326a5277fa31f2012a7b581e2e.500x319x11.gif" }
11
12
  its(:description) { should include "Drake is part of a generation of new rappers" }
12
13
 
@@ -3,10 +3,10 @@ require 'spec_helper'
3
3
  module RapGenius
4
4
  describe Line, vcr: { cassette_name: "line-2638695" } do
5
5
 
6
- let(:line) { described_class.find("2638695") }
6
+ let(:line) { described_class.find(2638695) }
7
7
  subject { line }
8
8
 
9
- its(:id) { should eq "2638695" }
9
+ its(:id) { should eq 2638695 }
10
10
  its(:song) { should be_a Song }
11
11
  its(:lyric) { should eq "Versace, Versace, Medusa head on me like I'm 'luminati" }
12
12
  its("explanations.first") { should include "Versace’s logo is the head of Medusa" }
@@ -5,6 +5,7 @@ module RapGenius
5
5
  context "given Migos's Versace", vcr: { cassette_name: "song-176872" } do
6
6
  subject(:song) { described_class.find(176872) }
7
7
 
8
+ its(:id) { should eq 176872 }
8
9
  its(:url) { should eq "http://rapgenius.com/Migos-versace-lyrics" }
9
10
  its(:title) { should eq "Versace" }
10
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapgenius
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Rogers
@@ -99,6 +99,7 @@ files:
99
99
  - LICENSE
100
100
  - README.md
101
101
  - Rakefile
102
+ - examples/guess_the_track.md
102
103
  - lib/rapgenius.rb
103
104
  - lib/rapgenius/artist.rb
104
105
  - lib/rapgenius/client.rb