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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f673dc8804cbb711aa151d451496056a4417d94769fac0142205e2cfc6f78ec2
4
- data.tar.gz: 185e12f5bffdf2aa5b7dae0d6b1bc1fe4da289ed35aba4af69058d86cf7e6b7f
3
+ metadata.gz: 6ef728152aba41e47db09ac2844824f7d834653c02cc51b63215ba6cff110a28
4
+ data.tar.gz: a987d8ba54e1b99c41e4fb50f3257d54fcd6ad23f33671aac3fc6fc9334b6773
5
5
  SHA512:
6
- metadata.gz: 45a3dbb90f68c21a285256a437b813800b99c12f233dace9920b277165840806c139bb2b778ef2661b260c4f697681e8dc5c57acc82af46bef3e29e8de4f6eef
7
- data.tar.gz: 3f0975364b5c50b81101ec3c30b09d1d0e702c3807e0ada1f26d4e760b2a89e2b3f90dff1ada7cd660356c4520c56ddc5fdcf0bcd2aa62959d2416fa60a1c3a1
6
+ metadata.gz: '0690c249f86173b52ef915397a297e22dc05362ddbcd77f92723512f5537de93f1e54d36df09342cbe120ff63f32b38846b28c7c8b6427aa308fd1ee109fc134'
7
+ data.tar.gz: 20da69280aedd1aea21aad16c2c3483d60a75dd4e529c7262cdad63b4f5aaea9858730961a8d193a03085eeaeaa2db2f6c869a629ba7ee58e83e3108ae4106d2
@@ -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) }
@@ -1,3 +1,3 @@
1
1
  module PubSubTie
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.1"
3
3
  end
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"] || 'developent'
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.2.0
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: 2021-08-06 00:00:00.000000000 Z
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