{"id":21991957,"url":"https://github.com/elct9620/liveness","last_synced_at":"2025-09-23T10:18:24.836Z","repository":{"id":39678498,"uuid":"449197149","full_name":"elct9620/liveness","owner":"elct9620","description":"The Rack middleware to provide health check endpoints.","archived":false,"fork":false,"pushed_at":"2023-03-16T00:54:15.000Z","size":71,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-05T12:01:11.269Z","etag":null,"topics":["rack","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elct9620.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-01-18T08:15:13.000Z","updated_at":"2024-04-17T07:49:03.000Z","dependencies_parsed_at":"2024-08-05T18:35:23.031Z","dependency_job_id":null,"html_url":"https://github.com/elct9620/liveness","commit_stats":{"total_commits":40,"total_committers":2,"mean_commits":20.0,"dds":0.09999999999999998,"last_synced_commit":"23ff3f98f349138d26a7210f78bf1c64f7b045f0"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/elct9620/liveness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fliveness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fliveness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fliveness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fliveness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elct9620","download_url":"https://codeload.github.com/elct9620/liveness/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fliveness/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276556565,"owners_count":25663484,"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","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["rack","rails","ruby"],"created_at":"2024-11-29T20:12:19.907Z","updated_at":"2025-09-23T10:18:24.784Z","avatar_url":"https://github.com/elct9620.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Liveness [![Ruby](https://github.com/elct9620/liveness/actions/workflows/main.yml/badge.svg)](https://github.com/elct9620/liveness/actions/workflows/main.yml)\n===\n\nThe Rack middleware to provide health check endpoints.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'liveness'\n```\n\n## Usage\n\nConfiguration the Liveness to add dependency.\n\n```ruby\nLiveness.config do |c|\n  c.add :postgres, timeout: 10\nend\n```\n\n### Named Dependency\n\n```ruby\nLiveness.config do |c|\n  c.add :postgres, name: :primary_db, timeout: 10\n  c.add :postgres, name: :read_replica, timeout: 10\nend\n```\n### Access Protected\n\n```ruby\nLiveness.config do |c|\n  c.token = 'unm@tnh8ugq-WAR-myr'\nend\n```\n\nTo access the status endpoint should add `?token=unm@tnh8ugq-WAR-myr` params to access it.\n\n```ruby\nLiveness.config do |c|\n  c.ip_whitelist = ['192.168.0.0/24']\nend\n```\n\nTo access the status endpoint should called from `127.0.0.1` or `::1` or under `192.168.0.0/24`.\n\n### Customize Connector\n\n```ruby\nLiveness.config do |c|\n  c.add :redis, timeout: 10 do\n    Redis.new(url: 'redis://example:6379/15')\n  end\nend\n```\n\n### Rails Application\n\nMount the `Liveness::Status` to `config/routes.rb`\n\n```ruby\nRails.application.routes.draw do\n  # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html\n\n  mount Liveness::Status =\u003e '/health'\nend\n```\n\n## Dependency Providers\n\n| Name       | Description                                           |\n|------------|-------------------------------------------------------|\n| `postgres` | The PostgreSQL adapter which for `ActiveRecord::Base` |\n| `mysql`    | The MySQL adapter which for `ActiveRecord::Base`      |\n| `redis`    | Test Redis via `redis-rb` gem via `#ping` method      |\n\n## Roadmap\n\n* [x] Status Endpoint\n* [ ] Metrics Endpoint (for single dependency)\n* [ ] Dependency Provider\n  * [ ] PostgreSQL\n    * [x] ActiveRecord\n    * [ ] Sequel\n  * [ ] MySQL\n    * [x] ActiveRecord\n    * [ ] Sequel\n  * [x] Redis\n  * [ ] HTTP Endpoint\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 the created tag, 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/elct9620/liveness. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/elct9620/liveness/blob/main/CODE_OF_CONDUCT.md).\n\n## Code of Conduct\n\nEveryone interacting in the Liveness project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/elct9620/liveness/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felct9620%2Fliveness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felct9620%2Fliveness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felct9620%2Fliveness/lists"}