<commit_before>module Guard

  # The DSL class provides the methods that are used in each `Guardfile` to describe
  # the behaviour of Guard.
  #
  # The main keywords of the DSL are `guard` and `watch`. These are necessary to define
  # the used Guard plugins and the file changes they are watching.
  #
  # You can optionally group the Guard plugins with the `group` keyword and ignore and filter certain paths
  # with the `ignore` and `filter` keywords.
  #
  # You can set your preferred system notification library with `notification` and pass
  # some optional configuration options for the library. If you don't configure a library,
  # Guard will automatically pick one with default options (if you don't want notifications,
  # specify `:off` as library). @see ::Guard::Notifier for more information about the supported libraries.
  #
  # A more advanced DSL use is the `callback` keyword that allows you to execute arbitrary
  # code before or after any of the `start`, `stop`, `reload`, `run_all`, `run_on_changes`,
  # `run_on_additions`, `run_on_modifications` and `run_on_removals` Guard plugins method.
  # You can even insert more hooks inside these methods.
  # Please [checkout the Wiki page](https://github.com/guard/guard/wiki/Hooks-and-callbacks) for more details.
  #
  # The DSL will also evaluate normal Ruby code.
  #
  # There are two possible locations for the `Guardfile`:
  # - The `Guardfile` in the current directory where Guard has been started
  # - The `.Guardfile` in your home directory.
  #
  # In addition, if a user configuration `.guard.rb` in your home directory is found, it will
  # be appended to the current project `Guardfile`.
  #
  # @example A sample of a complex Guardfile
  #
  #   notification :growl
  #
  #   group 'frontend' do
  #     guard 'passenger', :ping => true do
  #       watch('config/application.rb')
  #       watch('config/environment.rb')
  #       watch(%r{^config/environments/.+\.rb})
  #       watch(%r{^config/initializers/.+\.rb})
  #     end
  #
  #     guard 'livereload', :apply_js_live => false do
  #       watch(%r{^app/.+\.(erb|haml)})
  #       watch(%r{^app/helpers/.+\.rb})
  #       watch(%r{^public/javascripts/.+\.js})
  #       watch(%r{^public/stylesheets/.+\.css})
  #       watch(%r{^public/.+\.html})
  #       watch(%r{^config/locales/.+\.yml})
  #     end
  #   end
  #
  #   group 'backend' do
  #     # Reload the bundle when the Gemfile is modified
  #     guard 'bundler' do
  #       watch('Gemfile')
  #     end
  #
  #     # for big project you can fine tune the "timeout" before Spork's launch is considered failed
  #     guard 'spork', :wait => 40 do
  #       watch('Gemfile')
  #       watch('config/application.rb')
  #       watch('config/environment.rb')
  #       watch(%r{^config/environments/.+\.rb})
  #       watch(%r{^config/initializers/.+\.rb})
  #       watch('spec/spec_helper.rb')
  #     end
  #
  #     # use RSpec 2, from the system's gem and with some direct RSpec CLI options
  #     guard 'rspec', :version => 2, :cli => "--color --drb -f doc", :bundler => false do
  #       watch('spec/spec_helper.rb')                                  { "spec" }
  #       watch('app/controllers/application_controller.rb')            { "spec/controllers" }
  #       watch('config/routes.rb')                                     { "spec/routing" }
  #       watch(%r{^spec/support/(controllers|acceptance)_helpers\.rb}) { |m| "spec/#{m[1]}" }
  #       watch(%r{^spec/.+_spec\.rb})
  #
  #       watch(%r{^app/controllers/(.+)_(controller)\.rb}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
  #
  #       watch(%r{^app/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
  #       watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
  #     end
  #   end
  #
  class Dsl

    require 'guard'
    require 'guard/dsl'
    require 'guard/interactor'
    require 'guard/notifier'
    require 'guard/ui'
    require 'guard/watcher'

    # Deprecation message for the `ignore_paths` method
    IGNORE_PATHS_DEPRECATION = <<-EOS.gsub(/^\s*/, '')
      Starting with Guard v1.1 the use of the 'ignore_paths' Guardfile DSL method is deprecated.

      Please replace that method with the better 'ignore' or/and 'filter' methods.
      Documentation on the README: https://github.com/guard/guard#guardfile-dsl-ignore
    EOS

    # Deprecation message for the `ignore_paths` method
    INTERACTOR_DEPRECATION = <<-EOS.gsub(/^\s*/, '')
      Starting with Guard v1.4 the use of the 'interactor' Guardfile DSL method is only used to
      turn the Pry interactor off. All other usages are deprecated.

      Please make use of the Pry plugin architecture to customize the interactions and place them
      either in your `~/.guardrc` or the `Guardfile`.
    EOS

    class << self

      @@options = nil<commit_msg>Simplify `interactor` deprecation warning. (See #327) [ci skip]<commit_after>module Guard

  # The DSL class provides the methods that are used in each `Guardfile` to describe
  # the behaviour of Guard.
  #
  # The main keywords of the DSL are `guard` and `watch`. These are necessary to define
  # the used Guard plugins and the file changes they are watching.
  #
  # You can optionally group the Guard plugins with the `group` keyword and ignore and filter certain paths
  # with the `ignore` and `filter` keywords.
  #
  # You can set your preferred system notification library with `notification` and pass
  # some optional configuration options for the library. If you don't configure a library,
  # Guard will automatically pick one with default options (if you don't want notifications,
  # specify `:off` as library). @see ::Guard::Notifier for more information about the supported libraries.
  #
  # A more advanced DSL use is the `callback` keyword that allows you to execute arbitrary
  # code before or after any of the `start`, `stop`, `reload`, `run_all`, `run_on_changes`,
  # `run_on_additions`, `run_on_modifications` and `run_on_removals` Guard plugins method.
  # You can even insert more hooks inside these methods.
  # Please [checkout the Wiki page](https://github.com/guard/guard/wiki/Hooks-and-callbacks) for more details.
  #
  # The DSL will also evaluate normal Ruby code.
  #
  # There are two possible locations for the `Guardfile`:
  # - The `Guardfile` in the current directory where Guard has been started
  # - The `.Guardfile` in your home directory.
  #
  # In addition, if a user configuration `.guard.rb` in your home directory is found, it will
  # be appended to the current project `Guardfile`.
  #
  # @example A sample of a complex Guardfile
  #
  #   notification :growl
  #
  #   group 'frontend' do
  #     guard 'passenger', :ping => true do
  #       watch('config/application.rb')
  #       watch('config/environment.rb')
  #       watch(%r{^config/environments/.+\.rb})
  #       watch(%r{^config/initializers/.+\.rb})
  #     end
  #
  #     guard 'livereload', :apply_js_live => false do
  #       watch(%r{^app/.+\.(erb|haml)})
  #       watch(%r{^app/helpers/.+\.rb})
  #       watch(%r{^public/javascripts/.+\.js})
  #       watch(%r{^public/stylesheets/.+\.css})
  #       watch(%r{^public/.+\.html})
  #       watch(%r{^config/locales/.+\.yml})
  #     end
  #   end
  #
  #   group 'backend' do
  #     # Reload the bundle when the Gemfile is modified
  #     guard 'bundler' do
  #       watch('Gemfile')
  #     end
  #
  #     # for big project you can fine tune the "timeout" before Spork's launch is considered failed
  #     guard 'spork', :wait => 40 do
  #       watch('Gemfile')
  #       watch('config/application.rb')
  #       watch('config/environment.rb')
  #       watch(%r{^config/environments/.+\.rb})
  #       watch(%r{^config/initializers/.+\.rb})
  #       watch('spec/spec_helper.rb')
  #     end
  #
  #     # use RSpec 2, from the system's gem and with some direct RSpec CLI options
  #     guard 'rspec', :version => 2, :cli => "--color --drb -f doc", :bundler => false do
  #       watch('spec/spec_helper.rb')                                  { "spec" }
  #       watch('app/controllers/application_controller.rb')            { "spec/controllers" }
  #       watch('config/routes.rb')                                     { "spec/routing" }
  #       watch(%r{^spec/support/(controllers|acceptance)_helpers\.rb}) { |m| "spec/#{m[1]}" }
  #       watch(%r{^spec/.+_spec\.rb})
  #
  #       watch(%r{^app/controllers/(.+)_(controller)\.rb}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
  #
  #       watch(%r{^app/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
  #       watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
  #     end
  #   end
  #
  class Dsl

    require 'guard'
    require 'guard/dsl'
    require 'guard/interactor'
    require 'guard/notifier'
    require 'guard/ui'
    require 'guard/watcher'

    # Deprecation message for the `ignore_paths` method
    IGNORE_PATHS_DEPRECATION = <<-EOS.gsub(/^\s*/, '')
      Starting with Guard v1.1 the use of the 'ignore_paths' Guardfile DSL method is deprecated.

      Please replace that method with the better 'ignore' or/and 'filter' methods.
      Documentation on the README: https://github.com/guard/guard#guardfile-dsl-ignore
    EOS

    # Deprecation message for the `ignore_paths` method
    INTERACTOR_DEPRECATION = <<-EOS.gsub(/^\s*/, '')
      Starting with Guard v1.4 the use of the 'interactor' Guardfile DSL method is only used to
      disable or pass options to the Pry interactor. All other usages are deprecated.
    EOS

    class << self

      @@options = nil
{'fraction_non_alphanumeric': 0.13863425687506437, 'fraction_numerical': 0.003604902667627974, 'mean_word_length': 2.7317448116833205, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4691763', 'n_tokens_mistral': 3150, 'n_tokens_neox': 3068, 'n_words': 921}