{"id":18585987,"url":"https://github.com/cloud66-oss/glob_matcher","last_synced_at":"2025-04-10T13:31:38.350Z","repository":{"id":56874632,"uuid":"255085538","full_name":"cloud66-oss/glob_matcher","owner":"cloud66-oss","description":"A Ruby Globmatcher","archived":false,"fork":false,"pushed_at":"2020-04-18T21:45:34.000Z","size":16,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T21:42:26.771Z","etag":null,"topics":["gem","glob","regex","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloud66-oss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-12T13:13:27.000Z","updated_at":"2024-05-25T14:49:14.000Z","dependencies_parsed_at":"2022-08-20T10:11:13.639Z","dependency_job_id":null,"html_url":"https://github.com/cloud66-oss/glob_matcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud66-oss%2Fglob_matcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud66-oss%2Fglob_matcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud66-oss%2Fglob_matcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud66-oss%2Fglob_matcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud66-oss","download_url":"https://codeload.github.com/cloud66-oss/glob_matcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801160,"owners_count":20998339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","glob","regex","ruby"],"created_at":"2024-11-07T00:36:16.168Z","updated_at":"2025-04-10T13:31:33.311Z","avatar_url":"https://github.com/cloud66-oss.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"http://cdn2-cloud66-com.s3.amazonaws.com/images/oss-sponsorship.png\" width=150/\u003e\n\n![build_status](https://app.codeship.com/projects/eac78290-5ef1-0138-f343-1aecfe2393a1/status?branch=master)\n\n# GlobMatcher\n\nGlobMatcher is a string matcher for Ruby. You can use it to check for matches using wildcards. It supports multiple patterns as well as negative patterns.\n\nGlobMatcher is used in [Cloud 66 Skycap](https://www.cloud66.com/containers/skycap/) to filter git branches before deployment.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'glob_matcher'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install glob_matcher\n\n## Usage\n\nGlobMatcher checks strings against a pattern. A pattern is a space delimited list of single patterns to check against. Here are some patterns:\n\n```\nabc -\u003e Matches abc\na* -\u003e Matches ab, abc, azyz, ...\nfoo*bar -\u003e Matches fooxbar, fooxxxxbar, ...\n!abc -\u003e Matches any value except for abc\n!ab* -\u003e Matches any value except for anything that matches ab*\nfoo{abc,xyz}bar -\u003e Matches fooabcbar and fooxyzbar\n```\n\nYou can use multiple patterns:\n\n```\nabc xyz -\u003e Matches abc or xyz (OR)\n!abc !xyz -\u003e Matches anything expcet abc and xyz (AND)\nfoo bar !fuzz !buzz -\u003e Matches foo or bar but not fuzz and buzz\n```\n\n```ruby\nmatcher = ::GlobMatcher::Matcher.new('hel*')\nmatcher.is_match? 'hello' # true\n\nmatcher = ::GlobMatcher::Matcher.new('fo* !bar')\nmatcher.is_match? 'foo' # true\nmatcher.is_match? 'bar' # false\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/cloud66-oss/glob_matcher.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud66-oss%2Fglob_matcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud66-oss%2Fglob_matcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud66-oss%2Fglob_matcher/lists"}