Find out and have your say about development applications in your area.
This is the code for the web application side of things written using Ruby on Rails. The original code from PlanningAlerts.com, which this app is based on, was written using PHP.
If you're interested in contributing a scraper please give us a shout on the mailing list and we'll point you in the right direction. We're currently in the midst of changing the place that we run scrapers so it's all in a bit of a state of flux.
PlanningAlerts is brought to you by the OpenAustralia Foundation. It was adapted for Australia by Matthew Landauer and Katherine Szuminska, and is based on the UK site PlanningAlerts.com, built by Richard Pope, Mikel Maron, Sam Smith, Duncan Parkes, Tom Hughes and Andy Armstrong.
Install Dependencies
brew install sphinx
Checkout The Project
Install Ruby Dependencies
gem install bundler
bundle install
Setup The Database
cp config/database.yml.example config/database.yml
rake db:create
rake db:schema:load
bundle exec rake thinking_sphinx:configure
Run The Tests
rake
To use capistrano and the OpenAustralia Foundation's default configuration model, ignore this part of the instructions and carry on. To use mySociety's yaml-based configuration system instead you will need to:
config/general.yml-example
to config/general.ymlconfig/test.yml-example
to config/test.yml
This should cause the Configuration object in app/models/configuration.rb
to be overriden by lib/themes/hampshire/configuration.rb
which will replace the Configuration object's values with the ones held in the yml files. You can test whether this is working by running rspec lib/themes/hampshire/spec/models/configuration_spec.rb
Please note - customisations which are specific to mySociety's Hampshire theme have settings which exist only in the yml files. Config settings which relate to the main application are duplicated in the Configuration object.
Step 1 - Seed authorities table
rails s
rails console
:User.create(email: 'admin@example.com', password: 'password')
Marrickville Council
Marrickville
NSW
council@marrickville.nsw.gov.au
81489
planningalerts-scrapers/marrickville
false
Step 2 - Scrape DAs
MORPH_API_KEY
in app/models/configuration.rbrake planningalerts:applications:scrape['marrickville']
Step 3 - Setup an Alert
rails s
mailcatcher
Step 4 - Send email alerts
rake planningalerts:applications:email
last_sent
attribute of your alert to nilOur awesome contributors can be found on the PlanningAlerts site.
GPLv2, see the LICENSE file for full details.