<commit_before>Feature: Deprecated

  The following functionality is deprecated.

  Background:
    Given a file named "Rakefile" with:
      """
      require 'dice_bag/tasks'
      """

  Scenario Outline: Using deprecated extensions
    Given a file named "<template file>" with:
      """
      <%= 1 + 2 %>
      """
    When I run `rake config`
    Then the file "<config file>" should contain:
      """
      3
      """

    Examples:
      | template file        | config file |
      | test.erb             | test        |
      | test.erb.local       | test        |
      | test.config.template | test.config |
<commit_msg>Extend deprecated scenarios for Rails projects<commit_after>Feature: Deprecated

  The following functionality is deprecated with the exeption of the use of
  the `.dice` extension, which is tested here to keep the Rails simulation
  jailed to this file.

  Scenario Outline: Deprecated extensions in Rails projects
    Given a file named "Rakefile" with:
      """
      require 'dice_bag/tasks'

      # Simulate Rails being present. This triggers processing of the 'config'
      # sub-directory. Not our finest moment.
      module Rails; end
      """
    And an empty file named "<template file>"
    When I run `rake config`
    Then a file named "<config file>" should exist

    Examples:
      | template file         | config file |
      | config/test.dice      | config/test |
      | config/test.erb       | config/test |
      | config/test.erb.local | config/test |

  Scenario: Deprecated extensions in non-Rails projects
    Given a file named "Rakefile" with:
      """
      require 'dice_bag/tasks'
      """
    And an empty file named "test.config.template"
    When I run `rake config`
    Then a file named "test.config" should exist

{'fraction_non_alphanumeric': 0.08635097493036212, 'fraction_numerical': 0.001671309192200557, 'mean_word_length': 2.2654545454545456, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '5972892', 'n_tokens_mistral': 510, 'n_tokens_neox': 486, 'n_words': 185}