<commit_before>= Disclaimer

A tool for adding disclaimers to applications.
<commit_msg>Updates README to match current state of app<commit_after>= Disclaimer

A tool for adding disclaimers to applications.

== Installation

=== Gemfile  TODO - add config option

Update config/routes.rb by adding:

    mount Disclaimer::Engine => "/disclaimer"

See test/dummy/config/routes.rb

== Usage

First create a disclaimer document (see below) and give it a name. (The name is in underscore form: like_this).

Then in your application controller, define the disclaimer you wish to use with *disclaimer(:document_name)*.

So for example, you have a disclaimer document with the name our_company_disclaimer and you want to make sure that
everyone who visits your products controller has accepted this disclaimer. Modify the controller like this:

    class ProductsController < ApplicationController

      disclaimer(:our_company_disclaimer)


      .....(rest of controller)....

    end

Then when a user navigates to the products controller, they will be redirected to the disclaimer document at:

  /disclaimer/documents/our_company_disclaimer

If they accept the disclaimer, they will be redirected back to the page they were originally aiming for.

The acceptance is stored in session and therefore will remembered for as long as the browser is open.

== Documents and Segments

Documents can be created at /disclaimer/documents, and Segments as /disclaimer/segments. Documents are can contain
many segments, and segments can be shared across many documents (so that you can share common sections of a disclaimer
across many documents). This behaviour can be overwritten in the host application.



{'fraction_non_alphanumeric': 0.05011792452830189, 'fraction_numerical': 0.0, 'mean_word_length': 4.404458598726115, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '165924', 'n_tokens_mistral': 418, 'n_tokens_neox': 402, 'n_words': 220}