<commit_before># Local development requires we have the current directory on $LOAD_PATH.
$: << File.dirname(__FILE__)

begin
  require 'chunky_png'
rescue LoadError
  require 'rubygems'
  begin
    require 'chunky_png'
  rescue LoadError
    puts 'Unable to load ChunkyPNG. Please install it with one of the following commands:'
    puts '  gem install chunky_png'
    raise
  end
end

# Compass Magick, a library for dynamic image generation.
#
# The Compass::Magick module defines constants and exception used throughout
# the project.
#
# @author <NAME>
module Compass::Magick
  # The current version of Compass Magick. This value is updated manually on
  # release. If you are using a Git clone, the version will always end with
  # '.git'.
  VERSION = '0.1.0.git'

  # The locations where plug-ins are located. These paths are scanned for
  # *.rb files and loaded in order.
  PLUGINS_PATH = [
    File.join(File.dirname(__FILE__), 'plugins'),
    File.join(ENV['HOME'], '.magick', 'plugins'),
    File.join(Dir.getwd,              'plugins')
  ]<commit_msg>Use OilyPNG if installed and available, otherwise revert to ChunkyPNG.<commit_after># Local development requires we have the current directory on $LOAD_PATH.
$: << File.dirname(__FILE__)

begin
  require 'oily_png'
rescue LoadError
  require 'rubygems'
  begin
    require 'oily_png'
  rescue LoadError
    puts '(Compass:Magick) Unable to load OilyPNG, reverting to ChunkyPNG.'
    puts 'OilyPNG is a C extension to speed up the pure Ruby library.'
    puts "Please install it with the following command:\n\n"
    puts "  gem install oily_png\n\n"
    begin
      require 'chunky_png'
    rescue LoadError
      puts "(Compass:Magick) Unable to load ChunkyPNG. Please install it with the following command:\n\n"
      puts "  gem install chunky_png\n\n"
      raise
    end
  end
end

# Compass Magick, a library for dynamic image generation.
#
# The Compass::Magick module defines constants and exception used throughout
# the project.
#
# @author <NAME>
module Compass::Magick
  # The current version of Compass Magick. This value is updated manually on
  # release. If you are using a Git clone, the version will always end with
  # '.git'.
  VERSION = '0.1.0.git'

  # The locations where plug-ins are located. These paths are scanned for
  # *.rb files and loaded in order.
  PLUGINS_PATH = [
    File.join(File.dirname(__FILE__), 'plugins'),
    File.join(ENV['HOME'], '.magick', 'plugins'),
    File.join(Dir.getwd,              'plugins')
  ]
{'fraction_non_alphanumeric': 0.09069212410501193, 'fraction_numerical': 0.002386634844868735, 'mean_word_length': 3.443462897526502, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '5579944', 'n_tokens_mistral': 769, 'n_tokens_neox': 767, 'n_words': 292}