module ProxyTester

encoding

encoding

ProxyTester

Constants

VERSION

Attributes

config[RW]
environment[RW]
session[RW]
ui_logger[RW]

Public Class Methods

clear_environment() click to toggle source
# File lib/proxy_tester/main.rb, line 35
def clear_environment
  %w{
  http_proxy
  https_proxy
  HTTP_PROXY
  HTTPS_PROXY
  }.each { |var| ENV.delete(var) }
end
configure_i18n() click to toggle source
# File lib/proxy_tester/main.rb, line 24
def configure_i18n
  I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
  I18n.load_path = Dir[::File.join(ProxyTester.root_path, 'lib', 'proxy_tester', 'locales', '*.yml')]
  I18n.backend.load_translations
  I18n.enforce_available_locales = true
end
enable_debug_mode() click to toggle source
# File lib/proxy_tester/main.rb, line 15
def enable_debug_mode
  ProxyTester.ui_logger.info "Activating debug mode."

  require 'pry'
  require 'byebug'
rescue LoadError
  ProxyTester.ui_logger.error "You tried to enable debug-mode, but either 'pry'- or 'debugger'-gem are not installed. Please fix that before using the debug-switch again."
end
load_user_database() click to toggle source
# File lib/proxy_tester/main.rb, line 31
def load_user_database
  User.load_from(UserDatabase.new)
end
root_path() click to toggle source
# File lib/proxy_tester/main.rb, line 11
def root_path
  ::File.expand_path('../../..', __FILE__)
end