{"id":24529272,"url":"https://github.com/opencomponents/ruby-oc","last_synced_at":"2025-03-15T17:46:05.973Z","repository":{"id":34172190,"uuid":"38019414","full_name":"opencomponents/ruby-oc","owner":"opencomponents","description":"OpenComponents for Ruby","archived":false,"fork":false,"pushed_at":"2016-03-07T03:37:19.000Z","size":41,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-04-20T13:56:33.180Z","etag":null,"topics":[],"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/opencomponents.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-25T00:56:02.000Z","updated_at":"2019-12-12T12:27:56.000Z","dependencies_parsed_at":"2022-09-03T11:01:06.506Z","dependency_job_id":null,"html_url":"https://github.com/opencomponents/ruby-oc","commit_stats":null,"previous_names":["opentable/ruby-oc"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Fruby-oc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Fruby-oc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Fruby-oc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Fruby-oc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencomponents","download_url":"https://codeload.github.com/opencomponents/ruby-oc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243769949,"owners_count":20345215,"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":[],"created_at":"2025-01-22T07:35:42.678Z","updated_at":"2025-03-15T17:46:05.944Z","avatar_url":"https://github.com/opencomponents.png","language":"Ruby","readme":"# opencomponents\n[![Build Status](https://travis-ci.org/opentable/ruby-oc.svg?branch=master)][1]\n[![Coverage Status](https://coveralls.io/repos/opentable/ruby-oc/badge.svg)][2]\n[![Code Climate](https://codeclimate.com/github/opentable/ruby-oc/badges/gpa.svg)][3]\n[![Gem Version](https://badge.fury.io/rb/opencomponents.svg)][4]\n[![Dependency Status](https://gemnasium.com/opentable/ruby-oc.svg)][5]\n\n[1]:https://travis-ci.org/opentable/ruby-oc\n[2]:https://coveralls.io/r/opentable/ruby-oc\n[3]:https://codeclimate.com/github/opentable/ruby-oc\n[4]:http://badge.fury.io/rb/opencomponents\n[5]:https://gemnasium.com/opentable/ruby-oc\n\n[OpenComponents][6] for Ruby\n\n[6]:https://github.com/opentable/oc\n\n## Important\nThis gem is still under heavy development and the API is likely to change at any\ntime.\n\n## Getting Started\nAdd the gem to your Gemfile and run `bundle install`:\n```ruby\ngem 'opencomponents', '~\u003e 0.4.0'\n```\n\nBy default, the gem will attempt to use a component registry located at\n`http://localhost:3030`.\nIf you want to use a different registry, you can configure OpenComponents to use\nit with:\n```ruby\nOpenComponents.configure { |config| config.registry = 'http://some.other.host' }\n```\n\n## Getting Rendered Components\nTo request an OpenComponent with its rendered HTML, you can create and load a new\n`RenderedComponent` object.\n```ruby\ncomponent = OpenComponents::RenderedComponent.new('my-awesome-component')\ncomponent.load\n```\n\nOptionally, you can also specify parameters, the component version, and\nadditional HTTP headers to request:\n```ruby\ncomponent = OpenComponents::RenderedComponent.new(\n  'my-awesome-component',\n  params: {name: 'Kate'},\n  version: '1.0.2',\n  headers: {accept_language: 'emoji'}\n)\n```\n\n## Getting Unrendered Components\nIf you'd like to perform the component rendering yourself, you can request an\nunrendered component from a registry using a `UnrenderedComponent` object.\n```ruby\ncomponent = OpenComponents::UnrenderedComponent.new('my-awesome-component')\ncomponent.load\n```\n\nYou can use the same optional `params`, `version`, and `headers` arguments as\n`RenderedComponent`s.\n\n**Note**: `UnrenderedComponent`s will only fetch component data for you - they\ndo not provide an interface for rendering them. At the moment, it's up to you to\ndetermine the best way to render the template.\n\n## Integrations\nIndividual integrations for rendering components in Rails and Sinatra are\navailable.\n  * [opencomponents-rails][7]\n  * [sinatra-opencomponents][8]\n\n[7]:https://github.com/opentable/opencomponents-rails\n[8]:https://github.com/opentable/sinatra-opencomponents\n\n## Contributing\nWould be rad. Open a PR or Issue if you have an idea for improvements.\n\n## License\nCopyright 2015 OpenTable. See LICENSE for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomponents%2Fruby-oc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencomponents%2Fruby-oc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomponents%2Fruby-oc/lists"}