Module: RspecPuppetFactsUnsupported
- Included in:
- Facts, UnsupportedFilteringOperation
- Defined in:
- lib/rspec-puppet-facts-unsupported.rb,
lib/rspec-puppet-facts-unsupported/version.rb,
lib/rspec-puppet-facts-unsupported/on_unsupported_os.rb
Overview
A main module of rspec-puppet-facts-unsupported
Defined Under Namespace
Classes: Facts, Integerlike, Randomizer, UnsupportedFilteringOperation
Constant Summary collapse
- VERSION =
'0.1.1'.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#on_unsupported_os(opts = {}) ⇒ Object
Fetches an unsupported list of operating system’s facts.
- #verbose? ⇒ Boolean
Class Method Details
.verbose=(verbose) ⇒ Object
30 31 32 |
# File 'lib/rspec-puppet-facts-unsupported/on_unsupported_os.rb', line 30 def self.verbose=(verbose) @@verbose = (verbose == true) # rubocop:disable Style/ClassVars end |
.verbose? ⇒ Boolean
34 35 36 |
# File 'lib/rspec-puppet-facts-unsupported/on_unsupported_os.rb', line 34 def self.verbose? @@verbose end |
Instance Method Details
#on_unsupported_os(opts = {}) ⇒ Object
Fetches an unsupported list of operating system’s facts. List doesn’t contains operating system described in Puppet’s metadata.json file. machine facts or ‘i86pc’ will be used instead of the “operatingsystem_support” section if the metadata file even if the file is missing. narrow the search like :random - to randomly shuffle records (exact shuffle seed will be printed on stderr to be able to reproduce invalid behaivior), ‘:original` - to return original list, an integer seed - to reproduce failiures. By default it is set to `:random`
22 23 24 25 26 27 28 |
# File 'lib/rspec-puppet-facts-unsupported/on_unsupported_os.rb', line 22 def on_unsupported_os(opts = {}) process_opts(opts) filters = calculate_filters(opts) facts = FacterDB.get_facts(filters) op = UnsupportedFilteringOperation.new(facts, opts) op.facts end |
#verbose? ⇒ Boolean
38 39 40 |
# File 'lib/rspec-puppet-facts-unsupported/on_unsupported_os.rb', line 38 def verbose? RspecPuppetFactsUnsupported.verbose? end |