<commit_before>require "admin_module/version"
require "admin_module/cli"

module AdminModule
  class << self
    attr_accessor :configuration
  end

  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration) if block_given?
  end

  class Configuration
    attr_accessor :default_environment
    attr_accessor :credentials
    attr_accessor :base_urls
    attr_accessor :aliases
    attr_accessor :page_urls

    # Browser timeout in seconds. Default: 360 (6 mins).
    attr_accessor :browser_timeout

    def initialize
      @default_environment = :dev

      @credentials = { dev: [ ENV['HSBC_DEV_USER'], ENV['HSBC_DEV_PASSWORD'] ],
                      dev2: [ ENV['HSBC_DEV2_USER'], ENV['HSBC_DEV2_PASSWORD'] ],
                       sit: [ ENV['HSBC_SIT_USER'], ENV['HSBC_SIT_PASSWORD'] ],
                       uat: [ ENV['HSBC_UAT_USER'], ENV['HSBC_UAT_PASSWORD'] ] }

      @base_urls   = { dev: "http://207.38.119.211/fap2Dev/Admin",
                      dev2: "http://172.16.17.32/fap2Dev2/Admin",
                       sit: "http://172.16.17.32/fap2SIT/Admin",
                       uat: "http://207.38.119.211/fap2UAT/Admin" }

      @aliases      = {}

      @page_urls   = { 'GuidelinesPage'       => "/admin/decision/guidelines.aspx",
                       'GuidelinePage'        => "/admin/decision/guideline.aspx", #?gdl=34
                       'LockDefinitionsPage'  => "/admin/security/ViewDefinitions.aspx?act=2&type=2",
                    }

      @browser_timeout = 360
    end
<commit_msg>Add and use Configuration#reset method<commit_after>require "admin_module/version"
require "admin_module/cli"

module AdminModule
  class << self
    attr_accessor :configuration
  end

  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration) if block_given?
  end

  class Configuration
    attr_accessor :default_environment
    attr_accessor :credentials
    attr_accessor :base_urls
    attr_accessor :aliases
    attr_accessor :page_urls

    # Browser timeout in seconds. Default: 360 (6 mins).
    attr_accessor :browser_timeout

    def initialize
      reset
    end

    def reset
      @default_environment = :dev

      @credentials = { dev: [ ENV['HSBC_DEV_USER'], ENV['HSBC_DEV_PASSWORD'] ],
                      dev2: [ ENV['HSBC_DEV2_USER'], ENV['HSBC_DEV2_PASSWORD'] ],
                       sit: [ ENV['HSBC_SIT_USER'], ENV['HSBC_SIT_PASSWORD'] ],
                       uat: [ ENV['HSBC_UAT_USER'], ENV['HSBC_UAT_PASSWORD'] ] }

      @base_urls   = { dev: "http://172.16.17.32/fap2Dev/Admin",
                      dev2: "http://172.16.17.32/fap2Dev2/Admin",
                       sit: "http://172.16.17.32/fap2SIT/Admin",
                       uat: "http://172.16.17.32/fap2UAT/Admin" }

      @aliases      = {}

      @page_urls   = { 'GuidelinesPage'       => "/admin/decision/guidelines.aspx",
                       'GuidelinePage'        => "/admin/decision/guideline.aspx", #?gdl=34
                       'LockDefinitionsPage'  => "/admin/security/ViewDefinitions.aspx?act=2&type=2",
                    }

      @browser_timeout = 360
    end

{'fraction_non_alphanumeric': 0.12160454832596336, 'fraction_numerical': 0.03663929248262792, 'mean_word_length': 2.2054655870445345, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, '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': '3055827', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1004, 'n_words': 166}