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.4.6 lib/berkshelf/core_ext/file.rb
berkshelf-1.4.5 lib/berkshelf/core_ext/file.rb
berkshelf-2.0.0.beta lib/berkshelf/core_ext/file.rb
berkshelf-1.4.4 lib/berkshelf/core_ext/file.rb
berkshelf-1.4.3 lib/berkshelf/core_ext/file.rb
berkshelf-1.4.2 lib/berkshelf/core_ext/file.rb
berkshelf-1.4.1 lib/berkshelf/core_ext/file.rb
berkshelf-1.4.0 lib/berkshelf/core_ext/file.rb
berkshelf-1.4.0.rc1 lib/berkshelf/core_ext/file.rb
berkshelf-1.3.1 lib/berkshelf/core_ext/file.rb
berkshelf-1.3.0.rc1 lib/berkshelf/core_ext/file.rb
berkshelf-1.2.1 lib/berkshelf/core_ext/file.rb
berkshelf-1.2.0.rc1 lib/berkshelf/core_ext/file.rb
berkshelf-1.1.6 lib/berkshelf/core_ext/file.rb
berkshelf-1.1.5 lib/berkshelf/core_ext/file.rb
berkshelf-1.1.4 lib/berkshelf/core_ext/file.rb
berkshelf-1.1.3 lib/berkshelf/core_ext/file.rb
berkshelf-1.1.2 lib/berkshelf/core_ext/file.rb
berkshelf-1.1.1 lib/berkshelf/core_ext/file.rb
berkshelf-1.1.0 lib/berkshelf/core_ext/file.rb