primary_connect_proto 0.7.1 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 259d79559e0cd96cf6d33c570ee247f3959676fb93d9b87726f28f05f3b41e17
4
- data.tar.gz: 20bbb4772c549652494a244c9dae4ea0489c57abac984ac1e2c07ba0820aef7d
3
+ metadata.gz: b177c33a424bdfe684bc4166813374737af971317a6d36641a5b4ff3591dd3de
4
+ data.tar.gz: 61fc6522f9150924b1e5d778bce30daf7327a88e9e263fe914e4828bce287a5f
5
5
  SHA512:
6
- metadata.gz: d105b3e1c1d730debb1c2421f4bcb1f0dc8b4d8bd5e3dccc20b422667116b3b10fb78c18ff412a68ff8057868dddb5ddf41b50174ff936d33fb2cc76a3806c4f
7
- data.tar.gz: f1e3cf30c3c54a3a13309147acb0e829913e7a913dab6bd3af5097ea4393591259d8fb53ad8145703303e9a20135f185798732177ccae2d7442bb5101811b28b
6
+ metadata.gz: 581f551db451b814b7c6b213e10962e498b742d25b52c20c8212a685f16b861d1901bc7f8a9f97d8a46735668d2b3d71dc392abd13b7db3465ea0e85c8291a7c
7
+ data.tar.gz: 7b3f9e70ba458e89900fd36c657a450895947c54b52a7260ba4131123384abc094ba6b6788a21571e9054da8c8c7a843f915db1cf3ed26c86d5ecea674814f57
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.7.2
4
+
5
+ - Add `Typeable` extension
6
+
3
7
  ## 0.7.1
4
8
 
5
9
  - Use `Value` instead of `Any`
@@ -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.7.1"
8
+ s.version = "0.7.2"
9
9
  s.authors = ["Primary.Health"]
10
10
  s.email = ["sam@primary.health"]
11
11
 
@@ -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.1
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-15 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