demoji

0.0.7last stable release 7 years ago
Complexity Score
Low
Open Issues
1
Dependent Projects
0
Weekly Downloadsglobal
45

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

Demoji

MySQL configured with utf-8 encoding blows up when trying to save text rows containing emojis, etc., to address this, Demoji rescues from that specific exception and replaces the culprit chars with empty spaces.

This is a workaround until Rails adds support for UTF8MB4 in migrations, schema, etc.

Installation

Add this line to your application’s Gemfile:

gem 'demoji'

And then execute:

$ bundle

Or install it yourself as:

$ gem install demoji

Usage

Write an initializer in: config/initializers/demoji.rb:

ActiveRecord::Base.send :include, Demoji

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Dependencies

Loading dependencies...

CVE IssuesActive
0
Scorecards Score
No Data
Test Coverage
No Data
Follows Semver
Yes
Github Stars
41
Dependenciestotal
4
DependenciesOutdated
1
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute demoji in your own private RubyGems registry

gem install demoji
Processing...
Done

7 Releases

RubyGems on Cloudsmith

Getting started with RubyGems on Cloudsmith is fast and easy.