Skip to content

opengovernment/popolo-engine

 
 

Repository files navigation

Popolo Rails Engine

If you are looking for the GitHub repository for the data specification, head over to the popolo-spec repository.

Build Status Dependency Status Coverage Status Code Climate

Popolo's goal is to make it easier for civic developers to create government transparency, monitoring and engagement websites.

Popolo is a Ruby on Rails engine that provides additional functionality to a Ruby on Rails application, so that developers can focus on what's special about the governments they want to monitor, instead of re-implementing features commonly found in open government websites. The core Popolo engine provides basic models, controllers and views for the objects found in all open government websites – people, organizations and the relationships between the two. Other engines provide additional functionality.

In addition to being a Rails engine, Popolo is also a data specification.

Getting Started

Popolo uses Mongoid to connect to MongoDB, which requires Rails 3 and supports only MRI 1.9.3, 2.0.0 and HEAD, and JRuby 1.6.0+ in 1.9 mode.

First, create your Rails application:

rails new myapp --skip-active-record

Add the popolo gem to your Gemfile and bundle your dependencies:

gem 'popolo'
bundle

If you didn't run rails new with the --skip-active-record option, follow Mongoid's installation instructions. Otherwise:

rails generate mongoid:config

Finally, run the popolo generator and create the MongoDB indexes:

rails generate popolo
bundle exec rake db:mongoid:create_indexes

Internationalization

If you are using Popolo's default views, you can translate your contact detail types and organization classifications by creating a locale file, e.g. config/locales/en.yml:

en:
  popolo:
    organizations:
      classifications:
        party: Political party
    contact_details:
      types:
        cell: Mobile number

Bugs? Questions?

This engine's main repository is on GitHub: http://github.com/opennorth/popolo-engine, where your contributions, forks, bug reports, feature requests, and feedback are greatly welcomed.

Acknowledgements

This gem is developed by Open North through a partnership with the Participatory Politics Foundation.

Copyright (c) 2012 Open North Inc., released under the MIT license

About

Rails engine for open government websites

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 93.9%
  • JavaScript 3.2%
  • CSS 2.9%