summaryrefslogtreecommitdiff
path: root/lib/leap_cli/config
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/config')
-rw-r--r--lib/leap_cli/config/environment.rb4
-rw-r--r--lib/leap_cli/config/manager.rb5
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/leap_cli/config/environment.rb b/lib/leap_cli/config/environment.rb
index df4b56c..398fd02 100644
--- a/lib/leap_cli/config/environment.rb
+++ b/lib/leap_cli/config/environment.rb
@@ -106,7 +106,7 @@ module LeapCli; module Config
#
def template(template)
path = Path.named_path([:template_config, template], Path.provider_base)
- if File.exists?(path)
+ if File.exist?(path)
return load_json(path, Config::Object)
else
return nil
@@ -133,7 +133,7 @@ module LeapCli; module Config
end
def load_json(filename, object_class, options={})
- if !File.exists?(filename)
+ if !File.exist?(filename)
return object_class.new(self)
end
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb
index 5af046f..80ccbad 100644
--- a/lib/leap_cli/config/manager.rb
+++ b/lib/leap_cli/config/manager.rb
@@ -258,7 +258,7 @@ module LeapCli
# yields each node, in sorted order
#
def each_node(&block)
- env.nodes.each_node &block
+ env.nodes.each_node(&block)
end
def reload_node!(node)
@@ -294,7 +294,6 @@ module LeapCli
#
def apply_inheritance(node, throw_exceptions=false)
new_node = Config::Node.new(nil)
- name = node.name
node_env = guess_node_env(node)
new_node.set_environment(node_env, new_node)
@@ -409,7 +408,7 @@ module LeapCli
[['services', :service_config], ['tags', :tag_config]].each do |attribute, path_sym|
node[attribute].each do |attr_value|
path = Path.named_path([path_sym, "#{attr_value}.rb"], provider_dir).sub(/\.json$/,'')
- if File.exists?(path)
+ if File.exist?(path)
files << path
end
end