{"id":20874976,"url":"https://github.com/servicestack/gistcafe-ruby","last_synced_at":"2025-10-17T01:08:57.507Z","repository":{"id":56874207,"uuid":"333095445","full_name":"ServiceStack/gistcafe-ruby","owner":"ServiceStack","description":"gist.cafe utils for Ruby","archived":false,"fork":false,"pushed_at":"2021-01-27T17:46:32.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-09T22:07:07.643Z","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/ServiceStack.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":"2021-01-26T13:35:41.000Z","updated_at":"2021-01-27T17:46:34.000Z","dependencies_parsed_at":"2022-08-20T10:11:11.491Z","dependency_job_id":null,"html_url":"https://github.com/ServiceStack/gistcafe-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ServiceStack","download_url":"https://codeload.github.com/ServiceStack/gistcafe-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243249011,"owners_count":20260768,"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-18T06:40:36.343Z","updated_at":"2025-10-17T01:08:52.462Z","avatar_url":"https://github.com/ServiceStack.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Useful utils for [gist.cafe](https://gist.cafe) Ruby Apps.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'gistcafe'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install gistcafe\n\n## Usage\n\nSimple Usage Example:\n\n```ruby\nrequire 'json'\nrequire 'net/http'\nrequire 'gistcafe'\n\norg_name = \"ruby\"\nuri = URI.parse(\"https://api.github.com/orgs/#{org_name}/repos\")\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = (uri.scheme == 'https')\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nreq = Net::HTTP::Get.new(uri.request_uri)\nreq[\"User-Agent\"] = \"gist.cafe\"\n\nres = http.request(req)\norg_repos = JSON.parse(res.body).map {|x| {\n    name:        x['name'],\n    description: x['description'],\n    url:         x['url'],\n    lang:        x['language'],\n    watchers:    x['watchers'],\n    forks:       x['forks']\n} }.sort_by { |x| -x[:watchers] }\n\nputs \"Top 3 #{org_name} GitHub Repos:\"\nInspect.print_dump(org_repos.take(3))\n\nputs \"\\nTop 10 #{org_name} GitHub Repos:\"\nInspect.print_dump_table(org_repos.take(10).map {|x| {\n    name:     x[:name],\n    lang:     x[:lang],\n    watchers: x[:watchers],\n    forks:    x[:forks],\n}})\n```\n\nWhich outputs:\n\n```\nTop 3 ruby GitHub Repos:\n[\n    {\n        name: ruby,\n        description: The Ruby Programming Language [mirror],\n        url: https://api.github.com/repos/ruby/ruby,\n        lang: Ruby,\n        watchers: 17837,\n        forks: 4736\n    },\n    {\n        name: www.ruby-lang.org,\n        description: Source of the https://www.ruby-lang.org website.,\n        url: https://api.github.com/repos/ruby/www.ruby-lang.org,\n        lang: Ruby,\n        watchers: 787,\n        forks: 531\n    },\n    {\n        name: rdoc,\n        description: RDoc produces HTML and online documentation for Ruby projects.,\n        url: https://api.github.com/repos/ruby/rdoc,\n        lang: Ruby,\n        watchers: 635,\n        forks: 377\n    }\n]\n\nTop 10 ruby GitHub Repos:\n+----------------------------------------------+\n|        name        | lang | watchers | forks |\n|----------------------------------------------|\n| ruby               | Ruby |    17837 |  4736 |\n| www.ruby-lang.org  | Ruby |      787 |   531 |\n| rdoc               | Ruby |      635 |   377 |\n| psych              | C    |      464 |   165 |\n| spec               | Ruby |      437 |   353 |\n| racc               | Yacc |      435 |    64 |\n| iconv              | C    |       48 |    16 |\n| mspec              | Ruby |       46 |    60 |\n| chkbuild           | Ruby |       38 |    18 |\n| docs.ruby-lang.org | Ruby |       34 |    18 |\n+----------------------------------------------+\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ServiceStack/gistcafe-ruby.\n\n## License\n\nThe gem is available as open source under the terms of the [BSD 2-Clause](https://github.com/ServiceStack/gistcafe-ruby/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicestack%2Fgistcafe-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fservicestack%2Fgistcafe-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicestack%2Fgistcafe-ruby/lists"}