{"id":15046122,"url":"https://github.com/joe-noh/yaml_ref_resolver","last_synced_at":"2025-10-26T02:31:14.744Z","repository":{"id":16423611,"uuid":"79916152","full_name":"Joe-noh/yaml_ref_resolver","owner":"Joe-noh","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-16T04:40:46.000Z","size":46,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T13:43:38.848Z","etag":null,"topics":["yaml"],"latest_commit_sha":null,"homepage":null,"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/Joe-noh.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}},"created_at":"2017-01-24T13:57:06.000Z","updated_at":"2021-12-21T12:36:10.000Z","dependencies_parsed_at":"2022-07-25T04:46:19.388Z","dependency_job_id":null,"html_url":"https://github.com/Joe-noh/yaml_ref_resolver","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joe-noh%2Fyaml_ref_resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joe-noh%2Fyaml_ref_resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joe-noh%2Fyaml_ref_resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joe-noh%2Fyaml_ref_resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Joe-noh","download_url":"https://codeload.github.com/Joe-noh/yaml_ref_resolver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238247984,"owners_count":19440879,"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":["yaml"],"created_at":"2024-09-24T20:52:44.274Z","updated_at":"2025-10-26T02:31:14.446Z","avatar_url":"https://github.com/Joe-noh.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YamlRefResolver\n\n[![Gem Version](https://badge.fury.io/rb/yaml_ref_resolver.svg)](https://badge.fury.io/rb/yaml_ref_resolver)\n![Test](https://github.com/Joe-noh/yaml_ref_resolver/workflows/Run%20rake%20test/badge.svg)\n\nThis is a gem that resolves and expands `$ref` references to other YAML files.\n\n## Installation\n\nJust add this line to your application's Gemfile and run `bundle install`.\n\n```ruby\ngem 'yaml_ref_resolver'\n```\n\n## Usage\n\nAssume that we have following yaml files.\n\n```yaml\n# index.yaml\nauthor:\n  $ref: './john.yaml#/profile'\n```\n\n```yaml\n# john.yaml\nprofile:\n  name: John\n  age: 28\n```\n\nThis gem resolves `$ref` references.\n\n```ruby\nresolver = YamlRefResolver.new\n\nhash = resolver.resolve!('index.yaml')\n#=\u003e {'author' =\u003e {'name' =\u003e \"john\", 'age' =\u003e 28}}\n```\n\nOptionally you can specify the key.\n\n```ruby\nresolver = YamlRefResolver.new(key: '$import')\n```\n\n### CLI\n\nGive an entry point yaml with `-i` or `--input` option.\n\n```console\n$ yaml_ref_resolver -i ./path/to/index.yaml\n\n# dump to stdout\n```\n\nOptionally output file path with `-o` or `--output` can be given.\n\n```console\n$ yaml_ref_resolver -i ./path/to/index.yaml -o ./path/to/output.yaml\n```\n\n`-w` or `--watch` option watches referenced yaml files and dump whole resolved yaml when one of them changed.\n\n```console\n$ yaml_ref_resolver -i ./path/to/index.yaml -w\n```\n\n`-j` or `--json` switch outputs in json format instead of yaml format.\n\n```\n$ yaml_ref_resolver -i ./path/to/index.yaml -j\n```\n\n## Contributing\n\nBug reports and pull requests are very welcome on GitHub at https://github.com/Joe-noh/yaml_ref_resolver.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoe-noh%2Fyaml_ref_resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoe-noh%2Fyaml_ref_resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoe-noh%2Fyaml_ref_resolver/lists"}