Skip to content

Commit

Permalink
Test against Chef 11, and Chef 12+ in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
btm committed May 19, 2015
1 parent f4597b8 commit c14da0d
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.gem
.bundle
Gemfile.lock
travis.gemfile.lock
pkg/*
17 changes: 14 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
language: ruby

rvm:
- 1.9.3
- 2.0.0
- 2.1.5
- 2.2.0

script: bundle exec rake spec
gemfile: ci.gemfile

env:
- CHEF_VERSION="master"
- CHEF_VERSION="< 12"

matrix:
exclude:
- rvm: 1.9.3
env: CHEF_VERSION="master"

7 changes: 1 addition & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ source "https://rubygems.org"
# Specify your gem's dependencies in knife-windows.gemspec
gemspec

# TODO: Remove this line when a new version of `winrm-s` is released which contains:
#
# https://github.com/chef/winrm-s/commit/d9a85d7c93ef4c24faaea760cdc58a3532d599e9
#
gem 'winrm-s', github: 'chef/winrm-s'

group :test do
gem "chef"
gem "rspec", '~> 3.0'
gem "ruby-wmi"
gem "httpclient"
Expand Down
8 changes: 8 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ platform:
- x64

environment:
bundle_gemfile: ci.gemfile

matrix:
- ruby_version: "193"
chef_version: "< 12"

- ruby_version: "200"
chef_version: "< 12"

- ruby_version: "200"
chef_version: "master"

clone_folder: c:\projects\knife-windows
clone_depth: 1
Expand Down
15 changes: 15 additions & 0 deletions ci.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
source "https://rubygems.org"

# Specify your gem's dependencies in knife-windows.gemspec
gemspec

if ENV['CHEF_VERSION'] == 'master'
gem 'chef', github: 'chef/chef'
else
gem 'chef', ENV['CHEF_VERSION']
end

gem "rspec", '~> 3.0'
gem "ruby-wmi"
gem "httpclient"
gem 'rake'
2 changes: 0 additions & 2 deletions knife-windows.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ Gem::Specification.new do |s|
s.add_dependency "winrm-s", "~> 0.3.0.dev.0"
s.add_dependency "nokogiri"


s.add_development_dependency 'pry'
s.add_development_dependency 'chef', '< 12'

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
Expand Down

0 comments on commit c14da0d

Please sign in to comment.