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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a99e0e5901421256f11ec2abef25f9ca93332207746a52cd1e7554876e016940
4
- data.tar.gz: b37f870627065ca0e81a2dcd13e8885c56f0256c1b635fb03c78eb43c0197c76
3
+ metadata.gz: b177c33a424bdfe684bc4166813374737af971317a6d36641a5b4ff3591dd3de
4
+ data.tar.gz: 61fc6522f9150924b1e5d778bce30daf7327a88e9e263fe914e4828bce287a5f
5
5
  SHA512:
6
- metadata.gz: 6e377e734a68fa42cb9d1a360f7390b57e700e510d8787fd1119d43a8a2a3124e2b1031a74a03dbefdcade75368deb69695f9db60bb4ce6c78d429c050323fe4
7
- data.tar.gz: e9ca985e432384417cc1efaad8ec6d77271950f0ef30816032ca84ea32d46c84e82e3b2dc1b9a0aefd7e3bf8c66130203023afe8b4bc016ebd56b4563675f731
6
+ metadata.gz: 581f551db451b814b7c6b213e10962e498b742d25b52c20c8212a685f16b861d1901bc7f8a9f97d8a46735668d2b3d71dc392abd13b7db3465ea0e85c8291a7c
7
+ data.tar.gz: 7b3f9e70ba458e89900fd36c657a450895947c54b52a7260ba4131123384abc094ba6b6788a21571e9054da8c8c7a843f915db1cf3ed26c86d5ecea674814f57
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.7.2
4
+
5
+ - Add `Typeable` extension
6
+
7
+ ## 0.7.1
8
+
9
+ - Use `Value` instead of `Any`
10
+
11
+ ## 0.7.0
12
+
13
+ - Added `echo` to `Meta`
14
+ - Updated `Meta.destination.config`
15
+
3
16
  ## 0.6.0
4
17
 
5
18
  - Added `external_ids` to `Order`
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "primary_connect_proto"
8
- s.version = "0.6.0"
8
+ s.version = "0.7.2"
9
9
  s.authors = ["Primary.Health"]
10
10
  s.email = ["sam@primary.health"]
11
11
 
@@ -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, :string, 3
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, string> config = 3;
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.6.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-04 00:00:00.000000000 Z
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