Sha256: a39b4cb9266a09d4475dcbcc4adbd060d34c4f189550d8e380682386c844b812

Contents?: true

Size: 715 Bytes

Versions: 41

Compression:

Stored size: 715 Bytes

Contents

module Souls
  module Gcloud
    class << self
      def create_pubsub_topic(topic_name: "send-user-mail")
        system("gcloud pubsub topics create #{topic_name}")
      end

      def create_pubsub_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
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
souls-0.28.6 lib/souls/gcloud/pubsub.rb
souls-0.28.5 lib/souls/gcloud/pubsub.rb
souls-0.28.4 lib/souls/gcloud/pubsub.rb
souls-0.28.3 lib/souls/gcloud/pubsub.rb
souls-0.28.2 lib/souls/gcloud/pubsub.rb
souls-0.28.1 lib/souls/gcloud/pubsub.rb
souls-0.28.0 lib/souls/gcloud/pubsub.rb
souls-0.27.8 lib/souls/gcloud/pubsub.rb
souls-0.27.7 lib/souls/gcloud/pubsub.rb
souls-0.27.6 lib/souls/gcloud/pubsub.rb
souls-0.27.5 lib/souls/gcloud/pubsub.rb
souls-0.27.4 lib/souls/gcloud/pubsub.rb
souls-0.27.3 lib/souls/gcloud/pubsub.rb
souls-0.27.2 lib/souls/gcloud/pubsub.rb
souls-0.27.1 lib/souls/gcloud/pubsub.rb
souls-0.27.0 lib/souls/gcloud/pubsub.rb
souls-0.26.10 lib/souls/gcloud/pubsub.rb
souls-0.26.9 lib/souls/gcloud/pubsub.rb
souls-0.26.8 lib/souls/gcloud/pubsub.rb
souls-0.26.7 lib/souls/gcloud/pubsub.rb