pbwire 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +68 -19
- data/ext/pbwire_ext/core_ctx.c +16 -8
- data/ext/pbwire_ext/core_decode.c +30 -4
- data/ext/pbwire_ext/core_descriptor_set.c +115 -15
- data/ext/pbwire_ext/core_encode.c +122 -81
- data/ext/pbwire_ext/core_json.c +487 -123
- data/ext/pbwire_ext/core_message.c +36 -2
- data/ext/pbwire_ext/core_schema.c +69 -12
- data/ext/pbwire_ext/core_stream.c +82 -22
- data/ext/pbwire_ext/core_text.c +25 -15
- data/ext/pbwire_ext/core_wire.c +7 -3
- data/ext/pbwire_ext/core_wkt.c +3 -2
- data/ext/pbwire_ext/internal.h +32 -7
- data/ext/pbwire_ext/pbwire.h +137 -53
- data/ext/pbwire_ext/pbwire_ext.c +759 -7
- data/lib/pbwire.rb +7 -4
- metadata +16 -2
data/lib/pbwire.rb
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
#
|
|
15
15
|
# Build it with build.sh (or `make ruby-build`); the extension is linked against
|
|
16
16
|
# the C core, so the schema and the wire format stay in one place.
|
|
17
|
+
#
|
|
18
|
+
# pbench core arm: n/a. shortcut: no pure-Ruby core, reopen when a native-less
|
|
19
|
+
# Ruby target appears.
|
|
17
20
|
require_relative 'pbwire_ext'
|
|
18
21
|
|
|
19
22
|
# Idiomatic Ruby resource handling, mirroring File.open: with a block the
|
|
@@ -26,8 +29,8 @@ module Pbwire
|
|
|
26
29
|
alias_method :__pbwire_from_bytes__, :from_bytes
|
|
27
30
|
alias_method :__pbwire_from_file__, :from_file
|
|
28
31
|
|
|
29
|
-
def from_bytes(bytes)
|
|
30
|
-
schema = __pbwire_from_bytes__(bytes)
|
|
32
|
+
def from_bytes(bytes, opts = nil)
|
|
33
|
+
schema = __pbwire_from_bytes__(bytes, opts)
|
|
31
34
|
return schema unless block_given?
|
|
32
35
|
|
|
33
36
|
begin
|
|
@@ -37,8 +40,8 @@ module Pbwire
|
|
|
37
40
|
end
|
|
38
41
|
end
|
|
39
42
|
|
|
40
|
-
def from_file(path)
|
|
41
|
-
schema = __pbwire_from_file__(path)
|
|
43
|
+
def from_file(path, opts = nil)
|
|
44
|
+
schema = __pbwire_from_file__(path, opts)
|
|
42
45
|
return schema unless block_given?
|
|
43
46
|
|
|
44
47
|
begin
|
metadata
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pbwire
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jinganix
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
-
dependencies:
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: base64
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0'
|
|
12
26
|
description: A FileDescriptorSet becomes the schema at runtime; messages go to/from
|
|
13
27
|
wire bytes with no generated code, through a C extension over the pbwire core.
|
|
14
28
|
executables: []
|