google-cloud-storage 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 303659292accc44f277af53a486fc796a833b5f9f209923b989d34fd732a03dd
4
- data.tar.gz: 6d702f3c6ab49d78dd9fba0b836a7b5ebcd0fc00f80c59fe3a2217e441ed1ab1
3
+ metadata.gz: 005b0793cbed00c606d35b048008ab0621d10b7a17a5c7bddb8c7394a20af699
4
+ data.tar.gz: 04c41b836c797cc2b57d4f6bf877d4c85e9643cd9bb1d6c3bf9257187b505410
5
5
  SHA512:
6
- metadata.gz: c9cac290f73ce71a32b26f3a8f293ac12813f08c0494435c47736a0533e94719bcfe8697f33c7234466cc11ce1d5db4227edbb14a9cae537654ae558a6924444
7
- data.tar.gz: e7accc00dc59f35e31548767c33a871a2cabfce2ae2a4c13429aaa445e1436a36457911cc032ac162582381cf8ca6769f433c710c923c8ccc9983d9cce30a158
6
+ metadata.gz: 8b457e4df6fdae134b017fbb78b539d7549679b80cb6c67ab44c3299a011fe918869b1cfc5b6a5d35de6f600db01ca405920afa4f049a86e05358a964d2358c3
7
+ data.tar.gz: 48d8ed7a3c98364256e780d3d9d9d87498354d3a1f237a35397835d3d501daf228366f31f081ea4c71e5101f3c2c7b4f0b73beb52b7d8a6c214782d372313ecd
data/README.md CHANGED
@@ -40,6 +40,24 @@ backup = storage.bucket "task-attachment-backups"
40
40
  file.copy backup, file.name
41
41
  ```
42
42
 
43
+ ## Enabling Logging
44
+
45
+ To enable logging for this library, set the logger for the underlying [Google API Client](https://github.com/google/google-api-ruby-client/blob/master/README.md#logging) library. The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html) as shown below, or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger) that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/).
46
+
47
+ If you do not set the logger explicitly and your application is running in a Rails environment, it will default to `Rails.logger`. Otherwise, if you do not set the logger and you are not using Rails, logging is disabled by default.
48
+
49
+ Configuring a Ruby stdlib logger:
50
+
51
+ ```ruby
52
+ require "logger"
53
+
54
+ my_logger = Logger.new $stderr
55
+ my_logger.level = Logger::WARN
56
+
57
+ # Set the Google API Client logger
58
+ Google::Apis.logger = my_logger
59
+ ```
60
+
43
61
  ## Supported Ruby Versions
44
62
 
45
63
  This library is supported on Ruby 2.0+.
@@ -58,6 +58,34 @@ module Google
58
58
  # [Google Cloud Storage Overview
59
59
  # ](https://cloud.google.com/storage/docs/overview).
60
60
  #
61
+ # ## Enabling Logging
62
+ #
63
+ # To enable logging for this library, set the logger for the underlying
64
+ # [Google API Client](https://github.com/google/google-api-ruby-client/blob/master/README.md#logging)
65
+ # library. The logger that you set may be a Ruby stdlib
66
+ # [`Logger`](https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html)
67
+ # as shown below, or a
68
+ # [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
69
+ # that will write logs to [Stackdriver
70
+ # Logging](https://cloud.google.com/logging/).
71
+ #
72
+ # If you do not set the logger explicitly and your application is running in
73
+ # a Rails environment, it will default to `Rails.logger`. Otherwise, if you
74
+ # do not set the logger and you are not using Rails, logging is disabled by
75
+ # default.
76
+ #
77
+ # Configuring a Ruby stdlib logger:
78
+ #
79
+ # ```ruby
80
+ # require "logger"
81
+ #
82
+ # my_logger = Logger.new $stderr
83
+ # my_logger.level = Logger::WARN
84
+ #
85
+ # # Set the Google API Client logger
86
+ # Google::Apis.logger = my_logger
87
+ # ```
88
+ #
61
89
  # ## Retrieving Buckets
62
90
  #
63
91
  # A {Google::Cloud::Storage::Bucket} instance is a container for your data.
@@ -189,7 +189,7 @@ module Google
189
189
  next if roles[role_name].empty?
190
190
  Google::Apis::StorageV1::Policy::Binding.new(
191
191
  role: role_name,
192
- members: roles[role_name]
192
+ members: roles[role_name].uniq
193
193
  )
194
194
  end
195
195
  )
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Storage
19
- VERSION = "1.12.0".freeze
19
+ VERSION = "1.13.0".freeze
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-storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.13.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: 2018-05-10 00:00:00.000000000 Z
12
+ date: 2018-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.19.0
34
+ version: '0.23'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.19.0
41
+ version: '0.23'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: googleauth
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  version: '0'
244
244
  requirements: []
245
245
  rubyforge_project:
246
- rubygems_version: 2.7.6
246
+ rubygems_version: 2.7.7
247
247
  signing_key:
248
248
  specification_version: 4
249
249
  summary: API Client library for Google Cloud Storage