<commit_before>require 'itamae'

module Itamae
  class Recipe
    attr_reader :path
    attr_reader :runner
    attr_reader :dependencies
    attr_reader :delayed_actions

    def initialize(runner, path)
      @runner = runner
      @path = path
      @dependencies = RecipeDependencies.new
      @delayed_actions = []

      load_dependencies
    end

    def node
      @runner.node
    end

    def run(options = {})
      Logger.info "> Applying recipe... (#{@path})"

      @dependencies.each do |resource|
        case resource
        when Resource::Base
          resource.run(nil, dry_run: options[:dry_run])
        when Recipe
          resource.run(options)
        end
      end

      @delayed_actions.uniq.each do |action, resource|
        resource.run(action, dry_run: options[:dry_run])
      end

      Logger.info "< Finished. (#{@path})"
    end

    private
<commit_msg>Modify log output format.<commit_after>require 'itamae'

module Itamae
  class Recipe
    attr_reader :path
    attr_reader :runner
    attr_reader :dependencies
    attr_reader :delayed_actions

    def initialize(runner, path)
      @runner = runner
      @path = path
      @dependencies = RecipeDependencies.new
      @delayed_actions = []

      load_dependencies
    end

    def node
      @runner.node
    end

    def run(options = {})
      Logger.info "Recipe: #{@path}"

      @dependencies.each do |resource|
        case resource
        when Resource::Base
          resource.run(nil, dry_run: options[:dry_run])
        when Recipe
          resource.run(options)
        end
      end

      @delayed_actions.uniq.each do |action, resource|
        resource.run(action, dry_run: options[:dry_run])
      end

      Logger.info "< Finished. (#{@path})"
    end

    private

{'fraction_non_alphanumeric': 0.09310151430173864, 'fraction_numerical': 0.0, 'mean_word_length': 2.2554744525547443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6846402', 'n_tokens_mistral': 551, 'n_tokens_neox': 520, 'n_words': 130}