vk_music 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8c860184e789669f3064d22a6a25e0dc37cb133334b17b8ce029cb2c937c06b
4
- data.tar.gz: 4eb06a451e1d69e8838b8aad2423d88a0edbdf2f12b0331dba98d6fdaf636be8
3
+ metadata.gz: 1a54709405afad78ce1cfc55e5487ecb55d8a7930e3ef511997175eb01995c9a
4
+ data.tar.gz: dc49da61941078903e7b3da469631ba7d4eb266260ceed882a1b811e11d3ddaf
5
5
  SHA512:
6
- metadata.gz: 928a6156a75b7724975fc81fd390f8d11a011950fc9741fea4587e8350512b3a204d63acd8bfb846e7b1543979675de3d2b21ac4217a7f5bdc3c9942f6288926
7
- data.tar.gz: 34b8788ce3e592d390a09047bd6ac238c4182ad4d680db52aa76f6eef5327fe212cb8a28492cf46dabfb4975a9b3221b4290c15686040eae3db8e232b6cae9f7
6
+ metadata.gz: dc27e9b56575d82481157b0cbde9d4ad742fd002f117601c8b8461422cb956bd18654f477499459480c1b298f768452ff01586017a0121865b8cc446feb1c444
7
+ data.tar.gz: 21a10dc20607098e432f9da31172c74d83f59b2e2cb41879d9aaaa25f3907c3bffbbc2440195f121178a5d349aed7f7f69cf7ccf1f8913d8cf82920f32012e94
@@ -0,0 +1,35 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
25
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
26
+ # uses: ruby/setup-ruby@v1
27
+ uses: ruby/setup-ruby@v1.52.0
28
+ with:
29
+ ruby-version: 2.7.2
30
+ - name: Install dependencies
31
+ run: bundle install
32
+ - name: Run rubocop
33
+ run: bundle exec rake rubocop
34
+ - name: Run yarddoc
35
+ run: bundle exec rake yard
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vk_music (4.0.0)
4
+ vk_music (4.0.1)
5
5
  execjs (~> 2.7)
6
6
  json (~> 2.3)
7
7
  logger (~> 1.4)
@@ -46,8 +46,6 @@ GEM
46
46
  net-http-persistent (2.9.4)
47
47
  nokogiri (1.10.10)
48
48
  mini_portile2 (~> 2.4.0)
49
- nokogiri (1.10.10-x64-mingw32)
50
- mini_portile2 (~> 2.4.0)
51
49
  ntlm-http (0.1.1)
52
50
  parallel (1.19.2)
53
51
  parser (2.7.2.0)
@@ -92,7 +90,6 @@ GEM
92
90
  unf (0.1.4)
93
91
  unf_ext
94
92
  unf_ext (0.0.7.7)
95
- unf_ext (0.0.7.7-x64-mingw32)
96
93
  unicode-display_width (1.7.0)
97
94
  vcr (6.0.0)
98
95
  webmock (3.9.5)
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ ![Gem](https://img.shields.io/gem/v/vk_music) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/fizvlad/vk-music-rb/Ruby) ![Lines of code](https://img.shields.io/tokei/lines/github/fizvlad/vk-music-rb) ![Gem](https://img.shields.io/gem/dtv/vk_music)
2
+
1
3
  # VkMusic
2
4
 
3
5
  *vk_music* gem is a library to work with audios on popular Russian social network
data/Rakefile CHANGED
@@ -2,14 +2,17 @@
2
2
 
3
3
  require 'bundler/gem_tasks'
4
4
  require 'rspec/core/rake_task'
5
+ require 'rubocop/rake_task'
5
6
  require 'yard'
6
7
 
7
8
  RSpec::Core::RakeTask.new(:spec)
8
9
 
10
+ RuboCop::RakeTask.new
11
+
9
12
  YARD::Rake::YardocTask.new do |t|
10
13
  t.files = ['lib/**/*.rb']
11
14
  t.options = ['--any', '--extra', '--opts']
12
15
  t.stats_options = ['--list-undoc']
13
16
  end
14
17
 
15
- task default: %i[spec yard]
18
+ task default: %i[rubocop spec yard]
@@ -8,6 +8,10 @@ module VkMusic
8
8
  VK_PATH = %r{(?:https?://)?(?:vk\.com/)?([^/?&]+)}.freeze
9
9
  public_constant :VK_PATH
10
10
 
11
+ # audios list page
12
+ AUDIOS_PATH = /audios(-?\d+)/.freeze
13
+ public_constant :AUDIOS_PATH
14
+
11
15
  # vk.com user path regex
12
16
  USER_PATH = /id(\d+)/.freeze
13
17
  public_constant :USER_PATH
@@ -37,6 +41,9 @@ module VkMusic
37
41
  private
38
42
 
39
43
  def direct_match(path)
44
+ audios_match = path.match(AUDIOS_PATH)
45
+ return Integer(audios_match.captures.first, 10) if audios_match
46
+
40
47
  user_match = path.match(USER_PATH)
41
48
  return Integer(user_match.captures.first, 10) if user_match
42
49
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  module VkMusic
4
4
  # Library version.
5
- VERSION = '4.0.0'
6
-
5
+ VERSION = '4.0.1'
7
6
  public_constant :VERSION
8
7
  end
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: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fizvlad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-26 00:00:00.000000000 Z
11
+ date: 2020-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs
@@ -88,6 +88,7 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - ".env.example"
91
+ - ".github/workflows/ruby.yml"
91
92
  - ".gitignore"
92
93
  - ".rspec"
93
94
  - ".rubocop.yml"