{"id":19351685,"url":"https://github.com/operable/cog-rb","last_synced_at":"2025-04-23T07:31:05.624Z","repository":{"id":62555976,"uuid":"59513565","full_name":"operable/cog-rb","owner":"operable","description":"Simple, opinionated library for building Cog bundles in Ruby","archived":false,"fork":false,"pushed_at":"2017-02-21T20:25:02.000Z","size":64,"stargazers_count":6,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T19:56:44.815Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/operable.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.MD","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-23T19:47:19.000Z","updated_at":"2018-02-02T07:47:43.000Z","dependencies_parsed_at":"2022-11-03T05:31:24.591Z","dependency_job_id":null,"html_url":"https://github.com/operable/cog-rb","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/operable","download_url":"https://codeload.github.com/operable/cog-rb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250391129,"owners_count":21422846,"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":"2024-11-10T04:36:57.077Z","updated_at":"2025-04-23T07:31:05.293Z","avatar_url":"https://github.com/operable.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cog-rb\n\nSimple, opinionated library for building Cog commands in Ruby.\n\n## Usage\n\nFirst, create a file named `cog-command` at the top level of your project directory. This file should look something like the following, with `format` replaced with the name of your bundle:\n\n```ruby\n#!/usr/bin/env ruby\n\n# Make sure we're in the top-level directory for the command\n# since so many paths are relative.\nDir.chdir(File.dirname(__FILE__))\n\nrequire 'bundler/setup'\nrequire 'cog'\n\nCog.bundle('format')\n```\n\nThis file will be the target `executable` for every command in your bundle. The library handles routing commands to the correct class based on the command name. Note: The permissions on this file must allow it to be run by your Relay.\n\nThe class that implements your command should be named the same as your command and should be declared in a namespace named after your bundle within the `CogCmd` toplevel namespace. For instance, if you had a bundle named **test** and a command named **dump**, the class that implements the **dump** command would be called `CogCmd::Test::Dump`. The implementation for the command would live in `lib/cog_cmd/test/dump.rb` relative to the location of your `cog-command` script.\n\n## Examples\n\nSee the [cog-bundles/format](https://github.com/cog-bundles/format) repository for an example of this library in action.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'cog-rb'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install cog-rb\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperable%2Fcog-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foperable%2Fcog-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperable%2Fcog-rb/lists"}