Bike registration that works: online, powerful, free.
We're an open source project. Take a gander through our code, report bugs, or download it and run it locally.
PostgreSQL >= 9.6
Requires 1gb of ram (or at least more than 512mb)
Running Bike Index locally
This explanation assumes you're familiar with developing Ruby on Rails applications.
bin/setupsets up the application and seeds:
./startstart the server.
Go to localhost:3001
|Toggle in development||command||default|
Running Bike Index with Docker
docker-compose upbuild and download containers:
- Starts all servers (you need to setup the application on the first time, see bellow)
docker-compose run app bin/setupsets up the application and seeds:
docker-compose run appbefore any other rails command, f.e.:
docker-compose run app rails consolefor Rails console
docker-compose run app bundle exec rspecfor running tests
Go to localhost:3001
See the internationalization docs for details.
Run the test suite continuously in the background with
bin/guard(watches for file changes/saves and runs those specs)
You may have to manually add the
fuzzystrmatchextension, which we use for near serial searches, to your databases. The migration should take care of this but sometimes doesn't. Open the databases in postgres (
psql bikeindex_test) and add the extension.
CREATE EXTENSION fuzzystrmatch;
parallel_tests to run the test suite in parallel. By default, this will spawn one process per CPU in your computer.
Run all the tests in parallel with
bin/rake parallel:prepareto synchronize the test db schema after migrations (rather than
Run specific files or test directories with
Run Guard with parallelism
bin/guard -G Guardfile_parallel
We use the following tools to automate code formatting and linting:
EditorConfig ensures whitespace consistency. See the Download a Plugin section of the EditorConfig docs to find a plugin appropriate to your editor.
Rufo is an opinionated Ruby formatter we use to maintain consistent style with minimum configuration. See the Editor support section of the project README to find a suitable editor plugin.
RuboCop is configured to ignore Ruby style and layout (deferring to Rufo) and focus on code complexity, performance, and suggested best practices.
To run it from the command line, issue
bin/rubocop, optionally passing
a specific file(s). For a performance boost, you can also start a rubocop daemon
bundle exec rubocop-daemon start, in which case you'd lint with
bundle exec rubocop-daemon exec.
See the Editor integration section of the rubocop docs to find an appropriate plugin for on-the-fly linting.
Vagrant development box
In general, we recommend installing and running the app without Vagrant for local development
If, however, you would prefer to have a virtual environment, this repository contains a Vagrantfile which is used to automatically set up and configure a virtual local (Ubuntu Xenial) development environment with all of the required dependencies preinstalled.
A computer that supports hardware virtualization (Intel VT-x/AMD-V)
At least 1.5GB of free memory
vagrant up to start the virtual machine. Upon first run, it will run various provisioning scripts to install all of the required packages, configure PostgreSQL, and run all of the Ruby commands to initalize a local Bike Index dev environment. Port 3001 is forwarded locally for testing. Be warned, it will take around a half hour or longer (depending on your internet connection) on first run to download additional Vagrant dependencies and to provision the dev environment. You may observe some informational warning messages during the initial setup which you can safely ignore.
vagrant halt to shutdown the VM. Subsequent startups will take considerably less time after the initial run.
If the initial provisioning fails for any reason, try running
vagrant provision and see if running the provisioner again completes without error. If not, please try to troubleshoot/google issues as much as possible before filing an issue. Many Vagrant related errors/issues have already been solved and are documented between Stackoverflow and Github. If you run in to an issue you're unable to solve, be sure to include all relevant stdout messages and errors.
Have a bug or a feature request? Open an issue.
Keep track of development and community news.
Open a Pull request!
Don't wait until you have a finished feature before before opening the PR, unfinished pull requests are welcome! The earlier you open the pull request, the earlier it's possible to discuss the direction of the changes.
Once the PR is ready for review, request review from the relevant person.
If your pull request contains Ruby patches or features, you must include relevant Rspec tests.
... and go hard