<commit_before>ork-timestamps
==============

Timestamps for your Ork Models<commit_msg>Create a README with a description, installation and how-to section<commit_after>ork-timestamps
==============

[![Gem Version](https://badge.fury.io/rb/ork-timestamps.png)](http://badge.fury.io/rb/ork-timestamps)
[![Build Status](https://secure.travis-ci.org/emancu/ork-timestamps.png)](http://travis-ci.org/emancu/ork-timestamps)
[![Code Climate](https://codeclimate.com/github/emancu/ork-timestamps.png)](https://codeclimate.com/github/emancu/ork-timestamps)
[![Coverage Status](https://coveralls.io/repos/emancu/ork/badge.png)](https://coveralls.io/r/emancu/ork-timestamps)
[![Dependency Status](https://gemnasium.com/emancu/ork-timestamps.png)](https://gemnasium.com/emancu/ork-timestamps)


Timestamps for your Ork Models

## Dependencies

`ork-timestamps` requires:

* Ruby 1.9 or later.
* `riak-client` to connect to **Riak**.
* `ork` 0.1.3 or later.

Install Dependencies using `dep` is easy as run:

    $ dep insatll

## Installation

Install [Riak](http://basho.com/riak/) with your package manager:

    $ brew install riak

Or download it from [Riak's download page](http://docs.basho.com/riak/latest/downloads/)

Once you have it installed, you can execute `riak start` and it will run on `localhost:8098` by default.

If you don't have `Ork-Timestamps`, try this:

    $ gem install ork-timestamps


## Overview

`Ork::Timestamps` creates two attributes that automatically set create and update timestamp fields.

## Getting started

Include `Ork::Timestamps` module in your `Ork::Document` class.

```ruby
class SomeDocument
  include Ork::Document
  include Ork::Timestamps

  attribute :message
end
```

Enjoy your models with timestamps!

## Running the Tests

Adjust the variable to point to a test riak database. Default is `http://localhost:8098`

```bash
$ ORK_RIAK_URL='http://localhost:8198' rake
```
{'fraction_non_alphanumeric': 0.15203761755485892, 'fraction_numerical': 0.008881922675026124, 'mean_word_length': 4.874233128834356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1929637', 'n_tokens_mistral': 689, 'n_tokens_neox': 651, 'n_words': 157}