lastfm 1.21.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -0
- data/lastfm.gemspec +1 -1
- data/lib/lastfm/method_category/artist.rb +1 -2
- data/spec/method_specs/artist_spec.rb +34 -15
- metadata +4 -4
data/.travis.yml
CHANGED
data/lastfm.gemspec
CHANGED
@@ -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.
|
15
|
+
gem.version = "1.22.0"
|
16
16
|
gem.license = 'MIT'
|
17
17
|
|
18
18
|
gem.add_dependency "xml-simple"
|
@@ -131,21 +131,40 @@ describe '#artist' do
|
|
131
131
|
end
|
132
132
|
|
133
133
|
describe '#get_top_tags' do
|
134
|
-
|
135
|
-
|
136
|
-
:artist
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
134
|
+
context 'with artist' do
|
135
|
+
it 'should get artist top tags' do
|
136
|
+
@lastfm.should_receive(:request).with('artist.getTopTags', {
|
137
|
+
:artist => 'Giorgio Moroder',
|
138
|
+
:autocorrect => nil
|
139
|
+
}).and_return(make_response('artist_get_top_tags'))
|
140
|
+
|
141
|
+
tags = @lastfm.artist.get_top_tags(:artist => 'Giorgio Moroder')
|
142
|
+
tags.size.should == 5
|
143
|
+
tags[0]['name'].should == 'electronic'
|
144
|
+
tags[0]['count'].should == '100'
|
145
|
+
tags[0]['url'].should == 'http://www.last.fm/tag/electronic'
|
146
|
+
tags[1]['name'].should == 'Disco'
|
147
|
+
tags[1]['count'].should == '97'
|
148
|
+
tags[1]['url'].should == 'http://www.last.fm/tag/disco'
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
context 'with mbid' do
|
153
|
+
it 'should get artist top tags' do
|
154
|
+
@lastfm.should_receive(:request).with('artist.getTopTags', {
|
155
|
+
:mbid => 'xxxxx',
|
156
|
+
:autocorrect => nil
|
157
|
+
}).and_return(make_response('artist_get_top_tags'))
|
158
|
+
|
159
|
+
tags = @lastfm.artist.get_top_tags(:mbid => 'xxxxx')
|
160
|
+
tags.size.should == 5
|
161
|
+
tags[0]['name'].should == 'electronic'
|
162
|
+
tags[0]['count'].should == '100'
|
163
|
+
tags[0]['url'].should == 'http://www.last.fm/tag/electronic'
|
164
|
+
tags[1]['name'].should == 'Disco'
|
165
|
+
tags[1]['count'].should == '97'
|
166
|
+
tags[1]['url'].should == 'http://www.last.fm/tag/disco'
|
167
|
+
end
|
149
168
|
end
|
150
169
|
end
|
151
170
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lastfm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.22.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: xml-simple
|
@@ -213,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
segments:
|
215
215
|
- 0
|
216
|
-
hash:
|
216
|
+
hash: -4186265295065313550
|
217
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
218
|
none: false
|
219
219
|
requirements:
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
version: '0'
|
223
223
|
segments:
|
224
224
|
- 0
|
225
|
-
hash:
|
225
|
+
hash: -4186265295065313550
|
226
226
|
requirements: []
|
227
227
|
rubyforge_project:
|
228
228
|
rubygems_version: 1.8.24
|