Skip to content

Commit

Permalink
Accept a Proc on authentication_value
Browse files Browse the repository at this point in the history
  • Loading branch information
julioalucero authored and adrian-gomez committed Jan 18, 2017
1 parent 7a43000 commit d0bc43b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/controllers/swaggard/swagger_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ def index
format.html do
@authentication_type = Swaggard.configuration.authentication_type
@authentication_key = Swaggard.configuration.authentication_key
@authentication_value = Swaggard.configuration.authentication_value
@authentication_value = Swaggard.configuration.authentication_value.respond_to?(:call) ?
Swaggard.configuration.authentication_value.call :
Swaggard.configuration.authentication_value

render :index, layout: false
end
Expand Down
2 changes: 1 addition & 1 deletion lib/swaggard/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Swaggard

VERSION = '0.5.0'
VERSION = '0.5.1'

end

0 comments on commit d0bc43b

Please sign in to comment.