google-cloud-storage 1.12.0 → 1.13.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 +4 -4
- data/README.md +18 -0
- data/lib/google/cloud/storage.rb +28 -0
- data/lib/google/cloud/storage/policy.rb +1 -1
- data/lib/google/cloud/storage/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 005b0793cbed00c606d35b048008ab0621d10b7a17a5c7bddb8c7394a20af699
|
4
|
+
data.tar.gz: 04c41b836c797cc2b57d4f6bf877d4c85e9643cd9bb1d6c3bf9257187b505410
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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+.
|
data/lib/google/cloud/storage.rb
CHANGED
@@ -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.
|
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.
|
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-
|
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.
|
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.
|
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.
|
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
|