<commit_before># ActsAsTemporary

On occasion I've had the need to store data for a short period of time within an application's database but did not want it to artificially inflate the ID numbers.
This gem uses a _TemporaryObject_ model that stores the "definition" (read: attributes) of a model. It can then be recalled at a later date. Upon saving a recalled object the temporary version is deleted. 

## Requirements

This project builds upon ActiveRecord. In theory this should work with nothing outside of a Rails application

## Installation

This project is distributed as a gem and it should be as simple as adding the following line to your **Gemfile**.

    gem 'acts_as_temporary', '~> 0.0.1'

You'll need to copy and run the migration from the engine.

    $ cd _/your/rails/app_
    $ rake acts_as_temporary_engine:install:migrations
    $ rake db:migrate

## Configuration

In your _{environment}.rb_ file you can set the shelf life of a temporary object with the following configuration definition:

    config.acts_as_temporary_shelf_life = 1.day # Set the duration to something that makes sense

By default the shelf life of a temporary object is _365.days_.<commit_msg>tidy up the README.md requirements section<commit_after># ActsAsTemporary

On occasion I've had the need to store data for a short period of time within an application's database but did not want it to artificially inflate the ID numbers.
This gem uses a _TemporaryObject_ model that stores the "definition" (read: attributes) of a model. It can then be recalled at a later date. Upon saving a recalled object the temporary version is deleted. 

## Requirements

This project builds upon ActiveRecord and for that reason you must use it within a Rails application. Currently this gem has only been tested against a rails 3.1 application.

## Installation

This project is distributed as a gem and it should be as simple as adding the following line to your **Gemfile**.

    gem 'acts_as_temporary', '~> 0.0.1'

You'll need to copy and run the migration from the engine.

    $ cd _/your/rails/app_
    $ rake acts_as_temporary_engine:install:migrations
    $ rake db:migrate

## Configuration

In your _{environment}.rb_ file you can set the shelf life of a temporary object with the following configuration definition:

    config.acts_as_temporary_shelf_life = 1.day # Set the duration to something that makes sense

By default the shelf life of a temporary object is _365.days_.
{'fraction_non_alphanumeric': 0.04736842105263158, 'fraction_numerical': 0.006477732793522267, 'mean_word_length': 4.246284501061571, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '6140153', 'n_tokens_mistral': 669, 'n_tokens_neox': 634, 'n_words': 350}