Closed mcasper closed 8 years ago
Because CI isn't set up yet, here are the results of running specs:
- MATTCASPER.local code/work/sumo-collector-puppet-module (fix_collector_setup) $ bundle exec rake spec
/Users/mattcasper/.rbenv/versions/2.2.2/bin/ruby -I/Users/mattcasper/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib:/Users/mattcasper/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-support-3.4.1/lib /Users/mattcasper/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/exe/rspec --pattern spec/\{classes,defines,unit,functions,hosts,integration,types\}/\*\*/\*_spec.rb --color
........................
Finished in 3.6 seconds (files took 0.98402 seconds to load)
24 examples, 0 failures
/cc @duchatran
you are fast @mcasper ! :). Just curious, why sumo::nix_config and sumo::win_config do not inherit from class sumo (inside manifest/init)?
Because they don't really need to. They're never declared on their own, always through the base class, which ensures that the base class with get evaluated first, and we're always accessing parameters through their fully qualified name, so we don't need to ensure that the base class is the parent class of the *_config
classes.
Plus, we already do the only necessary inheritance in init.pp when it inherits sumo::params
, so there's no need for the second inheritance.
For anyone not familiar with the particulars of inheritence in Puppet: https://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html#inheritance
Thanks @mcasper. LGTM.
Thanks @duchatran! Are there any plans to publish this module to Puppet Forge?
This PR does a few things: