<commit_before>require 'dashing-contrib/version'
require 'dashing-contrib/configuration'
require 'dashing-contrib/history'
require 'dashing-contrib/routes'
require 'dashing-contrib/bottles/time'

module DashingContrib
  class << self
    attr_writer :configuration
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield configuration if block_given?
    self.configure_sprockets
  end

  private
  def self.configure_sprockets
    configuration.template_paths.each do |path|
      self.append_sprockets_path(path)
    end
  end

  def self.append_sprockets_path(path)
    puts "append to sprockets path: #{path}"
    puts Sinatra::Application.settings.sprockets

    Sinatra::Application.settings.sprockets.append_path(path)
  end<commit_msg>default load dotenv from project root<commit_after>require 'dashing-contrib/version'
require 'dashing-contrib/configuration'
require 'dashing-contrib/history'
require 'dashing-contrib/routes'
require 'dashing-contrib/bottles/time'
require 'dotenv'

module DashingContrib
  class << self
    attr_writer :configuration
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield configuration if block_given?
    self.configure_sprockets
    Dotenv.load
  end

  private
  def self.configure_sprockets
    configuration.template_paths.each do |path|
      self.append_sprockets_path(path)
    end
  end

  def self.append_sprockets_path(path)
    puts "append to sprockets path: #{path}"
    puts Sinatra::Application.settings.sprockets

    Sinatra::Application.settings.sprockets.append_path(path)
  end
{'fraction_non_alphanumeric': 0.07924984875983061, 'fraction_numerical': 0.0, 'mean_word_length': 4.37012987012987, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2721471', 'n_tokens_mistral': 520, 'n_tokens_neox': 512, 'n_words': 109}