lastfm 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/lastfm/method_category/album.rb +1 -1
- data/lib/lastfm/method_category/track.rb +4 -2
- data/lib/lastfm/response.rb +1 -1
- data/spec/fixtures/track_get_correction.xml +16 -14
- data/spec/method_specs/track_spec.rb +5 -3
- metadata +15 -15
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.1
|
@@ -13,9 +13,11 @@ class Lastfm
|
|
13
13
|
regular_method :get_info, [:artist, :track], [[:username, nil]] do |response|
|
14
14
|
response.xml['track']
|
15
15
|
end
|
16
|
-
|
17
|
-
|
16
|
+
|
17
|
+
regular_method :get_correction, [:artist, :track], [] do |response|
|
18
|
+
response.xml['corrections']['correction']
|
18
19
|
end
|
20
|
+
|
19
21
|
regular_method :get_top_fans, [:artist, :track], [] do |response|
|
20
22
|
response.xml['topfans']['user']
|
21
23
|
end
|
data/lib/lastfm/response.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</
|
2
|
+
<lfm status="ok">
|
3
|
+
<corrections>
|
4
|
+
<correction index="0" artistcorrected="1" trackcorrected="1">
|
5
|
+
<track>
|
6
|
+
<name>One More Cup of Coffee</name>
|
7
|
+
<mbid/>
|
8
|
+
<url>www.last.fm/music/The+White+Stripes/_/One+More+Cup+of+Coffee</url>
|
9
|
+
<artist>
|
10
|
+
<name>The White Stripes</name>
|
11
|
+
<mbid>eeb1195b-f213-4ce1-b28c-8565211f8e43</mbid>
|
12
|
+
<url>http://www.last.fm/music/The+White+Stripes</url>
|
13
|
+
</artist>
|
14
|
+
</track>
|
15
|
+
</correction>
|
16
|
+
</corrections>
|
17
|
+
</lfm>
|
@@ -67,11 +67,13 @@ describe '#track' do
|
|
67
67
|
it 'should get correction' do
|
68
68
|
@lastfm.should_receive(:request).with('track.getCorrection', {
|
69
69
|
:artist => 'White Stripes',
|
70
|
-
:track => 'One More Cup of Coffee'
|
71
|
-
:username => 'wainekerr',
|
70
|
+
:track => 'One More Cup of Coffee'
|
72
71
|
}).and_return(make_response('track_get_correction'))
|
73
72
|
|
74
|
-
|
73
|
+
corrections = @lastfm.track.get_correction('White Stripes', 'One More Cup of Coffee')
|
74
|
+
correction = corrections.first
|
75
|
+
|
76
|
+
corrections.size.should eql(1)
|
75
77
|
correction['track']['name'].should == 'One More Cup of Coffee'
|
76
78
|
correction['track']['artist']['name'].should == 'The White Stripes'
|
77
79
|
correction['track']['url'].should == 'www.last.fm/music/The+White+Stripes/_/One+More+Cup+of+Coffee'
|
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.5.
|
4
|
+
version: 1.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement: &
|
16
|
+
requirement: &70126356681880 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70126356681880
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: xml-simple
|
27
|
-
requirement: &
|
27
|
+
requirement: &70126356680500 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70126356680500
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: activesupport
|
38
|
-
requirement: &
|
38
|
+
requirement: &70126356679000 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 3.0.3
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70126356679000
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
|
-
requirement: &
|
49
|
+
requirement: &70126356676000 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 2.8.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70126356676000
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70126356691240 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.6.4
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70126356691240
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rdoc
|
71
|
-
requirement: &
|
71
|
+
requirement: &70126356690380 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70126356690380
|
80
80
|
description: A ruby interface for Last.fm web services version 2.0
|
81
81
|
email: youpy@buycheapviagraonlinenow.com
|
82
82
|
executables: []
|
@@ -167,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: '0'
|
168
168
|
segments:
|
169
169
|
- 0
|
170
|
-
hash: -
|
170
|
+
hash: -693805763570427911
|
171
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
172
|
none: false
|
173
173
|
requirements:
|