adsp 1.0.0 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/{test → lib/adsp/test}/common.rb +3 -2
  4. data/{test → lib/adsp/test}/coverage_helper.rb +0 -0
  5. data/{test → lib/adsp/test}/file.test.rb +2 -0
  6. data/{test → lib/adsp/test}/minitest.rb +1 -0
  7. data/{test → lib/adsp/test}/mock/common.rb +1 -0
  8. data/{test → lib/adsp/test}/mock/file.rb +1 -0
  9. data/{test → lib/adsp/test}/mock/stream/raw/compressor.rb +1 -0
  10. data/{test → lib/adsp/test}/mock/stream/raw/decompressor.rb +1 -0
  11. data/{test → lib/adsp/test}/mock/stream/raw/native_compressor.rb +1 -0
  12. data/{test → lib/adsp/test}/mock/stream/raw/native_decompressor.rb +1 -0
  13. data/{test → lib/adsp/test}/mock/stream/reader.rb +1 -0
  14. data/{test → lib/adsp/test}/mock/stream/writer.rb +1 -0
  15. data/{test → lib/adsp/test}/mock/string.rb +1 -0
  16. data/{test → lib/adsp/test}/option.rb +1 -0
  17. data/{test → lib/adsp/test}/stream/abstract.rb +2 -1
  18. data/{test → lib/adsp/test}/stream/minitar.test.rb +2 -0
  19. data/{test → lib/adsp/test}/stream/raw/abstract.rb +1 -0
  20. data/{test → lib/adsp/test}/stream/raw/compressor.test.rb +2 -0
  21. data/{test → lib/adsp/test}/stream/raw/decompressor.test.rb +2 -0
  22. data/{test → lib/adsp/test}/stream/reader.test.rb +2 -0
  23. data/{test → lib/adsp/test}/stream/reader_helpers.test.rb +2 -0
  24. data/{test → lib/adsp/test}/stream/writer.test.rb +2 -0
  25. data/{test → lib/adsp/test}/stream/writer_helpers.test.rb +2 -0
  26. data/{test → lib/adsp/test}/string.test.rb +2 -0
  27. data/{test → lib/adsp/test}/validation.rb +7 -0
  28. data/{test → lib/adsp/test}/version.test.rb +2 -0
  29. data/lib/adsp/version.rb +1 -1
  30. metadata +28 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bd22e8463be2343be9f61ce80d54261f32aefed31b3f6b6550f38e41a5c0401
4
- data.tar.gz: 690e5d1c232c781f2bd48b099b01f8ee2d60a7b79aadec7255775110acfedf1f
3
+ metadata.gz: '0857763064f25aac54a464ab7d50627214315565824b5c507713bf6f43aa40d2'
4
+ data.tar.gz: 4c4e2c600b0b887b2855629e3ab712ba6c99ff4b2a0f1f88693a52a400324a1e
5
5
  SHA512:
6
- metadata.gz: 03e5c419cebc46df3e64aa5f71905358c0f7dc5d16a417b2239d22c9e93eca734258da71a819037d6c754b4c4a077a9d177e13f9ec8310ee87187d875606f120
7
- data.tar.gz: 5759268ce78057265a84f667966e0869973da161035498438ef88e9c41fc06bdc4984ac8fd73f3b58a0010b2971eabc932ff874d152487c5f8ab6d60d1c92e3d
6
+ metadata.gz: dad7a1bed65e2b4302e7925e3ef4f6905a8edc5f716095af8b7df69c1f024d9a5545d0c3a2390142630b49d7d0ec898e17c959ddc5695b519ab9a0a37beb3b49
7
+ data.tar.gz: b1b79e2f89480b872338780a658c76facedb355e7c1d3e8bca2a8d6b77b19e1da7f189b9d022842d3dd398c90752855e0cb517642e2451cd9f0fcf879d800537
data/README.md CHANGED
@@ -80,6 +80,10 @@ Parallel.each large_datas do |large_data|
80
80
  end
81
81
  ```
82
82
 
83
+ # Docs
84
+
85
+ Please review [rdoc generated docs](https://andrew-aladev.github.io/adsp).
86
+
83
87
  ## Options
84
88
 
85
89
  | Option | Values | Default | Description |
@@ -198,14 +202,11 @@ Special asynchronous methods missing in `Zlib::GzipWriter`.
198
202
  So it is possible to have asynchronous variants for these synchronous methods.
199
203
  Behaviour is the same as `IO#write_nonblock` method.
200
204
 
201
- All nonblock operations for file will raise `EBADF` error on Windows.
202
- Setting file into nonblocking mode is [not available on Windows](https://github.com/ruby/ruby/blob/master/win32/win32.c#L4388).
203
-
204
205
  ```
205
206
  #<<(object)
206
207
  #print(*objects)
207
208
  #printf(*args)
208
- #putc(object, encoding: ::Encoding::BINARY)
209
+ #putc(object, :encoding => 'ASCII-8BIT')
209
210
  #puts(*objects)
210
211
  ```
211
212
 
@@ -9,8 +9,9 @@ require_relative "coverage_helper"
9
9
 
10
10
  module ADSP
11
11
  module Test
12
+ # ADSP::Test::Common module.
12
13
  module Common
13
- BASE_PATH = ::File.expand_path(::File.join(::File.dirname(__FILE__), "..")).freeze
14
+ BASE_PATH = ::File.expand_path(::File.join(::File.dirname(__FILE__), "..", "..", "..")).freeze
14
15
  TEMP_PATH = ::File.join(BASE_PATH, "tmp").freeze
15
16
 
16
17
  SOURCE_PATH = ::File.join(TEMP_PATH, "source").freeze
@@ -98,7 +99,7 @@ module ADSP
98
99
  file.write_nonblock "text"
99
100
  end
100
101
  rescue Errno::EBADF
101
- # Nonblock operations with files are not available on Windows.
102
+ # Nonblock operations with files may not be available.
102
103
  false
103
104
  else
104
105
  true
File without changes
@@ -10,7 +10,9 @@ require_relative "option"
10
10
  require_relative "validation"
11
11
 
12
12
  module ADSP
13
+ # ADSP::Test module.
13
14
  module Test
15
+ # ADSP::Test::File class.
14
16
  class File < Minitest::Test
15
17
  Option = Test::Option
16
18
  Target = Mock::File
@@ -4,6 +4,7 @@
4
4
  require "minitest"
5
5
  require "minitest/autorun"
6
6
 
7
+ # Minitest module.
7
8
  module Minitest
8
9
  Minitest.module_eval do
9
10
  class << self
@@ -8,6 +8,7 @@ require_relative "../common"
8
8
  module ADSP
9
9
  module Test
10
10
  module Mock
11
+ # ADSP::Test::Mock::Common module.
11
12
  module Common
12
13
  DEFAULT_DESTINATION_BUFFER_LENGTH = 1 << 18 # 256 KB
13
14
 
@@ -8,6 +8,7 @@ require_relative "./common"
8
8
  module ADSP
9
9
  module Test
10
10
  module Mock
11
+ # ADSP::Test::Mock::File class.
11
12
  class File < ADSP::File
12
13
  PORTION_LENGTH = 10**6
13
14
 
@@ -10,6 +10,7 @@ module ADSP
10
10
  module Mock
11
11
  module Stream
12
12
  module Raw
13
+ # ADSP::Test::Mock::Stream::Raw::Compressor class.
13
14
  class Compressor < ADSP::Stream::Raw::Compressor
14
15
  NativeCompressor = Raw::NativeCompressor
15
16
  end
@@ -10,6 +10,7 @@ module ADSP
10
10
  module Mock
11
11
  module Stream
12
12
  module Raw
13
+ # ADSP::Test::Mock::Stream::Raw::Decompressor class.
13
14
  class Decompressor < ADSP::Stream::Raw::Decompressor
14
15
  NativeDecompressor = Raw::NativeDecompressor
15
16
  end
@@ -11,6 +11,7 @@ module ADSP
11
11
  module Mock
12
12
  module Stream
13
13
  module Raw
14
+ # ADSP::Test::Mock::Stream::Raw::NativeCompressor class.
14
15
  class NativeCompressor
15
16
  def initialize(options)
16
17
  ADSP::Validation.validate_hash options
@@ -11,6 +11,7 @@ module ADSP
11
11
  module Mock
12
12
  module Stream
13
13
  module Raw
14
+ # ADSP::Test::Mock::Stream::Raw::NativeDecompressor class.
14
15
  class NativeDecompressor
15
16
  def initialize(options)
16
17
  ADSP::Validation.validate_hash options
@@ -9,6 +9,7 @@ module ADSP
9
9
  module Test
10
10
  module Mock
11
11
  module Stream
12
+ # ADSP::Test::Mock::Stream::Reader class.
12
13
  class Reader < ADSP::Stream::Reader
13
14
  RawDecompressor = Mock::Stream::Raw::Decompressor
14
15
  end
@@ -9,6 +9,7 @@ module ADSP
9
9
  module Test
10
10
  module Mock
11
11
  module Stream
12
+ # ADSP::Test::Mock::Stream::Writer class.
12
13
  class Writer < ADSP::Stream::Writer
13
14
  RawCompressor = Mock::Stream::Raw::Compressor
14
15
  end
@@ -8,6 +8,7 @@ require_relative "./common"
8
8
  module ADSP
9
9
  module Test
10
10
  module Mock
11
+ # ADSP::Test::Mock::String class.
11
12
  class String < ADSP::String
12
13
  def self.native_compress_string(source, options)
13
14
  destination_buffer_length = options[:destination_buffer_length]
@@ -8,6 +8,7 @@ require_relative "validation"
8
8
 
9
9
  module ADSP
10
10
  module Test
11
+ # ADSP::Test::Option module.
11
12
  module Option
12
13
  private_class_method def self.get_common_invalid_options(buffer_length_names, &block)
13
14
  Validation::INVALID_HASHES.each(&block)
@@ -11,6 +11,7 @@ require_relative "../validation"
11
11
  module ADSP
12
12
  module Test
13
13
  module Stream
14
+ # ADSP::Test::Stream::Abstract class.
14
15
  class Abstract < Minitest::Test
15
16
  SOURCE_PATH = Common::SOURCE_PATH
16
17
 
@@ -84,7 +85,7 @@ module ADSP
84
85
  instance.close_on_exec = true
85
86
  assert_predicate instance, :close_on_exec?
86
87
 
87
- # Fcntl is not available on windows.
88
+ # Fcntl may not be available.
88
89
  if Fcntl.const_defined? :F_GETFL
89
90
  stats = instance.fcntl Fcntl::F_GETFL, 0
90
91
  refute_nil stats
@@ -10,7 +10,9 @@ require_relative "../mock/stream/writer"
10
10
 
11
11
  module ADSP
12
12
  module Test
13
+ # ADSP::Test::Stream module.
13
14
  module Stream
15
+ # ADSP::Test::Stream::MinitarTest class.
14
16
  class MinitarTest < Minitest::Test
15
17
  Reader = Mock::Stream::Reader
16
18
  Writer = Mock::Stream::Writer
@@ -8,6 +8,7 @@ module ADSP
8
8
  module Test
9
9
  module Stream
10
10
  module Raw
11
+ # ADSP::Test::Stream::Raw::Abstract class.
11
12
  class Abstract < Minitest::Test
12
13
  NOOP_PROC = Validation::NOOP_PROC
13
14
 
@@ -12,7 +12,9 @@ require_relative "../../validation"
12
12
  module ADSP
13
13
  module Test
14
14
  module Stream
15
+ # ADSP::Test::Stream::Raw module.
15
16
  module Raw
17
+ # ADSP::Test::Stream::Raw::Compressor class.
16
18
  class Compressor < Abstract
17
19
  Target = Mock::Stream::Raw::Compressor
18
20
  String = Mock::String
@@ -12,7 +12,9 @@ require_relative "../../validation"
12
12
  module ADSP
13
13
  module Test
14
14
  module Stream
15
+ # ADSP::Test::Stream::Raw module.
15
16
  module Raw
17
+ # ADSP::Test::Stream::Raw::Decompressor class.
16
18
  class Decompressor < Abstract
17
19
  Target = Mock::Stream::Raw::Decompressor
18
20
  String = Mock::String
@@ -15,7 +15,9 @@ require_relative "../mock/string"
15
15
 
16
16
  module ADSP
17
17
  module Test
18
+ # ADSP::Test::Stream module.
18
19
  module Stream
20
+ # ADSP::Test::Stream::Reader class.
19
21
  class Reader < Abstract
20
22
  Target = Mock::Stream::Reader
21
23
  String = Mock::String
@@ -13,7 +13,9 @@ require_relative "../mock/string"
13
13
 
14
14
  module ADSP
15
15
  module Test
16
+ # ADSP::Test::Stream module.
16
17
  module Stream
18
+ # ADSP::Test::Stream::ReaderHelpers class.
17
19
  class ReaderHelpers < Minitest::Test
18
20
  Target = Mock::Stream::Reader
19
21
  String = Mock::String
@@ -14,7 +14,9 @@ require_relative "../mock/string"
14
14
 
15
15
  module ADSP
16
16
  module Test
17
+ # ADSP::Test::Stream module.
17
18
  module Stream
19
+ # ADSP::Test::Stream::Writer class.
18
20
  class Writer < Abstract
19
21
  Target = Mock::Stream::Writer
20
22
  String = Mock::String
@@ -13,7 +13,9 @@ require_relative "../mock/string"
13
13
 
14
14
  module ADSP
15
15
  module Test
16
+ # ADSP::Test::Stream module.
16
17
  module Stream
18
+ # ADSP::Test::Stream::WriterHelpers class.
17
19
  class WriterHelpers < Minitest::Test
18
20
  Target = Mock::Stream::Writer
19
21
  String = Mock::String
@@ -10,7 +10,9 @@ require_relative "option"
10
10
  require_relative "validation"
11
11
 
12
12
  module ADSP
13
+ # ADSP::Test module.
13
14
  module Test
15
+ # ADSP::Test::String class.
14
16
  class String < Minitest::Test
15
17
  Option = Test::Option
16
18
  Target = Mock::String
@@ -5,6 +5,7 @@ require "stringio"
5
5
 
6
6
  module ADSP
7
7
  module Test
8
+ # ADSP::Test::Validation module.
8
9
  module Validation
9
10
  NOOP_PROC = proc {} # no-op
10
11
 
@@ -43,26 +44,32 @@ module ADSP
43
44
  ]
44
45
  .freeze
45
46
 
47
+ # ADSP::Test::Validation::StringIOWithoutEOF class.
46
48
  class StringIOWithoutEOF < ::StringIO
47
49
  undef :eof?
48
50
  end
49
51
 
52
+ # ADSP::Test::Validation::StringIOWithoutRead class.
50
53
  class StringIOWithoutRead < ::StringIO
51
54
  undef :read
52
55
  end
53
56
 
57
+ # ADSP::Test::Validation::StringIOWithoutReadNonblock class.
54
58
  class StringIOWithoutReadNonblock < ::StringIO
55
59
  undef :read_nonblock
56
60
  end
57
61
 
62
+ # ADSP::Test::Validation::StringIOWithoutReadpartial class.
58
63
  class StringIOWithoutReadpartial < ::StringIO
59
64
  undef :readpartial
60
65
  end
61
66
 
67
+ # ADSP::Test::Validation::StringIOWithoutWrite class.
62
68
  class StringIOWithoutWrite < ::StringIO
63
69
  undef :write
64
70
  end
65
71
 
72
+ # ADSP::Test::Validation::StringIOWithoutWriteNonblock class.
66
73
  class StringIOWithoutWriteNonblock < ::StringIO
67
74
  undef :write_nonblock
68
75
  end
@@ -6,7 +6,9 @@ require "adsp"
6
6
  require_relative "minitest"
7
7
 
8
8
  module ADSP
9
+ # ADSP::Test module.
9
10
  module Test
11
+ # ADSP::Test::Version class.
10
12
  class Version < Minitest::Test
11
13
  def test_version
12
14
  refute_nil ADSP::VERSION
data/lib/adsp/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
 
4
4
  module ADSP
5
5
  # Abstract data stream processor version.
6
- VERSION = "1.0.0".freeze
6
+ VERSION = "1.0.4".freeze
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adsp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Aladjev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-29 00:00:00.000000000 Z
11
+ date: 2022-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codecov
@@ -218,34 +218,34 @@ files:
218
218
  - lib/adsp/stream/writer.rb
219
219
  - lib/adsp/stream/writer_helpers.rb
220
220
  - lib/adsp/string.rb
221
+ - lib/adsp/test/common.rb
222
+ - lib/adsp/test/coverage_helper.rb
223
+ - lib/adsp/test/file.test.rb
224
+ - lib/adsp/test/minitest.rb
225
+ - lib/adsp/test/mock/common.rb
226
+ - lib/adsp/test/mock/file.rb
227
+ - lib/adsp/test/mock/stream/raw/compressor.rb
228
+ - lib/adsp/test/mock/stream/raw/decompressor.rb
229
+ - lib/adsp/test/mock/stream/raw/native_compressor.rb
230
+ - lib/adsp/test/mock/stream/raw/native_decompressor.rb
231
+ - lib/adsp/test/mock/stream/reader.rb
232
+ - lib/adsp/test/mock/stream/writer.rb
233
+ - lib/adsp/test/mock/string.rb
234
+ - lib/adsp/test/option.rb
235
+ - lib/adsp/test/stream/abstract.rb
236
+ - lib/adsp/test/stream/minitar.test.rb
237
+ - lib/adsp/test/stream/raw/abstract.rb
238
+ - lib/adsp/test/stream/raw/compressor.test.rb
239
+ - lib/adsp/test/stream/raw/decompressor.test.rb
240
+ - lib/adsp/test/stream/reader.test.rb
241
+ - lib/adsp/test/stream/reader_helpers.test.rb
242
+ - lib/adsp/test/stream/writer.test.rb
243
+ - lib/adsp/test/stream/writer_helpers.test.rb
244
+ - lib/adsp/test/string.test.rb
245
+ - lib/adsp/test/validation.rb
246
+ - lib/adsp/test/version.test.rb
221
247
  - lib/adsp/validation.rb
222
248
  - lib/adsp/version.rb
223
- - test/common.rb
224
- - test/coverage_helper.rb
225
- - test/file.test.rb
226
- - test/minitest.rb
227
- - test/mock/common.rb
228
- - test/mock/file.rb
229
- - test/mock/stream/raw/compressor.rb
230
- - test/mock/stream/raw/decompressor.rb
231
- - test/mock/stream/raw/native_compressor.rb
232
- - test/mock/stream/raw/native_decompressor.rb
233
- - test/mock/stream/reader.rb
234
- - test/mock/stream/writer.rb
235
- - test/mock/string.rb
236
- - test/option.rb
237
- - test/stream/abstract.rb
238
- - test/stream/minitar.test.rb
239
- - test/stream/raw/abstract.rb
240
- - test/stream/raw/compressor.test.rb
241
- - test/stream/raw/decompressor.test.rb
242
- - test/stream/reader.test.rb
243
- - test/stream/reader_helpers.test.rb
244
- - test/stream/writer.test.rb
245
- - test/stream/writer_helpers.test.rb
246
- - test/string.test.rb
247
- - test/validation.rb
248
- - test/version.test.rb
249
249
  homepage: https://github.com/andrew-aladev/adsp
250
250
  licenses:
251
251
  - MIT
@@ -255,7 +255,6 @@ post_install_message:
255
255
  rdoc_options: []
256
256
  require_paths:
257
257
  - lib
258
- - test
259
258
  required_ruby_version: !ruby/object:Gem::Requirement
260
259
  requirements:
261
260
  - - ">="