This condition is not entirely accurate. See:
https://github.com/Katello/katello/blob/master/src/app/controllers/application_controller.rb#L14
https://github.com/Katello/katello/blob/master/src/app/lib/profiling.rb

Could you please change the configuration of profiling to use `Katello.config.profile`? And since there will be two optional gems depending on different configuration I would add `bundle.d/optional.rb` and put them there conditioned.