π² 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.
π£ How will this project approach the September 2025 hostile takeover of RubyGems? ποΈ
I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-takeover-of-rubygems-my-thoughts-5hlo).π» Synopsis
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-regex
If 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", "~> 1.0")
π Is "Platform Support" part of the public API? More details inside.
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: - ["Major Version Numbers are Not Sacred"][πmajor-versions-not-sacred]See CHANGELOG.md for a list of releases.
π License
The gem is available as open source under the terms of
the MIT .
| Field | Value |
|---|---|
| Package | gitmoji-regex |
| Description | π² A regular expression matching Gitmoji (a subset of Unicode Emoji) symbolsFund overlooked open source projects - bottom of stack, dev/test dependencies: floss-funding.dev |
| Homepage | https://github.com/galtzo-floss/gitmoji-regex |
| Source | https://github.com/galtzo-floss/gitmoji-regex/tree/v1.0.3 |
| License | MIT |
| Funding | https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/gitmoji-regex, https://www.buymeacoffee.com/pboling |