language: ruby
cache:
  bundler: true
  directories:
    - $HOME/.m2
script: bundle exec rake
rvm:
  - jruby-19mode
  - jruby-9.1.2.0

language: ruby
sudo: required
addons:
  apt:
    sources:
      - sourceline: "deb http://archive.ubuntu.com/ubuntu/ trusty universe"
    packages:
      - haveged
services:
  - docker
cache:
  bundler: true
  directories:
    - $HOME/.m2
before_script:
  - docker-compose -p kafka-clients-jruby -f spec/resources/docker-compose.yml up -d
script: bundle exec rake
rvm:
  - jruby-9.1.2.0
  - jruby-1.7

Add docker-compose setup on Travis
Add docker-compose setup on Travis

* Set project name for docker-compose
Otherwise it'll default to `resources_default`, and while not a problem
on Travis it might pose a problem locally if multiple projects have
their docker-compose.yml in `spec/resources/docker-compose.yml`.

* Use the apt addon for `haveged`
There's some issues with JRuby and entropy [1], and sometimes (for
uncertain reasons), `bundle install` takes more than 10 minutes to even
start. `haveged` makes sure that there's sufficient entropy for JRuby
to not choke.

[1]: https://github.com/jruby/jruby/wiki/Improving-startup-time#ensure-your-system-has-adequate-entropy