fake-kafka 0.0.1.pre.beta4 → 0.0.1.pre.beta5

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: 3c7c0173148a3e19aec4d000b07d1722b0ad251bd2f30966ee650c7fd66d8e7a
4
- data.tar.gz: 6293413cf7b847f93c9aeb2ddf1786083f01454b44363094b4657b4f10bc4641
3
+ metadata.gz: 1bdfcb434946fedc750c592389d1ad6cb0dda65bc3a27f1f8ac6f8d988eedf7e
4
+ data.tar.gz: ad046e00aae7e2cda16c5fff26db9b23a7972053586ae63dad142b7070202689
5
5
  SHA512:
6
- metadata.gz: 5a22c0ed2c542b7884933a6c229e76ee6305f3365731d2880cd86511e8c1b83f4caa0983acbadb00c57a197b24303433aa2e472c9008d85eab962206026ee37d
7
- data.tar.gz: 1b49b8aedf524975fe08de1e2abecb10b7254c6d463f56d302fd439c2b856da6edc8d8070f39a81a101be2d1c7589036b29d8ea9a3b29debd29816600c066558
6
+ metadata.gz: 5f3d3f9feedf485bdd031ea84ede95261e5f94b506d05c492143d4109a18a35b23d0083678f6d815894766acd5df6761d2cd3cd2f1b2c9b45c3fa264e0cf33cc
7
+ data.tar.gz: bb98b0af40dec1a132e3e68d328241b3b7f9bff3e683ceda5c611573170bc2257326d6f10f5acdebeb3cd0e53b92ab5c903fc66e38b26ea824c77f6781cc677d
data/README.md CHANGED
@@ -7,7 +7,7 @@ It is a drop in replacement for ruby-kafka driver, it works as In-memory driver,
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'fake-kafka', git: 'git@github.com:catawiki/fake-kafka.git', tag: '0.0.1-beta4'
10
+ gem 'fake-kafka'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -30,9 +30,32 @@ module Fake
30
30
  Consumer.new(self)
31
31
  end
32
32
 
33
- def producer(*)
33
+ # https://github.com/zendesk/ruby-kafka/blob/v1.0.0/lib/kafka/client.rb#L248-L261
34
+ # rubocop:disable Lint/UnusedMethodArgument, Metric/ParameterLists, Layout/LineLength
35
+ def producer(
36
+ compression_codec: nil,
37
+ compression_threshold: 1,
38
+ ack_timeout: 5,
39
+ required_acks: :all,
40
+ max_retries: 2,
41
+ retry_backoff: 1,
42
+ max_buffer_size: 1000,
43
+ max_buffer_bytesize: 10_000_000,
44
+ idempotent: false,
45
+ transactional: false,
46
+ transactional_id: nil,
47
+ transactional_timeout: 60
48
+ )
34
49
  Producer.new(self)
35
50
  end
51
+ # rubocop:enable all
52
+
53
+ # https://github.com/zendesk/ruby-kafka/blob/v1.0.0/lib/kafka/client.rb#L307
54
+ # rubocop:disable Lint/UnusedMethodArgument, Metric/ParameterLists, Layout/LineLength
55
+ def async_producer(delivery_interval: 0, delivery_threshold: 0, max_queue_size: 1000, max_retries: -1, retry_backoff: 0, **options)
56
+ producer(**options)
57
+ end
58
+ # rubocop:enable all
36
59
 
37
60
  # Used to clean in-memory data
38
61
  # Useful between test runs
@@ -13,4 +13,9 @@ class Fake::Kafka::Producer
13
13
  @kafka.deliver_message(value.to_s, **options)
14
14
  end
15
15
  end
16
+
17
+ # https://github.com/zendesk/ruby-kafka/blob/v1.0.0/lib/kafka/producer.rb#L285
18
+ def shutdown
19
+ # NOOP
20
+ end
16
21
  end
@@ -1,5 +1,5 @@
1
1
  module Fake
2
2
  class Kafka
3
- VERSION = "0.0.1-beta4"
3
+ VERSION = "0.0.1-beta5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake-kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.beta4
4
+ version: 0.0.1.pre.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Arcila Valenzuela
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-01 00:00:00.000000000 Z
11
+ date: 2020-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  - !ruby/object:Gem::Version
94
94
  version: 1.3.1
95
95
  requirements: []
96
- rubygems_version: 3.0.3
96
+ rubygems_version: 3.0.6
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Fake Kafka Consumer and Producer.