<commit_before>module SmAppConfig
  class InstallGenerator < Thor
    include Thor::Actions

    def self.source_root
      File.expand_path("../../templates", __FILE__)
    end

    desc "install", "Copies configuration files to config/"
    def install
      copy_app_config
      copy_app_config_example
      add_app_config_to_gitignore
    end

    desc "copy_app_config", "Copies app_config.yml to config/"
    def copy_app_config
      copy_file config_template, "config/app_config.yml"
      say "Copied app_config.yml to config/"
    end

    desc "copy_app_config_example", "Copies app_config.example.yml to config/"
    def copy_app_config_example
      copy_file config_template, "config/app_config.example.yml"
      say "Copied app_config.example.yml to config/"
    end

    desc "add_app_config_to_gitignore", "Adds app_config.yml to .gitignore"
    def add_app_config_to_gitignore
      append_to_file ".gitignore", "\n/config/app_config.yml"
      say "Added /config/app_config.yml to .gitignore"
    end

    private

    def config_template
      defined?(Rails) ? "rails_app_config.yml" : "app_config.yml"
    end

  end
end<commit_msg>UR-376 Add method option for adding Rails environments to configuration files<commit_after>module SmAppConfig
  class InstallGenerator < Thor
    include Thor::Actions

    def self.source_root
      File.expand_path("../../templates", __FILE__)
    end

    desc "install", "Copies configuration files to config/"
    method_options rails: true, desc: "Add Rails environments to configuration files"
    def install
      copy_app_config
      copy_app_config_example
      add_app_config_to_gitignore
    end

    desc "copy_app_config", "Copies app_config.yml to config/"
    def copy_app_config
      copy_file config_template, "config/app_config.yml"
      say "Copied app_config.yml to config/"
    end

    desc "copy_app_config_example", "Copies app_config.example.yml to config/"
    def copy_app_config_example
      copy_file config_template, "config/app_config.example.yml"
      say "Copied app_config.example.yml to config/"
    end

    desc "add_app_config_to_gitignore", "Adds app_config.yml to .gitignore"
    def add_app_config_to_gitignore
      append_to_file ".gitignore", "\n/config/app_config.yml"
      say "Added /config/app_config.yml to .gitignore"
    end

    private

    def config_template
      @template ||= options[:rails] ? "rails_app_config.yml" : "app_config.yml"
    end

  end
end
{'fraction_non_alphanumeric': 0.07990314769975787, 'fraction_numerical': 0.0012106537530266344, 'mean_word_length': 3.3038194444444446, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5824550', 'n_tokens_mistral': 807, 'n_tokens_neox': 761, 'n_words': 190}