lib/puppet-debugger/support/environment.rb in puppet-debugger-0.19.0 vs lib/puppet-debugger/support/environment.rb in puppet-debugger-1.0.0
- old
+ new
@@ -6,11 +6,11 @@
# creates a puppet environment given a module path and environment name
# this is cached
def puppet_environment
@puppet_environment ||= create_environment
end
- alias :environment :puppet_environment
+ alias environment puppet_environment
# returns an array of module directories, generally this is the only place
# to look for puppet code by default. This is read from the puppet configuration
def default_modules_paths
dirs = []
@@ -21,12 +21,12 @@
dirs << bolt_modules
dirs.flatten.compact.uniq
end
def bolt_modules
- spec = Gem::Specification.latest_specs.find { |spec| spec.name.eql?('bolt') }
- bolt_modules = File.join(spec.full_gem_path, 'bolt-modules') if spec
+ spec = Gem::Specification.latest_specs.find { |s| s.name.eql?('bolt') }
+ File.join(spec.full_gem_path, 'bolt-modules') if spec
end
# returns all the modules paths defined in the environment
def modules_paths
puppet_environment.full_modulepath
@@ -65,10 +65,10 @@
ENV['PUPPET_ENV'] || Puppet[:environment]
end
# currently this is not being used
def environment_loaders
- name = compiler.loaders.public_environment_loader.loader_name
+ compiler.loaders.public_environment_loader.loader_name
end
end
end
end