Resque tasks for ODI metrics collection
Ruby Cucumber
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
certs/test
config
features
fixtures/vcr_cassettes
lib
spec
.gitignore
.rspec
.ruby-version
.travis.yml
CHANGELOG.md
Gemfile
Gemfile.lock
Guardfile
LICENSE.md
README.md
Rakefile
odi-metrics-tasks.gemspec

README.md

ODI Metrics Tasks

Build Status Dependency Status Coverage Status Code Climate Gem Version License Badges

Setup

Add to gemfile:

gem 'odi-metrics-tasks'

And require if necessary:

require 'odi-metrics-tasks'

Configuration is loaded from environment variables. See the environment section below for the list of which variables must be set.

License

This code is open source under the MIT license. See the LICENSE.md file for full details.

Architecture

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.

Environment

The following environment variables should be set in order to use this gem.

  • METRICS_API_USERNAME
  • METRICS_API_PASSWORD
  • METRICS_API_BASE_URL
  • HUBOT_USER_LIST
  • AIRBRAKE_API_KEY
  • GITHUB_ORGANISATION
  • GITHUB_OAUTH_TOKEN
  • GAPPS_CLIENT_ID
  • GAPPS_CLIENT_SECRET
  • GAPPS_REFRESH_TOKEN
  • CAPSULECRM_ACCOUNT_NAME
  • CAPSULECRM_API_TOKEN
  • PRECISEMEDIA_FEED_URL
  • TRELLO_DEV_KEY
  • TRELLO_MEMBER_KEY