Class: PuppetLint::Plugins
- Inherits:
-
Object
- Object
- PuppetLint::Plugins
- Defined in:
- lib/puppet-lint/plugins.rb
Overview
Public: Various methods that implement puppet-lint’s plugin system
Examples
PuppetLint::Plugins.load_spec_helper
Class Method Summary collapse
-
.load_from_gems ⇒ Object
Internal: Find any gems containing puppet-lint plugins and load them.
-
.load_spec_helper ⇒ Object
Public: Load the puppet-lint spec_helper.rb.
Class Method Details
.load_from_gems ⇒ Object
Internal: Find any gems containing puppet-lint plugins and load them.
Returns nothing.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/puppet-lint/plugins.rb', line 12 def self.load_from_gems gem_directories.each do |directory| path = directory + 'puppet-lint/plugins' next unless path.directory? Dir["#{path}/**/*.rb"].each do |file| load(file) end end end |
.load_spec_helper ⇒ Object
Public: Load the puppet-lint spec_helper.rb
Returns nothings.
26 27 28 29 |
# File 'lib/puppet-lint/plugins.rb', line 26 def self.load_spec_helper gemspec = gemspecs.find { |spec| spec.name == 'puppet-lint' } load(Pathname.new(gemspec.full_gem_path) + 'spec/spec_helper.rb') end |