Class: Switchboard::Commands::PubSub

Inherits:
Switchboard::Command show all
Defined in:
lib/switchboard/commands/pubsub/info.rb,
lib/switchboard/commands/pubsub/items.rb,
lib/switchboard/commands/pubsub/nodes.rb,
lib/switchboard/commands/pubsub/purge.rb,
lib/switchboard/commands/pubsub/config.rb,
lib/switchboard/commands/pubsub/create.rb,
lib/switchboard/commands/pubsub/delete.rb,
lib/switchboard/commands/pubsub/listen.rb,
lib/switchboard/commands/pubsub/pubsub.rb,
lib/switchboard/commands/pubsub/options.rb,
lib/switchboard/commands/pubsub/publish.rb,
lib/switchboard/commands/pubsub/retract.rb,
lib/switchboard/commands/pubsub/subscribe.rb,
lib/switchboard/commands/pubsub/unsubscribe.rb,
lib/switchboard/commands/pubsub/affiliations.rb,
lib/switchboard/commands/pubsub/subscriptions.rb

Defined Under Namespace

Classes: Affiliations, Config, Create, Delete, Info, Items, Listen, Nodes, Options, Publish, Purge, Retract, Subscribe, Subscriptions, Unsubscribe

Class Method Summary collapse

Methods inherited from Switchboard::Command

description, run!, to_command, to_command_name

Class Method Details

.helpObject



6
7
8
# File 'lib/switchboard/commands/pubsub/pubsub.rb', line 6

def self.help
  "These are the more extensive instructions for using the pubsub command."
end

.options(opts) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/switchboard/commands/pubsub/pubsub.rb', line 10

def self.options(opts)
  super(opts)
  opts.on("--node=node", String, "Specifies the PubSub node to use.") { |v| OPTIONS["pubsub.node"] = v }
  opts.on("--server=server", String, "Specifies the PubSub server to use.") { |v| OPTIONS["pubsub.server"] = v }
  if defined?(OAuth)
    opts.on("--oauth", "Sign requests using OAuth.") { OPTIONS["oauth"] = true }
    opts.on("--oauth-consumer-key=key", String, "Specifies the OAuth consumer key to use.") { |v| OPTIONS["oauth.consumer_key"] = v }
    opts.on("--oauth-consumer-secret=secret", String, "Specifies the OAuth consumer secret to use.") { |v| OPTIONS["oauth.consumer_secret"] = v }
    opts.on("--oauth-token=token", String, "Specifies the OAuth token to use.") { |v| OPTIONS["oauth.token"] = v }
    opts.on("--oauth-token-secret=secret", String, "Specifies the OAuth token secret to use.") { |v| OPTIONS["oauth.token_secret"] = v }
  end
  opts
end