Skip to content

Commit

Permalink
Merge pull request #734 from tas50/master
Browse files Browse the repository at this point in the history
Remove support for Chef 11, update chef version to test on, use latest Fauxhai
  • Loading branch information
sethvargo committed Aug 18, 2016
2 parents 9d21867 + 910e742 commit b8754bd
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 177 deletions.
28 changes: 7 additions & 21 deletions .travis.yml
Expand Up @@ -6,8 +6,8 @@ before_install:
- gem install bundler

rvm:
- 2.1
- 2.2
- 2.1.9
- 2.2.5

branches:
only:
Expand All @@ -19,36 +19,22 @@ gemfile: gemfiles/chefspec.gemfile

env:
- CHEF_VERSION=master
- CHEF_VERSION=12.13.37
- CHEF_VERSION=12.12.15
- CHEF_VERSION=12.11.18
- CHEF_VERSION=12.10.24
- CHEF_VERSION=12.9.41
- CHEF_VERSION=12.8.1
- CHEF_VERSION=12.7.2
- CHEF_VERSION=12.6.0
- CHEF_VERSION=12.5.1
- CHEF_VERSION=12.4.3
- CHEF_VERSION=12.4.0
- CHEF_VERSION=12.3.0
- CHEF_VERSION=12.2.1
- CHEF_VERSION=12.1.2
- CHEF_VERSION=12.1.1
- CHEF_VERSION=12.1.0
- CHEF_VERSION=12.0.3

matrix:
fast_finish: true
allow_failures:
- env: CHEF_VERSION=master
include:
- env: CHEF_VERSION=11.18.6
rvm: 1.9.3
- env: CHEF_VERSION=11.18.0
rvm: 1.9.3
- env: CHEF_VERSION=11.16.4
rvm: 1.9.3
- env: CHEF_VERSION=11.16.2
rvm: 1.9.3
- env: CHEF_VERSION=11.16.0
rvm: 1.9.3
- env: CHEF_VERSION=11.14.6
rvm: 1.9.3
- env: CHEF_VERSION=11.14.2
rvm: 1.9.3

1 change: 1 addition & 0 deletions Gemfile
@@ -1,2 +1,3 @@
source 'https://rubygems.org'

gemspec
19 changes: 11 additions & 8 deletions README.md
Expand Up @@ -25,7 +25,7 @@ What people are saying

Important Notes
---------------
- **ChefSpec 3.0+ requires Ruby 2.1 or higher!**
- **ChefSpec requires Ruby 2.1 or later and Chef 12.0.2 or later!**
- **This documentation corresponds to the master branch, which may be unreleased. Please check the README of the latest git tag or the gem's source for your version's documentation!**
- **Each resource matcher is self-documented using [Yard](http://rubydoc.info/github/sethvargo/chefspec) and has a corresponding aruba test from the [examples directory](https://github.com/sethvargo/chefspec/tree/master/examples).**
- **ChefSpec aims to maintain compatibility with the two most recent minor versions of Chef.** If you are running an older version of Chef it may work, or you will need to run an older version of ChefSpec.
Expand All @@ -35,8 +35,6 @@ Notes on Compatibility with Chef Versions
-----------------------------------------
As a general rule, if it is tested in the Travis CI matrix, it is a supported version. The section below details any specific versions that are _not_ supported and why:

- Chef 12 prior to Chef 12.0.2 is not supported due to the lack of a declared resource type. This was fixed in [Chef 12.0.2](https://github.com/chef/chef/blob/12.0.2/lib/chef/resource.rb#L422-428).

Additionally, if you look at a cucumber feature and see a tag like `@not_chef_x_y_z`, that means that particular functionality is not supported on those versions of Chef.


Expand Down Expand Up @@ -872,9 +870,10 @@ end

1. The entire contents of this file must be wrapped with the conditional clause checking if `ChefSpec` is defined.
2. Each matcher is actually a top-level method. The above example corresponds to the following RSpec test:
```ruby
expect(chef_run).to my_custom_matcher('...')
```

```ruby
expect(chef_run).to my_custom_matcher('...')
```

3. `ChefSpec::Matchers::ResourceMatcher` accepts three parameters:
1. The name of the resource to find in the resource collection (i.e. the name of the LWRP).
Expand Down Expand Up @@ -1162,11 +1161,15 @@ Development
1. Fork the repository from GitHub.
2. Clone your fork to your local machine:

$ git clone git@github.com:USER/chefspec.git
```
$ git clone git@github.com:USER/chefspec.git
```

3. Create a git branch

$ git checkout -b my_bug_fix
```
$ git checkout -b my_bug_fix
```

4. **Write tests**
5. Make your changes/patches/fixes, committing appropriately
Expand Down
6 changes: 3 additions & 3 deletions chefspec.gemspec
Expand Up @@ -23,11 +23,11 @@ Gem::Specification.new do |s|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.require_paths = ['lib']

# ChefSpec requires Ruby 2.1+
# ChefSpec requires Ruby 2.1+ since ChefDK uses 2.1.X
s.required_ruby_version = '>= 2.1'

s.add_dependency 'chef', '>= 11.14'
s.add_dependency 'fauxhai', '~> 3.2'
s.add_dependency 'chef', '>= 12.0'
s.add_dependency 'fauxhai', '~> 3.6'
s.add_dependency 'rspec', '~> 3.0'

# Development Dependencies
Expand Down
10 changes: 0 additions & 10 deletions features/chocolatey_package.feature
@@ -1,17 +1,7 @@
@not_chef_11_14_2
@not_chef_11_14_6
@not_chef_11_16_0
@not_chef_11_16_2
@not_chef_11_16_4
@not_chef_11_18_0
@not_chef_11_18_6
@not_chef_12_0_3
@not_chef_12_1_0
@not_chef_12_1_1
@not_chef_12_1_2
@not_chef_12_2_1
@not_chef_12_3_0
@not_chef_12_4_0
@not_chef_12_4_3
@not_chef_12_5_1
@not_chef_12_6_0
Expand Down
9 changes: 0 additions & 9 deletions features/dsc_resource.feature
@@ -1,13 +1,4 @@
@not_chef_11_14_2
@not_chef_11_14_6
@not_chef_11_16_0
@not_chef_11_16_2
@not_chef_11_16_4
@not_chef_11_18_0
@not_chef_11_18_6
@not_chef_12_0_3
@not_chef_12_1_0
@not_chef_12_1_1
@not_chef_12_1_2
Feature: The dsc_resource matcher
Background:
Expand Down
7 changes: 7 additions & 0 deletions features/notifications.feature
@@ -1,3 +1,10 @@
@not_chef_12_0_3
@not_chef_12_1_2
@not_chef_12_2_1
@not_chef_12_3_0
@not_chef_12_4_3
@not_chef_12_5_1

Feature: The notifications matcher
Background:
* I am using the "notifications" cookbook
Expand Down
7 changes: 0 additions & 7 deletions features/reboot.feature
@@ -1,10 +1,3 @@
@not_chef_11_14_2
@not_chef_11_14_6
@not_chef_11_16_0
@not_chef_11_16_2
@not_chef_11_16_4
@not_chef_11_18_0
@not_chef_11_18_6
Feature: The reboot matcher
Background:
* I am using the "reboot" cookbook
Expand Down
7 changes: 0 additions & 7 deletions features/step_into.feature
@@ -1,10 +1,3 @@
@not_chef_11_14_2
@not_chef_11_14_6
@not_chef_11_16_0
@not_chef_11_16_2
@not_chef_11_16_4
@not_chef_11_18_0
@not_chef_11_18_6
Feature: The step_into matcher
Background:
* I am using the "step_into" cookbook
Expand Down
7 changes: 7 additions & 0 deletions features/subscribes.feature
@@ -1,3 +1,10 @@
@not_chef_12_0_3
@not_chef_12_1_2
@not_chef_12_2_1
@not_chef_12_3_0
@not_chef_12_4_3
@not_chef_12_5_1

Feature: The subscribes matcher
Background:
* I am using the "subscribes" cookbook
Expand Down
9 changes: 0 additions & 9 deletions features/windows_package.feature
@@ -1,13 +1,4 @@
@not_chef_11_14_2
@not_chef_11_14_6
@not_chef_11_16_0
@not_chef_11_16_2
@not_chef_11_16_4
@not_chef_11_18_0
@not_chef_11_18_6
@not_chef_12_0_3
@not_chef_12_1_0
@not_chef_12_1_1
@not_chef_12_1_2
@not_chef_12_2_1
@not_chef_12_3_0
Expand Down
7 changes: 0 additions & 7 deletions features/windows_service.feature
@@ -1,10 +1,3 @@
@not_chef_11_14_2
@not_chef_11_14_6
@not_chef_11_16_0
@not_chef_11_16_2
@not_chef_11_16_4
@not_chef_11_18_0
@not_chef_11_18_6
Feature: The windows_service matcher
Background:
* I am using the "windows_service" cookbook
Expand Down
6 changes: 6 additions & 0 deletions gemfiles/chefspec.gemfile
@@ -1,5 +1,11 @@
source 'https://rubygems.org'

# travis runs on older chef releases failed while including
# rack 2.X on Ruby 2.1. When we remove Ruby 2.1 support this can go
if ENV['CHEF_VERSION'].to_f < 12.6
gem 'rack', '~> 1.0'
end

if ENV['CHEF_VERSION'] == 'master'
gem 'chef', github: 'chef/chef'
else
Expand Down
96 changes: 0 additions & 96 deletions spec/unit/extensions/lwrp_base_spec.rb

This file was deleted.

0 comments on commit b8754bd

Please sign in to comment.