class FPM::Fry::Recipe
A FPM::Fry::Recipe
contains all information needed to build a package.
It is usually created by {FPM::Fry::Recipe::Builder}.
Attributes
@return [Array<#to_s>] steps that will be carried out before build
@return [Array<#to_s>] steps that will be carried out before dependencies are installed
@return [Hash<String,Hash>] build dependencies
@return [Array<#call>] hooks that will be called when building the Dockerfile
@return [Array<#call>] hooks that will be called on the input package
@return [Array<FPM::Fry::PackageRecipe>] a list of packages that will be created
@return [FPM::Fry::Source] the source used for building
@return [Array<#to_s>] steps that will be carried out during build
Public Class Methods
# File lib/fpm/fry/recipe.rb, line 159 def initialize @source = Source::Null @before_dependencies_steps = [] @before_build_steps = [] @steps = [] @packages = [PackageRecipe.new] @packages[0].files << '**' @build_depends = {} @input_hooks = [] @dockerfile_hooks = [] @build_mounts = [] end
Public Instance Methods
Filters the dockerfile @api experimental @param [Hash] df
# File lib/fpm/fry/recipe.rb, line 199 def apply_dockerfile_hooks( df ) dockerfile_hooks.each do |hook| hook.call(self, df) end return nil end
Applies input settings to package @param [FPM::Package] package @return [FPM::Package]
# File lib/fpm/fry/recipe.rb, line 191 def apply_input( package ) input_hooks.each{|h| h.call(self, package) } return package end
Calculates all dependencies of this recipe @return [Hash<String,Hash>] the dependencies
# File lib/fpm/fry/recipe.rb, line 174 def depends depends = @packages.map(&:depends).inject(:merge) @packages.map(&:name).each do | n | depends.delete(n) end return depends end
Checks all packages for common errors @return [Array<String>] problems
# File lib/fpm/fry/recipe.rb, line 184 def lint packages.flat_map(&:lint) end