pubsub_tie 1.2.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pubsub_tie/publisher.rb +7 -0
- data/lib/pubsub_tie/version.rb +1 -1
- data/lib/pubsub_tie.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ef728152aba41e47db09ac2844824f7d834653c02cc51b63215ba6cff110a28
|
4
|
+
data.tar.gz: a987d8ba54e1b99c41e4fb50f3257d54fcd6ad23f33671aac3fc6fc9334b6773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0690c249f86173b52ef915397a297e22dc05362ddbcd77f92723512f5537de93f1e54d36df09342cbe120ff63f32b38846b28c7c8b6427aa308fd1ee109fc134'
|
7
|
+
data.tar.gz: 20da69280aedd1aea21aad16c2c3483d60a75dd4e529c7262cdad63b4f5aaea9858730961a8d193a03085eeaeaa2db2f6c869a629ba7ee58e83e3108ae4106d2
|
data/lib/pubsub_tie/publisher.rb
CHANGED
@@ -92,6 +92,10 @@ module PubSubTie
|
|
92
92
|
case val
|
93
93
|
when String
|
94
94
|
bad_type(field, data) unless types[field.to_s] == "STRING"
|
95
|
+
when TrueClass
|
96
|
+
bad_type(field, data) unless types[field.to_s] == "BOOL"
|
97
|
+
when FalseClass
|
98
|
+
bad_type(field, data) unless types[field.to_s] == "BOOL"
|
95
99
|
when Integer
|
96
100
|
bad_type(field, data) unless ["INT", "FLOAT", "INT64", "SMALLINT", "INTEGER", "BIGINT", "TINYINT", "BYTEINT"].include? types[field.to_s]
|
97
101
|
when Numeric
|
@@ -100,6 +104,9 @@ module PubSubTie
|
|
100
104
|
bad_type(field, data) unless types[field.to_s] == "TIMESTAMP"
|
101
105
|
when DateTime
|
102
106
|
bad_type(field, data) unless types[field.to_s] == "DATETIME"
|
107
|
+
# since Ruby doesn't have a Boolean
|
108
|
+
when(FalseClass || TrueClass)
|
109
|
+
bad_type(field, data) unless types[field.to_s] == "BOOL"
|
103
110
|
when Array
|
104
111
|
bad_type(field, data) unless Events.repeated(sym).include? field
|
105
112
|
val.each {|elem| validate_type(field, elem, data, sym) }
|
data/lib/pubsub_tie/version.rb
CHANGED
data/lib/pubsub_tie.rb
CHANGED
@@ -23,7 +23,7 @@ module PubSubTie
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def env
|
26
|
-
@env ||= defined?(Rails) ? Rails.env : ENV["ENV"] || '
|
26
|
+
@env ||= defined?(Rails) ? Rails.env : ENV["ENV"] || 'development'
|
27
27
|
end
|
28
28
|
|
29
29
|
def configure_publisher
|
@@ -32,7 +32,7 @@ module PubSubTie
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def configure_events
|
35
|
-
config = YAML.load_file(File.join(app_root, 'config', 'events.yml'))
|
35
|
+
config = YAML.load_file(File.join(app_root, 'config', 'events.yml'))[env]
|
36
36
|
Events.configure(config)
|
37
37
|
end
|
38
38
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubsub_tie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Calderon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-pubsub
|