<commit_before>require 'guard'
require 'guard/guard'
require 'yard'

module Guard
  class Yard < Guard
    autoload :Server, 'guard/yard/server'
    attr_accessor :server

    def initialize(watchers=[], options={})
      super
      @server = Server.new(options[:port], options[:stdout], options[:stderr])
    end

    def start
      UI.info "[Guard::Yard] Starting YARD Documentation Server."
      boot
    end

    def stop
      server.kill
    end

    def reload
      UI.info "[Guard::Yard] Reloading YARD Documentation Server."
      boot
    end

    def run_all
      UI.info "[Guard::Yard] Generating all documentation."
      system('rm -rf .yardoc && yard doc')
      UI.info "[Guard::Yard] Documentation has been generated."
      true
    end

    def run_on_change(paths)
      UI.info "[Guard::Yard] Detected changes in #{paths.join(',')}."
      paths.each{ |path| document([path]) }
      UI.info "[Guard::Yard] Updated documentation for #{paths.join(',')}."
    end<commit_msg>Update for Guard v1.1 Compatibility<commit_after>require 'guard'
require 'guard/guard'
require 'yard'

module Guard
  class Yard < Guard
    autoload :Server, 'guard/yard/server'
    attr_accessor :server

    def initialize(watchers=[], options={})
      super
      @server = Server.new(options[:port], options[:stdout], options[:stderr])
    end

    def start
      UI.info "[Guard::Yard] Starting YARD Documentation Server."
      boot
    end

    def stop
      server.kill
    end

    def reload
      UI.info "[Guard::Yard] Reloading YARD Documentation Server."
      boot
    end

    def run_all
      UI.info "[Guard::Yard] Generating all documentation."
      system('rm -rf .yardoc && yard doc')
      UI.info "[Guard::Yard] Documentation has been generated."
      true
    end

    def run_on_changes(paths)
      UI.info "[Guard::Yard] Detected changes in #{paths.join(',')}."
      paths.each{ |path| document([path]) }
      UI.info "[Guard::Yard] Updated documentation for #{paths.join(',')}."
    end
{'fraction_non_alphanumeric': 0.12815437902028698, 'fraction_numerical': 0.0009896091044037606, 'mean_word_length': 2.8295454545454546, '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': '2593965', 'n_tokens_mistral': 626, 'n_tokens_neox': 605, 'n_words': 177}