Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for chef_gem resource #66

Closed
wants to merge 9 commits into from
Closed

Conversation

jimhopp
Copy link

@jimhopp 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
Copy link
Author

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.

@abecciu
Copy link
Contributor

abecciu commented Oct 31, 2012

+1

@acrmp
Copy link

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.

@abecciu
Copy link
Contributor

abecciu commented Nov 1, 2012

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

@jimhopp-lookout
Copy link
Contributor

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.

@leftathome
Copy link

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

Ranjib Dey and others added 8 commits November 9, 2012 13:57
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
Support for remote_file was added with 23f4b34,
but the feature never made it to the README.
At the moment, you have to try it out or search the commit/change log
to figure out the behavior.
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.
@jimhopp
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants