Sha256: 6af5e639adf25c635e7fb54d81b7727078a86e01dfd2d88ba80e59fc2422753e

Contents?: true

Size: 332 Bytes

Versions: 54

Compression:

Stored size: 332 Bytes

Contents

class File
  class << self
    # Returns true or false if the given path is a Chef Cookbook
    #
    # @param [#to_s] path
    #   path of directory to reflect on
    #
    # @return [Boolean]
    def cookbook?(path)
      File.exists?(File.join(path, "metadata.rb"))
    end
    alias_method :chef_cookbook?, :cookbook?
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
berkshelf-1.1.0.rc1 lib/berkshelf/core_ext/file.rb
berkshelf-1.0.4 lib/berkshelf/core_ext/file.rb
berkshelf-1.0.3 lib/berkshelf/core_ext/file.rb
berkshelf-1.0.2 lib/berkshelf/core_ext/file.rb
berkshelf-1.0.0 lib/berkshelf/core_ext/file.rb
berkshelf-1.0.0.rc3 lib/berkshelf/core_ext/file.rb
berkshelf-1.0.0.rc2 lib/berkshelf/core_ext/file.rb
berkshelf-1.0.0.rc1 lib/berkshelf/core_ext/file.rb
berkshelf-0.6.0.beta4 lib/berkshelf/core_ext/file.rb
berkshelf-0.6.0.beta3 lib/berkshelf/core_ext/file.rb
berkshelf-0.6.0.beta2 lib/berkshelf/core_ext/file.rb
berkshelf-0.5.1 lib/berkshelf/core_ext/file.rb
berkshelf-0.6.0.beta1 lib/berkshelf/core_ext/file.rb
berkshelf-0.5.0 lib/berkshelf/core_ext/file.rb
berkshelf-0.5.0.rc4 lib/berkshelf/core_ext/file.rb
berkshelf-0.5.0.rc3 lib/berkshelf/core_ext/file.rb
berkshelf-0.5.0.rc2 lib/berkshelf/core_ext/file.rb
berkshelf-0.5.0.rc1 lib/berkshelf/core_ext/file.rb
berkshelf-0.4.0 lib/berkshelf/core_ext/file.rb
berkshelf-0.4.0.rc4 lib/berkshelf/core_ext/file.rb