<commit_before>require 'do_snapshot/version'
require 'thor'
require 'logger'
require 'date'
require 'pony'
require 'core_ext/hash'

# Used primary for creating snapshot's as backups for DigitalOcean
#
module DoSnapshot
  # Set multiple Errors with `id` @param
  #
  class DigitalOceanError < StandardError
    attr_reader :id
    # @param [Object] id
    def initialize(id)
      @id = id
    end
  end
  class DropletShutdownError < DigitalOceanError; end
  class SnapshotCreateError < DigitalOceanError; end
  class SnapshotCleanupError < DigitalOceanError; end

  # Shared logger
  #
  class Log
    class << self
      attr_accessor :logger
      attr_accessor :shell
      attr_accessor :mail
      attr_accessor :quiet
      attr_accessor :verbose
      attr_writer :smtp

      def smtp
        @smtp ||= {}
      end

      def log(type, message)
        buffer << message
        message = "#{message}"
        logger.send(type, message) if logger<commit_msg>Cleanup before release<commit_after>require 'do_snapshot/version'
require 'thor'
require 'logger'
require 'date'
require 'pony'
require 'core_ext/hash'

# Used primary for creating snapshot's as backups for DigitalOcean
#
module DoSnapshot
  # Set multiple Errors with `id` @param
  #
  class DigitalOceanError < StandardError
    attr_reader :id
    # @param [Object] id
    def initialize(id)
      @id = id
    end
  end
  class DropletShutdownError < DigitalOceanError; end
  class SnapshotCreateError < DigitalOceanError; end
  class SnapshotCleanupError < DigitalOceanError; end

  # Shared logger
  #
  class Log
    class << self
      attr_accessor :logger
      attr_accessor :shell
      attr_accessor :mail
      attr_accessor :quiet
      attr_accessor :verbose
      attr_writer :smtp

      def smtp
        @smtp ||= {}
      end

      def log(type, message)
        buffer << message
        logger.send(type, message) if logger
{'fraction_non_alphanumeric': 0.07210031347962383, 'fraction_numerical': 0.0, 'mean_word_length': 3.006276150627615, 'pattern_counts': {'":': 0, '<': 19, '<?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': '6842728', 'n_tokens_mistral': 592, 'n_tokens_neox': 573, 'n_words': 175}