<commit_before>require 'von/config'
require 'von/counter'
require 'von/period'
require 'von/version'

require 'active_support/all'
require 'redis'

module Von
  def self.connection
    @connection ||= Redis.current
  end

  def self.config
    Config
  end

  def self.increment(field)
    counter = Counter.new(field)

    counter.increment
    counter.periods.each { |key, period| counter.increment(period) }
  end

  def self.count(field, period = nil)
    counter = Counter.new(field)
    counter.count(period)
  end

end<commit_msg>only require active_support/time and add configure block<commit_after>require 'von/config'
require 'von/counter'
require 'von/period'
require 'von/version'

require 'redis'
require 'active_support/time'

module Von
  def self.connection
    @connection ||= Redis.current
  end

  def self.config
    Config
  end

  def self.configure
    yield(config)
  end

  def self.increment(field)
    counter = Counter.new(field)

    counter.increment
    counter.periods.each { |key, period| counter.increment(period) }
  end

  def self.count(field, period = nil)
    counter = Counter.new(field)
    counter.count(period)
  end

end
{'fraction_non_alphanumeric': 0.1013745704467354, 'fraction_numerical': 0.0, 'mean_word_length': 3.623015873015873, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1109623', 'n_tokens_mistral': 395, 'n_tokens_neox': 373, 'n_words': 93}