google-cloud-pubsub 0.23.2 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14533c888ffd7e84b8cf694553812f76767b9981
4
- data.tar.gz: 2ccb42a505022c1948ba743baaae9a65169845b3
3
+ metadata.gz: b3e195a29890f73bda2b6a0b6caa90a9c8570454
4
+ data.tar.gz: 6663923bc7039afc67d791d02215109ca70ac083
5
5
  SHA512:
6
- metadata.gz: 43f41186141eb5e9a6b823ceb6b888e680decd5208e15a1d8d06c18c60e4aa1491d0b8fbba410125ecc5b69c3c767b12b221767fa72b226f4798760f714677e8
7
- data.tar.gz: 0928fb15ebef64f71a25acfb0e0a62e30ef5f3859be8550a45874723356acacc8929cf790c02392174db2120124c6c0ccfb69148f5e624d438c440e3469acf16
6
+ metadata.gz: 8851ed8c44d1f85bef860c026bfc014726dc2bcf1ca90b6e70fbde6a9c4484e6585bcfe9880821fc783e1ce85b807537c73b3f2c62c97921d4b7717a78459462
7
+ data.tar.gz: 148697983bbdeb834e4bd261502dd518d0edb104004768f47634fbe68fc2cf0f85f32022cdb4303875c8d8ced2496158cb8a63360f07926fcf6f33800997ee69
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [Google Cloud Pub/Sub](https://cloud.google.com/pubsub/) ([docs](https://cloud.google.com/pubsub/docs/reference/rest/)) is designed to provide reliable, many-to-many, asynchronous messaging between applications. Publisher applications can send messages to a “topic” and other applications can subscribe to that topic to receive the messages. By decoupling senders and receivers, Google Cloud Pub/Sub allows developers to communicate between independently written applications.
4
4
 
5
- - [google-cloud-pubsub API documentation](http://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-pubsub/master/google/cloud/pubsub)
5
+ - [google-cloud-pubsub API documentation](http://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-pubsub/latest)
6
6
  - [google-cloud-pubsub on RubyGems](https://rubygems.org/gems/[google-cloud-pubsub)
7
7
  - [Google Cloud Pub/Sub documentation](https://cloud.google.com/pubsub/docs)
8
8
 
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
  require "google/cloud/errors"
17
- require "google/cloud/core/environment"
17
+ require "google/cloud/env"
18
18
  require "google/cloud/pubsub/service"
19
19
  require "google/cloud/pubsub/credentials"
20
20
  require "google/cloud/pubsub/topic"
@@ -76,7 +76,7 @@ module Google
76
76
  ENV["PUBSUB_PROJECT"] ||
77
77
  ENV["GOOGLE_CLOUD_PROJECT"] ||
78
78
  ENV["GCLOUD_PROJECT"] ||
79
- Google::Cloud::Core::Environment.project_id
79
+ Google::Cloud.env.project_id
80
80
  end
81
81
 
82
82
  ##
@@ -83,15 +83,15 @@ module Google
83
83
  end
84
84
 
85
85
  ##
86
- # Retrieves all subscriptions by repeatedly loading {#next} until
86
+ # Retrieves remaining results by repeatedly invoking {#next} until
87
87
  # {#next?} returns `false`. Calls the given block once for each
88
- # subscription, which is passed as the parameter.
88
+ # result, which is passed as the argument to the block.
89
89
  #
90
90
  # An Enumerator is returned if no block is given.
91
91
  #
92
- # This method may make several API calls until all subscriptions are
93
- # retrieved. Be sure to use as narrow a search criteria as possible.
94
- # Please use with caution.
92
+ # This method will make repeated API calls until all remaining results
93
+ # are retrieved. (Unlike `#each`, for example, which merely iterates
94
+ # over the results returned by a single API call.) Use with caution.
95
95
  #
96
96
  # @param [Integer] request_limit The upper limit of API requests to
97
97
  # make to load all subscriptions. Default is no limit.
@@ -77,15 +77,15 @@ module Google
77
77
  end
78
78
 
79
79
  ##
80
- # Retrieves all topics by repeatedly loading {#next} until {#next?}
81
- # returns `false`. Calls the given block once for each topic, which is
82
- # passed as the parameter.
80
+ # Retrieves remaining results by repeatedly invoking {#next} until
81
+ # {#next?} returns `false`. Calls the given block once for each
82
+ # result, which is passed as the argument to the block.
83
83
  #
84
84
  # An Enumerator is returned if no block is given.
85
85
  #
86
- # This method may make several API calls until all topics are
87
- # retrieved. Be sure to use as narrow a search criteria as possible.
88
- # Please use with caution.
86
+ # This method will make repeated API calls until all remaining results
87
+ # are retrieved. (Unlike `#each`, for example, which merely iterates
88
+ # over the results returned by a single API call.) Use with caution.
89
89
  #
90
90
  # @param [Integer] request_limit The upper limit of API requests to
91
91
  # make to load all topics. Default is no limit.
@@ -54,6 +54,12 @@ module Google
54
54
  # end.seconds += 1;
55
55
  # end.nanos -= 1000000000;
56
56
  # }
57
+ #
58
+ # Example 3: Compute Duration from datetime.timedelta in Python.
59
+ #
60
+ # td = datetime.timedelta(days=3, minutes=10)
61
+ # duration = Duration()
62
+ # duration.FromTimedelta(td)
57
63
  # @!attribute [rw] seconds
58
64
  # @return [Integer]
59
65
  # Signed seconds of the span of time. Must be from -315,576,000,000
@@ -57,7 +57,7 @@ module Google
57
57
  # }
58
58
  #
59
59
  # A repeated field is not allowed except at the last position of a
60
- # field mask.
60
+ # paths string.
61
61
  #
62
62
  # If a FieldMask object is not present in a get operation, the
63
63
  # operation applies to all fields (as if a FieldMask of all fields
@@ -82,6 +82,58 @@ module Google
82
82
  # describe the updated values, the API ignores the values of all
83
83
  # fields not covered by the mask.
84
84
  #
85
+ # If a repeated field is specified for an update operation, the existing
86
+ # repeated values in the target resource will be overwritten by the new values.
87
+ # Note that a repeated field is only allowed in the last position of a +paths+
88
+ # string.
89
+ #
90
+ # If a sub-message is specified in the last position of the field mask for an
91
+ # update operation, then the existing sub-message in the target resource is
92
+ # overwritten. Given the target message:
93
+ #
94
+ # f {
95
+ # b {
96
+ # d : 1
97
+ # x : 2
98
+ # }
99
+ # c : 1
100
+ # }
101
+ #
102
+ # And an update message:
103
+ #
104
+ # f {
105
+ # b {
106
+ # d : 10
107
+ # }
108
+ # }
109
+ #
110
+ # then if the field mask is:
111
+ #
112
+ # paths: "f.b"
113
+ #
114
+ # then the result will be:
115
+ #
116
+ # f {
117
+ # b {
118
+ # d : 10
119
+ # }
120
+ # c : 1
121
+ # }
122
+ #
123
+ # However, if the update mask was:
124
+ #
125
+ # paths: "f.b.d"
126
+ #
127
+ # then the result would be:
128
+ #
129
+ # f {
130
+ # b {
131
+ # d : 10
132
+ # x : 2
133
+ # }
134
+ # c : 1
135
+ # }
136
+ #
85
137
  # In order to reset a field's value to the default, the field must
86
138
  # be in the mask and set to the default value in the provided resource.
87
139
  # Hence, in order to reset all fields of a resource, provide a default
@@ -63,14 +63,12 @@ module Google
63
63
  #
64
64
  # Example 5: Compute Timestamp from current time in Python.
65
65
  #
66
- # now = time.time()
67
- # seconds = int(now)
68
- # nanos = int((now - seconds) * 10**9)
69
- # timestamp = Timestamp(seconds=seconds, nanos=nanos)
66
+ # timestamp = Timestamp()
67
+ # timestamp.GetCurrentTime()
70
68
  # @!attribute [rw] seconds
71
69
  # @return [Integer]
72
70
  # Represents seconds of UTC time since Unix epoch
73
- # 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
71
+ # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
74
72
  # 9999-12-31T23:59:59Z inclusive.
75
73
  # @!attribute [rw] nanos
76
74
  # @return [Integer]
@@ -1,10 +1,10 @@
1
- # Copyright 2016 Google Inc. All rights reserved.
1
+ # Copyright 2017, Google Inc. All rights reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
5
5
  # You may obtain a copy of the License at
6
6
  #
7
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
8
  #
9
9
  # Unless required by applicable law or agreed to in writing, software
10
10
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,6 +26,7 @@ require "json"
26
26
  require "pathname"
27
27
 
28
28
  require "google/gax"
29
+
29
30
  require "google/iam/v1/iam_policy_pb"
30
31
  require "google/pubsub/v1/pubsub_pb"
31
32
 
@@ -7,10 +7,17 @@
7
7
  "UNAVAILABLE"
8
8
  ],
9
9
  "one_plus_delivery": [
10
+ "CANCELLED",
11
+ "UNKNOWN",
10
12
  "DEADLINE_EXCEEDED",
13
+ "RESOURCE_EXHAUSTED",
14
+ "ABORTED",
15
+ "INTERNAL",
11
16
  "UNAVAILABLE"
12
17
  ],
13
- "non_idempotent": []
18
+ "non_idempotent": [
19
+ "UNAVAILABLE"
20
+ ]
14
21
  },
15
22
  "retry_params": {
16
23
  "default": {
@@ -1,10 +1,10 @@
1
- # Copyright 2016 Google Inc. All rights reserved.
1
+ # Copyright 2017, Google Inc. All rights reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
5
5
  # You may obtain a copy of the License at
6
6
  #
7
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
8
  #
9
9
  # Unless required by applicable law or agreed to in writing, software
10
10
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,6 +26,7 @@ require "json"
26
26
  require "pathname"
27
27
 
28
28
  require "google/gax"
29
+
29
30
  require "google/iam/v1/iam_policy_pb"
30
31
  require "google/pubsub/v1/pubsub_pb"
31
32
 
@@ -673,6 +674,9 @@ module Google
673
674
  # @param subscription [String]
674
675
  # The subscription from which messages should be pulled.
675
676
  # Format is +projects/{project}/subscriptions/{sub}+.
677
+ # @param max_messages [Integer]
678
+ # The maximum number of messages returned for this request. The Pub/Sub
679
+ # system may return fewer than the number specified.
676
680
  # @param return_immediately [true, false]
677
681
  # If this field set to true, the system will respond immediately even if
678
682
  # it there are no messages available to return in the +Pull+ response.
@@ -680,9 +684,6 @@ module Google
680
684
  # least one message is available, rather than returning no messages. The
681
685
  # client may cancel the request if it does not wish to wait any longer for
682
686
  # the response.
683
- # @param max_messages [Integer]
684
- # The maximum number of messages returned for this request. The Pub/Sub
685
- # system may return fewer than the number specified.
686
687
  # @param options [Google::Gax::CallOptions]
687
688
  # Overrides the default settings for this call, e.g, timeout,
688
689
  # retries, etc.
@@ -6,7 +6,16 @@
6
6
  "DEADLINE_EXCEEDED",
7
7
  "UNAVAILABLE"
8
8
  ],
9
- "non_idempotent": []
9
+ "non_idempotent": [
10
+ "UNAVAILABLE"
11
+ ],
12
+ "pull": [
13
+ "CANCELLED",
14
+ "DEADLINE_EXCEEDED",
15
+ "RESOURCE_EXHAUSTED",
16
+ "INTERNAL",
17
+ "UNAVAILABLE"
18
+ ]
10
19
  },
11
20
  "retry_params": {
12
21
  "default": {
@@ -66,12 +75,12 @@
66
75
  },
67
76
  "Pull": {
68
77
  "timeout_millis": 60000,
69
- "retry_codes_name": "non_idempotent",
78
+ "retry_codes_name": "pull",
70
79
  "retry_params_name": "messaging"
71
80
  },
72
81
  "StreamingPull": {
73
82
  "timeout_millis": 60000,
74
- "retry_codes_name": "non_idempotent",
83
+ "retry_codes_name": "pull",
75
84
  "retry_params_name": "messaging"
76
85
  },
77
86
  "ModifyPushConfig": {
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Pubsub
19
- VERSION = "0.23.2"
19
+ VERSION = "0.24.0"
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-pubsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.2
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-04 00:00:00.000000000 Z
12
+ date: 2017-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 0.21.0
20
+ version: '1.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 0.21.0
27
+ version: '1.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: google-gax
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  version: '0'
236
236
  requirements: []
237
237
  rubyforge_project:
238
- rubygems_version: 2.6.10
238
+ rubygems_version: 2.6.11
239
239
  signing_key:
240
240
  specification_version: 4
241
241
  summary: API Client library for Google Cloud Pub/Sub