Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add support for chef_gem resource #66

Closed
wants to merge 9 commits into
from

Conversation

Projects
None yet
8 participants

jimhopp commented Oct 23, 2012

It would be handy if chefspec supported the 'chef_gem' resource in addition to the 'gem_package' resource.

I'm not sure that some of the actions (:remove, :purge) are strictly necessary for chef_gem but included them to be complete.

jimhopp commented Oct 30, 2012

So I thought chef_gem had been in chef for awhile; turns out it arrived in 0.10.10.

Given that, is it worth adding support for chef_gem? My inclination is yes, but I want to know what the community thinks.

Contributor

abecciu commented Oct 31, 2012

+1

Contributor

acrmp commented Nov 1, 2012

Hi Jim,

I agree that this looks very useful - thanks a lot! At the moment this pull request breaks the build on Travis because the current build matrix includes older versions of Chef that don't have the chef_gem resource.

We have a feature tag @requires_chef_10 that clumsily allows exclusion of features that depend on Chef 10+. It's not quite as simple as just adding this tag to your new feature though because as you point out chef_gem will break on versions older than 0.10.10 (including 0.10.8). The easiest thing would be to bump the version of Chef in the build matrix.

This also makes me think we should consider retiring support for Chef 0.9.x from ChefSpec given that it is end of life, which would allow us to remove some code.

Cheers,

Andrew.

Contributor

abecciu commented Nov 1, 2012

I completely agree with retiring support for Chef 0.9.x.

Contributor

jimhopp-lookout commented Nov 1, 2012

I concur with retiring support for chef 0.9.x.

-Jim
On Oct 31, 2012, at 5:08 PM, Andrew Crump wrote:

Hi Jim,

I agree that this looks very useful - thanks a lot! At the moment this pull request breaks the build on Travis because the current build matrix includes older versions of Chef that don't have the chef_gem resource.

We have a feature tag @requires_chef_10 that clumsily allows exclusion of features that depend on Chef 10+. It's not quite as simple as just adding this tag to your new feature though because as you point out chef_gem will break on versions older than 0.10.10 (including 0.10.8). The easiest thing would be to bump the version of Chef in the build matrix.

This also makes me think we should consider retiring support for Chef 0.9.x from ChefSpec given that it is end of life, which would allow us to remove some code.

Cheers,

Andrew.


Reply to this email directly or view it on GitHub.

+1 on chef_gem support and on retiring support for chef 0.9.x...

Ranjib Dey and others added some commits Sep 25, 2012

@jimhopp-lookout Ranjib Dey + jimhopp-lookout Fixing typos 16d2ab9
@jimhopp-lookout Ranjib Dey + jimhopp-lookout Adding cuckes for resource notification assert where notified resourc…
…e has braces in its name
8758138
@ChrisLundquist @jimhopp-lookout ChrisLundquist + jimhopp-lookout [matchers/service.rb] add :disable action 67bef91
@ketan @jimhopp-lookout ketan + jimhopp-lookout Add support for testing that a service is not running on boot c6c1d78
@mlafeldt @jimhopp-lookout mlafeldt + jimhopp-lookout Fix specs to set attributes using node.set in preparation for Chef 11.0
Fixes the following warning with Chef 10.6.2:

	WARN: Setting attributes without specifying a precedence is deprecated and will be
	removed in Chef 11.0. To set attributes at normal precedence, change code like:
	`node["key"] = "value"` # Not this
	to:
	`node.set["key"] = "value"` # This
85cbb2f
@mlafeldt @jimhopp-lookout mlafeldt + jimhopp-lookout Document create_remote_file in README
Support for remote_file was added with 23f4b34,
but the feature never made it to the README.
2219ad7
@mlafeldt @jimhopp-lookout mlafeldt + jimhopp-lookout Make it clear that create_file_with_content matches on partial content
At the moment, you have to try it out or search the commit/change log
to figure out the behavior.
1f73c73
@jimhopp-lookout jimhopp-lookout chef_gem support only if chef supports it.
The chef_gem resource was added in chef 0.10.10. We shouldn't add in the chef_gem matcher
unless the chef version supports it.
f4b56cd

jimhopp commented Nov 9, 2012

Well, I think I screwed up the git work and picked up several unrelated commits in this branch. I'm going to see if I can straighten it out.

jimhopp commented Nov 9, 2012

Also, I'd like comments on the mechanisms I used to ensure the new functionality only runs if it's on a chef version that supports chef_gem.

jimhopp commented Nov 9, 2012

I'm going to close this pull request since I screwed up the commit history. I've submitted a second pull request (74) with a re-based commit.

@jimhopp jimhopp closed this Nov 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment