{"id":15405165,"url":"https://github.com/fnando/info","last_synced_at":"2025-04-16T22:50:16.052Z","repository":{"id":20716254,"uuid":"24000275","full_name":"fnando/info","owner":"fnando","description":"Make your Rails app info available through a JSON endpoint.","archived":false,"fork":false,"pushed_at":"2016-03-30T11:16:14.000Z","size":77,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T05:41:45.152Z","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/fnando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-13T17:06:55.000Z","updated_at":"2017-01-31T11:54:17.000Z","dependencies_parsed_at":"2022-09-19T01:00:53.881Z","dependency_job_id":null,"html_url":"https://github.com/fnando/info","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Finfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Finfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Finfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Finfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnando","download_url":"https://codeload.github.com/fnando/info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844004,"owners_count":21170500,"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-10-01T16:15:17.224Z","updated_at":"2025-04-16T22:50:16.028Z","avatar_url":"https://github.com/fnando.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Info\n\n[![Build Status](https://travis-ci.org/fnando/info.svg)](https://travis-ci.org/fnando/info)\n[![Code Climate](https://codeclimate.com/github/fnando/info.png)](https://codeclimate.com/github/fnando/info)\n\nInfo a library that allows you collecting info about your application in a simple JSON endpoint.\n\n![Info endpoint](https://raw.githubusercontent.com/fnando/info/master/screenshot.png)\n\n## Installation\n\nJust the following line to your Gemfile:\n\n```ruby\ngem \"info\"\n```\n\nNow, create a initializer at `config/initializers/info.rb` with the following content:\n\n```ruby\nInfo.setup do\n  enable!\nend\n```\n\nRead more about authorization and how to add collectors below.\n\n## Usage\n\nTo add your own collectors, just use the method `Info::Configuration#add`.\n\n```ruby\nInfo.setup do\n  add \"Rails\", Rails.version\nend\n```\n\nYou can also use `Info.add \"Rails\", Rails.version`.\n\nInfo comes with some default information; just load the `info/rails` file. You can do it on a initializer file (`config/initializers/info.rb`) or your Gemfile.\n\n```ruby\ngem \"info\", require: \"info/rails\"\n```\n\nAll Rubygems that your app is using can be collected by loading the file `info/rubygems`.\n\nYou may need to clear all collectors; in this case just use `Info.collectors.clear`.\n\nTo view your collected info, just visit `/application/info`. This endpoint is public, so you can set authorization with two strategies: token and basic auth.\n\n### Authorization\n\nTo authorize the endpoint access with basic authentication, just provide a block that requires two arguments.\n\n```ruby\nInfo.setup do\n  authorize {|email, password| AdminUser.find_by_email(email).authenticate(password) }\nend\n```\n\nTo authorize the endpoint access with token authentication, just provide a block that requires one argument.\n\n```ruby\nInfo.setup do\n  authorize {|token| AdminUser.find_by_token(token).present? }\nend\n```\n\nYou can also use `Info.authorize(\u0026block)`.\n\n## Maintainer\n\n* Nando Vieira (\u003chttp://nandovieira.com\u003e)\n\n## License:\n\n(The MIT License)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Finfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnando%2Finfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Finfo/lists"}