Skip to content

Commit

Permalink
Test using ChefDK not Gemfiles
Browse files Browse the repository at this point in the history
These test deps were super out of date and they've probably been updated multiple times over the history of this cookbook. Constantly working out a compatible set of deps that works on every user's ruby release is a nightmare left up to Chef employees. Use DK as the set of test deps. It works on every platform and is updated.

Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Jun 14, 2017
1 parent b825200 commit 265658c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 24 deletions.
32 changes: 27 additions & 5 deletions .travis.yml
@@ -1,5 +1,27 @@
language: ruby
bundler_args: --without integration
rvm:
- 2.3
before_install: gem install bundler -v 1.10.6

dist: trusty
sudo: false
addons:
apt:
sources:
- chef-current-trusty
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)"

script:
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/bin/chef exec rake

26 changes: 7 additions & 19 deletions Gemfile
@@ -1,27 +1,15 @@
source "https://rubygems.org"
# This gemfile provides additional gems for testing and releasing this cookbook
# It is meant to be installed on top of ChefDK which provides the majority
# of the necessary gems for testing this cookbook
#
# Run 'chef exec bundle install' to install these dependencies

group :lint do
gem 'foodcritic', '~> 6.2'
gem 'rubocop', '~> 0.39.0'
end
source "https://rubygems.org"

group :develop do
gem "chef", "~> 12.9"
gem "chefspec", "~> 6.0"
gem "stove", "~> 4.1"
gem "berkshelf", ">= 5.6.4", "< 6.0"
gem "rake"
gem "stove", "~> 5.0"
gem "guard"
gem "guard-foodcritic"
gem "guard-rspec"
gem "guard-rubocop"
end

group :integration do
gem "test-kitchen", "~> 1.8"
gem "kitchen-docker"
gem "kitchen-vagrant"
gem "winrm", "~> 2.0"
gem "winrm-fs"
gem "winrm-elevated"
end

0 comments on commit 265658c

Please sign in to comment.