<commit_before>## Mongoid::Audit

[![Gem Version](https://badge.fury.io/rb/mongoid-audit.png)](http://badge.fury.io/rb/mongoid-audit)
[![Dependency Status](https://www.versioneye.com/user/projects/53ea131f8b6db55f150000b7/badge.svg)](https://www.versioneye.com/user/projects/53ea131f8b6db55f150000b7)
[![Issues](http://img.shields.io/github/issues/rs-pro/mongoid-audit.svg)](https://github.com/rs-pro/mongoid-audit/issues)
[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/rs-pro/mongoid-audit/blob/master/MIT-LICENSE.txt)

**MongoidAudit 1.0 is a complete rewrite and might break backwards compatibility**

Since 1.0.0, mongoid_audit is no longer a fork, but a wrapper of [mongoid-history](https://github.com/aq1018/mongoid-history), providing
out-of-the-box Userstamp, RailsAdmin integration and easier setup and configuration.

### Migrating from 0.x.x

* delete the initializer (if you had default settings).

* Database storage format for user / modifier in 1.0.0 was changed, since now glebtv_mongoid_userstamp gem is used to store modifier. To migrate your data you should do something like:
  
    HistoryTracker.all.each{|ht| ht.rename(:modifier_id, :updater_id)

* This gem includes storing modifier, but it is done via ```glebtv_mongoid_userstamp``` and not directly.

* RailsAdmin auditing adapter is still fully supported.

## Installation

Add this line to your application's Gemfile:

    # must be after rails_admin, if you use it
    gem 'mongoid-audit', '~> 1.0.0.alpha.1'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install mongoid-audit --pre<commit_msg>Add link to userstamp gem<commit_after>## Mongoid::Audit

[![Gem Version](https://badge.fury.io/rb/mongoid-audit.png)](http://badge.fury.io/rb/mongoid-audit)
[![Dependency Status](https://www.versioneye.com/user/projects/53ea131f8b6db55f150000b7/badge.svg)](https://www.versioneye.com/user/projects/53ea131f8b6db55f150000b7)
[![Issues](http://img.shields.io/github/issues/rs-pro/mongoid-audit.svg)](https://github.com/rs-pro/mongoid-audit/issues)
[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/rs-pro/mongoid-audit/blob/master/MIT-LICENSE.txt)

**MongoidAudit 1.0 is a complete rewrite and might break backwards compatibility**

Since 1.0.0, mongoid_audit is no longer a fork, but a wrapper of [mongoid-history](https://github.com/aq1018/mongoid-history), providing
out-of-the-box Userstamp, RailsAdmin integration and easier setup and configuration.

### Migrating from 0.x.x

* delete the initializer (if you had default settings).

* Database storage format for user / modifier in 1.0.0 was changed, since now [glebtv_mongoid_userstamp](https://github.com/glebtv/mongoid_userstamp) gem is used to store modifier. To migrate your data you should do something like:
  
    HistoryTracker.all.each{|ht| ht.rename(:modifier_id, :updater_id)

* This gem includes storing modifier, but it is done via ```glebtv_mongoid_userstamp``` and not directly.

* RailsAdmin auditing adapter is still fully supported.

## Installation

Add this line to your application's Gemfile:

    # must be after rails_admin, if you use it
    gem 'mongoid-audit', '~> 1.0.0.alpha.1'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install mongoid-audit --pre
{'fraction_non_alphanumeric': 0.1308411214953271, 'fraction_numerical': 0.02954476936991257, 'mean_word_length': 4.642857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 13, 'lorem ipsum': 0, 'www.': 4, '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': '4566895', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1117, 'n_words': 277}