Giter Club home page Giter Club logo

parliamentary-questions's Introduction

parliamentary-questions

Build Status Code Climate

Introduction

Webapp to manage the workflow Parliamentary Questions

System dependencies

  • Ruby MRI 2.1.2
  • Postgresql 9.3
  • phantomjs (tests only)
  • coreutils (required by the version_tag.sh script)
  • graphviz (required by the bin/generate-erd script)

To start with, make sure you have the right version of the Ruby runtime installed. Multiple versions of Ruby can be managed on the same machine through either rbenv or rvm.

The Postgresql version used in production is 9.3. This can be installed via homebrew:

brew install homebrew/versions/postgresql93

Project setup

Start by setting the required environment variables. Then Install the app dependencies by running the following

gem install bundler && bundle install

If you get problems installing the pg gem not being able to find libpg, try setting the architecture flag as follows:

gem install bundler && ARCHFLAGS="-arch x86_64" bundle install

You can now procede setting up the database table layout

bundle exec rake db:setup

And starting the app with:

bundle exec rails s

Mock data can be automatically imported by running the following rake task:

bundle exec rake pqa:import_dummy_data

Finally, a rake task is also provided to load PQ&A XML data into the system.

bundle exec rake pqa:import_from_xml[path/to/question_file.xml]

User authentication

It's done using devise and devise invitable:

For development you can create users with a rake task.

# default user
rake user:create

# specific email, password, name
rake "user:create[[email protected], 123456789, admin]"

Data model

PQ entity-relations diagram

An entity-relationship diagram of PQ's data model can be generated by running the bin/generate-erd script. Please do re-run this script to update the graph as the application schema evolves.

Running tests

Unit tests can be run via bundle exec rspec, while end-to-end tests can be run be executing the same command with the features folder as argument (i.e. bundle exec rspec features). Please refer to the readme in the features folder for end-to-end tests implementation details.

parliamentary-questions's People

Contributors

colinbruce avatar danielatdigital avatar njpreddy avatar stephenrichards avatar paulrhodes avatar melpierre avatar novotnyjakub avatar f0x02 avatar maxf avatar afiore avatar philt avatar dahernan avatar lukaszraczylo avatar munhitsu avatar ashb avatar cfandrade avatar kulwantl avatar rohanssalunkhe avatar ceebeeuk avatar stevegraham avatar carlosmoj avatar tehseens avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.