Sha256: d3c20901542130f76518ae70c2545971225c1308263ca705452738c92c50bf81

Contents?: true

Size: 876 Bytes

Versions: 9

Compression:

Stored size: 876 Bytes

Contents

module Souls
  module Gcloud
    module Pubsub
      class << self
        def create_subscription(
          topic_name: "send-user-mail",
          project_id: "souls-app",
          service_account: "souls-app",
          endpoint: "https:://test.com"
        )
          system(
            "gcloud pubsub subscriptions create #{topic_name}-sub \
            --topic #{topic_name} \
            --topic-project #{project_id} \
            --push-auth-service-account #{service_account} \
            --push-endpoint #{endpoint} \
            --expiration-period never
            "
          )
        end

        def update_subscription(
          topic_name: "send-user-mail",
          endpoint: "https:://test.com"
        )
          system("gcloud pubsub subscriptions update #{topic_name}-sub --push-endpoint #{endpoint} ")
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
souls-0.32.8 lib/souls/cli/gcloud/pubsub/subscriptions.rb
souls-0.32.7 lib/souls/cli/gcloud/pubsub/subscriptions.rb
souls-0.32.6 lib/souls/cli/gcloud/pubsub/subscriptions.rb
souls-0.32.5 lib/souls/cli/gcloud/pubsub/subscriptions.rb
souls-0.32.4 lib/souls/cli/gcloud/pubsub/subscriptions.rb
souls-0.32.3 lib/souls/cli/gcloud/pubsub/subscriptions.rb
souls-0.32.2 lib/souls/cli/gcloud/pubsub/subscriptions.rb
souls-0.32.1 lib/souls/cli/gcloud/pubsub/subscriptions.rb
souls-0.32.0 lib/souls/cli/gcloud/pubsub/subscriptions.rb