primary_connect_proto 0.6.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/connect_proto.gemspec +1 -1
- data/lib/connect_proto/build/meta_pb.rb +3 -1
- data/lib/connect_proto/src/meta.proto +3 -1
- data/lib/extensions/valueable.rb +17 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b177c33a424bdfe684bc4166813374737af971317a6d36641a5b4ff3591dd3de
|
4
|
+
data.tar.gz: 61fc6522f9150924b1e5d778bce30daf7327a88e9e263fe914e4828bce287a5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 581f551db451b814b7c6b213e10962e498b742d25b52c20c8212a685f16b861d1901bc7f8a9f97d8a46735668d2b3d71dc392abd13b7db3465ea0e85c8291a7c
|
7
|
+
data.tar.gz: 7b3f9e70ba458e89900fd36c657a450895947c54b52a7260ba4131123384abc094ba6b6788a21571e9054da8c8c7a843f915db1cf3ed26c86d5ecea674814f57
|
data/CHANGELOG.md
CHANGED
data/connect_proto.gemspec
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
+
require 'google/protobuf/struct_pb'
|
6
7
|
require 'google/protobuf/timestamp_pb'
|
7
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
9
|
add_file("meta.proto", :syntax => :proto3) do
|
@@ -15,6 +16,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
16
|
optional :message, :message, 6, "primary.connect.Meta.Message"
|
16
17
|
optional :transmission, :message, 7, "primary.connect.Meta.Transmission"
|
17
18
|
optional :facility_code, :string, 8
|
19
|
+
map :echo, :string, :message, 9, "google.protobuf.Value"
|
18
20
|
end
|
19
21
|
add_message "primary.connect.Meta.Source" do
|
20
22
|
optional :id, :string, 1
|
@@ -30,7 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
30
32
|
add_message "primary.connect.Meta.Destination" do
|
31
33
|
optional :id, :string, 1
|
32
34
|
optional :name, :string, 2
|
33
|
-
map :config, :string, :
|
35
|
+
map :config, :string, :message, 3, "google.protobuf.Value"
|
34
36
|
end
|
35
37
|
add_enum "primary.connect.Meta.EventType" do
|
36
38
|
value :EVENT_TYPE_NEW, 0
|
@@ -2,6 +2,7 @@
|
|
2
2
|
syntax = "proto3";
|
3
3
|
package primary.connect;
|
4
4
|
|
5
|
+
import "google/protobuf/struct.proto";
|
5
6
|
import "google/protobuf/timestamp.proto";
|
6
7
|
|
7
8
|
message Meta {
|
@@ -30,7 +31,7 @@ message Meta {
|
|
30
31
|
message Destination {
|
31
32
|
string id = 1;
|
32
33
|
string name = 2;
|
33
|
-
map<string,
|
34
|
+
map<string, google.protobuf.Value> config = 3;
|
34
35
|
}
|
35
36
|
|
36
37
|
EventType event_type = 1;
|
@@ -41,4 +42,5 @@ message Meta {
|
|
41
42
|
Message message = 6;
|
42
43
|
Transmission transmission = 7;
|
43
44
|
string facility_code = 8;
|
45
|
+
map<string, google.protobuf.Value> echo = 9;
|
44
46
|
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ConnectProto
|
4
|
+
module Extensions
|
5
|
+
module Valueable
|
6
|
+
def self.to_value(value)
|
7
|
+
case value
|
8
|
+
when String then Google::Protobuf::Value.new(string_value: value)
|
9
|
+
when Numeric then Google::Protobuf::Value.new(number_value: value)
|
10
|
+
when NilClass then Google::Protobuf::Value.new(null_value: :NULL_VALUE)
|
11
|
+
else
|
12
|
+
raise TypeError, "Invalid type #{value.class} for value #{value}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: primary_connect_proto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Primary.Health
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/connect_proto/src/visit.proto
|
118
118
|
- lib/extensions/full_nameable.rb
|
119
119
|
- lib/extensions/phone_numberable.rb
|
120
|
+
- lib/extensions/valueable.rb
|
120
121
|
- lib/primary_connect_proto.rb
|
121
122
|
- spec/protobuf/demographics_spec.rb
|
122
123
|
- spec/protobuf/name_spec.rb
|