๐ Gitmoji::Regex
if ci_badges.map(&:color).detect { it != "green"} โ๏ธ let me know, as I may have missed the discord notification.
if ci_badges.map(&:color).all? { it == "green"} ๐๏ธ send money so I can do more of this. FLOSS maintenance is now my full-time job.
I've summarized my thoughts in this blog post.
This gem provides a regex that allows Ruby code to test a string for a Gitmoji character. Gitmoji is a subset of the Unicode Emoji character set. This gem is not a fork of, but was inspired by, the wonderful emoji_regex gem.
You can use this regular expression to validate commit messages or extract leading gitmoji from strings.
# character at position 0 is a Gitmoji!
"๐ฅ" =~ Gitmoji::Regex::REGEX # => 0
# (0 is the index of the match, so it means valid!)
(Gitmoji::Regex::REGEX =~ "โจ Add feature").zero? #=> true
# Scan for Gitmoji
"โจ Fix bug ๐".scan(Gitmoji::Regex::REGEX) #=> ["โจ", "๐"]| ๐ Amazing test matrix was brought to you by | ๐ appraisal2 ๐ |
|---|---|
| ๐ Check it out! | โจ github.com/appraisal-rb/appraisal2 โจ |
๐ก Info you can shake a stick at
| Tokens to Remember |
|
|---|---|
| Works with JRuby |
|
| Works with Truffle Ruby |
|
| Works with MRI Ruby 4 |
|
| Works with MRI Ruby 3 |
|
| Works with MRI Ruby 2 |
|
| Support & Community |
|
| Source |
|
| Documentation |
|
| Compliance |
|
| Style |
|
| Maintainer ๐๏ธ |
|
... ๐ |
|
Compatibility
Compatible with MRI Ruby 2.4+, and concordant releases of JRuby, and TruffleRuby.
CI workflows and Appraisals are generated for MRI Ruby 2.4+.
This test floor is configured by ruby.test_minimum in .kettle-jem.yml and
may be higher than the gem's runtime compatibility floor when legacy Rubies are
not practical for the current toolchain.
| ๐ Amazing test matrix was brought to you by | ๐ appraisal2 ๐ and the color ๐ green ๐ |
|---|---|
| ๐ Check it out! | โจ github.com/appraisal-rb/appraisal2 โจ |
โจ Installation
Install the gem and add to the application's Gemfile by executing:
bundle add gitmoji-regexIf bundler is not being used to manage dependencies, install the gem by executing:
gem install gitmoji-regexโ๏ธ Configuration
Not needed.
๐ง Basic Usage
๐ Security
See SECURITY.md.
๐ค Contributing
If you need some ideas of where to help, you could work on adding more code coverage, or if it is already ๐ฏ (see below) check issues or PRs, or use the gem and think about how it could be better.
We so if you make changes, remember to update it.
See CONTRIBUTING.md for more detailed instructions.
๐ Versioning
This library follows for its public API where practical.
For most applications, prefer the Pessimistic Version Constraint with two digits of precision.
For example:
spec.add_dependency("gitmoji-regex", "~> 2.0")Dropping support for a platform can be a breaking change for affected users. If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.
To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer:
See CHANGELOG.md for a list of releases.
๐ License
The gem is available as open source under the terms of
the MIT .