vk_music 0.1.3 → 0.2.0

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: 9d584af9c00d7c7f501ceec5ca75d802bdb3bc921208cec733b58d174d52d9f9
4
- data.tar.gz: 2beb29130f8e26d4e14d07663307137f7308088e81ba6b31bf6deb1a1e639639
3
+ metadata.gz: b0b18a8dbb2f4a9e836fc86c32261f0b7dbbb73df81a1b04ff7fc14f8e6fa7d4
4
+ data.tar.gz: dd21f748dcee7334a481f909c39e699d13b3747370088c9dc6be4d0c86d6ffcf
5
5
  SHA512:
6
- metadata.gz: 1c355075749ef34b0c33f36578720d684a28b47e24dd5e092f1552eb46f03e89d2c57821f92974da1de48a57101502bd673c829926476fc632aec25172632d74
7
- data.tar.gz: 272700646076074d4b9f1eff44c5f0828c3cefbf2a6547ba6bf18456d99fc0c47857aed213241ecd628fd609d819a88e455ce4e81b4a108f9f861fe8013efc65
6
+ metadata.gz: 045f170226ffa593f6ad0cc73f3b5995b93e1a4d885214870c24b03ffdefb21f4b45e580617354b8e17c11017e9a7ff2439ea3cb4ae213db97da2c18d95306a2
7
+ data.tar.gz: 8875c652bf92ffc471badb3f11f910c288b90b6e36cbc4a643a10a2b9b3b1c5f3f2be764c0af6aa33fa82b2ce758b04ecd0adcaec5b4f49e4af1d0c53f266d37
data/Rakefile CHANGED
@@ -18,6 +18,6 @@ task :test do
18
18
 
19
19
  Dir[ "test/test*.rb" ].each do |file|
20
20
  puts "\n\nRunning #{file}:"
21
- puts `ruby -w #{file} #{username} #{password}`
21
+ puts `ruby -w #{file} '#{username}' '#{password}'`
22
22
  end
23
23
  end
@@ -76,7 +76,9 @@ module VkMusic
76
76
  end
77
77
 
78
78
  def get_audios(obj, up_to = nil)
79
- Warning.warn("Current implementation of method VkMusic::Client#get_audios is only able to load first 100 audios from user page.\n") if (up_to && up_to > 100)
79
+ if up_to && up_to > 100 && defined?(Warning.warn)
80
+ Warning.warn("Current implementation of method VkMusic::Client#get_audios is only able to load first 100 audios from user page.\n")
81
+ end
80
82
  # NOTICE: this method is only able to load first 100 audios
81
83
  # NOTICE: it is possible to download 50 audios per request on "https://m.vk.com/audios#{owner_id}?offset=#{offset}", so it will cost A LOT to download all of audios (up to 200 requests).
82
84
  # NOTICE: it is possible to load up to 2000 audios **without url** if offset is negative
@@ -25,7 +25,7 @@ module VkMusic
25
25
  VK_CUSTOM_ID_REGEX = /^\w+$/
26
26
  VK_URL_REGEX = /(?:https?:\/\/)?(?:m\.|www\.)?vk\.com\/(\w+)/
27
27
 
28
- VK_HREF_ID_CONTAINING_REGEX = /(?:audios|photo|write|owner_id=)-?\d+/
28
+ VK_HREF_ID_CONTAINING_REGEX = /(?:audios|photo|write|owner_id=|friends\?id=)-?\d+/
29
29
 
30
30
  # Playlist
31
31
  PLAYLIST_URL_REGEX = /.*audio_playlist(-?[\d]+)_([\d]+)(?:(?:(?:&access_hash=)|\/|%2F)([\da-z]+))?/
@@ -2,12 +2,12 @@ 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 = "0.1.3"
5
+ s.version = "0.2.0"
6
6
  s.author = "Kuznetsov Vladislav"
7
7
  s.email = "fizvlad@mail.ru"
8
8
  s.homepage = "https://github.com/fizvlad/vk-music-rb"
9
9
  s.platform = Gem::Platform::RUBY
10
- s.required_ruby_version = ">=2.5.1"
10
+ s.required_ruby_version = ">=2.3.1"
11
11
  s.files = Dir[ "lib/**/**", "test/**/**", "LICENSE", "Rakefile", "README.md", "vk_music.gemspec" ]
12
12
  s.test_files = Dir[ "test/test*.rb" ]
13
13
  s.has_rdoc = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vk_music
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuznetsov Vladislav
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-03 00:00:00.000000000 Z
11
+ date: 2019-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -88,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: 2.5.1
91
+ version: 2.3.1
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.7.6
99
+ rubygems_version: 2.7.6.2
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Provides interface to work with VK music via HTTP requests