lastfm 1.27.0 → 1.27.1

This diff has not been reviewed by any users.
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: 10b162c132972d25c1e26e047ca3cd4b23a5c40b
4
- data.tar.gz: 45cd8bb96eed2cd4c7f9e2995443a76451983bca
3
+ metadata.gz: a7932f8ef6da496e10123cc5bc240b713ef65395
4
+ data.tar.gz: d53cbc0e32c1cd6b2238e1ae6fac7224684fc411
5
5
  SHA512:
6
- metadata.gz: 849fa8b0f687be981575cffa0c91deca042c088ef75121b02291da04d7e8624f1638f6433c59b4d769d5909e4d92dadec51cf45959646b2d8bcecbc64c5f0a98
7
- data.tar.gz: f521209a84aa6dfe273a32659903d2d57b25637e3dd8d7fc206bef65ad5cd9ae9697dee1f7909049a1c717b1cb257332655d2b2801601b0879018f51801958c1
6
+ metadata.gz: b0b99c884b07000564a69955391b60a4452d808d374864c1e94d822581efad5d564948f47e0c8e54aaaac36cdae85161d8b98b66e96391629ae28c737099607a
7
+ data.tar.gz: 5923778f2c4b8926ab51091368182c4bb9a980f1fc419881d1ad42cdf51784e991639abefeb02e2dfa98fd4193548dada46795cc4d4a635afedc7eace4a493f8
data/README.md CHANGED
@@ -24,6 +24,7 @@ lastfm.track.update_now_playing(artist: 'Hujiko Pro', track: 'acid acid 7riddim'
24
24
  * 1.9.3
25
25
  * 2.0.0
26
26
  * 2.1.0
27
+ * 2.2.0
27
28
 
28
29
  ## Supported API Methods
29
30
 
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
13
13
  gem.name = %q{lastfm}
14
14
  gem.require_paths = ["lib"]
15
- gem.version = "1.27.0"
15
+ gem.version = "1.27.1"
16
16
  gem.license = 'MIT'
17
17
 
18
18
  gem.add_dependency "xml-simple"
@@ -30,7 +30,7 @@ class Lastfm
30
30
  ) do |response|
31
31
  result = response.xml['album']
32
32
 
33
- result['releasedate'].lstrip! unless result['releasedate'].empty?
33
+ result['releasedate'].lstrip! unless result.nil? || result['releasedate'].nil? || result['releasedate'].empty?
34
34
  result
35
35
  end
36
36
 
@@ -8,7 +8,8 @@ class Lastfm
8
8
  def initialize(body)
9
9
  @xml = XmlSimple.xml_in(body, 'ForceArray' => ['image', 'tag', 'user', 'event', 'correction'])
10
10
  rescue REXML::ParseException
11
- @xml = XmlSimple.xml_in(body.encode(Encoding.find("ISO-8859-1"), :undef => :replace), 'ForceArray' => ['image', 'tag', 'user', 'event', 'correction'])
11
+ @xml = XmlSimple.xml_in(body.encode(Encoding.find("ISO-8859-1"), :undef => :replace),
12
+ 'ForceArray' => ['image', 'tag', 'user', 'event', 'correction'])
12
13
  end
13
14
 
14
15
  def success?
@@ -0,0 +1,184 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <lfm status="ok">
3
+ <album>
4
+ <name>Believe</name>
5
+ <artist>Cher</artist>
6
+ <id>2026126</id>
7
+ <mbid>61bf0388-b8a9-48f4-81d1-7eb02706dfb0</mbid>
8
+ <url>http://www.last.fm/music/Cher/Believe</url>
9
+ <image size="small">http://userserve-ak.last.fm/serve/34s/42806845.png</image>
10
+ <image size="medium">http://userserve-ak.last.fm/serve/64s/42806845.png</image>
11
+ <image size="large">http://userserve-ak.last.fm/serve/174s/42806845.png</image>
12
+ <image size="extralarge">http://userserve-ak.last.fm/serve/300x300/42806845.png</image>
13
+ <image size="mega">http://userserve-ak.last.fm/serve/_/42806845/Believe++600++600+PNG.png</image>
14
+ <listeners>179749</listeners>
15
+ <playcount>838056</playcount>
16
+ <tracks>
17
+ <track rank="1">
18
+ <name>Believe</name>
19
+ <duration>239</duration>
20
+ <mbid/>
21
+ <url>http://www.last.fm/music/Cher/_/Believe</url>
22
+ <streamable fulltrack="0">1</streamable>
23
+ <artist>
24
+ <name>Cher</name>
25
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
26
+ <url>http://www.last.fm/music/Cher</url>
27
+ </artist>
28
+ </track>
29
+ <track rank="2">
30
+ <name>The Power</name>
31
+ <duration>235</duration>
32
+ <mbid/>
33
+ <url>http://www.last.fm/music/Cher/_/The+Power</url>
34
+ <streamable fulltrack="0">0</streamable>
35
+ <artist>
36
+ <name>Cher</name>
37
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
38
+ <url>http://www.last.fm/music/Cher</url>
39
+ </artist>
40
+ </track>
41
+ <track rank="3">
42
+ <name>Runaway</name>
43
+ <duration>285</duration>
44
+ <mbid/>
45
+ <url>http://www.last.fm/music/Cher/_/Runaway</url>
46
+ <streamable fulltrack="0">0</streamable>
47
+ <artist>
48
+ <name>Cher</name>
49
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
50
+ <url>http://www.last.fm/music/Cher</url>
51
+ </artist>
52
+ </track>
53
+ <track rank="4">
54
+ <name>All Or Nothing</name>
55
+ <duration>237</duration>
56
+ <mbid/>
57
+ <url>http://www.last.fm/music/Cher/_/All+Or+Nothing</url>
58
+ <streamable fulltrack="0">1</streamable>
59
+ <artist>
60
+ <name>Cher</name>
61
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
62
+ <url>http://www.last.fm/music/Cher</url>
63
+ </artist>
64
+ </track>
65
+ <track rank="5">
66
+ <name>Strong Enough</name>
67
+ <duration>223</duration>
68
+ <mbid/>
69
+ <url>http://www.last.fm/music/Cher/_/Strong+Enough</url>
70
+ <streamable fulltrack="0">1</streamable>
71
+ <artist>
72
+ <name>Cher</name>
73
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
74
+ <url>http://www.last.fm/music/Cher</url>
75
+ </artist>
76
+ </track>
77
+ <track rank="6">
78
+ <name>Dov'è l'amore</name>
79
+ <duration>257</duration>
80
+ <mbid/>
81
+ <url>http://www.last.fm/music/Cher/_/Dov%27%C3%A8+l%27amore</url>
82
+ <streamable fulltrack="0">0</streamable>
83
+ <artist>
84
+ <name>Cher</name>
85
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
86
+ <url>http://www.last.fm/music/Cher</url>
87
+ </artist>
88
+ </track>
89
+ <track rank="7">
90
+ <name>Takin' Back My Heart</name>
91
+ <duration>271</duration>
92
+ <mbid/>
93
+ <url>http://www.last.fm/music/Cher/_/Takin%27+Back+My+Heart</url>
94
+ <streamable fulltrack="0">0</streamable>
95
+ <artist>
96
+ <name>Cher</name>
97
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
98
+ <url>http://www.last.fm/music/Cher</url>
99
+ </artist>
100
+ </track>
101
+ <track rank="8">
102
+ <name>Taxi Taxi</name>
103
+ <duration>302</duration>
104
+ <mbid/>
105
+ <url>http://www.last.fm/music/Cher/_/Taxi+Taxi</url>
106
+ <streamable fulltrack="0">0</streamable>
107
+ <artist>
108
+ <name>Cher</name>
109
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
110
+ <url>http://www.last.fm/music/Cher</url>
111
+ </artist>
112
+ </track>
113
+ <track rank="9">
114
+ <name>Love Is the Groove</name>
115
+ <duration>270</duration>
116
+ <mbid/>
117
+ <url>http://www.last.fm/music/Cher/_/Love+Is+the+Groove</url>
118
+ <streamable fulltrack="0">0</streamable>
119
+ <artist>
120
+ <name>Cher</name>
121
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
122
+ <url>http://www.last.fm/music/Cher</url>
123
+ </artist>
124
+ </track>
125
+ <track rank="10">
126
+ <name>We All Sleep Alone</name>
127
+ <duration>233</duration>
128
+ <mbid/>
129
+ <url>http://www.last.fm/music/Cher/_/We+All+Sleep+Alone</url>
130
+ <streamable fulltrack="0">1</streamable>
131
+ <artist>
132
+ <name>Cher</name>
133
+ <mbid>bfcc6d75-a6a5-4bc6-8282-47aec8531818</mbid>
134
+ <url>http://www.last.fm/music/Cher</url>
135
+ </artist>
136
+ </track>
137
+ </tracks>
138
+ <toptags>
139
+ <tag>
140
+ <name>pop</name>
141
+ <url>http://www.last.fm/tag/pop</url>
142
+ </tag>
143
+ <tag>
144
+ <name>90s</name>
145
+ <url>http://www.last.fm/tag/90s</url>
146
+ </tag>
147
+ <tag>
148
+ <name>dance</name>
149
+ <url>http://www.last.fm/tag/dance</url>
150
+ </tag>
151
+ <tag>
152
+ <name>1998</name>
153
+ <url>http://www.last.fm/tag/1998</url>
154
+ </tag>
155
+ <tag>
156
+ <name>albums i own</name>
157
+ <url>http://www.last.fm/tag/albums%20i%20own</url>
158
+ </tag>
159
+ </toptags>
160
+ <wiki>
161
+ <published>Sat, 6 Mar 2010 16:48:03 +0000</published>
162
+ <summary><![CDATA[Believe is the twenty-third studio album by American singer-actress Cher, released on November 10, 1998 by Warner Bros. Records. The RIAA certified it Quadruple Platinum on December 23, 1999, recognizing four million shipments in the United States; Worldwide, the album has sold more than 20 million copies, making it the biggest-selling album of her career. In 1999 the album received three Grammy Awards nominations including &quot;Record of the Year&quot;, &quot;Best Pop Album&quot; and winning &quot;Best Dance Recording&quot; for the single &quot;Believe&quot;. ]]></summary>
163
+ <content><![CDATA[Believe is the twenty-third studio album by American singer-actress Cher, released on November 10, 1998 by Warner Bros. Records. The RIAA certified it Quadruple Platinum on December 23, 1999, recognizing four million shipments in the United States; Worldwide, the album has sold more than 20 million copies, making it the biggest-selling album of her career. In 1999 the album received three Grammy Awards nominations including &quot;Record of the Year&quot;, &quot;Best Pop Album&quot; and winning &quot;Best Dance Recording&quot; for the single &quot;Believe&quot;.
164
+
165
+ It was released by Warner Bros. Records at the end of 1998. The album was executive produced by Rob Dickens. Upon its debut, critical reception was generally positive. Believe became Cher's most commercially-successful release, reached number one and Top 10 all over the world. In the United States, the album was released on November 10, 1998, and reached number four on the Billboard 200 chart, where it was certified four times platinum.
166
+
167
+ The album featured a change in Cher's music; in addition, Believe presented a vocally stronger Cher and a massive use of vocoder and Auto-Tune. In 1999, the album received 3 Grammy Awards nominations for &quot;Record of the Year&quot;, &quot;Best Pop Album&quot; and winning &quot;Best Dance Recording&quot;. Throughout 1999 and into 2000 Cher was nominated and winning many awards for the album including a Billboard Music Award for &quot;Female Vocalist of the Year&quot;, Lifelong Contribution Awards and a Star on the Walk of Fame shared with former Sonny Bono. The boost in Cher's popularity led to a very successful Do You Believe? Tour.
168
+
169
+ The album was dedicated to Sonny Bono, Cher's former husband who died earlier that year from a skiing accident.
170
+
171
+ Cher also recorded a cover version of &quot;Love Is in the Air&quot; during early sessions for this album. Although never officially released, the song has leaked on file sharing networks.
172
+
173
+ Singles
174
+
175
+
176
+ &quot;Believe&quot;
177
+ &quot;Strong Enough&quot;
178
+ &quot;All or Nothing&quot;
179
+ &quot;Dov'è L'Amore&quot;
180
+
181
+ User-contributed text is available under the Creative Commons By-SA License and may also be available under the GNU FDL.]]></content>
182
+ </wiki>
183
+ </album>
184
+ </lfm>
@@ -131,6 +131,15 @@ describe '#album' do
131
131
  album['tracks']['track'][0]['duration'].should == '239'
132
132
  album['tracks']['track'][0]['url'].should == 'http://www.last.fm/music/Cher/_/Believe'
133
133
  end
134
+
135
+ it 'works without release date' do
136
+ @lastfm.should_receive(:request).with('album.getInfo', {
137
+ :mbid => 'xxxxx'
138
+ }).and_return(make_response('album_get_info_without_release_date'))
139
+
140
+ album = @lastfm.album.get_info(:mbid => 'xxxxx')
141
+ album['name'].should == 'Believe'
142
+ end
134
143
  end
135
144
 
136
145
  describe '#get_shouts' do
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lastfm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.27.0
4
+ version: 1.27.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - youpy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-06 00:00:00.000000000 Z
11
+ date: 2015-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-simple
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httparty
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 3.2.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 3.2.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 2.8.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.8.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: A ruby interface for Last.fm web services version 2.0
@@ -87,9 +87,9 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".gitignore"
91
- - ".rspec"
92
- - ".travis.yml"
90
+ - .gitignore
91
+ - .rspec
92
+ - .travis.yml
93
93
  - Gemfile
94
94
  - LICENSE
95
95
  - README.md
@@ -116,6 +116,7 @@ files:
116
116
  - lib/lastfm/util.rb
117
117
  - spec/fixtures/album_get_buylinks.xml
118
118
  - spec/fixtures/album_get_info.xml
119
+ - spec/fixtures/album_get_info_without_release_date.xml
119
120
  - spec/fixtures/album_get_shouts.xml
120
121
  - spec/fixtures/album_get_tags.xml
121
122
  - spec/fixtures/album_get_top_tags.xml
@@ -214,23 +215,24 @@ require_paths:
214
215
  - lib
215
216
  required_ruby_version: !ruby/object:Gem::Requirement
216
217
  requirements:
217
- - - ">="
218
+ - - '>='
218
219
  - !ruby/object:Gem::Version
219
220
  version: '0'
220
221
  required_rubygems_version: !ruby/object:Gem::Requirement
221
222
  requirements:
222
- - - ">="
223
+ - - '>='
223
224
  - !ruby/object:Gem::Version
224
225
  version: '0'
225
226
  requirements: []
226
227
  rubyforge_project:
227
- rubygems_version: 2.2.0.rc.1
228
+ rubygems_version: 2.0.14
228
229
  signing_key:
229
230
  specification_version: 4
230
231
  summary: A ruby interface for Last.fm web services version 2.0
231
232
  test_files:
232
233
  - spec/fixtures/album_get_buylinks.xml
233
234
  - spec/fixtures/album_get_info.xml
235
+ - spec/fixtures/album_get_info_without_release_date.xml
234
236
  - spec/fixtures/album_get_shouts.xml
235
237
  - spec/fixtures/album_get_tags.xml
236
238
  - spec/fixtures/album_get_top_tags.xml