Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Rack::MiniProfiler.config.pre_authorize_cb to be set in the app's initializer. #35

Merged
merged 1 commit into from
Dec 5, 2013

Conversation

fiedl
Copy link
Contributor

@fiedl fiedl commented Dec 4, 2013

By default, the MiniProfiler is not active in the test environment.

We would like to make sure in an integration test that the tool can only be seen by developers. Therefore, we have tried to override this behavior.

Overriding this behavior in rails-app initializer did not work:

# my_app/config/initializers/mini_profiler.rb
Rack::MiniProfiler.config.pre_authorize_cb = lambda do |env|
  return true
end

This tiny pull request changes this and allows Rack::MiniProfiler.config.pre_authorize_cb to be set in an initializer. The default setting is only applied, if pre_authorize_cb is not set in an initializer before.

@SamSaffron
Copy link
Member

Seems fine to me, thanks !

SamSaffron added a commit that referenced this pull request Dec 5, 2013
Allow Rack::MiniProfiler.config.pre_authorize_cb to be set in the app's initializer.
@SamSaffron SamSaffron merged commit 5752d05 into MiniProfiler:master Dec 5, 2013
fiedl added a commit to fiedl/wingolfsplattform that referenced this pull request Dec 5, 2013
@SamSaffron
Copy link
Member

FYI reverting: see #53 (comment)

SamSaffron added a commit that referenced this pull request Mar 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants