lib/cfoundry/rest_client.rb in cfoundry-2.3.5 vs lib/cfoundry/rest_client.rb in cfoundry-2.3.6.rc1

- old
+ new

@@ -46,18 +46,24 @@ } attr_reader :target attr_accessor :trace, :backtrace, :log, - :request_id, :token, :target, - :http_proxy, :https_proxy + :request_id, :token, :http_proxy, :https_proxy def initialize(target, token = nil) @target = target @token = token @trace = false @backtrace = false @log = false + end + + def target=(target) + return if target == @target + + @target = target + @token = nil end def request(method, path, options = {}) request_uri(method, construct_url(path), DEFAULT_OPTIONS.merge(options)) end