Class: Ridley::CookbookObject

Inherits:
ChefObject
  • Object
show all
Defined in:
lib/mb/ridley_ext/cookbook_object.rb

Instance Method Summary collapse

Instance Method Details

#has_motherbrain_plugin?Boolean

Check if the cookbook has the required files to be a motherbrain plugin

Returns:

  • (Boolean)


6
7
8
9
10
11
12
13
# File 'lib/mb/ridley_ext/cookbook_object.rb', line 6

def has_motherbrain_plugin?
  plugin_file   = root_files.find { |file| file[:name] == MB::Plugin::PLUGIN_FILENAME }
   = root_files.find do |file|
    file[:name] == MB::CookbookMetadata::RUBY_FILENAME || file[:name] == MB::CookbookMetadata::JSON_FILENAME
  end

  plugin_file && 
end