From e0763033e497fdb7956aa62534b5f8bee0f83a12 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 26 Jun 2013 21:39:23 -0700 Subject: added command `leap compile zone` --- lib/leap_cli/config/manager.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/leap_cli/config/manager.rb') diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index 05df22f..f34566c 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -19,10 +19,21 @@ module LeapCli attr_reader :services, :tags, :nodes, :provider, :common, :secrets attr_reader :base_services, :base_tags, :base_provider, :base_common + # + # returns the Hash of the contents of facts.json + # def facts @facts ||= JSON.parse(Util.read_file(:facts) || "{}") end + # + # returns an Array of all the environments defined for this provider. + # the returned array includes nil (for the default environment) + # + def environments + @environments ||= [nil] + self.tags.collect {|name, tag| tag['environment']}.compact + end + ## ## IMPORT EXPORT ## -- cgit v1.2.3