ruby-lzws 1.1.2 → 1.1.3

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: 76a3c67ab0ba4b9d98c8339cbb12905bd0763d487b48e7ef659414877f61500e
4
- data.tar.gz: 8212b819128eb28add84f7ffe6ae939f2a8763321a5f948c03a1f458d2b837a0
3
+ metadata.gz: 68638ae503703523496d753cb9c343dcfd258eb0a1cbf2da1c4fa0888df53d05
4
+ data.tar.gz: cdbfd18419ca03bb13c3db8908b5afed42500ff40d45bd412191fca723b3e51b
5
5
  SHA512:
6
- metadata.gz: 02f26ea6af75ba003afde00d70693f603e552a562e4f568b5e82971922fa451b1157a34b8ca8777578e06ef7a6d89cde2e2d68a3d4ff7bb53f146c6c077dc909
7
- data.tar.gz: 8dc3cd5ebc6ba7781cc9320dee25372699db636922f06af7420cf3f53ac9eab37934c05d7ce98e867f594638ded68d5e921040b2d97d30da936e5f8f143f318d
6
+ metadata.gz: bfa3497c91ca513e97a82d540d3302cb330d7addadda117eab1fe3f7d615bbb774f3bf00f037c8cb4dcd0f2abb9ec92e240459eca7fab5f9689307f70130c38c
7
+ data.tar.gz: beef34ff8bdf2f20ab9ab9dcd797a7587d4d74c79e82dea0eff3aa64cd11e1222eefab566a6d45baa6e9ee34427ca8dcfd46ab6769bedc44a6758d2276527627
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ruby bindings for lzws library
2
2
 
3
- | Travis | AppVeyor | Cirrus | Circle |
4
- | :---: | :---: | :---: | :---: |
5
- | [![Travis test status](https://travis-ci.com/andrew-aladev/ruby-lzws.svg?branch=master)](https://travis-ci.com/andrew-aladev/ruby-lzws) | [![AppVeyor test status](https://ci.appveyor.com/api/projects/status/github/andrew-aladev/ruby-lzws?branch=master&svg=true)](https://ci.appveyor.com/project/andrew-aladev/ruby-lzws/branch/master) | [![Cirrus test status](https://api.cirrus-ci.com/github/andrew-aladev/ruby-lzws.svg?branch=master)](https://cirrus-ci.com/github/andrew-aladev/ruby-lzws) | [![Circle test status](https://circleci.com/gh/andrew-aladev/ruby-lzws/tree/master.svg?style=shield)](https://circleci.com/gh/andrew-aladev/ruby-lzws/tree/master) |
3
+ | Travis | AppVeyor | Cirrus | Circle | Codecov |
4
+ | :---: | :---: | :---: | :---: | :---: |
5
+ | [![Travis test status](https://travis-ci.com/andrew-aladev/ruby-lzws.svg?branch=master)](https://travis-ci.com/andrew-aladev/ruby-lzws) | [![AppVeyor test status](https://ci.appveyor.com/api/projects/status/github/andrew-aladev/ruby-lzws?branch=master&svg=true)](https://ci.appveyor.com/project/andrew-aladev/ruby-lzws/branch/master) | [![Cirrus test status](https://api.cirrus-ci.com/github/andrew-aladev/ruby-lzws.svg?branch=master)](https://cirrus-ci.com/github/andrew-aladev/ruby-lzws) | [![Circle test status](https://circleci.com/gh/andrew-aladev/ruby-lzws/tree/master.svg?style=shield)](https://circleci.com/gh/andrew-aladev/ruby-lzws/tree/master) | [![Codecov](https://codecov.io/gh/andrew-aladev/ruby-lzws/branch/master/graph/badge.svg)](https://codecov.io/gh/andrew-aladev/ruby-lzws) |
6
6
 
7
7
  See [lzws library](https://github.com/andrew-aladev/lzws).
8
8
 
data/ext/extconf.rb CHANGED
@@ -66,7 +66,13 @@ $srcs = %w[
66
66
  .map { |name| "src/#{extension_name}/#{name}.c" }
67
67
  .freeze
68
68
 
69
+ if ENV["CI"] || ENV["COVERAGE"]
70
+ $CFLAGS << " --coverage"
71
+ $LDFLAGS << " --coverage"
72
+ end
73
+
69
74
  $CFLAGS << " -Wno-declaration-after-statement"
75
+
70
76
  $VPATH << "$(srcdir)/#{extension_name}:$(srcdir)/#{extension_name}/stream"
71
77
  # rubocop:enable Style/GlobalVars
72
78
 
@@ -51,7 +51,7 @@ module LZWS
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
 
@@ -40,8 +40,10 @@ module LZWS
40
40
  end
41
41
 
42
42
  unless bytes_written == source.bytesize
43
+ # :nocov:
43
44
  # Compressor write should eat all provided "source" without remainder.
44
45
  raise UnexpectedError, "unexpected error"
46
+ # :nocov:
45
47
  end
46
48
 
47
49
  break
@@ -53,12 +53,12 @@ module LZWS
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 LZWS
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 LZWS
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 LZWS
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 lzws 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 LZWS
@@ -1,6 +1,8 @@
1
1
  # Ruby bindings for lzws 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 LZWS
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?
data/lib/lzws/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # Copyright (c) 2019 AUTHORS, MIT License.
3
3
 
4
4
  module LZWS
5
- VERSION = "1.1.2".freeze
5
+ VERSION = "1.1.3".freeze
6
6
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lzws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
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: 2019-12-30 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: []