Sha256: 7831ae955ba637d02fca8c38901bf07b5f12ecd9e1284d94ab01d3551254cb60

Contents?: true

Size: 594 Bytes

Versions: 2

Compression:

Stored size: 594 Bytes

Contents

module Hibachi
  # Code for provisioning the box.
  module Provisioning
    extend ActiveSupport::Concern

    module ClassMethods
      # Accessor for the global Chef JSON.
      def node
        @node ||= Node.new(file_path: Hibachi.config.chef_json_path)
      end
    end

    # Accessor for the global Chef JSON in an instance.
    def node
      self.class.node
    end

    # Run chef for the given recipe.
    def chef
      Hibachi.run_chef recipe, background: run_in_background?
    end

    private
    def run_in_background?
      Hibachi.config.run_in_background
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hibachi-0.0.1 lib/hibachi/provisioning.rb
hibachi-0.0.1.pre lib/hibachi/provisioning.rb