waterdrop 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ba074f881bf7dae566b0f1c084d328913209b1e
4
- data.tar.gz: da63b01f8a1ceeaf044fa1009e1ee4ba8db3c4bd
3
+ metadata.gz: 0e1efd0704289e016048535e07bcd5b60c53c4b0
4
+ data.tar.gz: 371fb20b8bbea6483f12f05f8943ffd6aedfe531
5
5
  SHA512:
6
- metadata.gz: 7bda18594a2321c809a2ffd0463a0dfcc3ee714ed60e36cb59ca15a94e007cca319e178baf03962b31cab56ecea603af7bebac9f2968320bb309bbb843fe8ce7
7
- data.tar.gz: 6475608c7646f70561c74209961159621ba8c252aaecf552297564b9c2798ef9ddd41160e8eb60c3f526ed6d0bcc707c66947c9b95b25680450cd1f6db99e36f
6
+ metadata.gz: 325fe9feac7cbbca5400c4512b1ebcc9fdd6b4288ff1e9afcc3d4cfaec1417cd61d56d86f2df9817d0c3b4b89d7a2d04684809db365e2192330c8fe5c91dafaa
7
+ data.tar.gz: 45fd9b2720b355f76506309b88636e347add220a6764d02d403985ae0184d9e6563d4f56344cb34fe74288156a0f57f4767d92aebb9199b0ef2c878039e5736a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # WaterDrop changelog
2
2
 
3
+ ## 0.1.7
4
+ - kafka_host, kafka_hosts and kafka_ports settings consistency fix
5
+
3
6
  ## 0.1.6
4
7
  - Added null-logger gem
5
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- waterdrop (0.1.6)
4
+ waterdrop (0.1.7)
5
5
  aspector
6
6
  bundler
7
7
  connection_pool
@@ -33,7 +33,7 @@ GEM
33
33
  descendants_tracker (~> 0.0.4)
34
34
  ice_nine (~> 0.11.0)
35
35
  thread_safe (~> 0.3, >= 0.3.1)
36
- brakeman (3.1.0)
36
+ brakeman (3.1.1)
37
37
  erubis (~> 2.6)
38
38
  fastercsv (~> 1.5)
39
39
  haml (>= 3.0, < 5.0)
@@ -43,7 +43,7 @@ GEM
43
43
  ruby_parser (~> 3.7.0)
44
44
  sass (~> 3.0)
45
45
  slim (>= 1.3.6, < 4.0)
46
- terminal-table (~> 1.4.5)
46
+ terminal-table (~> 1.4)
47
47
  bson (3.2.4)
48
48
  builder (3.2.2)
49
49
  coderay (1.1.0)
@@ -74,30 +74,27 @@ GEM
74
74
  haml (~> 4.0)
75
75
  rubocop (>= 0.25.0)
76
76
  sysexits (~> 1.1)
77
- highline (1.7.3)
77
+ highline (1.7.7)
78
78
  i18n (0.7.0)
79
79
  ice_nine (0.11.1)
80
80
  json (1.8.3)
81
81
  memoizable (0.4.2)
82
82
  thread_safe (~> 0.3, >= 0.3.1)
83
83
  method_source (0.8.2)
84
- minitest (5.8.0)
85
- mongoid (4.0.2)
84
+ minitest (5.8.1)
85
+ mongo (2.1.0)
86
+ bson (~> 3.0)
87
+ mongoid (5.0.0)
86
88
  activemodel (~> 4.0)
87
- moped (~> 2.0.0)
89
+ mongo (~> 2.1)
88
90
  origin (~> 2.1)
89
91
  tzinfo (>= 0.3.37)
90
- mongoid-rspec (2.2.0)
91
- mongoid (~> 4.0.0)
92
+ mongoid-rspec (3.0.0)
93
+ mongoid (~> 5.0)
92
94
  rake
93
- rspec (~> 3.1)
94
- moped (2.0.7)
95
- bson (~> 3.0)
96
- connection_pool (~> 2.0)
97
- optionable (~> 0.2.0)
95
+ rspec (~> 3.3)
98
96
  multi_json (1.11.2)
99
97
  null-logger (0.1.0)
100
- optionable (0.2.0)
101
98
  origin (2.1.1)
102
99
  parser (2.2.2.6)
103
100
  ast (>= 1.1, < 3.0)
@@ -117,7 +114,7 @@ GEM
117
114
  poseidon (0.0.5)
118
115
  powerpack (0.1.1)
119
116
  procto (0.0.2)
120
- pry (0.10.1)
117
+ pry (0.10.2)
121
118
  coderay (~> 1.1.0)
122
119
  method_source (~> 0.8.1)
123
120
  slop (~> 3.4)
@@ -140,7 +137,7 @@ GEM
140
137
  diff-lcs (>= 1.2.0, < 2.0)
141
138
  rspec-support (~> 3.3.0)
142
139
  rspec-support (3.3.0)
143
- rubocop (0.34.0)
140
+ rubocop (0.34.2)
144
141
  astrolabe (~> 1.3)
145
142
  parser (>= 2.2.2.5, < 3.0)
146
143
  powerpack (~> 0.1)
@@ -178,7 +175,7 @@ GEM
178
175
  slop (3.6.0)
179
176
  sysexits (1.2.0)
180
177
  temple (0.7.6)
181
- terminal-table (1.4.5)
178
+ terminal-table (1.5.2)
182
179
  thread_safe (0.3.5)
183
180
  tilt (2.0.1)
184
181
  timecop (0.8.0)
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/karafka/waterdrop.png)](https://travis-ci.org/karafka/waterdrop)
4
4
  [![Code Climate](https://codeclimate.com/github/karafka/waterdrop/badges/gpa.svg)](https://codeclimate.com/github/karafka/waterdrop)
5
+ [![Gem Version](https://badge.fury.io/rb/waterdrop.svg)](http://badge.fury.io/rb/waterdrop)
5
6
 
6
7
  Gem used to send messages to Kafka in a standard and in an aspect way.
7
8
 
@@ -30,8 +31,7 @@ WaterDrop has following configuration options:
30
31
  | Option | Value type | Description |
31
32
  |-------------------------|---------------|----------------------------------|
32
33
  | send_messages | Boolean | Should we send messages to Kafka |
33
- | kafka_host | String | Kafka server host |
34
- | kafka_ports | Array<String> | Kafka server ports |
34
+ | kafka_hosts | Array<String> | Kafka servers hosts with ports |
35
35
  | connection_pool_size | Integer | Kafka connection pool size |
36
36
  | connection_pool_timeout | Integer | Kafka connection pool timeout |
37
37
  | raise_on_failure | Boolean | Should we raise an exception when we cannot send message to Kafka - if false will silently ignore failures (will just ignore them) |
@@ -43,8 +43,7 @@ WaterDrop.setup do |config|
43
43
  config.send_messages = true
44
44
  config.connection_pool_size = 20
45
45
  config.connection_pool_timeout = 1
46
- config.kafka_ports = %w( 9092 )
47
- config.kafka_host = 'localhost'
46
+ config.kafka_hosts = ['localhost:9092']
48
47
  config.raise_on_failure = true
49
48
  end
50
49
  ```
@@ -56,8 +55,7 @@ WaterDrop.setup do |config|
56
55
  config.send_messages = Rails.env.production?
57
56
  config.connection_pool_size = 20
58
57
  config.connection_pool_timeout = 1
59
- config.kafka_ports = %w( 9092 )
60
- config.kafka_host = Rails.env.production? ? 'prod-host' : 'localhost'
58
+ config.kafka_hosts = [Rails.env.production? ? 'prod-host:9091' : 'localhost:9092']
61
59
  config.raise_on_failure = Rails.env.production?
62
60
  end
63
61
  ```
@@ -9,15 +9,13 @@ module WaterDrop
9
9
  # @option connection_pool_size [Fixnum] The number of connections to pool.
10
10
  # @option connection_pool_timeout [Fixnum] Amount of time in seconds to wait for a connection
11
11
  # if none currently available.
12
- # @option kafka_ports [Array] the ports of kafka brokers
13
- # @option kafka_host [String] the host of kafka server
12
+ # @option kafka_hosts [Array<String>] Array that contains Kafka hosts with ports
14
13
  # @option send_messages [Boolean] boolean value to define whether messages should be sent
15
14
  # @option raise_on_failure [Boolean] Should raise error when failed to deliver a message
16
15
  OPTIONS = %i(
17
16
  connection_pool_size
18
17
  connection_pool_timeout
19
- kafka_ports
20
- kafka_host
18
+ kafka_hosts
21
19
  send_messages
22
20
  raise_on_failure
23
21
  )
@@ -12,11 +12,10 @@ module WaterDrop
12
12
  size: ::WaterDrop.config.connection_pool_size,
13
13
  timeout: ::WaterDrop.config.connection_pool_timeout
14
14
  ) do
15
- addresses = ::WaterDrop.config.kafka_ports.map do |port|
16
- "#{::WaterDrop.config.kafka_host}:#{port}"
17
- end
18
-
19
- Poseidon::Producer.new(addresses, object_id.to_s)
15
+ Poseidon::Producer.new(
16
+ ::WaterDrop.config.kafka_hosts,
17
+ object_id.to_s
18
+ )
20
19
  end
21
20
  end
22
21
  end
@@ -1,5 +1,5 @@
1
1
  # WaterDrop library
2
2
  module WaterDrop
3
3
  # Current WaterDrop version
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-07 00:00:00.000000000 Z
12
+ date: 2015-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler