<commit_before>require 'guard'
require 'guard/guard'
require 'faraday'
module Guard
  class Play < Guard

    def test name
      conn = Faraday::Connection.new "http://localhost:9000"
      r = conn.get "/@tests/#{name}.class"
      passed = r.status == 200 ? true : false
      message = "Test #{name} #{passed ? 'passed' : 'failed'}."
      image = passed ? :success : :failed
      ::Guard::UI.info message
      ::Guard::Notifier.notify(message, :title => "Guard::Play", :image => image)
    end

    # Initialize a Guard.
    # @param [Array<Guard::Watcher>] watchers the Guard file watchers
    # @param [Hash] options the custom Guard options
    def initialize(watchers = [], options = {})
    @options = {
    :notifications => true
      }.merge(options)
    super(watchers, @options)
    end

    def init
    end

    # Call once when Guard starts. Please override initialize method to init stuff.
    # @raise [:task_has_failed] when start has failed
    def start
    end

    # Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
    # @raise [:task_has_failed] when stop has failed
    def stop
    end

    # Called when `reload|r|z + enter` is pressed.<commit_msg>replace all slashes with .<commit_after>require 'guard'
require 'guard/guard'
require 'faraday'
module Guard
  class Play < Guard

    def test name
      conn = Faraday::Connection.new "http://localhost:9000"
      r = conn.get "/@tests/#{name.gsub('/','.')}.class"
      passed = r.status == 200 ? true : false
      message = "Test #{name} #{passed ? 'passed' : 'failed'}."
      image = passed ? :success : :failed
      ::Guard::UI.info message
      ::Guard::Notifier.notify(message, :title => "Guard::Play", :image => image)
    end

    # Initialize a Guard.
    # @param [Array<Guard::Watcher>] watchers the Guard file watchers
    # @param [Hash] options the custom Guard options
    def initialize(watchers = [], options = {})
    @options = {
    :notifications => true
      }.merge(options)
    super(watchers, @options)
    end

    def init
    end

    # Call once when Guard starts. Please override initialize method to init stuff.
    # @raise [:task_has_failed] when start has failed
    def start
    end

    # Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
    # @raise [:task_has_failed] when stop has failed
    def stop
    end

    # Called when `reload|r|z + enter` is pressed.
{'fraction_non_alphanumeric': 0.12925728354534263, 'fraction_numerical': 0.005744768157570784, 'mean_word_length': 2.913322632423756, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '3171000', 'n_tokens_mistral': 764, 'n_tokens_neox': 725, 'n_words': 239}