vk_music 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vk_music/constants.rb +1 -1
- data/test/test_playlist.rb +8 -0
- data/vk_music.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6efa2ab0abdb49d6cf5abf20aa20771f60539cd2d7c23abdb7d0aedf56cde42f
|
4
|
+
data.tar.gz: 283ca779eba1b54ed4ba2adb14e37d8479957bf1bbd15a3e48263da05fd97055
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40046f3b1034d944bc2aeb0c8ab4b7ca467992ec426aaa614dbf8c4cda1c8e1ed53745b9c22fceaca6eb46f5498dbb7b9fa0442d3287fdfbef52d9afa1fd1fed
|
7
|
+
data.tar.gz: 1b9d7cd5d63bdb7ba78cd1b315957d4c1cce2eaea96e8bf5569ca5cc0841ee55e4247db83eb97d773514df91fd31cd870c3878566ded05d70908e591cb976350
|
data/lib/vk_music/constants.rb
CHANGED
@@ -64,7 +64,7 @@ module VkMusic
|
|
64
64
|
|
65
65
|
##
|
66
66
|
# Playlist URL regular expression.
|
67
|
-
VK_PLAYLIST_URL_POSTFIX = /.*(?:audio_playlist|album\/)(-?\d+)_(\d+)(?:(?:(?:.*(?=&access_hash=)&access_hash=)|\/|%2F)([\da-z]+))?/
|
67
|
+
VK_PLAYLIST_URL_POSTFIX = /.*(?:audio_playlist|album\/)(-?\d+)_(\d+)(?:(?:(?:.*(?=&access_hash=)&access_hash=)|\/|%2F|_)([\da-z]+))?/
|
68
68
|
|
69
69
|
##
|
70
70
|
# Post URL regular expression #1.
|
data/test/test_playlist.rb
CHANGED
@@ -26,6 +26,14 @@ class TestVkMusic < MiniTest::Test
|
|
26
26
|
refute_empty(pl[-1].url, "Audio must have download url")
|
27
27
|
end
|
28
28
|
|
29
|
+
def test_playlist_small_3
|
30
|
+
pl = CLIENT.playlist("https://vk.com/music/album/-2000637322_637322_e677ea2eab62dc17a8")
|
31
|
+
refute_empty(pl, "This playlist must not be empty")
|
32
|
+
assert_instance_of(VkMusic::Audio, pl[0], "Playlist members must be of class Audio")
|
33
|
+
refute_empty(pl[0].url, "Audio must have download url")
|
34
|
+
refute_empty(pl[-1].url, "Audio must have download url")
|
35
|
+
end
|
36
|
+
|
29
37
|
def test_big_url
|
30
38
|
pl = CLIENT.playlist("https://m.vk.com/audio?act=audio_playlist256492540_83617715&from=search_owned_playlist&access_hash=b8d408241bcfb60583&back_url=%2Faudios-39786657%3Fq%3Dmashup%26tab%3Downed&back_hash=76ef9186ac6f248a27")
|
31
39
|
refute_empty(pl, "This playlist must not be empty")
|
data/vk_music.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.name = "vk_music"
|
3
3
|
s.summary = "Provides interface to work with VK music via HTTP requests"
|
4
4
|
s.description = "Library to work with audios on popular Russian social network vk.com. VK disabled their public API for audios, so it is now necessary to use parsers instead."
|
5
|
-
s.version = "2.1.
|
5
|
+
s.version = "2.1.2"
|
6
6
|
s.author = "Kuznetsov Vladislav"
|
7
7
|
s.email = "fizvlad@mail.ru"
|
8
8
|
s.homepage = "https://github.com/fizvlad/vk-music-rb"
|