Skip to content

Swapsea/swapsea

Repository files navigation

Swapsea

Swapsea - Patrol Swaps Made Easy

Swapsea is an award-winning patrol swap system for Australian Surf Life Saving Clubs. Swapsea is Open Source to attract more amazing volunteers - just like the Life Saving movement itself.

  • See CONTRIBUTING.md for instructions on how to contribute to Swapsea.
  • See LICENSE.md for the terms under which Swapsea is Open Source.

Ruby Style Guide pre-commit Build Status

Frequently Asked Questions

See https://www.swapsea.com.au/faq for information about what Swapsea does, why it works and where it came from.

Swapsea.com.au

Swapsea is offered for free to smaller clubs, or for a small hosting fee to larger clubs. See swapsea.com.au for details.

You're welcome to host Swapsea yourself, provided you respect the name "Swapsea" and comply with the License obligations (share your modifications, keep the Copyright notices etc.)

Development Environment Setup

Instructions for getting Swapsea working in a development environment. First, install the required Gems:

bundle install

Then, install postgresql and create and initialise the database:

rake db:setup

Then run the Rails application in development:

rails server

Run just the browser tests with:

RAILS_ENV=test bundle exec rspec spec/features/*.rb

Pre-commit hooks

We use pre-commit on every commit, to keep the code base nice and clean. Run manually with:

pre-commit run --all-files

Rubocop

We use Rubocop to keep our Ruby code conventional. Run manually with:

rubocop

Creating Demo Club Data

To create a demo club, use:

rake demo_club:populate['Swapsea Demo SLSC']

To destroy the demo club and all associated data, use:

rake demo_club:destroy['Swapsea Demo SLSC']

Run All Tests

RAILS_ENV=test bundle exec rake db:test:load
RAILS_ENV=test bundle exec rake

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The GNU General Public License is at LICENSE.