<commit_before># frozen_string_literal: true

class YleTf
  class Config
    module Defaults
      DEFAULT_CONFIG = {
        'hooks'     => {
          'pre'  => [],
          'post' => []
        },
        'backend'   => {
          'type'    => 'file',
          'bucket'  => nil,
          'file'    => '<%= @module %>_<%= @env %>.tfstate',
          'region'  => nil,
          'encrypt' => false,
        },
        'tfvars'    => {
        },
        'terraform' => {
          'version_requirement' => nil
        }
      }.freeze

      def default_config
        DEFAULT_CONFIG.dup
      end

      def default_config_context
        {
          env:    tf_env,
          module: module_dir.basename.to_s,
        }
      end
    end
  end
end<commit_msg>Add `module_dir` to the tf.yml evaluation context (#17)<commit_after># frozen_string_literal: true

class YleTf
  class Config
    module Defaults
      DEFAULT_CONFIG = {
        'hooks'     => {
          'pre'  => [],
          'post' => []
        },
        'backend'   => {
          'type'    => 'file',
          'bucket'  => nil,
          'file'    => '<%= @module %>_<%= @env %>.tfstate',
          'region'  => nil,
          'encrypt' => false,
        },
        'tfvars'    => {
        },
        'terraform' => {
          'version_requirement' => nil
        }
      }.freeze

      def default_config
        DEFAULT_CONFIG.dup
      end

      def default_config_context
        {
          env:        tf_env,
          module:     module_dir.basename.to_s,
          module_dir: module_dir.to_s,
        }
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.1338679827267119, 'fraction_numerical': 0.0012338062924120913, 'mean_word_length': 1.3039772727272727, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 31, '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': '2463356', 'n_tokens_mistral': 522, 'n_tokens_neox': 511, 'n_words': 98}