{"id":30191063,"url":"https://github.com/delano/uri-valkey","last_synced_at":"2025-08-24T15:08:00.701Z","repository":{"id":927464,"uuid":"694689","full_name":"delano/uri-valkey","owner":"delano","description":"URI support for Valkey/Redis connection settings","archived":false,"fork":false,"pushed_at":"2025-08-12T00:15:39.000Z","size":133,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-12T20:54:36.020Z","etag":null,"topics":["dev","redis","ruby","valkey"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/uri-valkey","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/delano.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-05-31T00:16:57.000Z","updated_at":"2025-07-26T09:40:29.000Z","dependencies_parsed_at":"2024-05-03T02:50:20.338Z","dependency_job_id":"fc496fc2-4d90-4c91-83f6-0019e8fdfce3","html_url":"https://github.com/delano/uri-valkey","commit_stats":{"total_commits":24,"total_committers":4,"mean_commits":6.0,"dds":0.5,"last_synced_commit":"7c2c6a7a8e25ea8e7ff161b51810b5c8dc3b74a6"},"previous_names":["delano/uri-valkey"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/delano/uri-valkey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delano%2Furi-valkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delano%2Furi-valkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delano%2Furi-valkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delano%2Furi-valkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delano","download_url":"https://codeload.github.com/delano/uri-valkey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delano%2Furi-valkey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271895129,"owners_count":24840090,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dev","redis","ruby","valkey"],"created_at":"2025-08-12T20:41:25.251Z","updated_at":"2025-08-24T15:08:00.693Z","avatar_url":"https://github.com/delano.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URI-Valkey\n\nCreates URI objects for Valkey URLs, with support for parsing connection strings and extracting configuration parameters.\n\n## Supported URI Formats\n\n    valkey://host:port/dbindex\n    valkeys://host:port/dbindex   # SSL\n    redis://host:port/dbindex     # Cross-scheme compatibility\n    rediss://host:port/dbindex    # Cross-scheme compatibility (SSL)\n\n## Installation\n\n* `gem install uri-valkey`\n* `git clone git@github.com:delano/uri-valkey.git`\n\n## Usage\n\n```ruby\nrequire 'uri-valkey'  # or require 'uri_valkey'\n\nconf = URI.parse 'valkey://localhost:6379/0'\nconf.scheme               # =\u003e \"valkey\"\nconf.host                 # =\u003e \"localhost\"\nconf.port                 # =\u003e 6379\nconf.db                   # =\u003e 0\nconf.to_s                 # =\u003e \"valkey://localhost:6379/0\"\n\n# Access configuration hash\nconf.conf                 # =\u003e {:host=\u003e\"localhost\", :port=\u003e6379, :db=\u003e0, :ssl=\u003efalse}\n```\n\n### SSL Support\n\nSSL is supported by using the `valkeys` scheme:\n\n```ruby\nconf = URI.parse 'valkeys://localhost:6379/0'\nconf.scheme               # =\u003e \"valkeys\"\nconf.conf[:ssl]           # =\u003e true\n```\n\n### Working with Keys\n\nThe URI class supports parsing and manipulating Valkey keys:\n\n```ruby\nuri = URI.parse 'valkey://localhost:6379/2/mykey:namespace'\nuri.db                    # =\u003e 2\nuri.key                   # =\u003e \"mykey:namespace\"\n\n# Modify the key\nuri.key = 'newkey:value'\nuri.to_s                  # =\u003e \"valkey://localhost:6379/2/newkey:value\"\n\n# Modify the database\nuri.db = 5\nuri.to_s                  # =\u003e \"valkey://localhost:6379/5/newkey:value\"\n```\n\n### Building URIs\n\n```ruby\nuri = URI::Valkey.build(host: \"localhost\", port: 6379, db: 2, key: \"v1:arbitrary:key\")\nuri.to_s                  # =\u003e \"valkey://localhost:6379/2/v1:arbitrary:key\"\n```\n\n### Query Parameters\n\nQuery parameters are supported for additional configuration:\n\n```ruby\nuri = URI.parse \"valkey://127.0.0.1/6/?timeout=5\u0026retries=3\"\nuri.conf                  # =\u003e {:db=\u003e6, :timeout=\u003e5, :retries=\u003e\"3\", :host=\u003e\"127.0.0.1\", :port=\u003e6379, :ssl=\u003efalse}\n```\n\n## Cross-Scheme Compatibility\n\nBoth gems support each other's URL schemes for maximum flexibility:\n\n```ruby\n# Valkey gem can parse Redis URLs\nredis_uri = URI.parse 'redis://localhost:6379/0'\nredis_uri.scheme          # =\u003e \"redis\"\nredis_uri.conf            # =\u003e {:host=\u003e\"localhost\", :port=\u003e6379, :db=\u003e0, :ssl=\u003efalse}\n\n# SSL schemes work cross-platform\nssl_uri = URI.parse 'rediss://localhost:6379/0'\nssl_uri.conf[:ssl]        # =\u003e true\n```\n\n## URI-Redis\n\nA `uri-redis` gem is also available with identical functionality for Redis URLs, including support for `valkey://` and `valkeys://` schemes:\n\n```ruby\nrequire 'uri-redis'\n\nconf = URI.parse 'redis://localhost:6379/0'\nconf.scheme               # =\u003e \"redis\"\nconf.conf                 # =\u003e {:host=\u003e\"localhost\", :port=\u003e6379, :db=\u003e0, :ssl=\u003efalse}\n```\n\n### Redis Client Integration\n\nIf you have the `redis` gem installed, URI-Redis provides a refinement to add URI support directly to Redis client instances:\n\n```ruby\nrequire 'uri-redis'\n\n# Enable the refinement in your scope\nusing RedisURIRefinement\n\nredis = Redis.new(url: 'redis://localhost:6379/2')\nredis.uri                 # Returns URI object for the Redis client's connection\n\n# Class method for generating URIs from configuration\nRedis.uri(host: 'localhost', port: 6379, db: 2, ssl: true)\n# =\u003e URI object for \"rediss://localhost:6379/2\"\n```\n\n**Note:** The refinement is only available when the `redis` gem is loaded and only works within scopes where `using RedisURIRefinement` has been called.\n\n## About\n\n* [Github](https://github.com/delano/uri-valkey)\n\n## License\n\nSee LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelano%2Furi-valkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelano%2Furi-valkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelano%2Furi-valkey/lists"}