README.md in prawn-emoji-3.1.0 vs README.md in prawn-emoji-3.2.0

- old
+ new

@@ -1,9 +1,9 @@ # Prawn::Emoji +[![Test](https://github.com/hidakatsuya/prawn-emoji/workflows/Test/badge.svg?branch=master)](https://github.com/hidakatsuya/prawn-emoji/actions) [![Gem Version](https://badge.fury.io/rb/prawn-emoji.svg)](https://badge.fury.io/rb/prawn-emoji) -[![Build Status](https://travis-ci.org/hidakatsuya/prawn-emoji.svg)](https://travis-ci.org/hidakatsuya/prawn-emoji) [![Maintainability](https://api.codeclimate.com/v1/badges/edcd23ef38c2e393513b/maintainability)](https://codeclimate.com/github/hidakatsuya/prawn-emoji/maintainability) Prawn::Emoji is an extention that adds Emoji support to [Prawn](https://github.com/prawnpdf/prawn). ```ruby @@ -65,15 +65,30 @@ ### True Type Font Required In order to draw Emoji, you must use a True Type Font. I recommend you use a Japanese font. +## Configuring Emoji Regex + +Emoji Regex is a regular expression used to determine which emoji to draw. + +```ruby +Prawn::Emoji.config.regex # => ::Unicode::Emoji::REGEX_VALID by default +``` + +You can override it with [unicode-emoji's Regex](https://github.com/janlelis/unicode-emoji#regex): + +```ruby +Prawn::Emoji.config.regex = ::Unicode::Emoji::REGEX_INCLUDE_TEXT +``` + + ## Supported Versions ### Ruby -2.4, 2.5, 2.6 +2.4, 2.5, 2.6, 2.7 ### Prawn 2.2+ @@ -103,24 +118,26 @@ $ bundle exec rake test:pdf ``` In order to run `test:pdf`, you need to install [diff-pdf](https://github.com/vslavik/diff-pdf) in your environment, or you can run test in the docker container as below. -### Run test using the Docker container +### How to develop in Docker container -The `diff-pdf` is already installed on the Docker container, so there is no need to install it in your environment. +You can use the Docker container for development. This container contains the libraries required for testing, such as diff-pdf. ``` -$ docker build -t prawn-emoji-test . +$ docker build -t prawn-emoji-dev . -# Run test:pdf by default -$ docker run --rm prawn-emoji-test +$ docker run -v $PWD:/prawn-emoji -it prawn-emoji-dev bash -# Run test:units -$ docker run --rm prawn-emoji-test test:units +> /prawn-emoji# +``` -# Run all test -$ docker run --rm prawn-emoji-test test +You can run test: + +``` +> /prawn-emoji# bundle install +> /prawn-emoji# bundle exec rake test ``` ### How to update bundled emojis ```