Skip to content
A finder for courts and tribunals etc.
Ruby HTML CSS CoffeeScript Python JavaScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
bin
config
db
doc
docker/runit
lib
log
public
script
spec
support
vendor
.gitignore
.rspec
.rubocop.yml
.ruby-gemset
.ruby-version
.simplecov
CHANGELOG
Dockerfile
Gemfile
Gemfile.lock
Guardfile
LICENSE.txt
README.md
Rakefile
VERSION
authorities.csv
authorities.json
config.ru
hipchat_notifier.py
run.sh
shippable.yml

README.md

Court Finder

Build Status Code Climate Test Coverage

Set-up

ImageMagick

Court photos are resized when uploaded. This requires an install of ImageMagick on your environment. Install manually using from [http://www.imagemagick.org/script/index.php] or [http://cactuslab.com/imagemagick/].

Then run:

which convert

Note the path to ImageMagick and run the following line (replacing with your path to ImageMagick) before running bundle install. The below example is based on a which convert output of /opt/ImageMagick/bin/convert:

export PKG_CONFIG_PATH="/opt/ImageMagick/lib/pkgconfig:$PKG_CONFIG_PATH"

Data

Consult the deployment repository for instructions on how to clone production data.

Import

To add all court and address data run:

rake import:all

You can see a list of individual import tasks by running rake -T.

Then source all the court images from the existing website:

rake source:court_images

Generating Map Locations

After court data has been imported, some courts may be missing their map locations. The locations can be generated from their post codes of the visiting addresses and imported by running:

RAILS_ENV=production rake import:map_location

Some post codes are not recognised by the default map location provider. For them, please use Google Maps Labs and enter their location manually in the file below before re-running the script.

db/data/manual_map_locations.yml

Admin Area

Sign-in

To get access to the admin area you will then need to create the first user manually via the rake task:

rake "admin:create[sue@example.com, the_password, Sue Denim]"
Something went wrong with that request. Please try again.