feedx 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +2 -2
- data/feedx.gemspec +1 -1
- data/lib/feedx/compression/gzip.rb +19 -5
- data/spec/feedx/compression/gzip_spec.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d84be642c90e028ccba4dabbe561e8305126f0b66cc008204ab961645a9309b4
|
4
|
+
data.tar.gz: 9a63d2736d1ca689f1596d60294c90d6ed1c869b42192803712b32d347e034b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c7baa1af8c07105c8330da14000a5883954787989c675bc483d87fb8d11dc0c5423d541162646452252443dcdbb6fdff51ea7f53aad5b8f8a1812db89e3dbb6
|
7
|
+
data.tar.gz: e48503c89d01a15ea309b002a2713413d8a635ea89e5667a11bfd4c90df0aabfb4ca6bb44341aadbe30d8fd846b9911e3d1f5eb8cfe3a5ef43a286044997b575
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
feedx (0.10.
|
4
|
+
feedx (0.10.1)
|
5
5
|
bfs (>= 0.5.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
parallel (1.19.1)
|
16
16
|
parser (2.7.0.2)
|
17
17
|
ast (~> 2.4.0)
|
18
|
-
pbio (0.2.
|
18
|
+
pbio (0.2.1)
|
19
19
|
google-protobuf
|
20
20
|
rainbow (3.0.0)
|
21
21
|
rake (13.0.1)
|
data/feedx.gemspec
CHANGED
@@ -1,11 +1,25 @@
|
|
1
1
|
require 'zlib'
|
2
2
|
|
3
3
|
class Feedx::Compression::Gzip < Feedx::Compression::Abstract
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
class << self
|
5
|
+
def reader(io, &block)
|
6
|
+
force_binmode(io)
|
7
|
+
Zlib::GzipReader.wrap(io, &block)
|
8
|
+
end
|
9
|
+
|
10
|
+
def writer(io, &block)
|
11
|
+
force_binmode(io)
|
12
|
+
Zlib::GzipWriter.wrap(io, &block)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
7
16
|
|
8
|
-
|
9
|
-
|
17
|
+
def force_binmode(io)
|
18
|
+
if io.respond_to?(:binmode)
|
19
|
+
io.binmode
|
20
|
+
elsif io.respond_to?(:set_encoding)
|
21
|
+
io.set_encoding(Encoding::BINARY)
|
22
|
+
end
|
23
|
+
end
|
10
24
|
end
|
11
25
|
end
|
@@ -5,11 +5,13 @@ RSpec.describe Feedx::Compression::Gzip do
|
|
5
5
|
wio = StringIO.new
|
6
6
|
described_class.writer(wio) {|w| w.write 'xyz' * 1000 }
|
7
7
|
expect(wio.size).to be_within(20).of(40)
|
8
|
+
expect(wio.string.encoding).to eq(Encoding::BINARY)
|
8
9
|
|
9
10
|
data = ''
|
10
11
|
StringIO.open(wio.string) do |rio|
|
11
12
|
described_class.reader(rio) {|z| data = z.read }
|
12
13
|
end
|
13
14
|
expect(data.size).to eq(3000)
|
15
|
+
expect(data.encoding).to eq(Encoding.default_external)
|
14
16
|
end
|
15
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feedx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Black Square Media Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bfs
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
|
-
rubygems_version: 3.0.
|
194
|
+
rubygems_version: 3.0.3
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: Exchange data between components via feeds
|