robbie 2.1.3 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b9b52200d4521e75aea2d69bafd050f09d47abe
4
- data.tar.gz: 136c5cd1c08b207cd4d503e35787506bdf7730c4
3
+ metadata.gz: ac03016b8572101ecb13799dc7deea787df0e991
4
+ data.tar.gz: 11f25b14bd3442ce863e4983b34cef532a22efb3
5
5
  SHA512:
6
- metadata.gz: dddf4d28eb6898e3b98e35dafd31b536ca702969f65eaf2ce5886cb358a244f0bfcae5615b1fc317a8056c4c55ffa984e3c1c054b9ddab504296f622b0d0cc42
7
- data.tar.gz: 7118329fd3cc0d1d00d34c2ebcbdbd79ac1750d51bcaed155f95c7fcf43db6d3f0fafaca5d6b65b70756ba144f4753c3ac3e4d4cef819d453175a2dba9f1436e
6
+ metadata.gz: 1dfb4bd4161551c0de79ae4a7e4a6a630393482ca786a80ec4be819c6c81322d261458bf193dd64ae1f4f658af5cb5107673d1964fd4220ddeb2e1b2403d35e5
7
+ data.tar.gz: 229fe1d903d2a827abe6b6062626bef2365a3515256a87bed84ffaf201a6dd91aa1e41bffc09c5ff5a2a14e43289bd79cbd777fdf01635e3cd204540d0271574
@@ -38,11 +38,15 @@ module Request
38
38
  @res = HTTP.get("http://ws.audioscrobbler.com/2.0/?method=track.getInfo&track=#{@song}&artist=#{@artist}&api_key=0a7d3b25ed857f679eba1a353e98a658&format=json").body
39
39
  @json = JSON.parse(@res)
40
40
 
41
- #@year = @json['track']['wiki']['published'] || "No Year data available"
41
+ if @year = @json['track']['wiki'].nil?
42
+ @year = "Not Available"
43
+ else
44
+ @year = @json['track']['wiki']['published']
45
+ end
42
46
 
43
47
  puts "Title: \t\t#{@json['track']['name']}"
44
48
  puts "Artist: \t#{@json['track']['artist']['name']}"
45
- # puts "Year: \t\t#{@year}"
49
+ puts "Year: \t\t#{@year}"
46
50
  puts "Duration: \t#{@json['track']['duration'].to_i/1000} seconds"
47
51
  end
48
52
 
@@ -1,4 +1,4 @@
1
1
  module Robbie
2
- VERSION = '2.1.3'
2
+ VERSION = '2.1.4'
3
3
  E_VERSION = "robbie v#{VERSION}"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robbie
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Poile