Skip to content

Commit

Permalink
(GH-332) Ensure PuppetStrings is loaded for tasks
Browse files Browse the repository at this point in the history
Prior to this commit users would receive an Undefined Constant error
when attempting to generate a reference file via the provided Rake
tasks.

This was caused by the compact testing style for modules added in v3.0.

In this case the parent, PuppetStrings is not properly loaded before
Tasks. As a result the error above is caused.

This commit adds a new module declaration to tasks.rb that will ensure
that the PuppetStrings is properly loaded.
  • Loading branch information
chelnak committed Oct 25, 2022
1 parent deaee1f commit 0292153
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/puppet-strings/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
require 'rake'
require 'rake/tasklib'

# Ensure PuppetStrings is loaded.
module PuppetStrings end

# The module for Puppet Strings rake tasks.
module PuppetStrings::Tasks
require 'puppet-strings/tasks/generate.rb'
Expand Down

0 comments on commit 0292153

Please sign in to comment.