File tree 3 files changed +30
-2
lines changed
3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change
1
+ language : ruby
2
+
3
+ sudo : false
4
+
5
+ rvm :
6
+ - 2.1
7
+ - 2.2
8
+ - 2.3
9
+ - 2.4
10
+
11
+ before_install :
12
+ - wget http://www.us.apache.org/dist/kafka/0.11.0.1/kafka_2.12-0.11.0.1.tgz -O kafka.tgz
13
+ - mkdir -p kafka && tar xzf kafka.tgz -C kafka --strip-components 1
14
+ - nohup bash -c "cd kafka && bin/zookeeper-server-start.sh config/zookeeper.properties &"
15
+ - nohup bash -c "cd kafka && bin/kafka-server-start.sh config/server.properties &"
16
+
17
+ before_script :
18
+ - cd ext && bundle exec rake && cd ..
19
+ - bundle exec rake create_topics
20
+
21
+ script :
22
+ - bundle exec rspec
Original file line number Diff line number Diff line change 1
1
# Rdkafka
2
2
3
+ [ ![ Build Status] ( https://travis-ci.org/thijsc/rdkafka-ruby.svg?branch=master )] ( https://travis-ci.org/thijsc/rdkafka-ruby )
3
4
[ ![ Gem Version] ( https://badge.fury.io/rb/rdkafka.svg )] ( https://badge.fury.io/rb/rdkafka )
4
5
5
6
The ` rdkafka ` gem is a modern Kafka client library for Ruby based on
Original file line number Diff line number Diff line change @@ -2,8 +2,13 @@ require "./lib/rdkafka"
2
2
3
3
task :create_topics do
4
4
puts "Creating test topics"
5
- `kafka-topics --create --topic=produce_test_topic --zookeeper=127.0.0.1:2181 --partitions=3 --replication-factor=1`
6
- `kafka-topics --create --topic=rake_test_topic --zookeeper=127.0.0.1:2181 --partitions=3 --replication-factor=1`
5
+ kafka_topics = if ENV [ 'TRAVIS' ]
6
+ 'kafka/bin/kafka-topics.sh'
7
+ else
8
+ 'kafka-topics'
9
+ end
10
+ `#{ kafka_topics } --create --topic=produce_test_topic --zookeeper=127.0.0.1:2181 --partitions=3 --replication-factor=1`
11
+ `#{ kafka_topics } --create --topic=rake_test_topic --zookeeper=127.0.0.1:2181 --partitions=3 --replication-factor=1`
7
12
end
8
13
9
14
task :produce_messages do
You can’t perform that action at this time.
0 commit comments