vk_music 2.1.3 → 2.1.4

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: c65c2dafcb344531e327c5267a64646f191cba83480ce03b1b90c96e164bd44d
4
- data.tar.gz: 6c2b7f6ef866a5e7acd97bd681f2af96cc5f8d21e5468ae7e1fea0f2ba2c8557
3
+ metadata.gz: 78762df4d72ae1bdb007f992aab2b77ea10d16a9481784323585d9539a0b04c7
4
+ data.tar.gz: 7d4eb4eb4be42f3c2252a687cbd6f995877326461200bb08dad0a073d1aa0c8d
5
5
  SHA512:
6
- metadata.gz: '0878bec095d953a51fc5cda8f429e101c6294c8577c988874cb4a84fb05abd25ba63d33d0f46778657bfeac131302c7ab52dbf61769160a19dc65ecc608693d1'
7
- data.tar.gz: 2ba4c82fbfc3eaa01ad96df984aec5af016929bea6c4774bd35870d0c95cfc8b83c162bac8ee340fb4ee878b5865ee1da539284260818cab84d0b52ee8d5180d
6
+ metadata.gz: b71584b7a5cea3b2f13e7c0965784a9be8e2e40f7c20ee118b73a53e6dc37c89c562620144ac84432049d3365e505d0710e916a68b0d859fc64bc79db787634e
7
+ data.tar.gz: f5865b1f21529cf8701b1876a83cc4c3d43df02142f78b42d25780cd09209e6d670b29a2ac6708af949d66e3f75fce5cfaddbbb586928f8b96ad14879bb057e6
@@ -310,7 +310,7 @@ module VkMusic
310
310
  # @return [Array<Audio>] array of audios with download URLs.
311
311
  def from_id(args)
312
312
  begin
313
- args.map! do |el|
313
+ args_formatted = args.map do |el|
314
314
  case el
315
315
  when Array
316
316
  el.join("_")
@@ -327,7 +327,7 @@ module VkMusic
327
327
  end
328
328
 
329
329
  result = []
330
- args.each_slice(10) do |subarray|
330
+ args_formatted.each_slice(10) do |subarray|
331
331
  json = load__json__audios_by_id(subarray)
332
332
  subresult = audios__from_data(json["data"][0].to_a)
333
333
  raise Exceptions::ParseError, "Result size don't match: excepected #{subarray.size}, got #{subresult.size}", caller if subresult.size != subarray.size
data/test/test_from_id.rb CHANGED
@@ -57,5 +57,13 @@ class TestVkMusic < MiniTest::Test
57
57
  ])
58
58
  end
59
59
  end
60
+
61
+ def test_initial_array_not_changed
62
+ init = [
63
+ ["2000023175", "456242595", "addd832f78d7c61b6d", "b6b14f49280d4d55f0"]
64
+ ]
65
+ CLIENT.from_id(init)
66
+ assert_instance_of(Array, init[0], "Function must not change initial array")
67
+ end
60
68
 
61
69
  end
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.3"
5
+ s.version = "2.1.4"
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.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuznetsov Vladislav