Skip to content

Commit

Permalink
Ensure global client picks up on temporary configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
timkurvers committed Apr 25, 2015
1 parent 9766410 commit 3a78a38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/openid_token_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ def configure
def configure_temporarily
original = config
@config = original.dup
client.config = @config
yield @config
ensure
@config = original
client.config = @config
end
end
end
2 changes: 1 addition & 1 deletion lib/openid_token_proxy/client.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module OpenIDTokenProxy
class Client
attr_reader :config
attr_accessor :config

def initialize(config = OpenIDTokenProxy.config)
@config = config
Expand Down

0 comments on commit 3a78a38

Please sign in to comment.