Sha256: 0f238b672c47c6922cc765118bae8d99dd96bda88d3b6f3db5f71ececd37a41b

Contents?: true

Size: 634 Bytes

Versions: 4

Compression:

Stored size: 634 Bytes

Contents

require 'routemaster/cli/base'

module Routemaster
  module CLI
    class Pub < Base
      prefix %w[pub]
      syntax 'EVENT TOPIC URL'
      descr %{
          Publishes an event to the bus.  Note that the `TOKEN` passed in `options` must
          be that of the subscriber, not a root token. `EVENT` must be one of `created`,
          `updated`, `deleted`, or `noop`. `TOPIC` must be a valid topic name. `URL` must
          be a valid HTTPS URL.
      }

      action do
        bad_argc! unless argv.length == 3

        event, topic, url = argv
        helper.client.public_send(event, topic, url)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
routemaster-client-3.2.3 routemaster/cli/pub.rb
routemaster-client-3.2.0 routemaster/cli/pub.rb
routemaster-client-3.1.2 routemaster/cli/pub.rb
routemaster-client-3.1.1 routemaster/cli/pub.rb