kafka-rb 0.0.1 → 0.0.2
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.
- data/Rakefile +1 -1
- data/lib/kafka/batch.rb +13 -0
- data/spec/batch_spec.rb +21 -0
- metadata +6 -4
data/Rakefile
CHANGED
data/lib/kafka/batch.rb
ADDED
data/spec/batch_spec.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
2
|
+
|
3
|
+
describe Batch do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
@batch = Batch.new
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "batch messages" do
|
10
|
+
it "holds all messages to be sent" do
|
11
|
+
@batch.should respond_to(:messages)
|
12
|
+
@batch.messages.class.should eql(Array)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "supports queueing/adding messages to be send" do
|
16
|
+
@batch.messages << mock(Kafka::Message.new("one"))
|
17
|
+
@batch.messages << mock(Kafka::Message.new("two"))
|
18
|
+
@batch.messages.length.should eql(2)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kafka-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alejandro Crosa
|
@@ -15,7 +15,7 @@ autorequire: kafka-rb
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-11 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -44,11 +44,13 @@ files:
|
|
44
44
|
- LICENSE
|
45
45
|
- README.md
|
46
46
|
- Rakefile
|
47
|
+
- lib/kafka/batch.rb
|
47
48
|
- lib/kafka/io.rb
|
48
49
|
- lib/kafka/message.rb
|
49
50
|
- lib/kafka/producer.rb
|
50
51
|
- lib/kafka.rb
|
51
52
|
- lib/test.rb
|
53
|
+
- spec/batch_spec.rb
|
52
54
|
- spec/io_spec.rb
|
53
55
|
- spec/kafka_spec.rb
|
54
56
|
- spec/message_spec.rb
|