Sha256: afd07b5d260e8b8a08e6eb4a254f0e0c37180abdfc423c5e4a1e334e7d7cb127

Contents?: true

Size: 884 Bytes

Versions: 2

Compression:

Stored size: 884 Bytes

Contents

require 'dep_selector'
require 'zlib'
require 'archive/tar/minitar'

require 'kcd/version'
require 'kcd/shelf'
require 'kcd/cookbook'
require 'kcd/metacookbook'
require 'kcd/dsl'
require 'kcd/cookbookfile'
require 'kcd/lockfile'
require 'kcd/git'
require 'kcd/error_messages'

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

  autoload :KnifeUtils, 'kcd/knife_utils'

  class << self
    attr_accessor :ui

    def root
      File.join(File.dirname(__FILE__), '..')
    end

    def shelf
      @shelf ||= KCD::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

# Alias for {KnifeCookbookDependencies}
KCD = KnifeCookbookDependencies

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
knife_cookbook_dependencies-0.0.6 lib/knife_cookbook_dependencies.rb
knife_cookbook_dependencies-0.0.5 lib/knife_cookbook_dependencies.rb