Module: GClouder::Resources::PubSub::Subscriptions::Subscription

Includes:
GCloud, Helpers
Defined in:
lib/gclouder/resources/pubsub/subscriptions.rb

Class Method Summary collapse

Methods included from Helpers

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

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 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(subscription) ⇒ Object



85
86
87
# File 'lib/gclouder/resources/pubsub/subscriptions.rb', line 85

def self.args(subscription)
  hash_to_args(subscription)
end

.ensure(subscription) ⇒ Object



89
90
91
# File 'lib/gclouder/resources/pubsub/subscriptions.rb', line 89

def self.ensure(subscription)
  Resource.ensure :"beta pubsub subscriptions", subscription["name"], args(subscription), filter: "name ~ ^.*\/#{subscription['name']}$", indent: 3
end

.purge(subscription) ⇒ Object



93
94
95
# File 'lib/gclouder/resources/pubsub/subscriptions.rb', line 93

def self.purge(subscription)
  Resource.purge :"beta pubsub subscriptions", subscription["name"], filter: "name ~ ^.*\/#{subscription['name']}$"
end