Bug #4178
Ruby manifests don't autoload
| Status: | Closed | Start date: | 07/08/2010 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 2.6.0 | |||
| Affected Puppet version: | 2.6alpha1 | Branch: | luke/tickets/master/4178-ruby_manifests_not_autoloading | |
| Keywords: | ||||
| Votes: | 0 |
Description
Discovered this while writing up the release notes. :/
Basically, it works fine if you use ‘puppet
I’ve got code that fixes it, but it’s not yet thoroughly tested; I’ll post once I have a ticket number.
History
Updated by Luke Kanies almost 2 years ago
- Branch set to luke/tickets/master/4178-ruby_manifests_not_autoloading
Ok, I’ve published a branch that has fixes, but no tests, and not really thoroughly tested. Also, it’s a couple of fixes in one:
- Fix autoloading from modules
- Fix importing from the main manifests dir (haven’t tested this)
- Set ‘@name’ and ‘@title’ as you’d expect
I also noticed that the way we’re setting instance variables is currently by copying the params from the resource. My guess is that this is counter-intuitive – e.g., the new ‘$modulename’ variable isn’t a resource parameter, it’s just a variable in the scope. So, it’s probably a better idea to just take all of the variables in the scope and set those, rather than relying on the resource params.
Updated by Markus Roberts almost 2 years ago
- Affected Puppet version changed from 0.25.5 to 2.6alpha1
I’m assuming this was really on 2.6alpha, all things considered.
Updated by Markus Roberts almost 2 years ago
- Assignee set to Markus Roberts
Updated by Markus Roberts almost 2 years ago
- Status changed from Accepted to Closed
Cleaned up version with Luke’s suggested refinement (use file globing rather than searching for each supported extension in turn), tests, and code simplifications pushed to master as commit:3c0059195fb2b1255f368d98021f4a99ecd121a6.