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

init command should default to Berkshelf #28

Closed
jtimberman opened this issue Jan 27, 2013 · 2 comments
Closed

init command should default to Berkshelf #28

jtimberman opened this issue Jan 27, 2013 · 2 comments
Milestone

Comments

@jtimberman
Copy link
Contributor

The Vagrantfile rendered by the init command should set up Berkshelf support by default. This means:

  • Add gem "berkshelf" to Gemfile
  • Add require 'berkshelf/vagrant' to Vagrantfile
  • Generate a default Berksfile:
source :opscode
metadata

group :test do
  cookbook "apt"
  cookbook "yum"
  cookbook "minitest-handler"

  require 'pathname'
  cb_dir = ::File.join('.', 'test', 'kitchen', 'cookbooks')
  if ::File.exist?(cb_dir)
    Pathname.new(cb_dir).children.select(&:directory?).each do |c|
      cookbook c.basename.to_s, :path => ::File.join(cb_dir, c.basename.to_s).to_s
    end
  end
end

The last part is to support #24.

A command-line option could be added to disable Berkshelf support, or switch to librarian-chef.

@jtimberman
Copy link
Contributor Author

We don't need the Gemfile/Vagrantfile integration. A "--create-berksfile" for Berkshelf would still be nice.

@jtimberman
Copy link
Contributor Author

This is resolved with existing auto-detection magic.

@test-kitchen test-kitchen locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant