machine:
  ruby:
    version: 2.1.3
dependencies:
  cache_directories:
    - elasticsearch-1.3.6
  post:
    - if [[ ! -e elasticsearch-1.3.6 ]]; then wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.6.tar.gz && tar -xvf elasticsearch-1.3.6.tar.gz; fi
    - elasticsearch-1.3.6/bin/elasticsearch: {background: true}
test:
  override:
    - bundle exec rake

machine:
  ruby:
    version: 2.1.3
dependencies:
  cache_directories:
    - ci_cache
  post:
    - mkdir -p ci_cache
    - find ci_cache -maxdepth 1 -name 'elasticsearch*' -not -name 'elasticsearch-1.4.2' -exec rm -rf {} \;
    - if [[ ! -e ci_cache/elasticsearch-1.4.2 ]]; then cd ci_cache; wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.2.tar.gz && tar -xvf elasticsearch-1.4.2.tar.gz; rm elasticsearch-1.4.2.tar.gz; fi
    - ci_cache/elasticsearch-1.4.2/bin/elasticsearch: {background: true}
test:
  override:
    - bundle exec rake

Upgrade to elasticsearch 1.4 for tests.
Upgrade to elasticsearch 1.4 for tests.
