class HttpStubDocker::Rake::Arguments

Constants

DEFAULT_PORT

Attributes

configurer[R]
external_base_uri[R]
port[R]
publish_tags[R]
stub_dir[R]
stub_name[R]
task_prefix[R]

Public Class Methods

new(args) click to toggle source
# File lib/http_stub_docker/rake/arguments.rb, line 12
def initialize(args)
  @port = ENV["port"] || DEFAULT_PORT
  args.each { |name, value| self.instance_variable_set("@#{name}", value) }
  @external_base_uri ||= "http://localhost:#{@port}"
  @task_prefix = current_rake_namespace
end

Private Instance Methods

current_rake_namespace() click to toggle source
# File lib/http_stub_docker/rake/arguments.rb, line 21
def current_rake_namespace
  ::Rake.application.current_scope.empty? ? "" : "#{::Rake.application.current_scope.to_a.reverse.join(":")}:"
end