{"id":13928913,"url":"https://github.com/paviliondev/discourse_subscription_client","last_synced_at":"2025-07-19T10:32:16.134Z","repository":{"id":67881368,"uuid":"604285332","full_name":"paviliondev/discourse_subscription_client","owner":"paviliondev","description":"Subscription client gem for Discourse plugins.","archived":false,"fork":false,"pushed_at":"2024-10-24T11:08:08.000Z","size":153,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-25T04:49:55.128Z","etag":null,"topics":["discourse","discourse-plugin","gem"],"latest_commit_sha":null,"homepage":"https://pavilion.tech","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paviliondev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-20T18:21:25.000Z","updated_at":"2024-10-24T11:08:02.000Z","dependencies_parsed_at":"2024-10-18T07:02:31.662Z","dependency_job_id":null,"html_url":"https://github.com/paviliondev/discourse_subscription_client","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"679107215a0d45c13ef1ab805163b351a11286f5"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paviliondev%2Fdiscourse_subscription_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paviliondev%2Fdiscourse_subscription_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paviliondev%2Fdiscourse_subscription_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paviliondev%2Fdiscourse_subscription_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paviliondev","download_url":"https://codeload.github.com/paviliondev/discourse_subscription_client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226588866,"owners_count":17655798,"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":["discourse","discourse-plugin","gem"],"created_at":"2024-08-07T18:01:59.391Z","updated_at":"2024-11-26T17:31:08.600Z","avatar_url":"https://github.com/paviliondev.png","language":"Ruby","readme":"# Discourse Subscription Client Gem\nThis gem is only for use with Discourse plugins. It provides subscription client support to a Discourse plugin, primarily for use with the Discourse Subscription Server plugin.\n\n## Installation\nAdd this line to your plugin's `plugin.rb` file\n\n```ruby\ngem \"discourse_subscription_client\", \"0.1.0.pre11\", require_name: \"discourse_subscription_client\"\n```\n\n## Usage\n\nThe gem API is accessible through the `DiscourseSubscriptionClient` class. Supported methods are described below.\n\n### find_subscriptions\n\n```ruby\nDiscourseSubscriptionClient.find_subscriptions(resource_name)\n```\n\n#### Arguments\n\n##### resource_name\n\nThe name of a resource defined in the `discourse-subscription-server` plugin's `subscription_server_subscriptions` setting.\n\n#### Returns\n\nReturns a `DiscourseSubscriptionClient::Subscriptions::Result` object, containing the supplier, resource and any active subscriptions.\n\n#### Example\n\n```ruby\nresult = DiscourseSubscriptionClient.find_subscriptions(\"discourse-custom-wizard\")\nresult.supplier # \u003cDiscourseSubscriptionSupplier name=\"Pavilion\" ...\u003e\nresult.resource # \u003cDiscourseSubscriptionResource name=\"discourse-custom-wizard\" ...\u003e\nresult.subscriptions # [\u003cDiscourseSubscriptionSubscription product_name=\"Business\" ...\u003e]\n```\n\n## Development\n\n### Tests\nThe gem has to create a dummy Discourse environment when running specs, so there are a few testing quirks.\n\nDiscourse migrations go in `db/migrate` as normal. They are including in the rails migrations_paths in `lib/discourse_subscription_client/engine.rb`.\n\nIf you add new migrations, run test migrations as normal (from the root of the gem)\n\n```\nRAILS_ENV=test rake db:drop db:create db:migrate\n```\n\nIf you're not adding new migrations you only need to load the schema. If you are running migrations you need to also load the schema (in addition to running the migrations)\n\n```\nRAILS_ENV=test bundle exec rake db:schema:load\n```\n\n## License\nThe gem is available as open source under the terms of the [GNU GPL v2 License](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).\n","funding_links":[],"categories":["others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaviliondev%2Fdiscourse_subscription_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaviliondev%2Fdiscourse_subscription_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaviliondev%2Fdiscourse_subscription_client/lists"}