{"id":13878430,"url":"https://github.com/warrant-dev/warrant-ruby","last_synced_at":"2025-04-13T21:13:19.583Z","repository":{"id":37851987,"uuid":"428364580","full_name":"warrant-dev/warrant-ruby","owner":"warrant-dev","description":"Ruby SDK for Warrant","archived":false,"fork":false,"pushed_at":"2024-06-03T19:09:04.000Z","size":175,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T11:38:35.497Z","etag":null,"topics":["abac","access-control","acl","attribute-based-access-control","authorization","authz","permissions","rbac","role-based-access-control","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/warrant-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-11-15T17:46:46.000Z","updated_at":"2024-06-03T19:09:07.000Z","dependencies_parsed_at":"2023-11-16T01:26:01.676Z","dependency_job_id":"f40e5c15-4eb1-4ebc-a67e-027779e8163e","html_url":"https://github.com/warrant-dev/warrant-ruby","commit_stats":{"total_commits":103,"total_committers":3,"mean_commits":"34.333333333333336","dds":"0.13592233009708743","last_synced_commit":"6a89901fac68ff73f2df767d40261e15056beb59"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrant-dev%2Fwarrant-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrant-dev%2Fwarrant-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrant-dev%2Fwarrant-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrant-dev%2Fwarrant-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warrant-dev","download_url":"https://codeload.github.com/warrant-dev/warrant-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248500262,"owners_count":21114452,"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":["abac","access-control","acl","attribute-based-access-control","authorization","authz","permissions","rbac","role-based-access-control","ruby"],"created_at":"2024-08-06T08:01:49.444Z","updated_at":"2025-04-13T21:13:19.554Z","avatar_url":"https://github.com/warrant-dev.png","language":"Ruby","readme":"# Warrant Ruby Library\n\nUse [Warrant](https://warrant.dev/) in ruby projects.\n\n[![Gem Version](https://badge.fury.io/rb/warrant.svg)](https://badge.fury.io/rb/warrant)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'warrant'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself:\n\n    $ gem install warrant\n\nYou can also build the gem from source:\n\n    $ gem build warrant.gemspec\n\n## Documentation\n\n- [Ruby API Docs](https://rubydoc.info/gems/warrant)\n- [Warrant Docs](https://docs.warrant.dev/)\n\n## Requirements\n\n- Ruby 2.3+.\n\n## Usage\n\n```ruby\nrequire 'warrant'\nWarrant.api_key = 'api_test_f5dsKVeYnVSLHGje44zAygqgqXiLJBICbFzCiAg1E='\n\n# Create a user\nWarrant::User.create(user_id: \"user123\")\n\n# Check whether user slp951 has view access to report 7asm24\nWarrant::Warrant.is_authorized?(object_type: \"report\", object_id: \"7asm24\", relation: \"viewer\", subject: { object_id: \"user\", object_id: \"slp951\" })\n```\n\n## Configuring the API and Authorize Endpoints\nThe API and Authorize endpoints the SDK makes requests to is configurable via the `Warrant.api_base` and `Warrant.authorize_endpoint` attributes:\n\n```ruby\nrequire 'warrant'\n\n# Set api and authorize endpoints to http://localhost:8000\nWarrant.api_base = 'http://localhost:8000'\nWarrant.authorize_endpoint = 'http://localhost:8000'\n```\n\n## Configuring SSL\nBy default, the SDK will attempt to use SSL when making requests to the API. This setting is configurable via the `Warrant.use_ssl` attribute:\n\n```ruby\nrequire 'warrant'\n\n# Disable ssl\nWarrant.use_ssl = false\n```\n\nWe’ve used a random API key in these code examples. Replace it with your [actual publishable API keys](https://app.warrant.dev) to\ntest this code through your own Warrant account.\n\nFor more information on how to use the Warrant API, please refer to the [Warrant API reference](https://docs.warrant.dev).\n\nNote that we may release new [minor and patch](https://semver.org/) versions of this library with small but backwards-incompatible fixes to the type declarations. These changes will not affect Warrant itself.\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarrant-dev%2Fwarrant-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarrant-dev%2Fwarrant-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarrant-dev%2Fwarrant-ruby/lists"}