Provides a simple UI to view and manage some aspects of Caffeinate.
Add this line to your application's Gemfile:
gem 'caffeinate_webui'
And then execute:
$ bundle install
Drop it into your routes:
mount Caffeinate::Webui::Engine => '/admin/caffeinate'
If you're using Devise, you can simply:
authenticate :user, ->(user) { user.admin? } do
mount Caffeinate::Webui::Engine => '/admin/caffeinate'
end
Otherwise, protect it with your preferred rack-based strategy.
Doesn't need Sprockets, so I guess that's nice.