zoo_stream 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/zoo_stream/kinesis_publisher.rb +3 -1
- data/lib/zoo_stream/version.rb +1 -1
- data/lib/zoo_stream.rb +4 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0674a63b02c413fbd9fcf609865dd16c178e643d
|
4
|
+
data.tar.gz: 025b359061bfdebc7081c2b1aeb6218cfc1e606e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e48405639604ad543440f860f49284246179f33d9d5cc6d21cfadd77b5a51a9571210b03c113b3cd667104b0e3da752432489c4a743d8748fa79d32522909be8
|
7
|
+
data.tar.gz: f87205f8096ebd49e71470f334a1ffb46570e5ee9e62957cd1ca4bad3e9d6e747f928154130195ef9cc939cc4ad066d3b383fb9117d7ed8a90600c4f623ba5fc
|
data/CHANGELOG.md
ADDED
@@ -9,7 +9,9 @@ module ZooStream
|
|
9
9
|
@client = client
|
10
10
|
end
|
11
11
|
|
12
|
-
def publish(event, shard_by:)
|
12
|
+
def publish(event, shard_by: nil)
|
13
|
+
raise ArgumentError, "Must specify shard_by" unless shard_by
|
14
|
+
|
13
15
|
client.put_record(
|
14
16
|
stream_name: stream_name,
|
15
17
|
partition_key: shard_by,
|
data/lib/zoo_stream/version.rb
CHANGED
data/lib/zoo_stream.rb
CHANGED
@@ -9,7 +9,10 @@ module ZooStream
|
|
9
9
|
# @param data [Hash] the event data
|
10
10
|
# @param linked [Hash] related models to the data
|
11
11
|
# @param shard_by [String] if present, reader order will be guaranteed within this shard. If left blank, the entire stream will always be a single shard.
|
12
|
-
def self.publish(event
|
12
|
+
def self.publish(event: nil, data: nil, linked: {}, shard_by: nil)
|
13
|
+
raise ArgumentError, "Must specify event" unless event
|
14
|
+
raise ArgumentError, "Must specify data" unless data
|
15
|
+
|
13
16
|
return unless publisher
|
14
17
|
event = Event.new(source, event, data, linked)
|
15
18
|
publisher.publish(event, shard_by: (shard_by || event.type).to_s)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoo_stream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- ".gitignore"
|
78
78
|
- ".rspec"
|
79
79
|
- ".travis.yml"
|
80
|
+
- CHANGELOG.md
|
80
81
|
- CODE_OF_CONDUCT.md
|
81
82
|
- Gemfile
|
82
83
|
- LICENSE.txt
|