codeclimate-kafka 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: dd36735cbf74eaa7090b513cbfb2936a39c19a40
4
- data.tar.gz: e2c34ca572d9f68716a395658f7c32b9c228ea7a
3
+ metadata.gz: b4d8e754a10740c9e3c00721921c3a30bf3614fb
4
+ data.tar.gz: 92d2c55a3369689870d9b5019ffd2e5e83411bdb
5
5
  SHA512:
6
- metadata.gz: 4c44c82fb498a857e87d02bf5c02cef37836f39ce2727d7091cc07faa1247c3b3eec93a0e3c85fb2efd4e75f9638cc35629f4a71ad594d343f44bea9d9b103fe
7
- data.tar.gz: 69534b7d9f0604835e1e3169a0b2ff038e5e8d6aef21737558ae74fd4a29d0e07eb78acbeb3ad404735114820df2e1ec37c41d28243140e472c912b25603a96e
6
+ metadata.gz: 1d0680001aec2fdec1c1e40aa7a8e1798b046f5ff2deda2d76cd83e9c8e794ea5f3253623b3c5d650dfe20966a6aae9c941bca6156493b83337a96362f890138
7
+ data.tar.gz: 3257fe99d81ee0333b5c65ebb24424a568a1166be3f8f1386084fcb00dbbc9a8df678deb2f301d371f85a366e4c8b402123338ab4d09b5fb98df7bcb917b89d2
@@ -15,14 +15,20 @@ module CC
15
15
  def initialize(url, client_id = nil)
16
16
  @url = url
17
17
  @client_id = client_id
18
+
19
+ Kafka.logger.debug("initialized client for #{@url} (id: #{@client_id.inspect})")
18
20
  end
19
21
 
20
22
  def send_message(data, key = nil)
23
+ Kafka.logger.debug("data: #{data.inspect}, key: #{key.inspect}")
24
+
21
25
  serialized = BSON.serialize(data).to_s
22
26
 
23
27
  if http?
28
+ Kafka.logger.debug("sending message over HTTP")
24
29
  send_http(serialized, key)
25
30
  else
31
+ Kafka.logger.debug("sending message direct via Poseidon")
26
32
  send_poseidon(serialized, key)
27
33
  end
28
34
  end
@@ -52,6 +58,8 @@ module CC
52
58
  request = Net::HTTP::Post.new("/message")
53
59
  request.set_form_data(data)
54
60
 
61
+ Kafka.logger.debug("POST #{uri.host}:#{uri.port}/message")
62
+ Kafka.logger.debug("form data: #{data.inspect}")
55
63
  response = http.request(request)
56
64
 
57
65
  unless response.is_a?(Net::HTTPSuccess)
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Kafka
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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.1.0
4
+ version: 0.1.1
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-07-01 00:00:00.000000000 Z
11
+ date: 2015-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bson