primary_connect_proto 0.7.0 → 0.7.3
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/CHANGELOG.md +12 -0
- data/connect_proto.gemspec +1 -1
- data/lib/connect_proto/build/meta_pb.rb +3 -3
- data/lib/connect_proto/src/meta.proto +3 -3
- data/lib/extensions/valueable.rb +17 -0
- data/lib/primary_connect_proto.rb +1 -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: 2fa78c8e4e9515e7829618255e20304b203f9a5b0cac4355abd0ee61b6b746af
|
4
|
+
data.tar.gz: 28d46c3fbfad77d1ae2bb15c8dec6e202e22d7ec5a511ecc927f8b34d033ba0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f694b8ac82d2b3d75f5ec50e9ab0b523d2283cf7580154b12df6ba8eb5459bba1834328f2dada48bf67f772438df29154cbc3411564a7d2036073a7071d8ca9
|
7
|
+
data.tar.gz: 1443d3f3e5c990d56ed1d8a284bc9a449f5c5525d2daf53f4e754018c67e5e6fe65edfffef373383bd49a35812cd330c8fea461b90bece4728593cbb3c9dc3c2
|
data/CHANGELOG.md
CHANGED
data/connect_proto.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
-
require 'google/protobuf/
|
6
|
+
require 'google/protobuf/struct_pb'
|
7
7
|
require 'google/protobuf/timestamp_pb'
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("meta.proto", :syntax => :proto3) do
|
@@ -16,7 +16,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
16
16
|
optional :message, :message, 6, "primary.connect.Meta.Message"
|
17
17
|
optional :transmission, :message, 7, "primary.connect.Meta.Transmission"
|
18
18
|
optional :facility_code, :string, 8
|
19
|
-
map :echo, :string, :message, 9, "google.protobuf.
|
19
|
+
map :echo, :string, :message, 9, "google.protobuf.Value"
|
20
20
|
end
|
21
21
|
add_message "primary.connect.Meta.Source" do
|
22
22
|
optional :id, :string, 1
|
@@ -32,7 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
32
32
|
add_message "primary.connect.Meta.Destination" do
|
33
33
|
optional :id, :string, 1
|
34
34
|
optional :name, :string, 2
|
35
|
-
map :config, :string, :message, 3, "google.protobuf.
|
35
|
+
map :config, :string, :message, 3, "google.protobuf.Value"
|
36
36
|
end
|
37
37
|
add_enum "primary.connect.Meta.EventType" do
|
38
38
|
value :EVENT_TYPE_NEW, 0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
syntax = "proto3";
|
3
3
|
package primary.connect;
|
4
4
|
|
5
|
-
import "google/protobuf/
|
5
|
+
import "google/protobuf/struct.proto";
|
6
6
|
import "google/protobuf/timestamp.proto";
|
7
7
|
|
8
8
|
message Meta {
|
@@ -31,7 +31,7 @@ message Meta {
|
|
31
31
|
message Destination {
|
32
32
|
string id = 1;
|
33
33
|
string name = 2;
|
34
|
-
map<string, google.protobuf.
|
34
|
+
map<string, google.protobuf.Value> config = 3;
|
35
35
|
}
|
36
36
|
|
37
37
|
EventType event_type = 1;
|
@@ -42,5 +42,5 @@ message Meta {
|
|
42
42
|
Message message = 6;
|
43
43
|
Transmission transmission = 7;
|
44
44
|
string facility_code = 8;
|
45
|
-
map<string, google.protobuf.
|
45
|
+
map<string, google.protobuf.Value> echo = 9;
|
46
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.7.
|
4
|
+
version: 0.7.3
|
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
|