Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Register of Freedom of Information requests
Ruby HTML CSS Shell Other

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app Update email templates from Brighton
commonlib @ 83367d1 Default auto-generated Rails project
config Make cron jobs use Ruby 1.9.1
db Update db/schema.rb
doc Default auto-generated Rails project
extras Send public body status changes to alaveteli
lib
public Remove Rails welcome page
script Upgrade Ruby to 1.9.3, update deploy script
test
vendor jQuery UI datepicker styles
.gitignore Ignore logrotate files
.gitmodules
.ruby-version Upgrade Ruby to 1.9.3, update deploy script
Gemfile Update Rails to 3.2.21
Gemfile.lock Update strip_attributes gem to 1.7.0
README.md Replace .rvmrc with .ruby-version
Rakefile Default auto-generated Rails project
config.ru Default auto-generated Rails project

README.md

FOI Register

Installation

  1. Clone the repo:

    $ git clone git@github.com:mysociety/foi-register.git
    
  2. Get the git submodules

    $ cd foi-register
    $ git submodule update --init
    
  3. Install the required packages in config/packages using your package manager

  4. Copy the settings in config/database.yml-example to config/database.yml and adjust as appropriate.

  5. Copy the settings in config/general.yml-example to config/general.yml and adjust as appropriate.

  6. Run the following:

    $ bundle install
    $ script/post-deploy
    
  7. Then arrange for the delayed_job daemon to start, e.g.:

    $ RAILS_ENV=production script/delayed_job start
    

    See delayed job documentation for more info.

Running tests

To run all the tests, use:

$ bundle exec rake test

But see the notes in config/test.yml, some tests require a running Alaveteli instance to test against, which you'll have to set up. If you want to skip these tests, blank the setting TEST_ALAVETELI_API_HOST in config/test.yml

Developing with Vagrant

An example vagrant file can be found in config/Vagrantfile.example - the provisioning script sets up the basics for you, and has the neccessary settings to let you run this code in a virtual machine. To use it, it's probably easiest to copy it out to the parent directory, so that it sits alongside the foi-register folder you cloned from git:

$ cp foi-register/config/Vagrantfile-example Vagrantfile
$ vagrant up
$ vagrant ssh

Now follow the instructions above, the code is in /vagrant/foi-register

Something went wrong with that request. Please try again.