<commit_before># Ocelots
[![Build Status](https://secure.travis-ci.org/wahyd4/ocelots.png)](https://travis-ci.org/wahyd4/ocelots)
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/wahyd4/ocelots)

This is an application to allow members of a team to get to know each other.

You log in using a mozilla persona id (linked to your email address) and then you'll be presented with the list of groups you belong to (which will be none initially).

You can now create a team and invite new members to join by entering their email address (including yourself - you can administer a team without being a member).

Everyone can try it [iocelots.com][1]

To setup your own instance on heroku:

    heroku apps:create
    heroku addons:add heroku-postgresql
    heroku addons:add sendgrid:starter
    git push heroku master

You should now generate a new rails secret for heroku

    heroku config:add RAILS_SECRET=`rake secret`

For photo storage, you will need to configure an S3 account:

    heroku config:add S3_ACCESS_KEY_ID=
    heroku config:add S3_SECRET_ACCESS_KEY=
    heroku config:add S3_BUCKET=
    heroku config:add S3_URL=

If you want some admin users to be able to assume the identity of others:

    heroku config:add OMNIPOTENT_USERS=<EMAIL>

If you want some email domains to be able to view teams they are not members of:

    heroku config:add BLESSED_DOMAINS=domain.com

You can specify the email sender by setting another environment variable:

    heroku config:add FROM_EMAIL=<EMAIL>

You will also need to specify the preferred base url:

    heroku config:add BASE_URL=http://localhost:3000

For local development, you can copy the SENDGRID_USERNAME and SENDGRID_PASSWORD and use them as local environment variables.

To use google maps, you will need to provide a google api key

    heroku config:add GOOGLE_API=your_api_key

To use Pusher to auto-fresh messages,you need to add Pusher addon on heroku,and to use it in local you need config it like following:

    export  PUSHER_APP_ID=32953
    export  PUSHER_KEY='d7f89f6f647afd76e667'
    export  PUSHER_SECRET='8bf576ce7079c9916e55'

## API

You can experiment with the API from the command line

First, set a couple of environment variables:

    export OCELOTS_URL=http://localhost:3000
    export OCELOTS_AUTH_TOKEN=<PASSWORD>

### Google OAuth API Config
You should apply for the API token from [Google API console][2],then set it.

    heroku config:add GOOGLE_OAUTH_CLIENT_ID=yourid --app ocelots
    heroku config:add GOOGLE_OAUTH_CLIENT_SECRET=yourSecret
    heroku config:add GOOGLE_OAUTH_REDIRECT=http://replace to your domain/home/verify_g_callback

To use it in local, you need export variables:
     export GOOGLE_OAUTH_CLIENT_ID=yourid --app ocelots
     export GOOGLE_OAUTH_CLIENT_SECRET=yourSecret
     export GOOGLE_OAUTH_REDIRECT=http://replace to your domain/home/verify_g_callback

### Membership Details<commit_msg>fix readme<commit_after># Ocelots
[![Build Status](https://secure.travis-ci.org/wahyd4/ocelots.png)](https://travis-ci.org/wahyd4/ocelots)
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/wahyd4/ocelots)

This is an application to allow members of a team to get to know each other.

You log in using a mozilla persona id (linked to your email address) and then you'll be presented with the list of groups you belong to (which will be none initially).

You can now create a team and invite new members to join by entering their email address (including yourself - you can administer a team without being a member).

Everyone can try it [iocelots.com][1]

To setup your own instance on heroku:

    heroku apps:create
    heroku addons:add heroku-postgresql
    heroku addons:add sendgrid:starter
    git push heroku master

You should now generate a new rails secret for heroku

    heroku config:add RAILS_SECRET=`rake secret`

For photo storage, you will need to configure an S3 account:

    heroku config:add S3_ACCESS_KEY_ID=
    heroku config:add S3_SECRET_ACCESS_KEY=
    heroku config:add S3_BUCKET=
    heroku config:add S3_URL=

If you want some admin users to be able to assume the identity of others:

    heroku config:add OMNIPOTENT_USERS=<EMAIL>

If you want some email domains to be able to view teams they are not members of:

    heroku config:add BLESSED_DOMAINS=domain.com

You can specify the email sender by setting another environment variable:

    heroku config:add FROM_EMAIL=<EMAIL>

You will also need to specify the preferred base url:

    heroku config:add BASE_URL=http://localhost:3000

For local development, you can copy the SENDGRID_USERNAME and SENDGRID_PASSWORD and use them as local environment variables.

To use google maps, you will need to provide a google api key

    heroku config:add GOOGLE_API=your_api_key

To use Pusher to auto-fresh messages,you need to add Pusher addon on heroku,and config it like:

    heroku config:add PUSHER_APP_ID=your_pusher_app_id
    heroku config:add PUSHER_KEY='your_pusher_key'
    heroku config:add PUSHER_SECRET='your_pusher_secret'

To use it in local you need config it like following:

    export  PUSHER_APP_ID=your_pusher_app_id
    export  PUSHER_KEY='your_pusher_key'
    export  PUSHER_SECRET='your_pusher_secret'

## API

You can experiment with the API from the command line

First, set a couple of environment variables:

    export OCELOTS_URL=http://localhost:3000
    export OCELOTS_AUTH_TOKEN=<PASSWORD>

### Google OAuth API Config
You should apply for the API token from [Google API console][2],then set it.

    heroku config:add GOOGLE_OAUTH_CLIENT_ID=yourid --app ocelots
    heroku config:add GOOGLE_OAUTH_CLIENT_SECRET=yourSecret
    heroku config:add GOOGLE_OAUTH_REDIRECT=http://replace to your domain/home/verify_g_callback

To use it in local, you need export variables:
     export GOOGLE_OAUTH_CLIENT_ID=yourid --app ocelots
     export GOOGLE_OAUTH_CLIENT_SECRET=yourSecret
     export GOOGLE_OAUTH_REDIRECT=http://replace to your domain/home/verify_g_callback

### Membership Details
{'fraction_non_alphanumeric': 0.0587557603686636, 'fraction_numerical': 0.011026991441737986, 'mean_word_length': 4.524545454545454, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '31255', 'n_tokens_mistral': 1961, 'n_tokens_neox': 1891, 'n_words': 702}