{"id":15605556,"url":"https://github.com/shuuuuun/ripgrep-ruby","last_synced_at":"2025-05-16T09:31:18.340Z","repository":{"id":56892350,"uuid":"185008730","full_name":"shuuuuun/ripgrep-ruby","owner":"shuuuuun","description":"A Ruby wrapper around ripgrep!","archived":false,"fork":false,"pushed_at":"2020-09-20T09:35:21.000Z","size":32,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T23:11:44.252Z","etag":null,"topics":["gem","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuuuuun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-05T09:19:27.000Z","updated_at":"2024-03-07T04:03:34.000Z","dependencies_parsed_at":"2022-08-21T00:50:54.800Z","dependency_job_id":null,"html_url":"https://github.com/shuuuuun/ripgrep-ruby","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuuuuun%2Fripgrep-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuuuuun%2Fripgrep-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuuuuun%2Fripgrep-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuuuuun%2Fripgrep-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuuuuun","download_url":"https://codeload.github.com/shuuuuun/ripgrep-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254504770,"owners_count":22082084,"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","ruby"],"created_at":"2024-10-03T04:08:48.841Z","updated_at":"2025-05-16T09:31:16.489Z","avatar_url":"https://github.com/shuuuuun.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ripgrep-ruby\n\nA Ruby wrapper around [ripgrep](https://github.com/BurntSushi/ripgrep)!\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'ripgrep'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install ripgrep\n\n## Usage\n\n```ruby\nrequire 'ripgrep'\n\nrg = Ripgrep::Client.new\n\n### return the version like `rg --version`\nputs rg.version\n# =\u003e\n#    ripgrep 11.0.1\n#    -SIMD -AVX (compiled)\n#    +SIMD +AVX (runtime)\n\n### Search like `rg require lib`\nresult = rg.exec 'require', path: 'lib'\nputs result\n# =\u003e\n#    lib/ripgrep.rb:require 'ripgrep/version'\n#    lib/ripgrep.rb:require 'ripgrep/core'\n#    lib/ripgrep.rb:require 'ripgrep/client'\n#    lib/ripgrep.rb:require 'ripgrep/result'\n#    lib/ripgrep.rb:require 'ripgrep/match'\n#    lib/ripgrep/core.rb:require 'open3'\n#    lib/ripgrep/client.rb:require 'forwardable'\n\nputs result.matches.map(\u0026:to_json)\n# =\u003e\n#    {\"file\":\"lib/ripgrep.rb\",\"body\":\"require 'ripgrep/version'\",\"raw_line\":\"lib/ripgrep.rb:require 'ripgrep/version'\"}\n#    {\"file\":\"lib/ripgrep.rb\",\"body\":\"require 'ripgrep/core'\",\"raw_line\":\"lib/ripgrep.rb:require 'ripgrep/core'\"}\n#    {\"file\":\"lib/ripgrep.rb\",\"body\":\"require 'ripgrep/client'\",\"raw_line\":\"lib/ripgrep.rb:require 'ripgrep/client'\"}\n#    {\"file\":\"lib/ripgrep.rb\",\"body\":\"require 'ripgrep/result'\",\"raw_line\":\"lib/ripgrep.rb:require 'ripgrep/result'\"}\n#    {\"file\":\"lib/ripgrep.rb\",\"body\":\"require 'ripgrep/match'\",\"raw_line\":\"lib/ripgrep.rb:require 'ripgrep/match'\"}\n#    {\"file\":\"lib/ripgrep/core.rb\",\"body\":\"require 'open3'\",\"raw_line\":\"lib/ripgrep/core.rb:require 'open3'\"}\n#    {\"file\":\"lib/ripgrep/client.rb\",\"body\":\"require 'forwardable'\",\"raw_line\":\"lib/ripgrep/client.rb:require 'forwardable'\"}\n\n### Search like `rg --ignore-case ruby ripgrep.gemspec`\nresult = rg.exec 'ruby', path: 'ripgrep.gemspec', options: { ignore_case: true }\nputs result\n# =\u003e\n#     spec.summary       = \"A Ruby wrapper around ripgrep!\"\n#     spec.description   = \"A Ruby wrapper around ripgrep!\"\n#     spec.homepage      = \"https://github.com/shuuuuun/ripgrep-ruby\"\n#     # The `git ls-files -z` loads the files in the RubyGem that have been added into git.\n\n### You can use `rg` method in run block.\nrg.run do\n  result = rg '--ignore-case', 'ruby'\n  puts result\nend\n\nRipgrep.run do\n  result = rg '--ignore-case', 'ruby'\n  puts result\nend\n```\n\n## Links\n\n* Original: https://github.com/BurntSushi/ripgrep\n* GitHub: https://github.com/shuuuuun/ripgrep-ruby\n* RubyGems: https://rubygems.org/gems/ripgrep\n\n## Development\n\nAfter 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.\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/shuuuuun/ripgrep-ruby.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuuuuun%2Fripgrep-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuuuuun%2Fripgrep-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuuuuun%2Fripgrep-ruby/lists"}