icalia-sdk-event-notification 0.2.0 → 0.3.0

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: ef20f61096dca725e5d61ebc6cc7629b33b694ea61142e4a4bdf331dacff2a2c
4
- data.tar.gz: 4fb4d685249caf1dd80ed0322a2a412c0c3053e3876f769b770d56f9a749b9b0
3
+ metadata.gz: d4466c4f19eaba3dec12cc72bf6f10ff2a7016301838b36db555e4b0023c8f7d
4
+ data.tar.gz: eb0de43b40ed889454363edcb9afc49c0b6e6297127bb18d2155f5c9295e67a7
5
5
  SHA512:
6
- metadata.gz: 6ba2954b5171714bfb90a1e21e80efc3fb3af118ac8d48d42f775af1028d6e292432a197447af9e847e432c8109cade762c4ec367f94cea36359ff1c55a44d6d
7
- data.tar.gz: 7b0b343f021ae429163c58d17545495572a3aa6acba53570981663a6d1a983cd5b07d6d1007595a963d2cac529562591e00f7a54dd2089bfa81f1ca671b809a8
6
+ metadata.gz: 449b05229ccdfea47f221d13b82cb6c31f1096590db005310cf4084e8aa2681ab8394652bcce713d4fc018aa7bbec68034295e7107f3453663d8263b4643d0c0
7
+ data.tar.gz: fb191efdadd7d68ce33ee3853c5198dc3e71fd37d45db39ed539db9b03e6e8132c66e443abf19fe734721dae4ee1c0a46645203f1a4dbd171dac12d17c049c26
@@ -5,6 +5,8 @@ require 'google/cloud/pubsub'
5
5
  require 'active_support'
6
6
  require 'active_support/logger'
7
7
 
8
+ require 'msgpack'
9
+
8
10
  module Icalia::Event
9
11
  module GRPCRailsLogger
10
12
  def logger; Rails.logger; end
@@ -26,17 +28,16 @@ module Icalia::Event
26
28
 
27
29
  attr_reader :client, :logger
28
30
 
29
- delegate :encode, to: ActiveSupport::JSON, prefix: :json
31
+ delegate :pack, to: MessagePack, prefix: :message
30
32
 
31
33
  def initialize
32
34
  initialize_pubsub_client
33
35
  initialize_logger
34
36
  end
35
37
 
36
- def publish(topic_name, data, attributes = { json_data: true })
38
+ def publish(topic_name, data, attributes = {})
37
39
  logger.debug "Publishing to '#{topic_name}': #{data.inspect}"
38
- encoded_data = attributes[:json_data] ? json_encode(data) : data
39
- get_or_create_topic(topic_name).publish(encoded_data, attributes)
40
+ get_or_create_topic(topic_name).publish message_pack(data), attributes
40
41
  end
41
42
 
42
43
  protected
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Icalia
4
4
  module Event
5
- NOTIFICATION_VERSION = '0.2.0'
5
+ NOTIFICATION_VERSION = '0.3.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icalia-sdk-event-notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Quintanilla
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-22 00:00:00.000000000 Z
11
+ date: 2020-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: icalia-sdk-event-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0
26
+ version: 0.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 5.2.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: msgpack
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: google-cloud-pubsub
43
57
  requirement: !ruby/object:Gem::Requirement