<commit_before># uberZeit

Time and activity tracking web application for the rest of us.

## Features

### Time Reporting

![Time Reporting](doc/images/time_reporting.png)

### Absences Management

![Absences Personal](doc/images/absences_personal.png)
![Absences Employees](doc/images/absences_employees.png)


## Installation on your production server

The installation has been tested on Ubuntu 12.04.

### Packages / Dependencies

#### For Ubuntu 12.04

    apt-get update
    apt-get install libxml2 libxml2-dev libxslt1-dev libcurl4-openssl-dev ruby1.9.1 ruby1.9.1-dev postgresql-9.1 libpq-dev git build-essential
    gem install bundler


### Setup

#### Clone repository

    cd /to/installation/directory
    git clone https://github.com/ninech/uberzeit.git .

#### Install required Gems

    bundle install --without development test

#### Setup database

    cp config/database.yml.example config/database.yml

Now add a database user and adjust database.yml accordingly.
Then set up the database:

    RAILS_ENV=production bundle exec rake db:create db:schema:load db:seed


#### Precompile assets

    RAILS_ENV=production bundle exec rake assets:precompile


#### Copy initial app settings

    cp config/uberzeit.yml.example config/uberzeit.yml


#### Setup environment variables

    cp config/.env.example config/.env

Edit `.env` and change the value of `SECRET_TOKEN` to a random alphanumeric string.
You could for example use `pwgen -s -1 100` to generate a random string.

#### Start the app

    RAILS_ENV=production bundle exec thin start -e production

Now visit http://hostname:3000 and sign in with `<EMAIL>`, password `<PASSWORD>`. Enjoy!


## Deployment on Heroku

To deploy on Heroku, some some modifications are required. The configuration
must also be added to the repository.
We do this using the hidden branch `deploy` which will be pushed to Heroku only.

### Clone repository

    cd /to/installation/directory
    git clone https://github.com/ninech/uberzeit.git .

### Set up Heroku

    heroku create
    git checkout -b deploy

### Configure

    cp config/uberzeit.yml.example config/uberzeit.yml
    # Edit config/uberzeit.yml to fit your needs
    git add -f config/uberzeit.yml
    git commit -m 'add configuration'
    heroku config:set SECRET_TOKEN=`pwgen -s -1 100`

### Deploy To Heroku

    git push heroku deploy:master
    heroku run rake db:schema:load db:seed
    heroku open

Sign in with `<EMAIL>`, password `<PASSWORD>`. Enjoy!

## API

    curl -v -H 'X-Auth-Token: <PASSWORD>' -X GET uberzeit.dev/api/ping

## License

uberZeit is released under the [MIT License](http://www.opensource.org/licenses/MIT). See LICENSE.txt for further details.
<commit_msg>Use Bundler's deployment mode so uberzeit can be installed by non-root users and doesn't pollute the global gem space.<commit_after># uberZeit

Time and activity tracking web application for the rest of us.

## Features

### Time Reporting

![Time Reporting](doc/images/time_reporting.png)

### Absences Management

![Absences Personal](doc/images/absences_personal.png)
![Absences Employees](doc/images/absences_employees.png)


## Installation on your production server

The installation has been tested on Ubuntu 12.04.

### Packages / Dependencies

#### For Ubuntu 12.04

    apt-get update
    apt-get install libxml2 libxml2-dev libxslt1-dev libcurl4-openssl-dev ruby1.9.1 ruby1.9.1-dev postgresql-9.1 libpq-dev git build-essential
    gem install bundler


### Setup

#### Clone repository

    cd /to/installation/directory
    git clone https://github.com/ninech/uberzeit.git .

#### Install required Gems

    bundle install --without development test --deployment

#### Setup database

    cp config/database.yml.example config/database.yml

Now add a database user and adjust database.yml accordingly.
Then set up the database:

    RAILS_ENV=production bundle exec rake db:create db:schema:load db:seed


#### Precompile assets

    RAILS_ENV=production bundle exec rake assets:precompile


#### Copy initial app settings

    cp config/uberzeit.yml.example config/uberzeit.yml


#### Setup environment variables

    cp config/.env.example config/.env

Edit `.env` and change the value of `SECRET_TOKEN` to a random alphanumeric string.
You could for example use `pwgen -s -1 100` to generate a random string.

#### Start the app

    RAILS_ENV=production bundle exec thin start -e production

Now visit http://hostname:3000 and sign in with `<EMAIL>`, password `<PASSWORD>`. Enjoy!


## Deployment on Heroku

To deploy on Heroku, some some modifications are required. The configuration
must also be added to the repository.
We do this using the hidden branch `deploy` which will be pushed to Heroku only.

### Clone repository

    cd /to/installation/directory
    git clone https://github.com/ninech/uberzeit.git .

### Set up Heroku

    heroku create
    git checkout -b deploy

### Configure

    cp config/uberzeit.yml.example config/uberzeit.yml
    # Edit config/uberzeit.yml to fit your needs
    git add -f config/uberzeit.yml
    git commit -m 'add configuration'
    heroku config:set SECRET_TOKEN=`pwgen -s -1 100`

### Deploy To Heroku

    git push heroku deploy:master
    heroku run rake db:schema:load db:seed
    heroku open

Sign in with `<EMAIL>`, password `<PASSWORD>`. Enjoy!

## API

    curl -v -H 'X-Auth-Token: <PASSWORD>' -X GET uberzeit.dev/api/ping

## License

uberZeit is released under the [MIT License](http://www.opensource.org/licenses/MIT). See LICENSE.txt for further details.

{'fraction_non_alphanumeric': 0.09491158426560808, 'fraction_numerical': 0.01154817755322988, 'mean_word_length': 3.705432937181664, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '37553', 'n_tokens_mistral': 1764, 'n_tokens_neox': 1627, 'n_words': 597}