google-cloud-pubsub-v1 0.1.2 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,6 +38,23 @@ module Google
38
38
  "projects/#{project}"
39
39
  end
40
40
 
41
+ ##
42
+ # Create a fully-qualified Schema resource string.
43
+ #
44
+ # The resource will be in the following format:
45
+ #
46
+ # `projects/{project}/schemas/{schema}`
47
+ #
48
+ # @param project [String]
49
+ # @param schema [String]
50
+ #
51
+ # @return [::String]
52
+ def schema_path project:, schema:
53
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
54
+
55
+ "projects/#{project}/schemas/#{schema}"
56
+ end
57
+
41
58
  ##
42
59
  # Create a fully-qualified Subscription resource string.
43
60
  #
@@ -79,7 +96,7 @@ module Google
79
96
 
80
97
  "projects/#{project}/topics/#{topic}"
81
98
  end),
82
- "" => (proc do
99
+ "" => (proc do
83
100
  "_deleted-topic_"
84
101
  end)
85
102
  }