cztop 0.14.1 → 1.1.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/coverage.yml +20 -0
- data/.github/workflows/draft_api.yml +27 -0
- data/.github/workflows/stable_api.yml +26 -0
- data/.rubocop.yml +175 -0
- data/CHANGES.md +9 -4
- data/Gemfile +3 -7
- data/README.md +19 -58
- data/ci/install-libczmq +22 -0
- data/ci/install-libzmq +22 -0
- data/cztop.gemspec +12 -13
- data/lib/cztop/actor.rb +55 -26
- data/lib/cztop/authenticator.rb +18 -9
- data/lib/cztop/beacon.rb +22 -10
- data/lib/cztop/cert_store.rb +8 -2
- data/lib/cztop/certificate.rb +47 -18
- data/lib/cztop/config/comments.rb +14 -3
- data/lib/cztop/config/serialization.rb +25 -5
- data/lib/cztop/config/traversing.rb +44 -13
- data/lib/cztop/config.rb +23 -9
- data/lib/cztop/frame.rb +23 -10
- data/lib/cztop/has_ffi_delegate.rb +11 -1
- data/lib/cztop/message/frames.rb +16 -2
- data/lib/cztop/message.rb +36 -22
- data/lib/cztop/metadata.rb +35 -24
- data/lib/cztop/monitor.rb +14 -5
- data/lib/cztop/poller/aggregated.rb +31 -15
- data/lib/cztop/poller/zmq.rb +25 -22
- data/lib/cztop/poller/zpoller.rb +18 -6
- data/lib/cztop/poller.rb +43 -18
- data/lib/cztop/polymorphic_zsock_methods.rb +6 -1
- data/lib/cztop/proxy.rb +34 -19
- data/lib/cztop/send_receive_methods.rb +5 -1
- data/lib/cztop/socket/types.rb +128 -22
- data/lib/cztop/socket.rb +23 -18
- data/lib/cztop/version.rb +5 -1
- data/lib/cztop/z85/padded.rb +12 -3
- data/lib/cztop/z85/pipe.rb +40 -17
- data/lib/cztop/z85.rb +17 -6
- data/lib/cztop/zap.rb +57 -32
- data/lib/cztop/zsock_options.rb +155 -122
- data/lib/cztop.rb +2 -1
- metadata +25 -90
- data/.gitlab-ci.yml +0 -32
- data/Guardfile +0 -61
- data/Procfile +0 -3
- data/ci-scripts/install-deps +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 149778ca201f323611fe23b4b1107c4cb4bde8ea7364bbe7370cea39daf5ab02
|
4
|
+
data.tar.gz: 195be179654f5b1c286f4859a012a093bed587f644306ee63642a7e300b261f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2a65ca5f02e39cfc9ca2695fefd6b02c0e898878041a662d0af1361235fa1ec091c4024d0a9d68b793173f191ce81350e21cc98b0a2320d3d6c9d9617f35d50
|
7
|
+
data.tar.gz: bae808f502e3f8b3ced7872d76a6377578bd37d332bf12ba96aaa126ea7571abbbfe363426c9578c30ecd6abbc126198e470d3d378de0bd0b1960384ab9d17b7
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Coverage
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-20.04
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v2
|
10
|
+
- name: Set up Ruby
|
11
|
+
uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 3.1
|
14
|
+
- name: Install CZMQ
|
15
|
+
run: sudo apt-get install libczmq-dev
|
16
|
+
- name: Run the default task
|
17
|
+
run: |
|
18
|
+
gem install bundler
|
19
|
+
bundle install
|
20
|
+
env REPORT_COVERAGE=true bundle exec rake
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: DRAFT API
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-20.04
|
8
|
+
timeout-minutes: 15
|
9
|
+
steps:
|
10
|
+
- uses: actions/checkout@v2
|
11
|
+
- name: Set up Ruby
|
12
|
+
uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: 3.1
|
15
|
+
- name: Install ZMQ and CZMQ
|
16
|
+
run: |
|
17
|
+
export PKG_CONFIG_PATH=$HOME/lib/pkgconfig # custom libs (for linking)
|
18
|
+
env
|
19
|
+
env ZMQ_VERSION=HEAD ci/install-libzmq
|
20
|
+
env CZMQ_VERSION=HEAD ci/install-libczmq
|
21
|
+
- name: Run the default task
|
22
|
+
run: |
|
23
|
+
export LD_LIBRARY_PATH=$HOME/lib # custom libs (for execution)
|
24
|
+
env
|
25
|
+
gem install bundler
|
26
|
+
bundle install
|
27
|
+
bundle exec rake
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: STABLE API
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-20.04
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby:
|
11
|
+
- 2.7
|
12
|
+
- 3.0
|
13
|
+
- 3.1
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
20
|
+
- name: Install CZMQ
|
21
|
+
run: sudo apt-get install libczmq-dev
|
22
|
+
- name: Run the default task
|
23
|
+
run: |
|
24
|
+
gem install bundler
|
25
|
+
bundle install
|
26
|
+
bundle exec rake
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.7
|
3
|
+
NewCops: enable
|
4
|
+
Layout/EmptyLineAfterMagicComment:
|
5
|
+
Enabled: true
|
6
|
+
Layout/ExtraSpacing:
|
7
|
+
AllowForAlignment: true
|
8
|
+
Layout/EmptyLines:
|
9
|
+
Enabled: false
|
10
|
+
Layout/EmptyLineBetweenDefs:
|
11
|
+
NumberOfEmptyLines: 2
|
12
|
+
Layout/MultilineOperationIndentation:
|
13
|
+
Enabled: true
|
14
|
+
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
15
|
+
Enabled: true
|
16
|
+
Gemspec/RequireMFA: # new in 1.23
|
17
|
+
Enabled: true
|
18
|
+
Layout/LineContinuationLeadingSpace: # new in 1.31
|
19
|
+
Enabled: true
|
20
|
+
Layout/LineContinuationSpacing: # new in 1.31
|
21
|
+
Enabled: true
|
22
|
+
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
23
|
+
Enabled: true
|
24
|
+
Layout/SpaceBeforeBrackets: # new in 1.7
|
25
|
+
Enabled: true
|
26
|
+
Lint/AmbiguousAssignment: # new in 1.7
|
27
|
+
Enabled: true
|
28
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
29
|
+
Enabled: false
|
30
|
+
Lint/AmbiguousRange: # new in 1.19
|
31
|
+
Enabled: true
|
32
|
+
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
33
|
+
Enabled: true
|
34
|
+
Lint/DeprecatedConstants: # new in 1.8
|
35
|
+
Enabled: true
|
36
|
+
Lint/DuplicateBranch: # new in 1.3
|
37
|
+
Enabled: true
|
38
|
+
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
|
39
|
+
Enabled: true
|
40
|
+
Lint/EmptyBlock: # new in 1.1
|
41
|
+
Enabled: true
|
42
|
+
Lint/EmptyClass: # new in 1.3
|
43
|
+
Enabled: true
|
44
|
+
Lint/EmptyInPattern: # new in 1.16
|
45
|
+
Enabled: true
|
46
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
47
|
+
Enabled: true
|
48
|
+
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
49
|
+
Enabled: true
|
50
|
+
Lint/NoReturnInBeginEndBlocks: # new in 1.2
|
51
|
+
Enabled: true
|
52
|
+
Lint/NonAtomicFileOperation: # new in 1.31
|
53
|
+
Enabled: true
|
54
|
+
Lint/NumberedParameterAssignment: # new in 1.9
|
55
|
+
Enabled: true
|
56
|
+
Lint/OrAssignmentToConstant: # new in 1.9
|
57
|
+
Enabled: true
|
58
|
+
Lint/RedundantDirGlobSort: # new in 1.8
|
59
|
+
Enabled: true
|
60
|
+
Lint/RefinementImportMethods: # new in 1.27
|
61
|
+
Enabled: true
|
62
|
+
Lint/RequireRangeParentheses: # new in 1.32
|
63
|
+
Enabled: true
|
64
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
65
|
+
Enabled: true
|
66
|
+
Lint/SymbolConversion: # new in 1.9
|
67
|
+
Enabled: true
|
68
|
+
Lint/ToEnumArguments: # new in 1.1
|
69
|
+
Enabled: true
|
70
|
+
Lint/TripleQuotes: # new in 1.9
|
71
|
+
Enabled: true
|
72
|
+
Lint/UnexpectedBlockArity: # new in 1.5
|
73
|
+
Enabled: true
|
74
|
+
Lint/UnmodifiedReduceAccumulator: # new in 1.1
|
75
|
+
Enabled: true
|
76
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
77
|
+
Enabled: true
|
78
|
+
Naming/BlockForwarding: # new in 1.24
|
79
|
+
Enabled: true
|
80
|
+
Security/CompoundHash: # new in 1.28
|
81
|
+
Enabled: true
|
82
|
+
Security/IoMethods: # new in 1.22
|
83
|
+
Enabled: true
|
84
|
+
Style/AndOr:
|
85
|
+
EnforcedStyle: conditionals
|
86
|
+
Style/InfiniteLoop:
|
87
|
+
Enabled: false
|
88
|
+
Style/ArgumentsForwarding: # new in 1.1
|
89
|
+
Enabled: true
|
90
|
+
Style/CollectionCompact: # new in 1.2
|
91
|
+
Enabled: true
|
92
|
+
Style/DocumentDynamicEvalDefinition: # new in 1.1
|
93
|
+
Enabled: true
|
94
|
+
Style/EmptyHeredoc: # new in 1.32
|
95
|
+
Enabled: true
|
96
|
+
Style/EndlessMethod: # new in 1.8
|
97
|
+
Enabled: true
|
98
|
+
Style/EnvHome: # new in 1.29
|
99
|
+
Enabled: true
|
100
|
+
Style/FetchEnvVar: # new in 1.28
|
101
|
+
Enabled: true
|
102
|
+
Style/FileRead: # new in 1.24
|
103
|
+
Enabled: true
|
104
|
+
Style/FileWrite: # new in 1.24
|
105
|
+
Enabled: true
|
106
|
+
Style/FrozenStringLiteralComment:
|
107
|
+
EnforcedStyle: always_true
|
108
|
+
Style/HashConversion: # new in 1.10
|
109
|
+
Enabled: true
|
110
|
+
Style/HashExcept: # new in 1.7
|
111
|
+
Enabled: true
|
112
|
+
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
113
|
+
Enabled: true
|
114
|
+
Style/InPatternThen: # new in 1.16
|
115
|
+
Enabled: true
|
116
|
+
Style/MagicCommentFormat: # new in 1.35
|
117
|
+
Enabled: true
|
118
|
+
Style/MapCompactWithConditionalBlock: # new in 1.30
|
119
|
+
Enabled: true
|
120
|
+
Style/MapToHash: # new in 1.24
|
121
|
+
Enabled: true
|
122
|
+
Style/MultilineInPatternThen: # new in 1.16
|
123
|
+
Enabled: true
|
124
|
+
Style/NegatedIfElseCondition: # new in 1.2
|
125
|
+
Enabled: true
|
126
|
+
Style/NestedFileDirname: # new in 1.26
|
127
|
+
Enabled: true
|
128
|
+
Style/NilLambda: # new in 1.3
|
129
|
+
Enabled: true
|
130
|
+
Style/NumberedParameters: # new in 1.22
|
131
|
+
Enabled: true
|
132
|
+
Style/NumberedParametersLimit: # new in 1.22
|
133
|
+
Enabled: true
|
134
|
+
Style/ObjectThen: # new in 1.28
|
135
|
+
Enabled: true
|
136
|
+
Style/OpenStructUse: # new in 1.23
|
137
|
+
Enabled: true
|
138
|
+
Style/QuotedSymbols: # new in 1.16
|
139
|
+
Enabled: true
|
140
|
+
Style/RedundantArgument: # new in 1.4
|
141
|
+
Enabled: true
|
142
|
+
Style/RedundantInitialize: # new in 1.27
|
143
|
+
Enabled: true
|
144
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
145
|
+
Enabled: true
|
146
|
+
Style/SelectByRegexp: # new in 1.22
|
147
|
+
Enabled: true
|
148
|
+
Style/StringChars: # new in 1.12
|
149
|
+
Enabled: true
|
150
|
+
Style/SwapValues: # new in 1.1
|
151
|
+
Enabled: true
|
152
|
+
Style/ClassAndModuleChildren:
|
153
|
+
Enabled: false
|
154
|
+
Style/StringConcatenation:
|
155
|
+
Enabled: false
|
156
|
+
Style/RescueModifier:
|
157
|
+
Enabled: false
|
158
|
+
Style/YodaCondition:
|
159
|
+
Enabled: false
|
160
|
+
Lint/AmbiguousRegexpLiteral:
|
161
|
+
Enabled: false
|
162
|
+
Style/WordArray:
|
163
|
+
Enabled: false
|
164
|
+
Style/Semicolon:
|
165
|
+
Enabled: false
|
166
|
+
Naming/MethodName:
|
167
|
+
Enabled: false
|
168
|
+
Style/EmptyMethod:
|
169
|
+
Enabled: false
|
170
|
+
Layout/EmptyLinesAroundClassBody:
|
171
|
+
Enabled: true
|
172
|
+
EnforcedStyle: empty_lines_except_namespace
|
173
|
+
Layout/EmptyLinesAroundModuleBody:
|
174
|
+
Enabled: true
|
175
|
+
EnforcedStyle: empty_lines_except_namespace
|
data/CHANGES.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
0.
|
1
|
+
1.1.0.pre1 (10/17/2022)
|
2
2
|
-----
|
3
|
-
*
|
4
|
-
*
|
3
|
+
* modernize syntax using Rubocop
|
4
|
+
* use czmq-ffi-gen 1.1.0.pre1
|
5
|
+
* require Ruby >= 2.7.x
|
5
6
|
|
7
|
+
1.0.0 (01/08/2021)
|
8
|
+
-----
|
9
|
+
* use czmq-ffi-gen 1.0.x
|
10
|
+
* modernized project
|
6
11
|
|
7
12
|
0.13.1 (03/04/2018)
|
8
13
|
-----
|
@@ -134,7 +139,7 @@
|
|
134
139
|
|
135
140
|
0.3.0 (04/13/2016)
|
136
141
|
-----
|
137
|
-
* port CZTop::Poller to zmq_poller_*() functions so it supports thread-safe
|
142
|
+
* port CZTop::Poller to `zmq_poller_*()` functions so it supports thread-safe
|
138
143
|
sockets as well
|
139
144
|
* extract niche features to CZTop::Poller::Aggregated
|
140
145
|
* fix taxi system example
|
data/Gemfile
CHANGED
@@ -2,13 +2,9 @@ source 'https://rubygems.org'
|
|
2
2
|
gemspec
|
3
3
|
|
4
4
|
# useful when working on czmq-ffi-gen in parallel
|
5
|
-
#gem "czmq-ffi-gen",
|
6
|
-
#gem "rspec-core", git: "file:///Users/paddor/src/ruby/rspec-core"
|
5
|
+
# gem "czmq-ffi-gen", path: "../czmq-ffi-gen"
|
7
6
|
|
8
7
|
group :development do
|
9
|
-
gem '
|
10
|
-
gem '
|
11
|
-
|
12
|
-
# >= 3.1 doesn't work on Rubinius, see guard/listen#391
|
13
|
-
gem 'listen', '~> 3.0.x', require: false
|
8
|
+
gem 'codecov', require: false
|
9
|
+
gem 'simplecov', require: false
|
14
10
|
end
|
data/README.md
CHANGED
@@ -1,31 +1,15 @@
|
|
1
|
+
![Specs status](https://github.com/paddor/cztop/workflows/STABLE%20API/badge.svg)
|
2
|
+
![Specs status](https://github.com/paddor/cztop/workflows/DRAFT%20API/badge.svg)
|
3
|
+
[![codecov](https://codecov.io/gh/paddor/cztop/branch/master/graph/badge.svg?token=TnjOba97R7)](https://codecov.io/gh/paddor/cztop)
|
4
|
+
|
1
5
|
# CZTop
|
2
6
|
|
3
7
|
CZTop is a CZMQ binding for Ruby. It is based on
|
4
|
-
[czmq-ffi-gen](https://
|
8
|
+
[czmq-ffi-gen](https://github.com/paddor/czmq-ffi-gen), the generated low-level
|
5
9
|
FFI binding of [CZMQ](https://github.com/zeromq/czmq) and has a focus on being
|
6
10
|
easy to use for Rubyists (POLS) and providing first class support for security
|
7
11
|
mechanisms (like CURVE).
|
8
12
|
|
9
|
-
[![pipeline status](https://gitlab.com/paddor/cztop/badges/master/pipeline.svg)](https://gitlab.com/paddor/cztop/commits/master)
|
10
|
-
[![Coverage Status](https://coveralls.io/repos/gitlab/paddor/cztop/badge.svg?branch=master)](https://coveralls.io/gitlab/paddor/cztop?branch=master)
|
11
|
-
[![ISC License](https://img.shields.io/badge/license-ISC_License-blue.svg)](LICENSE)
|
12
|
-
|
13
|
-
## Goals
|
14
|
-
|
15
|
-
Here are some some of the goals I had in mind for this library:
|
16
|
-
|
17
|
-
- [x] as easy as possible, Ruby-esque API
|
18
|
-
- [x] first class support for security (CURVE mechanism)
|
19
|
-
- [x] including handling of certificates
|
20
|
-
- [x] support MRI, Rubinius, and JRuby
|
21
|
-
- [x] high-quality API documentation
|
22
|
-
- [x] 100% test coverage
|
23
|
-
- [x] provide a portable Z85 implementation
|
24
|
-
* unlike [fpesce/z85](https://github.com/fpesce/z85), which is a C extension
|
25
|
-
- [x] use it to replace the [Celluloid::ZMQ](https://github.com/celluloid/celluloid-zmq) part of [Celluloid](https://github.com/celluloid/celluloid)
|
26
|
-
* [celluloid/celluloid-zmq#56](https://github.com/celluloid/celluloid-zmq/issues/56)
|
27
|
-
- [ ] implement some of the missing (CZMQ based) Ruby examples in the [ZMQ Guide](http://zguide.zeromq.org/page:all)
|
28
|
-
|
29
13
|
## Overview
|
30
14
|
|
31
15
|
### Class Hierarchy
|
@@ -89,50 +73,28 @@ More information in the [API documentation](http://www.rubydoc.info/github/paddo
|
|
89
73
|
* use `Socket#CURVE_server!(cert)` on the server
|
90
74
|
* and `Socket#CURVE_client!(client_cert, server_cert)` on the client
|
91
75
|
* socket types as Ruby classes
|
92
|
-
* no need to manually pass
|
76
|
+
* no need to manually pass type constants
|
93
77
|
* but you can: `CZTop::Socket.new_by_type(:REP)`
|
94
|
-
* e.g. `#subscribe` only exists on CZTop::Socket::SUB
|
95
|
-
* DRAFT API ready
|
96
|
-
* certain DRAFT methods are supported if the libraries (ZMQ/CZMQ) have been compiled with DRAFT APIs enabled (`--enable-drafts`)
|
97
|
-
* use `CZMQ::FFI.has_draft?` to check if the CZMQ DRAFT API is available
|
98
|
-
* use `CZMQ::FFI::LibZMQ.has_draft?` to check if the ZMQ DRAFT API is available
|
99
|
-
* extend CZTop to your needs
|
100
|
-
* ZMTP 3.1 heartbeat ready
|
101
|
-
* `socket.options.heartbeat_ivl = 2000`
|
102
|
-
* `socket.options.heartbeat_timeout = 8000`
|
78
|
+
* e.g. `#subscribe` only exists on `CZTop::Socket::SUB`
|
103
79
|
|
104
80
|
## Requirements
|
105
81
|
|
106
|
-
You'll need:
|
107
|
-
|
108
|
-
* CZMQ >= 4.1
|
109
|
-
* ZMQ >= 4.2
|
110
|
-
|
111
|
-
For security mechanisms like CURVE, it's recommended to use Libsodium. However,
|
112
|
-
ZMQ can be compiled with tweetnacl enabled.
|
113
82
|
|
114
|
-
|
83
|
+
* CZMQ >= 4.2
|
84
|
+
* ZMQ >= 4.3
|
115
85
|
|
116
|
-
$ brew install libsodium
|
117
|
-
$ brew install zmq --HEAD --with-libsodium
|
118
|
-
$ brew install czmq --HEAD
|
119
86
|
|
120
|
-
|
121
|
-
to get more help. Make sure to install CZMQ, not only ZMQ.
|
87
|
+
On Ubuntu 20.04+:
|
122
88
|
|
123
|
-
|
124
|
-
be required to pass `--enable-drafts` to `./configure` to make sure all the
|
125
|
-
`zmq_poller_*()` functions are available. However, this doesn't seem to be the
|
126
|
-
case on all systems.
|
89
|
+
$ sudo apt install libczmq-dev
|
127
90
|
|
128
|
-
|
91
|
+
On macOS using Homebrew, run:
|
129
92
|
|
130
|
-
|
131
|
-
is tested.
|
93
|
+
$ brew install czmq
|
132
94
|
|
133
|
-
|
95
|
+
### Supported Rubies
|
134
96
|
|
135
|
-
* MRI (2.
|
97
|
+
* MRI (2.6, 2.7, 3.0)
|
136
98
|
* Rubinius (HEAD)
|
137
99
|
* JRuby 9000 (HEAD)
|
138
100
|
|
@@ -159,20 +121,19 @@ and Ruby. The following API documentation is currently available:
|
|
159
121
|
|
160
122
|
* [YARD API documentation](http://www.rubydoc.info/gems/cztop) (release)
|
161
123
|
|
162
|
-
Feel free to start a [wiki](https://
|
124
|
+
Feel free to start a [wiki](https://github.com/paddor/cztop/wiki) page.
|
163
125
|
|
164
126
|
## Performance
|
165
127
|
|
166
|
-
|
167
|
-
reasonably thin. CZTop is just a convenience layer.
|
128
|
+
CZTop is just a convenience layer on top of the thin czmq-ffi-gen library.
|
168
129
|
|
169
130
|
Make sure to check out the
|
170
|
-
[perf](https://
|
131
|
+
[perf](https://github.com/paddor/cztop/blob/master/perf) directory for latency
|
171
132
|
and throughput measurement scripts.
|
172
133
|
|
173
134
|
## Usage
|
174
135
|
|
175
|
-
See the [examples](https://
|
136
|
+
See the [examples](https://github.com/paddor/cztop/blob/master/examples) directory for some examples.
|
176
137
|
|
177
138
|
|
178
139
|
## Contributing
|
data/ci/install-libczmq
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/sh -x
|
2
|
+
# vim: ft=sh
|
3
|
+
set -e
|
4
|
+
mkdir -p ~/src
|
5
|
+
cd ~/src
|
6
|
+
|
7
|
+
case "$CZMQ_VERSION" in
|
8
|
+
HEAD)
|
9
|
+
echo "Using HEAD and compiling with --enable-drafts ..."
|
10
|
+
git clone https://github.com/zeromq/czmq czmq
|
11
|
+
CONFIGURE_OPTS="--enable-drafts=yes"
|
12
|
+
;;
|
13
|
+
*)
|
14
|
+
echo '$CZMQ_VERSION not set.'
|
15
|
+
exit 1
|
16
|
+
esac
|
17
|
+
|
18
|
+
cd czmq
|
19
|
+
./autogen.sh
|
20
|
+
./configure --prefix=$HOME $CONFIGURE_OPTS
|
21
|
+
make
|
22
|
+
make install
|
data/ci/install-libzmq
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/sh -x
|
2
|
+
# vim: ft=sh
|
3
|
+
set -e
|
4
|
+
mkdir -p ~/src
|
5
|
+
cd ~/src
|
6
|
+
|
7
|
+
case "$ZMQ_VERSION" in
|
8
|
+
HEAD)
|
9
|
+
echo "Using HEAD and compiling with --enable-drafts ..."
|
10
|
+
git clone https://github.com/zeromq/libzmq libzmq
|
11
|
+
CONFIGURE_OPTS="--enable-drafts=yes"
|
12
|
+
;;
|
13
|
+
*)
|
14
|
+
echo '$ZMQ_VERSION not set.'
|
15
|
+
exit 1
|
16
|
+
esac
|
17
|
+
|
18
|
+
cd libzmq
|
19
|
+
./autogen.sh
|
20
|
+
./configure --prefix=$HOME $CONFIGURE_OPTS
|
21
|
+
make
|
22
|
+
make install
|
data/cztop.gemspec
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
require 'cztop/version'
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/cztop/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
6
|
spec.name = "cztop"
|
@@ -9,16 +8,21 @@ Gem::Specification.new do |spec|
|
|
9
8
|
spec.authors = ["Patrik Wenger"]
|
10
9
|
spec.email = ["paddor@gmail.com"]
|
11
10
|
|
12
|
-
spec.summary = %q{CZMQ Ruby binding
|
13
|
-
spec.homepage = "https://
|
11
|
+
spec.summary = %q{CZMQ Ruby binding based on the generated low-level FFI bindings of CZMQ}
|
12
|
+
spec.homepage = "https://rubygems.org/gems/cztop"
|
14
13
|
spec.license = "ISC"
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/paddor/cztop"
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/paddor/cztop/blob/master/CHANGELOG.md"
|
15
19
|
|
16
20
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
21
|
spec.bindir = "exe"
|
18
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
23
|
spec.require_paths = ["lib"]
|
20
24
|
|
21
|
-
spec.add_runtime_dependency "czmq-ffi-gen", "~> 0.
|
25
|
+
spec.add_runtime_dependency "czmq-ffi-gen", "~> 1.1.0.pre1"
|
22
26
|
|
23
27
|
spec.add_development_dependency "bundler"
|
24
28
|
spec.add_development_dependency "rake"
|
@@ -27,10 +31,5 @@ Gem::Specification.new do |spec|
|
|
27
31
|
spec.add_development_dependency "rspec-given", "~> 3.8.0"
|
28
32
|
spec.add_development_dependency "pry"
|
29
33
|
spec.add_development_dependency "yard"
|
30
|
-
spec.add_development_dependency "
|
31
|
-
spec.add_development_dependency "guard-rspec"
|
32
|
-
spec.add_development_dependency "guard-yard"
|
33
|
-
spec.add_development_dependency "guard-shell"
|
34
|
-
spec.add_development_dependency 'terminal-notifier-guard'
|
35
|
-
spec.add_development_dependency 'foreman'
|
34
|
+
spec.add_development_dependency "rubocop", "~> 1.36.0"
|
36
35
|
end
|