Skip to content

Instantly share code, notes, and snippets.

@fujin
Created July 16, 2014 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fujin/073efbf81ef64b1de024 to your computer and use it in GitHub Desktop.
Save fujin/073efbf81ef64b1de024 to your computer and use it in GitHub Desktop.
# Relative path because berkshelf is dumb?
current_dir = File.dirname(__FILE__)
metadata_glob = ::File.join(current_dir, 'site-cookbooks', '*', 'metadata.rb')
Pathname.glob(metadata_glob).sort.each do |metadata_path|
cookbook metadata_path.dirname.basename.to_s, # e.g. foo
path: metadata_path.dirname.to_s # e.g. ./site-cookbooks/foo
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment