pbio 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +54 -0
- data/.rubocop.yml +7 -4
- data/Gemfile.lock +61 -32
- data/pbio.gemspec +3 -4
- data/spec/lib/pbio/delimited_spec.rb +5 -5
- metadata +6 -20
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36b95e1705d04faed8b26ed62a4a4ed9622881e78f4bb31a3ec6195cf1aaf3fd
|
4
|
+
data.tar.gz: 432b73cb7fd0349619bb98c5b3710af137d87da79bebc6716b8dce1a3402fa1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47468bad7600fbddcb8ede71a05ec6a0107b0d2e08f00b8a471fa02c8db8ce0b807be6b1d9023dbbebdd33641b67e008af9105084f7da61e3dc6ead83360a21c
|
7
|
+
data.tar.gz: 8f3cc0d72c3ee110a0a30232817c387487e64ce69d7429fbf67c8a32225b836ea7f1e9602b80196d9eb3d1314fc726d4197c33c566b84deded7f6930fd98b188
|
@@ -0,0 +1,54 @@
|
|
1
|
+
name: Test
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- main
|
6
|
+
pull_request:
|
7
|
+
branches:
|
8
|
+
- main
|
9
|
+
jobs:
|
10
|
+
go:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
go-version: [1.15.x, 1.16.x]
|
15
|
+
steps:
|
16
|
+
- name: Fetch staticcheck
|
17
|
+
uses: engineerd/configurator@v0.0.6
|
18
|
+
with:
|
19
|
+
name: staticcheck
|
20
|
+
fromGitHubReleases: true
|
21
|
+
repo: dominikh/go-tools
|
22
|
+
version: latest
|
23
|
+
urlTemplate: "https://github.com/dominikh/go-tools/releases/download/2020.2.3/staticcheck_linux_amd64.tar.gz"
|
24
|
+
pathInArchive: staticcheck/staticcheck
|
25
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
26
|
+
- name: Checkout
|
27
|
+
uses: actions/checkout@v2
|
28
|
+
- name: Cache dependencies
|
29
|
+
uses: actions/cache@v2
|
30
|
+
with:
|
31
|
+
path: ~/go/pkg/mod
|
32
|
+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
33
|
+
restore-keys: |
|
34
|
+
${{ runner.os }}-go-
|
35
|
+
- name: Setup Go
|
36
|
+
uses: actions/setup-go@v2
|
37
|
+
with:
|
38
|
+
go-version: ${{ matrix.go-version }}
|
39
|
+
- name: Run tests
|
40
|
+
run: make test
|
41
|
+
- name: Run staticcheck
|
42
|
+
run: make staticcheck
|
43
|
+
ruby:
|
44
|
+
runs-on: ubuntu-latest
|
45
|
+
strategy:
|
46
|
+
matrix:
|
47
|
+
ruby-version: ["2.5", "2.6", "2.7", "3.0"]
|
48
|
+
steps:
|
49
|
+
- uses: actions/checkout@v2
|
50
|
+
- uses: ruby/setup-ruby@v1
|
51
|
+
with:
|
52
|
+
ruby-version: ${{ matrix.ruby-version }}
|
53
|
+
bundler-cache: true
|
54
|
+
- run: bundle exec rake
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,50 +1,80 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pbio (0.
|
4
|
+
pbio (0.3.0)
|
5
5
|
google-protobuf
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
|
10
|
+
activesupport (6.1.3.1)
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
+
i18n (>= 1.6, < 2)
|
13
|
+
minitest (>= 5.1)
|
14
|
+
tzinfo (~> 2.0)
|
15
|
+
zeitwerk (~> 2.3)
|
16
|
+
ast (2.4.2)
|
17
|
+
concurrent-ruby (1.1.8)
|
11
18
|
diff-lcs (1.4.4)
|
12
|
-
google-protobuf (3.
|
13
|
-
|
14
|
-
|
19
|
+
google-protobuf (3.15.8)
|
20
|
+
i18n (1.8.10)
|
21
|
+
concurrent-ruby (~> 1.0)
|
22
|
+
minitest (5.14.4)
|
23
|
+
parallel (1.20.1)
|
24
|
+
parser (3.0.1.1)
|
15
25
|
ast (~> 2.4.1)
|
26
|
+
rack (2.2.3)
|
16
27
|
rainbow (3.0.0)
|
17
|
-
rake (13.0.
|
18
|
-
regexp_parser (1.
|
19
|
-
rexml (3.2.
|
20
|
-
rspec (3.
|
21
|
-
rspec-core (~> 3.
|
22
|
-
rspec-expectations (~> 3.
|
23
|
-
rspec-mocks (~> 3.
|
24
|
-
rspec-core (3.
|
25
|
-
rspec-support (~> 3.
|
26
|
-
rspec-expectations (3.
|
28
|
+
rake (13.0.3)
|
29
|
+
regexp_parser (2.1.1)
|
30
|
+
rexml (3.2.5)
|
31
|
+
rspec (3.10.0)
|
32
|
+
rspec-core (~> 3.10.0)
|
33
|
+
rspec-expectations (~> 3.10.0)
|
34
|
+
rspec-mocks (~> 3.10.0)
|
35
|
+
rspec-core (3.10.1)
|
36
|
+
rspec-support (~> 3.10.0)
|
37
|
+
rspec-expectations (3.10.1)
|
27
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
-
rspec-support (~> 3.
|
29
|
-
rspec-mocks (3.
|
39
|
+
rspec-support (~> 3.10.0)
|
40
|
+
rspec-mocks (3.10.2)
|
30
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
-
rspec-support (~> 3.
|
32
|
-
rspec-support (3.
|
33
|
-
rubocop (
|
42
|
+
rspec-support (~> 3.10.0)
|
43
|
+
rspec-support (3.10.2)
|
44
|
+
rubocop (1.13.0)
|
34
45
|
parallel (~> 1.10)
|
35
|
-
parser (>=
|
46
|
+
parser (>= 3.0.0.0)
|
36
47
|
rainbow (>= 2.2.2, < 4.0)
|
37
|
-
regexp_parser (>= 1.
|
48
|
+
regexp_parser (>= 1.8, < 3.0)
|
38
49
|
rexml
|
39
|
-
rubocop-ast (>=
|
50
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
40
51
|
ruby-progressbar (~> 1.7)
|
41
|
-
unicode-display_width (>= 1.4.0, <
|
42
|
-
rubocop-ast (
|
43
|
-
parser (>=
|
44
|
-
rubocop-
|
45
|
-
rubocop (
|
46
|
-
|
47
|
-
|
52
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
53
|
+
rubocop-ast (1.5.0)
|
54
|
+
parser (>= 3.0.1.1)
|
55
|
+
rubocop-bsm (0.5.9)
|
56
|
+
rubocop (~> 1.0)
|
57
|
+
rubocop-performance
|
58
|
+
rubocop-rails
|
59
|
+
rubocop-rake
|
60
|
+
rubocop-rspec
|
61
|
+
rubocop-performance (1.11.1)
|
62
|
+
rubocop (>= 1.7.0, < 2.0)
|
63
|
+
rubocop-ast (>= 0.4.0)
|
64
|
+
rubocop-rails (2.9.1)
|
65
|
+
activesupport (>= 4.2.0)
|
66
|
+
rack (>= 1.1)
|
67
|
+
rubocop (>= 0.90.0, < 2.0)
|
68
|
+
rubocop-rake (0.5.1)
|
69
|
+
rubocop
|
70
|
+
rubocop-rspec (2.3.0)
|
71
|
+
rubocop (~> 1.0)
|
72
|
+
rubocop-ast (>= 1.1.0)
|
73
|
+
ruby-progressbar (1.11.0)
|
74
|
+
tzinfo (2.0.4)
|
75
|
+
concurrent-ruby (~> 1.0)
|
76
|
+
unicode-display_width (2.0.0)
|
77
|
+
zeitwerk (2.4.2)
|
48
78
|
|
49
79
|
PLATFORMS
|
50
80
|
ruby
|
@@ -54,8 +84,7 @@ DEPENDENCIES
|
|
54
84
|
pbio!
|
55
85
|
rake
|
56
86
|
rspec
|
57
|
-
rubocop
|
58
|
-
rubocop-performance
|
87
|
+
rubocop-bsm
|
59
88
|
|
60
89
|
BUNDLED WITH
|
61
90
|
2.1.4
|
data/pbio.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'pbio'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '0.3.0'
|
4
4
|
s.authors = ['Dimitrij Denissenko']
|
5
5
|
s.email = ['dimitrij@blacksquaremedia.com']
|
6
6
|
s.summary = 'Protobuf Streaming'
|
@@ -11,13 +11,12 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^spec/}) }
|
12
12
|
s.test_files = `git ls-files -z -- spec/*`.split("\x0")
|
13
13
|
s.require_paths = ['lib']
|
14
|
-
s.required_ruby_version = '>= 2.
|
14
|
+
s.required_ruby_version = '>= 2.5'
|
15
15
|
|
16
16
|
s.add_dependency 'google-protobuf'
|
17
17
|
|
18
18
|
s.add_development_dependency 'bundler'
|
19
19
|
s.add_development_dependency 'rake'
|
20
20
|
s.add_development_dependency 'rspec'
|
21
|
-
s.add_development_dependency 'rubocop'
|
22
|
-
s.add_development_dependency 'rubocop-performance'
|
21
|
+
s.add_development_dependency 'rubocop-bsm'
|
23
22
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe PBIO::Delimited do
|
4
|
+
subject { described_class.new io }
|
5
|
+
|
4
6
|
let(:io) { StringIO.new }
|
5
7
|
let(:msg1) { PBIO::Spec::Message.new(name: 'Test A') }
|
6
8
|
let(:msg2) { PBIO::Spec::Message.new(name: 'Test B') }
|
7
9
|
let(:msg3) { PBIO::Spec::Message.new(name: 'x' * 32_000) }
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
it 'should write' do
|
11
|
+
it 'writes' do
|
12
12
|
expect(subject.write(msg1)).to eq(9)
|
13
13
|
expect(subject.write(msg2)).to eq(9)
|
14
14
|
expect(io.size).to eq(18)
|
@@ -18,13 +18,13 @@ describe PBIO::Delimited do
|
|
18
18
|
expect(io.size).to eq(32_025)
|
19
19
|
end
|
20
20
|
|
21
|
-
it '
|
21
|
+
it 'reads' do
|
22
22
|
expect(subject.write(msg1)).to eq(9)
|
23
23
|
expect(subject.write(msg2)).to eq(9)
|
24
24
|
io.rewind
|
25
25
|
|
26
26
|
expect(subject.read(PBIO::Spec::Message)).to eq(msg1)
|
27
|
-
expect(subject).
|
27
|
+
expect(subject).not_to be_eof
|
28
28
|
expect(subject.read(PBIO::Spec::Message)).to eq(msg2)
|
29
29
|
expect(subject).to be_eof
|
30
30
|
expect(subject.read(PBIO::Spec::Message)).to be_nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pbio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -67,21 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubocop
|
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'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop-performance
|
70
|
+
name: rubocop-bsm
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - ">="
|
@@ -101,9 +87,9 @@ executables: []
|
|
101
87
|
extensions: []
|
102
88
|
extra_rdoc_files: []
|
103
89
|
files:
|
90
|
+
- ".github/workflows/test.yml"
|
104
91
|
- ".gitignore"
|
105
92
|
- ".rubocop.yml"
|
106
|
-
- ".travis.yml"
|
107
93
|
- Gemfile
|
108
94
|
- Gemfile.lock
|
109
95
|
- LICENSE
|
@@ -131,14 +117,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
117
|
requirements:
|
132
118
|
- - ">="
|
133
119
|
- !ruby/object:Gem::Version
|
134
|
-
version: 2.
|
120
|
+
version: '2.5'
|
135
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
122
|
requirements:
|
137
123
|
- - ">="
|
138
124
|
- !ruby/object:Gem::Version
|
139
125
|
version: '0'
|
140
126
|
requirements: []
|
141
|
-
rubygems_version: 3.1.
|
127
|
+
rubygems_version: 3.1.4
|
142
128
|
signing_key:
|
143
129
|
specification_version: 4
|
144
130
|
summary: Protobuf Streaming
|