machine:
  services:
    - docker
test:
  override:
    - bundle exec rspec spec --format progress:
        timeout: 1200 # Compiling node.js takes a while
deployment:
  hub:
    branch: master
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push edwinvdgraaf/ruby-node-phantomjs

machine:
  services:
    - docker

dependencies:
  cache_directories:
    - "~/docker"
  override:
    - bundle install
    - docker info
    - if [[ -e ~/docker/image.tar ]]; then docker load --input ~/docker/image.tar; fi
    - docker build -t edwinvdgraaf/ruby-node-phantomjs .
    - mkdir -p ~/docker; docker save edwinvdgraaf/ruby-node-phantomjs > ~/docker/image.tar

test:
  override:
    - bundle exec rspec spec --format progress:
        timeout: 1200 # Compiling node.js takes a while
deployment:
  hub:
    branch: master
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push edwinvdgraaf/ruby-node-phantomjs

Add docker image caching to speed the CI process up
Add docker image caching to speed the CI process up
