sudo: false
language: ruby
rvm:
  - 2.1
bundler_args: --without integration
cache: bundler
after_script: bundle exec rubocop
# Use Travis's cointainer based infrastructure
sudo: false
addons:
  apt:
    sources:
      - chef-stable-precise
    packages:
      - chefdk

# Don't `bundle install`
install: echo "skip bundle install"

branches:
  only:
    - master

# Ensure we make ChefDK's Ruby the default
before_script:
  - eval "$(/opt/chefdk/bin/chef shell-init bash)"
  # We have to install chef-sugar for ChefSpec
  - /opt/chefdk/embedded/bin/chef gem install chef-sugar
script:
  - /opt/chefdk/embedded/bin/chef --version
  - /opt/chefdk/embedded/bin/rubocop --version
  - /opt/chefdk/embedded/bin/rubocop
  - /opt/chefdk/embedded/bin/foodcritic --version
  - /opt/chefdk/embedded/bin/foodcritic . --exclude spec
  - /opt/chefdk/embedded/bin/rspec spec

Test using ChefDK vs. Gems
Test using ChefDK vs. Gems
