{"id":15454775,"url":"https://github.com/coi-gov-pl/rspec-puppet-facts-unsupported","last_synced_at":"2025-06-13T02:02:54.914Z","repository":{"id":22310746,"uuid":"95903942","full_name":"coi-gov-pl/rspec-puppet-facts-unsupported","owner":"coi-gov-pl","description":"Helpers to generate unsupported OS facts to test for proper fail","archived":false,"fork":false,"pushed_at":"2023-04-04T22:26:00.000Z","size":40,"stargazers_count":1,"open_issues_count":8,"forks_count":1,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-06-13T02:02:16.111Z","etag":null,"topics":["facter","facts","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coi-gov-pl.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}},"created_at":"2017-06-30T16:01:05.000Z","updated_at":"2024-10-18T08:47:41.000Z","dependencies_parsed_at":"2024-11-16T17:13:26.714Z","dependency_job_id":"a62086b0-40bf-4647-b974-7553b49c2cfe","html_url":"https://github.com/coi-gov-pl/rspec-puppet-facts-unsupported","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.05882352941176472,"last_synced_commit":"cf56b1830d5d8f12d6346bafde0e3f33b66b4077"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/coi-gov-pl/rspec-puppet-facts-unsupported","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coi-gov-pl%2Frspec-puppet-facts-unsupported","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coi-gov-pl%2Frspec-puppet-facts-unsupported/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coi-gov-pl%2Frspec-puppet-facts-unsupported/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coi-gov-pl%2Frspec-puppet-facts-unsupported/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coi-gov-pl","download_url":"https://codeload.github.com/coi-gov-pl/rspec-puppet-facts-unsupported/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coi-gov-pl%2Frspec-puppet-facts-unsupported/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259565528,"owners_count":22877344,"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":["facter","facts","puppet","rspec-puppet"],"created_at":"2024-10-01T22:05:40.316Z","updated_at":"2025-06-13T02:02:54.876Z","avatar_url":"https://github.com/coi-gov-pl.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RspecPuppetFactsUnsupported\n\n[![Build Status](https://travis-ci.org/coi-gov-pl/rspec-puppet-facts-unsupported.svg?branch=develop)](https://travis-ci.org/coi-gov-pl/rspec-puppet-facts-unsupported) [![Gem](https://img.shields.io/gem/v/rspec-puppet-facts-unsupported.svg)](https://rubygems.org/gems/rspec-puppet-facts-unsupported)\n\nHelpers to generate unsupported OS facts to test for proper fail.\n\nUsing new `on_unsupported_os` method you can get a number of random provided OS's with their facts. Those facts can be used in rspec-puppet tests just like shown below:\n\n```ruby\non_unsupported_os.each do |os, facts|\n  context \"on unsupported OS #{os}\" do\n    let(:facts) { facts }\n    it { is_expected.to compile.and_raise_error(/Unsupported operating system/) }\n  end\nend\n```\n\n## Installation\n\nAdd this to your puppet module's Gemfile:\n\n```ruby\ngroup :system_tests do\n  # [..]\n  gem 'rspec-puppet-facts-unsupported'\nend\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rspec-puppet-facts-unsupported\n\n## Usage\n\n### Simple example\n\nrandomized, limited to 2 records, unsupported os - facts pair\n\n```ruby\n# in rspec-puppet test\nrequire 'spec_helper'\nrequire 'rspec-puppet-facts-unsupported'\n\ndescribe '::vagrant', type: :class do\n  include RspecPuppetFactsUnsupported\n\n  # Generates by default 2 records from shuffled library of unsupported OS's\n  on_unsupported_os.each do |os, facts|\n    context \"on unsupported OS #{os}\" do\n      let(:facts) { facts }\n      it { is_expected.to compile.and_raise_error(/Unsupported operating system/) }\n    end\n  end\nend\n```\n\n### Examples with options\n\n```ruby\n# in rspec-puppet test\nrequire 'spec_helper'\nrequire 'rspec-puppet-facts-unsupported'\n\ndescribe '::vagrant', type: :class do\n  include RspecPuppetFactsUnsupported\n\n  # Generates by up to 6 records from library in original order filtering to return only RedHat systems\n  on_unsupported_os(limit: 6, order: :original, filters: { osfamily: 'RedHat' }).each do |os, facts|\n    context \"on unsupported OS #{os}\" do\n      let(:facts) { facts }\n      it { is_expected.to compile.and_raise_error(/Unsupported operating system: RedHat/) }\n    end\n  end\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bundle` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bundle exec rake 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, use GitFlow convention - remember to update the version number in `version.rb`. Push branches and new tag. When finished checkout master and run `bundle exec rake build` and then run `gem push pkg/*.gem`, which will 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/coi-gov-pl/rspec-puppet-facts-unsupported. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [Apache 2.0](https://opensource.org/licenses/Apache-2.0).\n\n## Code of Conduct\n\nEveryone interacting in the Puppet::Examples::Helper project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/coi-gov-pl/rspec-puppet-facts-unsupported/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoi-gov-pl%2Frspec-puppet-facts-unsupported","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoi-gov-pl%2Frspec-puppet-facts-unsupported","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoi-gov-pl%2Frspec-puppet-facts-unsupported/lists"}