language: ruby
rvm:
- 2.2
cache:
  directories:
  - "$HOME/.berkshelf"
addons:
  apt:
    sources:
    - chef-stable-precise
    packages:
    - chefdk
branches:
  only:
  - master
env:
  matrix:
  - TEST=cookstyle
  - TEST="foodcritic ."
  - TEST="chef exec rspec"
  - TEST="kitchen test -d always"
before_install:
- chef --version
- eval "$(chef shell-init bash)"
- cookstyle --version
- foodcritic --version
install:
- chef gem install kitchen-sync
- berks
script: "$TEST"

language: ruby
cache:
  directories:
  - "$HOME/.berkshelf"
addons:
  apt:
    sources:
    - chef-stable-trusty
    packages:
    - chefdk
if: "(type = pull_request) OR (tag IS present) OR (branch = master)"
before_install:
- eval "$(chef shell-init bash)"
- chef --version
install:
- chef gem install kitchen-sync
- berks
script: chef exec delivery local all

Update Travis config per current practice
Update Travis config per current practice

* Drop specifying a Ruby version
* Install ChefDK for Trusty
* Only do builds on PRs, tags, and pushes to master
* Use Chef Delivery to run tests
