<commit_before># Phrasing!

1. gem install phrasing

2. rake copycat:install

3. rake db:migrate

4. must have a current_user method

5.a) must have bootstrap in your app

5.b) your application.js file should look something like this:

```javascript
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-editable
//= require bootstrap-editable-rails
//= require_tree .
```

On production you can include `bootstrap-editable.min` instead of `bootstrap-editable`

6.a) add to your layout file: ( most of the time its your application.html)

= stylesheet_link_tag "phrasing" if current_user
	
6.b) add to your application.css.scss

//= require bootstrap
--------//= require bootstrap-editable

7.a) Restart your server after adding all of these assets!

7.b) Start with adding your phrases w/ phrase('my-first-phrase')

8. The username and password for the HTTP Basic authentification are placedin the config/initializers/copycat.rb file.
   If you are going to change them, remember that you should restart your server.

# Current user

Phrasing expects that your view helpers have a <tt>current_user</tt> method defined.<commit_msg>Updated Read.me, everything to setup the gem should be in there<commit_after># Phrasing!

A inline editing gem, a small CMS substitute for editing live websites. 
It is stacked upon two other gems, Copycat and Bootstrap-editable-rails, immensely using their codes, so thank you to the authors and all the contributors! 

## Requirements

1. Phrasing expects that your view helpers have a <tt>current_user</tt> method defined.
	
2. Must install the bootstrap gem.

## How to use phrasing?

1. <tt> gem install phrasing </tt>

2. <tt> rake copycat:install </tt>

	This will create a migration file and a config file. The config file will be placed in the <tt>config/initializers/copycat.rb</tt> and you will be able to change your HTTP basic auth username and password for editing the live content. 

3. <tt> rake db:migrate </tt>

4. Include the javascript files (most often its your application.js file). It should look something like this:

	```javascript
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-editable
//= require bootstrap-editable-rails
//= require_tree .
	```

	On production you can include `bootstrap-editable.min` instead of `bootstrap-editable`

5. Add to your layout file ( most of the time its your application.html):

	<tt>= stylesheet_link_tag "phrasing" if current_user</tt>
	
6. If you haven't done it yet, require <tt>bootstrap</tt> in your layout file:

	<tt>//= require bootstrap</tt>

7. Start with adding your phrases simply by writting in your view file:

	<tt>phrase('my-first-phrase')</tt>
{'fraction_non_alphanumeric': 0.09144326110907088, 'fraction_numerical': 0.007344840249724568, 'mean_word_length': 4.063197026022305, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '5840486', 'n_tokens_mistral': 827, 'n_tokens_neox': 785, 'n_words': 351}