Katello/katello — pull request #124 by iNecas (2012-05-16 16:27:04+00:00)
Title: reduce usage of require for code in lib dir

Code loaded with require is not reloaded in development mode after each
request and therefore it's needed to restart the whole server. Using
require_dependency instead might lead to memory leaks when some
constants are not marked for reload.

Since we have `lib` dir already in autoload paths we can let Rails to load
and unload the code automatically when following convetions. Therefore
modules under `lib/resources` dir were moved to `Resources` module so
that Rails knows where to find them. This change should also improve the
code readability: e.g. it's clearer where the Candlepin module is defined
now.

Since this commit it's almost never needed to require code from `lib` dir explicitly. Just use the Class/Module and Rails will do the job for you.