Sha256: 554097921d61dbafd93c0be6046f823435d35e2158776c3e216b6cb3fd5c1662

Contents?: true

Size: 1013 Bytes

Versions: 2

Compression:

Stored size: 1013 Bytes

Contents

require 'dep_selector'
require 'zlib'
require 'archive/tar/minitar'
require 'chef/config'
require 'chef/knife/cookbook_site_download'

require 'knife_cookbook_dependencies/version'
require 'knife_cookbook_dependencies/shelf'
require 'knife_cookbook_dependencies/cookbook'
require 'knife_cookbook_dependencies/metacookbook'
require 'knife_cookbook_dependencies/dependency_reader'
require 'knife_cookbook_dependencies/dsl'
require 'knife_cookbook_dependencies/cookbookfile'
require 'knife_cookbook_dependencies/git'
require 'knife_cookbook_dependencies/error_messages'

module KnifeCookbookDependencies
  DEFAULT_FILENAME = 'Cookbookfile'
  COOKBOOKS_DIRECTORY = 'cookbooks'

  class << self
    attr_accessor :ui

    def shelf
      @shelf ||= KnifeCookbookDependencies::Shelf.new
    end

    def clear_shelf!
      @shelf = nil
    end

    def ui
      @ui ||= Chef::Knife::UI.new(STDOUT, STDERR, STDIN, {})
    end

    def clean
      clear_shelf!
      FileUtils.rm_rf COOKBOOKS_DIRECTORY
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
knife_cookbook_dependencies-0.0.3 lib/knife_cookbook_dependencies.rb
knife_cookbook_dependencies-0.0.2 lib/knife_cookbook_dependencies.rb