<commit_before><p align="center">
  <a href="https://github.com/mirego/emojimmy">
    <img src="http://i.imgur.com/n4Dh6tB.png" alt="Emojimmy" />
  </a>
  <br />
  Emojimmy makes it possible to store emoji characters in ActiveRecord datastores<br/> that don’t support <em>4-Byte UTF-8 Unicode</em> (<code>utf8mb4</code>) encoding.
  <br /><br />
  <a href="https://rubygems.org/gems/emojimmy"><img src="https://badge.fury.io/rb/emojimmy.png" /></a>
  <a href="https://codeclimate.com/github/mirego/emojimmy"><img src="https://codeclimate.com/github/mirego/emojimmy.png" /></a>
  <a href='https://coveralls.io/r/mirego/emojimmy?branch=master'><img src='https://coveralls.io/repos/mirego/emojimmy/badge.png?branch=master' /></a>
  <a href='https://gemnasium.com/mirego/emojimmy'><img src="https://gemnasium.com/mirego/emojimmy.png" /></a>
  <a href="https://travis-ci.org/mirego/emojimmy"><img src="https://travis-ci.org/mirego/emojimmy.png?branch=master" /></a>
</p>

You probably should be using a database that supports `utf8mb4` though (and not this gem), like PostgreSQL or MySQL (5.5+). We built this gem because stock [Heroku](http://heroku.com) machines cannot compile the `mysql2` gem to use the `utf8mb4` encoding (because they ship with an old version of `libmysqlclient`).

---

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'emojimmy'
```

### Usage

First, you must enable Emojimmy in an initializer (when your application boots):

```ruby
# config/initializers/emojimmy.rb
Emojimmy.initialize!
```

#### ActiveRecord

Then, you can edit your models to specify which fields will be storing emoji characters:<commit_msg>Remove initialize! part of README.md<commit_after><p align="center">
  <a href="https://github.com/mirego/emojimmy">
    <img src="http://i.imgur.com/n4Dh6tB.png" alt="Emojimmy" />
  </a>
  <br />
  Emojimmy makes it possible to store emoji characters in ActiveRecord datastores<br/> that don’t support <em>4-Byte UTF-8 Unicode</em> (<code>utf8mb4</code>) encoding.
  <br /><br />
  <a href="https://rubygems.org/gems/emojimmy"><img src="https://badge.fury.io/rb/emojimmy.png" /></a>
  <a href="https://codeclimate.com/github/mirego/emojimmy"><img src="https://codeclimate.com/github/mirego/emojimmy.png" /></a>
  <a href='https://coveralls.io/r/mirego/emojimmy?branch=master'><img src='https://coveralls.io/repos/mirego/emojimmy/badge.png?branch=master' /></a>
  <a href='https://gemnasium.com/mirego/emojimmy'><img src="https://gemnasium.com/mirego/emojimmy.png" /></a>
  <a href="https://travis-ci.org/mirego/emojimmy"><img src="https://travis-ci.org/mirego/emojimmy.png?branch=master" /></a>
</p>

You probably should be using a database that supports `utf8mb4` though (and not this gem), like PostgreSQL or MySQL (5.5+). We built this gem because stock [Heroku](http://heroku.com) machines cannot compile the `mysql2` gem to use the `utf8mb4` encoding (because they ship with an old version of `libmysqlclient`).

---

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'emojimmy'
```

### Usage

#### ActiveRecord

You have to edit your models to specify which fields will be storing emoji characters:
{'fraction_non_alphanumeric': 0.1739266687558759, 'fraction_numerical': 0.00814791601378878, 'mean_word_length': 4.609841827768014, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 22, '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': '5337375', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1178, 'n_words': 272}