Module: GClouder::Resources::RuntimeConfig::Variables::Variable

Includes:
GCloud
Defined in:
lib/gclouder/resources/runtime-config/variables.rb

Class Method Summary collapse

Methods included from GCloud

#gcloud, included, #verify

Methods included from Config::CLIArgs

check, #cli_args, cli_args, included, load, valid_resources

Methods included from Config::Project

load, #project, project

Methods included from Helpers

#hash_to_args, included, #module_exists?, #to_arg, #to_deep_merge_hash, #valid_json?

Methods included from Logging

#add, #bad, #change, #debug, #error, #fatal, #good, included, #info, log, loggers, #remove, report, #resource_state, setup, #warn, #warning

Methods included from Shell

included, #shell

Class Method Details

.args(variable) ⇒ Object



58
59
60
# File 'lib/gclouder/resources/runtime-config/variables.rb', line 58

def self.args(variable)
  hash_to_args(variable.select{|k,v| k != "value"}) # Value is passed as an arg
end

.ensure(variable) ⇒ Object



62
63
64
# File 'lib/gclouder/resources/runtime-config/variables.rb', line 62

def self.ensure(variable)
  Resource.set :"beta runtime-config configs variables", variable["name"], variable["value"], args(variable)
end

.purge(config) ⇒ Object



66
67
68
# File 'lib/gclouder/resources/runtime-config/variables.rb', line 66

def self.purge(config)
  Resource.purge :"beta runtime-config configs variables", config
end