Module: ProxyPacRb

Defined in:
lib/proxy_pac_rb/main.rb,
lib/proxy_pac_rb/rspec.rb,
lib/proxy_pac_rb/errors.rb,
lib/proxy_pac_rb/parser.rb,
lib/proxy_pac_rb/runtime.rb,
lib/proxy_pac_rb/version.rb,
lib/proxy_pac_rb/cli/find.rb,
lib/proxy_pac_rb/cli/init.rb,
lib/proxy_pac_rb/cli/lint.rb,
lib/proxy_pac_rb/cli/show.rb,
lib/proxy_pac_rb/encoding.rb,
lib/proxy_pac_rb/runtimes.rb,
lib/proxy_pac_rb/cli/runner.rb,
lib/proxy_pac_rb/cli/shared.rb,
lib/proxy_pac_rb/exceptions.rb,
lib/proxy_pac_rb/javascript.rb,
lib/proxy_pac_rb/environment.rb,
lib/proxy_pac_rb/cli/compress.rb,
lib/proxy_pac_rb/proxy_pac_js.rb,
lib/proxy_pac_rb/cli_validator.rb,
lib/proxy_pac_rb/rspec/helpers.rb,
lib/proxy_pac_rb/cli/find_proxy.rb,
lib/proxy_pac_rb/proxy_pac_file.rb,
lib/proxy_pac_rb/proxy_pac_dumper.rb,
lib/proxy_pac_rb/proxy_pac_linter.rb,
lib/proxy_pac_rb/proxy_pac_loader.rb,
lib/proxy_pac_rb/proxy_pac_parser.rb,
lib/proxy_pac_rb/cli/init_proxy_pac.rb,
lib/proxy_pac_rb/cli/lint_proxy_pac.rb,
lib/proxy_pac_rb/code_configuration.rb,
lib/proxy_pac_rb/runtimes/rubyracer.rb,
lib/proxy_pac_rb/runtimes/rubyrhino.rb,
lib/proxy_pac_rb/basic_configuration.rb,
lib/proxy_pac_rb/javascript_compiler.rb,
lib/proxy_pac_rb/proxy_pac_compressor.rb,
lib/proxy_pac_rb/rspec/matchers/proxy.rb,
lib/proxy_pac_rb/rack/proxy_pac_linter.rb,
lib/proxy_pac_rb/cli/compress_proxy_pac.rb,
lib/proxy_pac_rb/rack/proxy_pac_compressor.rb,
lib/proxy_pac_rb/rspec/matchers/base_matcher.rb

Overview

ProxyPacRb

Defined Under Namespace

Modules: Cli, Encoding, Exceptions, RSpecMatchers, Rack, Rspec, Rules, Runtimes Classes: BasicConfiguration, CliValidator, CodeConfiguration, CompilerError, Environment, InvalidArgumentError, Javascript, JavascriptCompiler, LinterError, Parser, ParserError, ProgramError, ProxyPacCompressor, ProxyPacDumper, ProxyPacFile, ProxyPacFileLoader, ProxyPacInvalidError, ProxyPacJs, ProxyPacLinter, ProxyPacLoader, ProxyPacNullLoader, ProxyPacParser, ProxyPacStringDumper, ProxyPacStringLoader, ProxyPacTemplateDumper, ProxyPacUriLoader, RubyRacerRuntime, RubyRhinoRuntime, Runtime, RuntimeUnavailableError, UrlInvalidError

Constant Summary collapse

VERSION =
'3.0.0'

Class Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object


16
17
18
19
20
# File 'lib/proxy_pac_rb/rspec.rb', line 16

def configure(&block)
  @configuration.configure(&block)

  @configuration
end

.debug_mode_enabled?Boolean

Returns:

  • (Boolean)

14
15
16
# File 'lib/proxy_pac_rb/main.rb', line 14

def debug_mode_enabled?
  debug_mode == true
end

.enable_debug_modeObject


18
19
20
21
# File 'lib/proxy_pac_rb/main.rb', line 18

def enable_debug_mode
  self.debug_mode = true
  %w(pry byebug).each { |l| require l }
end

.require_file_matching_pattern(pattern) ⇒ Object


23
24
25
26
27
# File 'lib/proxy_pac_rb/main.rb', line 23

def require_file_matching_pattern(pattern)
  root = File.expand_path('../', __FILE__)
  path = File.join(root, pattern)
  Dir.glob(path).each { |f| require_relative f }
end