{"id":30047449,"url":"https://github.com/heyvito/patchyaml","last_synced_at":"2025-08-12T15:03:19.325Z","repository":{"id":308380411,"uuid":"1032687046","full_name":"heyvito/patchyaml","owner":"heyvito","description":"Ruby Library for patching YAML files","archived":false,"fork":false,"pushed_at":"2025-08-05T17:10:45.000Z","size":0,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-05T17:26:07.447Z","etag":null,"topics":["ruby","yaml","yaml-editor"],"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/heyvito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2025-08-05T17:07:53.000Z","updated_at":"2025-08-05T17:18:57.000Z","dependencies_parsed_at":"2025-08-05T17:39:22.264Z","dependency_job_id":null,"html_url":"https://github.com/heyvito/patchyaml","commit_stats":null,"previous_names":["heyvito/patchyaml"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/heyvito/patchyaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyvito%2Fpatchyaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyvito%2Fpatchyaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyvito%2Fpatchyaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyvito%2Fpatchyaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heyvito","download_url":"https://codeload.github.com/heyvito/patchyaml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyvito%2Fpatchyaml/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269236688,"owners_count":24383237,"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-08-07T02:00:09.698Z","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":["ruby","yaml","yaml-editor"],"created_at":"2025-08-07T09:50:43.964Z","updated_at":"2025-08-07T09:50:48.206Z","avatar_url":"https://github.com/heyvito.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PatchYAML\n\nPatchYAML is an utility library for patching YAML while optimistically keeping\nthe original document formatting.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```bash\nbundle add patchyaml\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n```bash\ngem install patchyaml\n```\n\n## Usage\n\nThe exposed interface is intentionally minimal. The library provide the methods\n`delete`, `update`, `map_rename`, `map_add`, and `seq_add`, obtaining the\nresulting changes through the `yaml` method. For instance:\n\n```ruby\nrequire 'patchyaml'\n\neditor = PatchYAML.load(\u003c\u003c~YAML)\n    mapping:\n      a:\n        sequence:\n          - name: a\n          - name: b\n          - name: c\n          - name: d\n            otherValue: hello\n      b: foo\n      c: true\n      d: [1, 2, 3, 4, foo, bar, hello]\n    d: 1\n    empty:\n    e: { a: 1, b: 2, c: 3 }\n    f: [1, 2, 3, 4, hello]\n    g: {}\n    h: []\nYAML\n\neditor\n  .delete(\"mapping.a.sequence.1\")\n  .update(\"mapping.a.sequence.3.otherValue\", \"henlo\")\n  .map_rename(\"mapping.b\", to: \"test\")\n  .map_add(\"mapping.a\", \"e\", \"some value\")\n  .seq_add(\"f\", 123)\n\nputs editor.yaml\n# mapping:\n#   a:\n#     sequence:\n#       - name: b\n#       - name: c\n#       - name: d\n#         otherValue: henlo\n#   b: test\n#   c: true\n#   d: [1, 2, 3, 4, foo, bar, hello]\n#   e: some value\n# d: 1\n# empty:\n# e: { a: 1, b: 2, c: 3 }\n# f: [1, 2, 3, 4, hello, 123]\n# g: {}\n# h: []\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 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/heyvito/patchyaml. 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/heyvito/patchyaml/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Patchyaml project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/heyvito/patchyaml/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheyvito%2Fpatchyaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheyvito%2Fpatchyaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheyvito%2Fpatchyaml/lists"}