rapgenius 1.0.1 → 1.0.2
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 +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/rapgenius/client.rb +5 -1
- data/lib/rapgenius/exceptions.rb +4 -0
- data/lib/rapgenius/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5774eb3c5cf310838d23e2d1f75edc1f344fa73b
|
|
4
|
+
data.tar.gz: 16cfb10f58eecf93d6e631092514460610beaae5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7dfce6f3a65a584ad8e4283aa47c8d0c48e5e6cf2872968a85c000e4924e28563653e91de3187f292ef3c214d4a2299905b3715818ca9c6e825dea3f0584f69
|
|
7
|
+
data.tar.gz: 365ccc48ad15cbc2984df20db6f30d46f407b2db4fe4365dbad7e9246a8b0736134eb1665bc2aaeec132c6431ef740ce82554f3fc5910d06cacda13de848505f
|
data/CHANGELOG.md
CHANGED
|
@@ -22,4 +22,13 @@ __v1.0.0__ (27th January 2014)
|
|
|
22
22
|
* Switches to using the private REST API used by the soon to be released
|
|
23
23
|
[Genius iOS app](http://rapgenius.com/static/app).
|
|
24
24
|
* Vastly improves quality of data available on songs and their lyrics
|
|
25
|
-
* Provides access to media items and song artists
|
|
25
|
+
* Provides access to media items and song artists
|
|
26
|
+
|
|
27
|
+
__v1.0.1__ (1st February 2014)
|
|
28
|
+
|
|
29
|
+
* Allows pagination through an artist's songs
|
|
30
|
+
|
|
31
|
+
__v1.0.2__ (2nd February 2014)
|
|
32
|
+
|
|
33
|
+
* Defines a specific `RapGenius::NotFoundError` for when requests to the API
|
|
34
|
+
return a 404
|
data/lib/rapgenius/client.rb
CHANGED
|
@@ -33,7 +33,11 @@ module RapGenius
|
|
|
33
33
|
response = HTTPClient.get(url)
|
|
34
34
|
|
|
35
35
|
if response.code != 200
|
|
36
|
-
|
|
36
|
+
if response.code == 404
|
|
37
|
+
raise RapGenius::NotFoundError
|
|
38
|
+
else
|
|
39
|
+
raise RapGenius::Error, "Received a #{response.code} HTTP response"
|
|
40
|
+
end
|
|
37
41
|
end
|
|
38
42
|
|
|
39
43
|
response.parsed_response
|
data/lib/rapgenius/exceptions.rb
CHANGED
data/lib/rapgenius/version.rb
CHANGED
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.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Rogers
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-02-
|
|
12
|
+
date: 2014-02-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: httparty
|