40 lines
975 B
Markdown
40 lines
975 B
Markdown
# Car Tracker
|
|
|
|
Vehicle maintenance and fuel tracking application.
|
|
|
|
|
|
## Initial setup
|
|
|
|
Start the rails server with `bin/rails server` in the cloned repo
|
|
|
|
In a new terminal where the repo is cloned run `bin/rails console` This will open an interactive console. You can get the current server key with `AccessKey.current.raw_key`. This is needed to log a user in. By default the key is rotated every 30 days but this can be configured. See the complete list of commands in the (Key management) section
|
|
|
|
Navigate to localhost:3000 in your browser to be able to see the website.
|
|
|
|
## Key management
|
|
|
|
```ruby
|
|
AccessKey.current.raw_key
|
|
AccessKey.rotate!
|
|
AccessKey.current.disable_auto_rotation!
|
|
AccessKey.current.enable_auto_rotation!
|
|
AccessKey.current.auto_rotation_frequency_days
|
|
AccessKey.current.update!(auto_rotation_frequency_days: 60)
|
|
```
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
Run the application test suite with:
|
|
|
|
```sh
|
|
bundle exec rspec
|
|
```
|
|
|
|
Run the full local CI baseline with:
|
|
|
|
```sh
|
|
bin/ci
|
|
```
|