ruby-brs 1.1.0 → 1.1.1

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: 76cee1124501f374a5f27ca52ecd1b632058bfb3136e2fa3c1f447ae292d9f23
4
- data.tar.gz: 4436a321a655174132a371e8140a892f18fcd365efbd4fd3da4ee2f1683d2c19
3
+ metadata.gz: 774954dc3bd3496501331c3799402c19bb6cd683fb0852420228677c8cc9bee5
4
+ data.tar.gz: 162bbb4c99689035c3c2a245ba0c242886c1f75eab278ce1082984110896366e
5
5
  SHA512:
6
- metadata.gz: 1b9d0d1bead338ba24ee95dad6c6387a8ab31bb1e037147d4c15955176eaf1314120b1c0ced1bc68dc6c7c498ade16b22be90f0d89b76eaf31542c48c562ac09
7
- data.tar.gz: 470a2e6fab1f66d787d92dc352094f2c34e9c0f788545bc08a3643e3cc4faa6369804c24ec5499666894b130600630e9455b70f5c0b2c9b38148eb979111f188
6
+ metadata.gz: 2560264e86f2ff77dd810261d94576d9999682c5f9f70334d2e85d28dfc7e576bd1e996872020b65e3588d3334e019d3a6c056960ddcd0cbe98c406fc2794c6c
7
+ data.tar.gz: fef04f25c06b4cdac5b187feced270ca021361c4c112db269d7509dea636fdf53d492d10566b137889dea543433ed332ec1e8d643163233f0db8657c03342dc5
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ruby bindings for brotli library
2
2
 
3
- | Travis | AppVeyor | Cirrus | Circle |
4
- | :---: | :---: | :---: | :---: |
5
- | [![Travis test status](https://travis-ci.com/andrew-aladev/ruby-brs.svg?branch=master)](https://travis-ci.com/andrew-aladev/ruby-brs) | [![AppVeyor test status](https://ci.appveyor.com/api/projects/status/github/andrew-aladev/ruby-brs?branch=master&svg=true)](https://ci.appveyor.com/project/andrew-aladev/ruby-brs/branch/master) | [![Cirrus test status](https://api.cirrus-ci.com/github/andrew-aladev/ruby-brs.svg?branch=master)](https://cirrus-ci.com/github/andrew-aladev/ruby-brs) | [![Circle test status](https://circleci.com/gh/andrew-aladev/ruby-brs/tree/master.svg?style=shield)](https://circleci.com/gh/andrew-aladev/ruby-brs/tree/master) |
3
+ | Travis | AppVeyor | Cirrus | Circle | Codecov |
4
+ | :---: | :---: | :---: | :---: | :---: |
5
+ | [![Travis test status](https://travis-ci.com/andrew-aladev/ruby-brs.svg?branch=master)](https://travis-ci.com/andrew-aladev/ruby-brs) | [![AppVeyor test status](https://ci.appveyor.com/api/projects/status/github/andrew-aladev/ruby-brs?branch=master&svg=true)](https://ci.appveyor.com/project/andrew-aladev/ruby-brs/branch/master) | [![Cirrus test status](https://api.cirrus-ci.com/github/andrew-aladev/ruby-brs.svg?branch=master)](https://cirrus-ci.com/github/andrew-aladev/ruby-brs) | [![Circle test status](https://circleci.com/gh/andrew-aladev/ruby-brs/tree/master.svg?style=shield)](https://circleci.com/gh/andrew-aladev/ruby-brs/tree/master) | [![Codecov](https://codecov.io/gh/andrew-aladev/ruby-brs/branch/master/graph/badge.svg)](https://codecov.io/gh/andrew-aladev/ruby-brs) |
6
6
 
7
7
  See [brotli library](https://github.com/google/brotli).
8
8
 
@@ -61,7 +61,13 @@ $srcs = %w[
61
61
  .map { |name| "src/#{extension_name}/#{name}.c" }
62
62
  .freeze
63
63
 
64
+ if ENV["CI"] || ENV["COVERAGE"]
65
+ $CFLAGS << " --coverage"
66
+ $LDFLAGS << " --coverage"
67
+ end
68
+
64
69
  $CFLAGS << " -Wno-declaration-after-statement"
70
+
65
71
  $VPATH << "$(srcdir)/#{extension_name}:$(srcdir)/#{extension_name}/stream"
66
72
  # rubocop:enable Style/GlobalVars
67
73
 
@@ -51,7 +51,7 @@ module BRS
51
51
  protected def reset_io_advise
52
52
  # Both compressor and decompressor need sequential io access.
53
53
  @io.advise :sequential
54
- rescue ::Errno::ESPIPE # rubocop:disable Lint/HandleExceptions
54
+ rescue ::Errno::ESPIPE # rubocop:disable Lint/SuppressedException
55
55
  # ok
56
56
  end
57
57
 
@@ -44,8 +44,10 @@ module BRS
44
44
  end
45
45
 
46
46
  unless bytes_written == source.bytesize
47
+ # :nocov:
47
48
  # Compressor write should eat all provided "source" without remainder.
48
49
  raise UnexpectedError, "unexpected error"
50
+ # :nocov:
49
51
  end
50
52
 
51
53
  break
@@ -53,12 +53,12 @@ module BRS
53
53
  unless bytes_to_read.nil?
54
54
  return nil if eof?
55
55
 
56
- read_more_from_buffer until @buffer.bytesize >= bytes_to_read || @io.eof?
56
+ read_more_to_buffer until @buffer.bytesize >= bytes_to_read || @io.eof?
57
57
 
58
58
  return read_bytes_from_buffer bytes_to_read, out_buffer
59
59
  end
60
60
 
61
- read_more_from_buffer until @io.eof?
61
+ read_more_to_buffer until @io.eof?
62
62
 
63
63
  result = @buffer
64
64
  reset_buffer
@@ -71,7 +71,7 @@ module BRS
71
71
  result
72
72
  end
73
73
 
74
- protected def read_more_from_buffer
74
+ protected def read_more_to_buffer
75
75
  io_data = @io.read @source_buffer_length
76
76
  append_io_data_to_buffer io_data
77
77
  end
@@ -79,12 +79,12 @@ module BRS
79
79
  def readpartial(bytes_to_read = nil, out_buffer = nil)
80
80
  raise ::EOFError if eof?
81
81
 
82
- readpartial_from_buffer until @buffer.bytesize >= bytes_to_read || @io.eof?
82
+ readpartial_to_buffer until @buffer.bytesize >= bytes_to_read || @io.eof?
83
83
 
84
84
  read_bytes_from_buffer bytes_to_read, out_buffer
85
85
  end
86
86
 
87
- protected def readpartial_from_buffer
87
+ protected def readpartial_to_buffer
88
88
  io_data = @io.readpartial @source_buffer_length
89
89
  append_io_data_to_buffer io_data
90
90
  end
@@ -108,12 +108,12 @@ module BRS
108
108
  def read_nonblock(bytes_to_read, out_buffer = nil, *options)
109
109
  raise ::EOFError if eof?
110
110
 
111
- read_more_from_buffer_nonblock(*options) until @buffer.bytesize >= bytes_to_read || @io.eof?
111
+ read_more_to_buffer_nonblock(*options) until @buffer.bytesize >= bytes_to_read || @io.eof?
112
112
 
113
113
  read_bytes_from_buffer bytes_to_read, out_buffer
114
114
  end
115
115
 
116
- protected def read_more_from_buffer_nonblock(*options)
116
+ protected def read_more_to_buffer_nonblock(*options)
117
117
  io_data = @io.read_nonblock @source_buffer_length, *options
118
118
  append_io_data_to_buffer io_data
119
119
  end
@@ -1,6 +1,8 @@
1
1
  # Ruby bindings for brotli library.
2
2
  # Copyright (c) 2019 AUTHORS, MIT License.
3
3
 
4
+ require "English"
5
+
4
6
  require_relative "../validation"
5
7
 
6
8
  module BRS
@@ -1,6 +1,8 @@
1
1
  # Ruby bindings for brotli library.
2
2
  # Copyright (c) 2019 AUTHORS, MIT License.
3
3
 
4
+ require "English"
5
+
4
6
  require_relative "../error"
5
7
  require_relative "../validation"
6
8
 
@@ -12,11 +14,6 @@ module BRS
12
14
  end
13
15
 
14
16
  def print(*objects)
15
- if objects.empty?
16
- write $LAST_READ_LINE unless $LAST_READ_LINE.nil?
17
- return nil
18
- end
19
-
20
17
  objects.each do |object|
21
18
  write object
22
19
  write $OUTPUT_FIELD_SEPARATOR unless $OUTPUT_FIELD_SEPARATOR.nil?
@@ -2,5 +2,5 @@
2
2
  # Copyright (c) 2019 AUTHORS, MIT License.
3
3
 
4
4
  module BRS
5
- VERSION = "1.1.0".freeze
5
+ VERSION = "1.1.1".freeze
6
6
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-brs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Aladjev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-13 00:00:00.000000000 Z
11
+ date: 2020-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: codecov
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: minitar
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +66,34 @@ dependencies:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
68
  version: '1.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: rake-compiler
57
85
  requirement: !ruby/object:Gem::Requirement
58
86
  requirements:
59
- - - "~>"
87
+ - - ">="
60
88
  - !ruby/object:Gem::Version
61
- version: '1.0'
89
+ version: '0'
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - "~>"
94
+ - - ">="
67
95
  - !ruby/object:Gem::Version
68
- version: '1.0'
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: rubocop
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +136,20 @@ dependencies:
108
136
  - - "~>"
109
137
  - !ruby/object:Gem::Version
110
138
  version: '2.3'
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
111
153
  description:
112
154
  email: aladjev.andrew@gmail.com
113
155
  executables: []