{"id":15509812,"url":"https://github.com/smortex/yaml-sort","last_synced_at":"2025-04-23T02:51:33.587Z","repository":{"id":38148778,"uuid":"480219659","full_name":"smortex/yaml-sort","owner":"smortex","description":"Sort lines in YAML files in a predictable order","archived":false,"fork":false,"pushed_at":"2023-03-10T11:27:23.000Z","size":138,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-16T09:06:57.483Z","etag":null,"topics":["hiera","l10n","puppet","rails","yaml"],"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/smortex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-04-11T03:58:11.000Z","updated_at":"2023-03-08T12:58:22.000Z","dependencies_parsed_at":"2024-08-22T20:55:01.683Z","dependency_job_id":null,"html_url":"https://github.com/smortex/yaml-sort","commit_stats":{"total_commits":65,"total_committers":1,"mean_commits":65.0,"dds":0.0,"last_synced_commit":"b95006500d26382c57dcaf19d806645e6b5b2250"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smortex%2Fyaml-sort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smortex%2Fyaml-sort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smortex%2Fyaml-sort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smortex%2Fyaml-sort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smortex","download_url":"https://codeload.github.com/smortex/yaml-sort/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250360248,"owners_count":21417717,"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":["hiera","l10n","puppet","rails","yaml"],"created_at":"2024-10-02T09:44:07.543Z","updated_at":"2025-04-23T02:51:33.567Z","avatar_url":"https://github.com/smortex.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yaml-sort\n\n[![CI](https://github.com/smortex/yaml-sort/actions/workflows/ci.yaml/badge.svg)](https://github.com/smortex/yaml-sort/actions/workflows/ci.yaml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/4df28a3babe44d1a83c0/maintainability)](https://codeclimate.com/github/smortex/yaml-sort/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/4df28a3babe44d1a83c0/test_coverage)](https://codeclimate.com/github/smortex/yaml-sort/test_coverage)\n\nAn utility to manage YAML files and ensure their lines is in a predictable order.\n\nThis is mainly indended to manage [Hiera files](https://puppet.com/docs/puppet/7/hiera_intro.html) for [Puppet](https://puppet.com/) and translation files in [Ruby on Rails](https://rubyonrails.org/) applications.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add yaml-sort\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install yaml-sort\n\n## Usage\n\n```\nUsage: yaml-sort [options] [filename]\n    -i, --in-place                   Update files in-place\n    -l, --lint                       Ensure files content is sorted as expected\n```\n\n## Hiera Integration for Puppet\n\nAdd this to your Rakefile:\n\n```ruby\nrequire \"yaml/sort/tasks/puppet\"\n\nRake::Task[:lint].enhance [\"lint:hiera_data_ordering\"]\n```\n\nThis provide two new targets:\n\n```\nrake lint:hiera_data_ordering  # Check Hiera data content ordering\nrake reorder_hiera_data        # Reorder Hiera data in-place\n```\n\n## Ruby on Rails Integration\n\nAdd this to your Rakefile:\n\n```ruby\nrequire \"yaml/sort/tasks/rails\"\n\nRake::Task[:test].enhance [\"test:translations_ordering\"]\n```\n\nThis provide two new targets:\n\n```\nrake reorder_translations        # Reorder translations in-place\nrake test:translations_ordering  # Check translations content ordering\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/smortex/yaml-sort. 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/smortex/yaml-sort/blob/main/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 yaml-sort project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/smortex/yaml-sort/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmortex%2Fyaml-sort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmortex%2Fyaml-sort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmortex%2Fyaml-sort/lists"}