{"id":19136835,"url":"https://github.com/mdub/config_hound","last_synced_at":"2025-05-06T20:09:36.503Z","repository":{"id":27717749,"uuid":"31204931","full_name":"mdub/config_hound","owner":"mdub","description":"Sniffs out config, wherever it may be","archived":false,"fork":false,"pushed_at":"2023-03-03T00:45:25.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T14:57:35.390Z","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/mdub.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":"2015-02-23T11:15:08.000Z","updated_at":"2023-06-04T04:18:06.000Z","dependencies_parsed_at":"2024-11-09T06:35:51.189Z","dependency_job_id":null,"html_url":"https://github.com/mdub/config_hound","commit_stats":{"total_commits":88,"total_committers":8,"mean_commits":11.0,"dds":"0.20454545454545459","last_synced_commit":"96072d20cd4c2de8797c6067fd13e9b296b4e6bd"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdub%2Fconfig_hound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdub%2Fconfig_hound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdub%2Fconfig_hound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdub%2Fconfig_hound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdub","download_url":"https://codeload.github.com/mdub/config_hound/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252761223,"owners_count":21800125,"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-09T06:35:39.465Z","updated_at":"2025-05-06T20:09:36.455Z","avatar_url":"https://github.com/mdub.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfigHound\n\n[![Gem Version](https://badge.fury.io/rb/config_hound.svg)](http://badge.fury.io/rb/config_hound)\n[![Build Status](https://github.com/mdub/config_hound/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/mdub/config_hound/actions/workflows/test.yaml)\n\nConfigHound makes it easy to load configuration data.\n\n## Usage\n\n`ConfigHound.load` supports config in JSON, YAML or TOML formats, and returns raw Ruby data.\n\n```ruby\nconfig = ConfigHound.load(\"config.yml\")   # or \"config.{json,toml}\"\n```\n\n## Remote config\n\nAs well as local files, you can load from any URI supported by `OpenURI`, e.g.\n\n```ruby\n# load over HTTP\nConfigHound.load(\"http://config-source/app-config.yml\")\n\n# load from S3\nrequire \"open-uri-s3\"\nconfig = ConfigHound.load(\"s3://config-bucket/app-config.json\")\n```\n\n## Multiple sources of config\n\nIf you specify a list of config sources, ConfigHound will load them all, and deep-merge the data. Files specified earlier in the list take precedence.\n\n```ruby\nConfigHound.load([\"config.yml\", \"defaults.yml\"])\n```\n\nYou can include raw data (Hashes) in the list, too, which is handy if you have defaults or overrides already in Ruby format.\n\n```ruby\noverrides = { ... }\nConfigHound.load([overrides, \"config.yml\"])\n```\n\n## Inclusion\n\nYou can also \"include\" other file (or URIs) from _within_ a config file.\nJust list the paths under the key `_include`.\n\nFor example, in `config.yml`:\n\n```yaml\npool:\n  size: 10\nlog:\n  file: \"app.log\"\n_include:\n  - defaults.yml\n```\n\nthen in `defaults.yml`\n\n  ```yaml\nlog:\n  level: INFO\npool:\n  size: 1\n```\n\nValues in the original config file take precedence over those from included files.\nMultiple levels of inclusion are possible.\n\nIf the placeholder \"`_include`\" doesn't suit, you can specify\nanother, e.g.\n\n```ruby\nconfig = ConfigHound.load(\"config.yml\", :include_key =\u003e \"defaults\")\n```\n\n## Reference expansion\n\nConfigHound can expand references of the form `\u003c(X.Y.Z)\u003e` in config values, which can help DRY up configuration, e.g.\n\n```yaml\nname: myapp\naws:\n  region: us-west-1\nlog:\n  stream: \u003c(name)\u003e-logs-\u003c(aws.region)\u003e\n```\n\nEnable reference expansion with the `:expand_refs` option.\n\n```ruby\nConfigHound.load(config_files, :expand_refs =\u003e true)\n```\n\nReference expansion is performed _after_ all config is loaded and merged, so you can reference config specified in other files.\n\n## Contributing\n\nIt's on GitHub; you know the drill.\n\n## See also\n\nConfigHound works well with:\n\n* [ConfigMapper](https://github.com/mdub/config_mapper)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdub%2Fconfig_hound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdub%2Fconfig_hound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdub%2Fconfig_hound/lists"}