Open Organisation Services
This repository is for code for services that support the ODI's operation as an open organisation. Our aim is to publish open data as a mechanism to help us function more effectively, and to act as a demonstrator of both the technical and policy challenges.
Feature documentation can be found on Relish.
Add to Gemfile:
gem 'open-orgn-services', :git => 'https://github.com/theodi/open-orgn-services.git'
And require if necessary:
Configuration is loaded from environment variables. See the environment section below for the list of which variables must be set.
You can start a local console using
foreman run bundle console. This loads
the app and environment.
There are Cucumber features and RSpec unit tests.
You can run the Cucumber features with
bundle exec cucumber features
And the specs with
bundle exec rspec
Make sure that all environment variables are setup to point to test systems as the test systems may be hit during test runs. This especially applies to Capsule CRM, Xero, Eventbrite and Mailchimp.
This code is open source under the MIT license. See the LICENSE.md file for full details.
This repository consists of a whole bunch of glue scripts which connect various other systems. They should all have the following features:
- Implemented as resque jobs.
- Minimal; each job should be as small as possible, spawing other jobs rather than executing big bits of code.
- Idempotent; they should be able to run many times with the same arguments and not cause problems.
- Testable; minimal jobs are very easy to test. This is generally done with cucumber features.
We use VCR to mock away any HTTP requests during tests.
The following environment variables should be set in order to use this gem.
COURSES_TARGET_URL EVENTBRITE_API_KEY EVENTBRITE_USER_KEY EVENTBRITE_ORGANIZER_ID RACKSPACE_USERNAME RACKSPACE_API_KEY RACKSPACE_CONTAINER GAPPS_FINANCE_SPOOL_COLLECTION GAPPS_FINANCE_TARGET_COLLECTION GAPPS_FINANCE_TARGET_KEY GAPPS_USER_EMAIL GAPPS_PASSWORD CAPSULECRM_ACCOUNT_NAME CAPSULECRM_API_TOKEN CAPSULECRM_DEFAULT_OWNER TRELLO_DEV_KEY TRELLO_MEMBER_KEY XERO_CONSUMER_KEY XERO_CONSUMER_SECRET XERO_PRIVATE_KEY_PATH MAILING_LIST_API_KEY MAILING_LIST_LIST_ID