lastfm 1.26.0 → 1.27.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -2
- data/.travis.yml +3 -0
- data/README.md +14 -5
- data/lastfm.gemspec +3 -4
- data/lib/lastfm.rb +0 -1
- data/lib/lastfm/method_category/album.rb +68 -1
- data/lib/lastfm/method_category/artist.rb +7 -0
- data/lib/lastfm/method_category/base.rb +1 -1
- data/lib/lastfm/method_category/track.rb +5 -2
- data/lib/lastfm/method_category/user.rb +2 -2
- data/lib/lastfm/response.rb +19 -1
- data/lib/lastfm/util.rb +6 -11
- data/spec/fixtures/album_get_buylinks.xml +31 -0
- data/spec/fixtures/album_get_info_without_release_date.xml +184 -0
- data/spec/fixtures/album_get_shouts.xml +15 -0
- data/spec/fixtures/album_get_tags.xml +13 -0
- data/spec/fixtures/album_get_top_tags.xml +15 -0
- data/spec/fixtures/album_search.xml +35 -0
- data/spec/fixtures/album_search_no_match.xml +10 -0
- data/spec/fixtures/album_search_single_album.xml +23 -0
- data/spec/fixtures/artist_get_correction.xml +12 -0
- data/spec/fixtures/artist_search.xml +1 -1
- data/spec/fixtures/tag_search.xml +1 -1
- data/spec/fixtures/track_search_no_match.xml +11 -0
- data/spec/fixtures/track_search_single_track.xml +1 -1
- data/spec/fixtures/user_get_loved_tracks_no_tracks.xml +5 -0
- data/spec/fixtures/user_get_loved_tracks_single_track.xml +17 -0
- data/spec/lastfm_spec.rb +34 -34
- data/spec/method_category_spec.rb +1 -1
- data/spec/method_specs/album_spec.rb +255 -25
- data/spec/method_specs/artist_spec.rb +82 -70
- data/spec/method_specs/chart_spec.rb +13 -13
- data/spec/method_specs/event_spec.rb +3 -3
- data/spec/method_specs/geo_spec.rb +13 -13
- data/spec/method_specs/group_spec.rb +4 -4
- data/spec/method_specs/library_spec.rb +7 -7
- data/spec/method_specs/radio_spec.rb +10 -10
- data/spec/method_specs/tag_spec.rb +28 -28
- data/spec/method_specs/tasteometer_spec.rb +4 -4
- data/spec/method_specs/track_spec.rb +91 -73
- data/spec/method_specs/user_spec.rb +124 -94
- data/spec/response_spec.rb +6 -6
- data/spec/util_spec.rb +16 -16
- metadata +33 -23
data/spec/util_spec.rb
CHANGED
@@ -8,42 +8,42 @@ describe Lastfm::Util do
|
|
8
8
|
describe '.build_options' do
|
9
9
|
describe 'with array' do
|
10
10
|
it 'should build options' do
|
11
|
-
subject.build_options(
|
11
|
+
expect(subject.build_options(
|
12
12
|
['foo', nil],
|
13
13
|
[:foo],
|
14
14
|
[[:bar, 'xxx'], [:baz, nil]
|
15
|
-
]).
|
15
|
+
])).to eq({
|
16
16
|
:foo => 'foo',
|
17
17
|
:bar => 'xxx',
|
18
18
|
:baz => nil,
|
19
|
-
}
|
19
|
+
})
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'should use proc object to set optional value' do
|
23
|
-
subject.build_options(
|
23
|
+
expect(subject.build_options(
|
24
24
|
['foo', nil],
|
25
25
|
[:foo],
|
26
26
|
[[:bar, Proc.new { 'xxx' }]
|
27
|
-
]).
|
27
|
+
])).to eq({
|
28
28
|
:foo => 'foo',
|
29
29
|
:bar => 'xxx',
|
30
|
-
}
|
30
|
+
})
|
31
31
|
end
|
32
32
|
|
33
33
|
it 'should raise error if required option is not passed' do
|
34
|
-
|
34
|
+
expect {
|
35
35
|
subject.build_options(
|
36
36
|
[],
|
37
37
|
[:foo],
|
38
38
|
[[:bar, 'xxx'], [:baz, nil]
|
39
39
|
])
|
40
|
-
}.
|
40
|
+
}.to raise_error('foo is required')
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
44
|
describe 'with hash' do
|
45
45
|
it 'should build options' do
|
46
|
-
subject.build_options(
|
46
|
+
expect(subject.build_options(
|
47
47
|
[
|
48
48
|
{
|
49
49
|
:foo => 'foo',
|
@@ -55,15 +55,15 @@ describe Lastfm::Util do
|
|
55
55
|
[
|
56
56
|
[:bar, 'xxx'],
|
57
57
|
[:baz, nil]
|
58
|
-
]).
|
58
|
+
])).to eq({
|
59
59
|
:foo => 'foo',
|
60
60
|
:bar => 'xxx',
|
61
61
|
:baz => 'baz',
|
62
|
-
}
|
62
|
+
})
|
63
63
|
end
|
64
64
|
|
65
65
|
it 'should use proc object to set optional value' do
|
66
|
-
subject.build_options(
|
66
|
+
expect(subject.build_options(
|
67
67
|
[
|
68
68
|
{
|
69
69
|
:foo => 'foo',
|
@@ -72,14 +72,14 @@ describe Lastfm::Util do
|
|
72
72
|
],
|
73
73
|
[:foo],
|
74
74
|
[[:bar, Proc.new { 'xxx' }]
|
75
|
-
]).
|
75
|
+
])).to eq({
|
76
76
|
:foo => 'foo',
|
77
77
|
:bar => 'xxx',
|
78
|
-
}
|
78
|
+
})
|
79
79
|
end
|
80
80
|
|
81
81
|
it 'should raise error if required option is not passed' do
|
82
|
-
|
82
|
+
expect {
|
83
83
|
subject.build_options(
|
84
84
|
[
|
85
85
|
{
|
@@ -92,7 +92,7 @@ describe Lastfm::Util do
|
|
92
92
|
[:bar, 'xxx'],
|
93
93
|
[:baz, nil]
|
94
94
|
])
|
95
|
-
}.
|
95
|
+
}.to raise_error('foo is required')
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lastfm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.27.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- youpy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|
@@ -38,48 +38,34 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: activesupport
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 3.2.0
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 3.2.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
47
|
+
version: 3.4.0
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
54
|
+
version: 3.4.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: rake
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
|
-
- - "
|
59
|
+
- - "<"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
61
|
+
version: 12.3.3
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
|
-
- - "
|
66
|
+
- - "<"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
68
|
+
version: 12.3.3
|
83
69
|
description: A ruby interface for Last.fm web services version 2.0
|
84
70
|
email:
|
85
71
|
- youpy@buycheapviagraonlinenow.com
|
@@ -114,7 +100,16 @@ files:
|
|
114
100
|
- lib/lastfm/method_category/user.rb
|
115
101
|
- lib/lastfm/response.rb
|
116
102
|
- lib/lastfm/util.rb
|
103
|
+
- spec/fixtures/album_get_buylinks.xml
|
117
104
|
- spec/fixtures/album_get_info.xml
|
105
|
+
- spec/fixtures/album_get_info_without_release_date.xml
|
106
|
+
- spec/fixtures/album_get_shouts.xml
|
107
|
+
- spec/fixtures/album_get_tags.xml
|
108
|
+
- spec/fixtures/album_get_top_tags.xml
|
109
|
+
- spec/fixtures/album_search.xml
|
110
|
+
- spec/fixtures/album_search_no_match.xml
|
111
|
+
- spec/fixtures/album_search_single_album.xml
|
112
|
+
- spec/fixtures/artist_get_correction.xml
|
118
113
|
- spec/fixtures/artist_get_events.xml
|
119
114
|
- spec/fixtures/artist_get_images.xml
|
120
115
|
- spec/fixtures/artist_get_info.xml
|
@@ -154,10 +149,13 @@ files:
|
|
154
149
|
- spec/fixtures/track_get_top_fans.xml
|
155
150
|
- spec/fixtures/track_get_top_tags.xml
|
156
151
|
- spec/fixtures/track_search.xml
|
152
|
+
- spec/fixtures/track_search_no_match.xml
|
157
153
|
- spec/fixtures/track_search_single_track.xml
|
158
154
|
- spec/fixtures/user_get_friends.xml
|
159
155
|
- spec/fixtures/user_get_info.xml
|
160
156
|
- spec/fixtures/user_get_loved_tracks.xml
|
157
|
+
- spec/fixtures/user_get_loved_tracks_no_tracks.xml
|
158
|
+
- spec/fixtures/user_get_loved_tracks_single_track.xml
|
161
159
|
- spec/fixtures/user_get_neighbours.xml
|
162
160
|
- spec/fixtures/user_get_new_releases.xml
|
163
161
|
- spec/fixtures/user_get_personal_tags.xml
|
@@ -213,12 +211,21 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
211
|
version: '0'
|
214
212
|
requirements: []
|
215
213
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.
|
214
|
+
rubygems_version: 2.6.8
|
217
215
|
signing_key:
|
218
216
|
specification_version: 4
|
219
217
|
summary: A ruby interface for Last.fm web services version 2.0
|
220
218
|
test_files:
|
219
|
+
- spec/fixtures/album_get_buylinks.xml
|
221
220
|
- spec/fixtures/album_get_info.xml
|
221
|
+
- spec/fixtures/album_get_info_without_release_date.xml
|
222
|
+
- spec/fixtures/album_get_shouts.xml
|
223
|
+
- spec/fixtures/album_get_tags.xml
|
224
|
+
- spec/fixtures/album_get_top_tags.xml
|
225
|
+
- spec/fixtures/album_search.xml
|
226
|
+
- spec/fixtures/album_search_no_match.xml
|
227
|
+
- spec/fixtures/album_search_single_album.xml
|
228
|
+
- spec/fixtures/artist_get_correction.xml
|
222
229
|
- spec/fixtures/artist_get_events.xml
|
223
230
|
- spec/fixtures/artist_get_images.xml
|
224
231
|
- spec/fixtures/artist_get_info.xml
|
@@ -258,10 +265,13 @@ test_files:
|
|
258
265
|
- spec/fixtures/track_get_top_fans.xml
|
259
266
|
- spec/fixtures/track_get_top_tags.xml
|
260
267
|
- spec/fixtures/track_search.xml
|
268
|
+
- spec/fixtures/track_search_no_match.xml
|
261
269
|
- spec/fixtures/track_search_single_track.xml
|
262
270
|
- spec/fixtures/user_get_friends.xml
|
263
271
|
- spec/fixtures/user_get_info.xml
|
264
272
|
- spec/fixtures/user_get_loved_tracks.xml
|
273
|
+
- spec/fixtures/user_get_loved_tracks_no_tracks.xml
|
274
|
+
- spec/fixtures/user_get_loved_tracks_single_track.xml
|
265
275
|
- spec/fixtures/user_get_neighbours.xml
|
266
276
|
- spec/fixtures/user_get_new_releases.xml
|
267
277
|
- spec/fixtures/user_get_personal_tags.xml
|