codeclimate-kafka 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/kafka/producer.rb +10 -0
- data/lib/cc/kafka/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46a3df0a0f970ad998a1b6e5504bde7dc4afba0d
|
4
|
+
data.tar.gz: 85961485f103bd2e075f32751afe5e16cda1eee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8690e91192c83271f76ffc1d03f1bbdb8fe19daa60e0af358b13f670a7f96a6ddae9caa4793d4a0454cf58e0186e005bd61cd76e68e0051a08f2b7ff36066d51
|
7
|
+
data.tar.gz: 8db9bbdb28678f2a65486e542639101dd65c32c44839478e72b519a656a9ef4384f4ecdee655e20c28e94ef74bad9e11c23b647adc4488cd9ec6fe74d10ec5bb
|
data/lib/cc/kafka/producer.rb
CHANGED
@@ -23,6 +23,16 @@ module CC
|
|
23
23
|
raise
|
24
24
|
end
|
25
25
|
|
26
|
+
def send_snapshot_document(collection:, document:, snapshot_id:)
|
27
|
+
snapshot_id = BSON::ObjectId(snapshot_id) if snapshot_id.is_a?(String)
|
28
|
+
data = {
|
29
|
+
type: "document",
|
30
|
+
collection: collection,
|
31
|
+
document: document.merge(snapshot_id: snapshot_id)
|
32
|
+
}
|
33
|
+
send_message(data, snapshot_id.to_s)
|
34
|
+
end
|
35
|
+
|
26
36
|
def close
|
27
37
|
producer.close
|
28
38
|
end
|
data/lib/cc/kafka/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code Climate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bson
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.4.
|
103
|
+
rubygems_version: 2.4.8
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Code Climate Kafka Client
|