{"id":15048235,"url":"https://github.com/github/octofacts","last_synced_at":"2025-04-06T16:12:07.733Z","repository":{"id":25705995,"uuid":"106006325","full_name":"github/octofacts","owner":"github","description":"Automate creation and maintenance of complete fact sets for rspec-puppet tests","archived":false,"fork":false,"pushed_at":"2025-03-10T22:23:46.000Z","size":41318,"stargazers_count":29,"open_issues_count":5,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-30T14:11:18.237Z","etag":null,"topics":["puppet","rspec-puppet"],"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/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2017-10-06T13:13:39.000Z","updated_at":"2025-02-13T05:08:48.000Z","dependencies_parsed_at":"2024-01-09T00:30:58.869Z","dependency_job_id":"efd1c82f-bb41-4c57-9d60-f92f49cc217a","html_url":"https://github.com/github/octofacts","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.125,"last_synced_commit":"bd81f796bb5ab34d4763f9f0c481b3877b816c2c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Foctofacts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Foctofacts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Foctofacts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Foctofacts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/octofacts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509224,"owners_count":20950232,"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":["puppet","rspec-puppet"],"created_at":"2024-09-24T21:09:38.436Z","updated_at":"2025-04-06T16:12:07.708Z","avatar_url":"https://github.com/github.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# octofacts\n\n`octofacts` is a tool that enables Puppet developers to provide complete sets of facts for rspec-puppet tests. It works by saving facts from actual hosts as fixture files, and then presenting a straightforward programming interface to select and manipulate those facts within tests. Using nearly real-life facts is a good way to ensure that rspec-puppet tests match production as closely as possible.\n\n`octofacts` is actively used in production at [GitHub](https://github.com). This project is actively maintained by the original authors and the rest of the Site Reliability Engineering team at GitHub.\n\n## Overview\n\nThe `octofacts` project is distributed with two components:\n\n- The `octofacts` gem is called within your rspec-puppet tests, to provide facts from indexed fact fixture files in your repository. This allows you to replace a hard-coded `let (:facts) { ... }` hash with more realistic facts from recent production runs.\n\n- The `octofacts-updater` gem is a utility to maintain the indexed fact fixture files consumed by `octofacts`. It pulls facts from a data source (e.g. PuppetDB, fact caches, or SSH), indexes your facts, and can even create Pull Requests on GitHub to update those fixture files for you.\n\n## Requirements\n\nTo use `octofacts` in your rspec-puppet tests, those tests must be executed with Ruby 2.1 or higher and rspec-puppet 2.3.2 or higher, and executed on a Unix-like operating system. We explicitly test `octofacts` with Linux and Mac OS, but do not test under Windows.\n\nTo use `octofacts-updater`, we recommend using PuppetDB, and if you do you'll need version 3.0 or higher.\n\n## Example\n\nOnce you complete the initial setup and generate fact fixtures, you'll be able to use code like this in your rspec-puppet tests:\n\n```\ndescribe \"modulename::classname\" do\n  let(:node) { \"fake-node.example.net\" }\n  let(:facts) { Octofacts.from_index(app: \"my_app_name\", role: \"my_role_name\") }\n\n  it \"should do whatever...\"\n    ...\n  end\nend\n```\n\n## Installation and use\n\nThe basics:\n\n- [Quick start tutorial - covers installation and basic configuration](/doc/tutorial.md) \u003c-- **New users start here**\n- [Automating fixture generation with octofacts-updater](/doc/octofacts-updater.md)\n\nMore advanced usage:\n\n- [Plugin reference for octofacts-updater](/doc/plugin-reference.md)\n- [Using manipulators to adjust fact values](/doc/manipulators.md)\n- [Additional examples of octofacts capabilities](/doc/more-examples.md)\n\n## Contributing\n\nPlease see our [contributing document](CONTRIBUTING.md) if you would like to participate!\n\nWe would specifically appreciate contributions in these areas:\n\n- Any updates you make to make octofacts compatible with your site -- there are probably assumptions made from the original environment that need to be more flexible.\n- Any interesting anonymization plugins you write for octofacts-updater -- you may place these in the [contrib/plugins](/contrib/plugins) directory.\n\n## Getting help\n\nIf you have a problem or suggestion, please [open an issue](https://github.com/github/octofacts/issues/new) in this repository, and we will do our best to help. Please note that this project adheres to its [Code of Conduct](/CODE_OF_CONDUCT.md).\n\n## License\n\n`octofacts` is licensed under the [MIT license](/LICENSE).\n\n## Authors\n\n- [@antonio - Antonio Santos](https://github.com/antonio)\n- [@kpaulisse - Kevin Paulisse](https://github.com/kpaulisse)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Foctofacts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Foctofacts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Foctofacts/lists"}