<commit_before>require 'json'
require 'mechanize'
require 'require_all'
require_rel 'voipfone_client'

module VoipfoneClient
  BASE_URL = "https://www.voipfone.co.uk"
  API_GET_URL = "https://www.voipfone.co.uk/api/srv"
  API_POST_URL = "https://www.voipfone.co.uk/api/upd"

  class << self
    attr_accessor :configuration
  end

  # A module method which accepts a block, allowing us to configure the module.
  # @param [Block] the configuration block, containing the configuration variables
  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration)
  end

  # A configuration class which contains the attributes we want to set in the module method
  class Configuration
    attr_accessor :username, :password, :user_agent_string

    def initialize

    end
  end
end<commit_msg>Some tidying of constants; added a new configuration option to cache cookies, set some default config options<commit_after>require 'json'
require 'mechanize'
require 'require_all'
require_rel 'voipfone_client'

module VoipfoneClient
  BASE_URL = "https://www.voipfone.co.uk"
  API_GET_URL = "#{BASE_URL}/api/srv"
  API_POST_URL = "#{BASE_URL}/api/upd"
  TMP_FOLDER = File.join(File.dirname(__FILE__),"..","/tmp")

  class << self
    attr_accessor :configuration
  end

  # A module method which accepts a block, allowing us to configure the module.
  # @param [Block] the configuration block, containing the configuration variables
  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration)
  end

  # A configuration class which contains the attributes we want to set in the module method
  class Configuration
    attr_accessor :username, :password, :user_agent_string, :cache_cookies

    # Configuration initializer, to set up default configuration options
    def initialize
      # By default we cache cookies to a file
      @cache_cookies = true

      # By default we set the user agent string to "VoipfoneClient/[version] http://github.com/errorstudio/voipfone_client"
      @user_agent_string = "VoipfoneClient/#{VoipfoneClient::VERSION} (http://github.com/errorstudio/voipfone_client)"
    end
  end
end
{'fraction_non_alphanumeric': 0.08460471567267684, 'fraction_numerical': 0.0, 'mean_word_length': 4.239709443099273, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '3588173', 'n_tokens_mistral': 657, 'n_tokens_neox': 642, 'n_words': 200}