Skip to content

pboling/gitmoji-regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

344f863 Β· Jun 1, 2023

History

55 Commits
May 30, 2023
May 30, 2023
May 30, 2023
May 30, 2023
Mar 29, 2022
Jun 1, 2023
May 30, 2023
Jun 1, 2023
Jun 1, 2023
May 29, 2023
May 30, 2023
Mar 30, 2022
Mar 30, 2022
May 30, 2023
Jun 1, 2023
May 30, 2023
Jun 1, 2023
Jun 1, 2023
Mar 28, 2022
May 29, 2023
Jun 1, 2023
Jun 1, 2023
Mar 28, 2022
May 30, 2023
Jun 1, 2023
Jun 24, 2022
Jun 1, 2023

Repository files navigation

Gotmoji Logo Copyright (c) 2016-2022 Carlos Cuesta, MIT License Regular Expression OOjs UI Icon by GOJU, MIT License via Wikimedia Commons Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5

Gitmoji::Regex

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.

Project bundle add gitmoji-regex
1️⃣ name, license, docs, standards RubyGems.org License: MIT RubyDoc.info GitMoji SemVer 2.0.0 Keep-A-Changelog 1.0.0
2️⃣ version & activity Gem Version Total Downloads Download Rank Source Code Open PRs Closed PRs
3️⃣ maintenance & linting Maintainability Helpers Depfu Contributors Style Kloc Roll
4️⃣ testing Open Issues Closed Issues Supported Heads
5️⃣ coverage & security CodeClimate CodeCov Coveralls Security Policy CodeQL Code Coverage
6️⃣ resources Discussion Get help on Codementor Chat Blog Wiki
7️⃣ spread πŸ’– Liberapay Patrons Sponsor Me Tweet @ Peter 🌏 πŸ‘Ό

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

Usage

"πŸ”₯" =~ Gitmoji::Regex::REGEX
# => 0 # character at position 0 is a Gitmoji!
"fire" =~ Gitmoji::Regex::REGEX
# => nil

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

To update the cached src/gitmojis.json load the console with bin/console, and run:

Gitmoji::Regex::Reference.instance.write_json

Contributing

See CONTRIBUTING.md

Contributors

Contributors

Made with contributors-img.

License

The gem is available as open source under the terms of the MIT License License: MIT. See LICENSE for the official Copyright Notice.

NOTE: the gitmoji project is also MIT Licensed, and the file src/gitmojis.json comes from that project.

Code of Conduct

Everyone interacting in the Gitmoji::Regex project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Versioning

This library aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions.

As a result of this policy, you can (and should) specify a dependency on this gem using the Pessimistic Version Constraint with two digits of precision.

For example:

spec.add_dependency "gitmoji-regex", "~> 1.0"

Security

See SECURITY.md.