lib/sitehub/core.rb in sitehub-0.5.0.alpha10 vs lib/sitehub/core.rb in sitehub-0.5.0.alpha11

- old
+ new

@@ -14,13 +14,14 @@ # TODO: default action for missing key, throw exception? def from_hash(config) new do extend CollectionMethods sitehub_cookie_name config[:sitehub_cookie_name] if config[:sitehub_cookie_name] + sitehub_cookie_path config[:sitehub_cookie_path] if config[:sitehub_cookie_path] collection!(config, :proxies).each do |proxy| - mappings.add_route route_builder: CandidateRoutes.from_hash(proxy, sitehub_cookie_name) + mappings.add_route candidate_routes: CandidateRoutes.from_hash(proxy, sitehub_cookie_name, sitehub_cookie_path ) end collection(config, :reverse_proxies).each do |proxy| reverse_proxy proxy[:downstream_url] => proxy[:path] end @@ -31,9 +32,10 @@ include Equality extend Forwardable attr_reader :mappings, :reverse_proxies def_delegator :mappings, :sitehub_cookie_name + def_delegator :mappings, :sitehub_cookie_path def initialize(&block) @reverse_proxies = {} @mappings = Middleware::CandidateRouteMappings.new instance_eval(&block) if block