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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40fe252314af6fe66fe807cee91c7f8cb82c590947e7a773ecb36b19942953de
4
- data.tar.gz: f1a9aa1189bc179b3a068f88fda05df8551ae05e148c02bea9ac51cc7d924a82
3
+ metadata.gz: 6efa2ab0abdb49d6cf5abf20aa20771f60539cd2d7c23abdb7d0aedf56cde42f
4
+ data.tar.gz: 283ca779eba1b54ed4ba2adb14e37d8479957bf1bbd15a3e48263da05fd97055
5
5
  SHA512:
6
- metadata.gz: c1a3ce11b31f306948a6ac5f695eecbca111627dc482857820184304b1992be3de6f8794332596af73af2bba0010cfc899f89c538f1d73baf2afdf6e21bc7924
7
- data.tar.gz: 4eaa3bcb54614e8295d36a703bb40c841067b5b04a81cb0eea7dec1786c290525d8ec225a694c0afd0d2138a319027fcb81f548b92238a9eaf75417e3d56519c
6
+ metadata.gz: 40046f3b1034d944bc2aeb0c8ab4b7ca467992ec426aaa614dbf8c4cda1c8e1ed53745b9c22fceaca6eb46f5498dbb7b9fa0442d3287fdfbef52d9afa1fd1fed
7
+ data.tar.gz: 1b9d7cd5d63bdb7ba78cd1b315957d4c1cce2eaea96e8bf5569ca5cc0841ee55e4247db83eb97d773514df91fd31cd870c3878566ded05d70908e591cb976350
@@ -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.
@@ -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.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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vk_music
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuznetsov Vladislav