Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Added support of passing options for berkshelf via knife.rb #369

Merged
merged 3 commits into from
May 3, 2015

Conversation

iavael
Copy link
Contributor

@iavael iavael commented May 21, 2014

No description provided.

@tmatilai
Copy link
Collaborator

Thanks! I think the idea itself is fine. But this breaks compatibility with Berkshelf 2 which is still widely used. Tests and documentation would also be nice. =)

Travis tests seem to be broken, but that feels to be related to a new net-ssh version.

@iavael iavael force-pushed the feature/berkshelf-options branch from 556c949 to 05f5829 Compare December 24, 2014 20:49
@iavael
Copy link
Contributor Author

iavael commented Dec 24, 2014

But this breaks compatibility with Berkshelf 2

According to d8227f7 berkshelf 3+ is required

documentation would also be nice.

I'll update wiki as soon as this PR would be accepted. Plan to add

  • You can control berkshelf groups with knife[:berkshelf_options][:except] and knife[:berkshelf_options][:only] options (type of Array)

in the end of https://github.com/matschaffer/knife-solo/wiki/Berkshelf-&-Librarian-Chef-integration#berkshelf-integration

@tmatilai
Copy link
Collaborator

@iavael the tests use Berkshelf 3, but knife-solo itself is also compatible with v2 (see #268).

@iavael iavael force-pushed the feature/berkshelf-options branch from 9fa1315 to ac7515c Compare January 20, 2015 17:17
@@ -19,7 +19,12 @@ def install!
path = berkshelf_path
ui.msg "Installing Berkshelf cookbooks to '#{path}'..."

berksfile = ::Berkshelf::Berksfile.from_file('Berksfile')
if defined?(::Berkshelf) && Gem::Version.new(::Berkshelf::VERSION) >= Gem::Version.new("3.0.0")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't realize you'd added a compatibility check. Thanks!

What's the reason for the defined?(::Berkshelf) check here? Seems like if it failed the original code as well as line 26 here will fail as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, you are right, there is no reason. I removed it.

@iavael iavael force-pushed the feature/berkshelf-options branch from ac7515c to 5f1049e Compare May 3, 2015 00:42
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 89.91% when pulling 5f1049e on iavael:feature/berkshelf-options into 0b181fb on matschaffer:master.

matschaffer added a commit that referenced this pull request May 3, 2015
Added support of passing options for berkshelf via knife.rb
@matschaffer matschaffer merged commit 7ec285d into matschaffer:master May 3, 2015
@matschaffer
Copy link
Owner

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants