<commit_before># Table Differ

Take snapshots of database tables and compute the differences between two snapshots.

[![Build Status](https://api.travis-ci.org/bronson/table_differ.png?branch=master)](http://travis-ci.org/bronson/table_differ)

## Installation

The usual, add this line to your application's Gemfile:

```ruby
gem 'table_differ'
```

## Synopsis

```ruby
Attachment.create_snapshot
  => "attachments_20140626_233336"
Attachment.first.touch               # set updated_at to right now
  => true
added,removed,changed = Attachment.diff_snapshot<commit_msg>add the version number badge<commit_after># Table Differ

Take snapshots of database tables and compute the differences between two snapshots.

[![Build Status](https://api.travis-ci.org/bronson/table_differ.png?branch=master)](http://travis-ci.org/bronson/table_differ)
[![Gem Version](https://badge.fury.io/rb/table_differ.svg)](http://badge.fury.io/rb/table_differ)

## Installation

The usual, add this line to your application's Gemfile:

```ruby
gem 'table_differ'
```

## Synopsis

```ruby
Attachment.create_snapshot
  => "attachments_20140626_233336"
Attachment.first.touch               # change updated_at to be right now
  => true
added,removed,changed = Attachment.diff_snapshot
{'fraction_non_alphanumeric': 0.12053925455987312, 'fraction_numerical': 0.022204599524187154, 'mean_word_length': 5.096618357487923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 3, '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': '435863', 'n_tokens_mistral': 433, 'n_tokens_neox': 410, 'n_words': 92}