<commit_before>require "cgi"
require "json"
require "octokit"
require "rest_client"

require "vendor/pony"

require "comsat/client"
require "comsat/route"
require "comsat/service"
require "comsat/version"

require "comsat/helpers/auth_helper"

require "comsat/services/campfire"
require "comsat/services/failure"
require "comsat/services/github"
require "comsat/services/pagerduty"
require "comsat/services/sendgrid"

module Comsat

  def self.merge(data1, data2)
    data1.merge(data2)
  end

  # Public: Allows the user to specify a logger for the log messages that Comsat
  # produces.
  #
  # logger = The object you want logs to be sent too
  #
  # Examples
  #
  #   Comsat.instrument_with(STDOUT.method(:puts))
  #   # => #<Method: IO#puts>
  #
  # Returns the logger object
  def self.instrument_with(logger)
    @logger = logger
  end

  # Public: Turns on mocking mode
  #
  # Examples
  #
  #   Comsat.mock!
  #   # => true
  def self.mock!
    @mock = true
  end

  # Public: Checks if mocking mode is enabled
  #
  # Examples
  #
  #   Comsat.mocking?
  #   # => false
  #   Comsat.mock!
  #   Comsat.mocking?
  #   # => true
  #
  # Returns the state of mocking
  def self.mocking?
    !!@mock
  end

  # Public: Store mocked notifications
  #
  # Returns an Array of notifications
  def self.notifications
    @notifications ||= []
  end

  # Public: View the the currently instrumented logger
  #
  # Returns the logger object
  def self.logger
    @logger || STDOUT.method(:puts)
  end

  # Internal: Top level log method for use by Comsat
  #
  # data = Logging data (typically a hash)
  # blk  = block to execute
  #
  # Returns the response from calling the logger with the arguments
  def self.log(data, &blk)
    logger.call({:lib => :comsat}.merge(data), &blk)
  end

  # Public: Reset the mocked data
  #
  # Examples
  #
  #   Comsat.notifications
  #   # => [{..}]
  #   Comsat.reset!
  #   Comsat.notifications
  #   # => []
  def self.reset!
    @notifications = []
  end
end
<commit_msg>Comment sendgrid since it's broken<commit_after>require "cgi"
require "json"
require "octokit"
require "rest_client"

#require "vendor/pony"

require "comsat/client"
require "comsat/route"
require "comsat/service"
require "comsat/version"

require "comsat/helpers/auth_helper"

require "comsat/services/campfire"
require "comsat/services/failure"
require "comsat/services/github"
require "comsat/services/pagerduty"
#require "comsat/services/sendgrid"

module Comsat

  def self.merge(data1, data2)
    data1.merge(data2)
  end

  # Public: Allows the user to specify a logger for the log messages that Comsat
  # produces.
  #
  # logger = The object you want logs to be sent too
  #
  # Examples
  #
  #   Comsat.instrument_with(STDOUT.method(:puts))
  #   # => #<Method: IO#puts>
  #
  # Returns the logger object
  def self.instrument_with(logger)
    @logger = logger
  end

  # Public: Turns on mocking mode
  #
  # Examples
  #
  #   Comsat.mock!
  #   # => true
  def self.mock!
    @mock = true
  end

  # Public: Checks if mocking mode is enabled
  #
  # Examples
  #
  #   Comsat.mocking?
  #   # => false
  #   Comsat.mock!
  #   Comsat.mocking?
  #   # => true
  #
  # Returns the state of mocking
  def self.mocking?
    !!@mock
  end

  # Public: Store mocked notifications
  #
  # Returns an Array of notifications
  def self.notifications
    @notifications ||= []
  end

  # Public: View the the currently instrumented logger
  #
  # Returns the logger object
  def self.logger
    @logger || STDOUT.method(:puts)
  end

  # Internal: Top level log method for use by Comsat
  #
  # data = Logging data (typically a hash)
  # blk  = block to execute
  #
  # Returns the response from calling the logger with the arguments
  def self.log(data, &blk)
    logger.call({:lib => :comsat}.merge(data), &blk)
  end

  # Public: Reset the mocked data
  #
  # Examples
  #
  #   Comsat.notifications
  #   # => [{..}]
  #   Comsat.reset!
  #   Comsat.notifications
  #   # => []
  def self.reset!
    @notifications = []
  end
end

{'fraction_non_alphanumeric': 0.11072749691738594, 'fraction_numerical': 0.001972872996300863, 'mean_word_length': 2.972575905974535, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '2702158', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1392, 'n_words': 382}