README.md in balrog-1.0.0 vs README.md in balrog-1.1.0
- old
+ new
@@ -28,12 +28,12 @@
Run the installer to generate an initializer:
```shell
$ bundle exec rails generate balrog:install
-Enter New Password:
-Confirm New Password:
+Enter New Password:
+Confirm New Password:
create config/initializers/balrog.rb
$
```
## Regenerating a password hash
@@ -105,11 +105,48 @@
<%= balrog_logout_button "Leave this place" %>
<%= balrog_logout_button "Click me", class: 'fancy-button--with-custom-text' %>
<%= balrog_logout_button class: 'fancy-button--with-default-text' %>
```
+## Changing session expiry length
+`set_session_expiry` requires the user to login again after a period of time.
+To customise this value, open `config/initializers/balrog.rb` after running `balrog:install`
+and change the argument being passed to `set_session_expiry`.
+
+The argument passed to `set_session_expiry` can be any of the
+[Rails time extensions](https://api.rubyonrails.org/classes/Numeric.html).
+
+If you don't want sessions to expire, remove `set_session_expiry`
+from the initializer completely.
+
+```ruby
+Rails.application.config.middleware.use Balrog::Middleware do
+ password_hash '$2a$12$BLz7XCFdG9YfwL64KlTgY.T3FY55aQk8SZEzHfpHfw15F2uN1kuSi'
+ set_session_expiry 30.minutes
+end
+```
+## Configuring the Balrog gate view
+
+We built Balrog to have a default view and stylesheet so that you can drop
+Balrog into your project and everything should “just work”.
+However, we don't want to be in your way if you needed to customise
+your Balrog gate view.
+
+If you want to customise the Balrog view, you can run the `balrog:view`
+generator, which will copy the required view and layout to your application:
+
+```shell
+$ rails generate balrog:view
+```
+
+After running the generator, you can now add elements and classes to the
+`views/balrog/gate.html.erb`, add styles to the
+`assets/stylesheets/application.css` and import the application stylesheet in
+`app/views/layouts/balrog.html.erb`. For an example, see the
+[dummy-rails-app](https://github.com/pixielabs/balrog/tree/master/spec/dummy-rails-app) in the spec folder.
+
## Contributing
### Running the tests
Tests are part of the dummy Rails app within the spec folder:
@@ -135,7 +172,5 @@
## TODO
* Restricting access via `routes.rb`
* Test coverage
- * Check it's OK with Ruby on Rails 6
- * Expire sessions