| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
We basically just make sure that we tell Ruby
about files we've loaded, so you can 'require' these
files and doing so will essentially no-op, rather
than clobbering the already-loaded code.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
This is the big win, because it causes us to just
skip the whole loading infrastructure, including
skipping looking through the modulepath.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The cache isn't actually used yet - this just adds
all of the plumbing.
It was found that stat'ing files that didn't exist
could take up to 85% of a run, so this is progress
toward getting rid of those stats.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
There's more caching to add, but this simplifies
the interface to the list of paths and then caches
that list so we aren't constantly searching the
filesystem.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby's exception hierarchy is a bit strange, in that only
exceptions that sub RuntimeError are caught by default.
This patch explicitly catches the base class, Exception,
which means that LoadError, SyntaxError, and any
RuntimeErrors will all be caught.
This is done for both load() and loadall(); load() uses
Kernel.load, but loadall() uses Kernel.require.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
from modules even when Autoload#loadall is used.
|
| |
|
|
|
|
|
|
| |
in each module, in addition to the lib directory. The 'lib'
directory is also deprecated, but supported for now to give
people a chance to convert.
|
|
|
|
|
|
|
|
|
|
|
|
| |
to sometimes suddenly disappear and thus tests to fail --
Kernel.require was not loading the normal ruby path (e.g.,
'puppet/type/cron'), so if someone else loaded that then
it would replace the in-memory type with a new one, but that
new one couldn't load its own providers, because the Kernel
would ignore the providers, thinking they were already loaded.
This doesn't fix all of the autoloading problems, but at least
we won't suddenly break a ton of tests.
|
|
|
|
| |
problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now.
|
|
|
|
| |
to manipulate it. All config tests pass in both the old tests and the new ones, so it is time to add the hooks for manipulating the search path.
|
|
|
|
|
|
|
|
| |
Puppet now looks for a lib directory inside each module bundle, and adds
the directory to the list searched by Puppet::Util::Autoload.
The intent is to facilitate more sophisticated virtual types and flexibility
within modules.
|
|
|
|
|
|
| |
method to query whether a given file has been loaded.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2668 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2518 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0
|