google-cloud-translate 1.2.0 → 1.2.1

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: 41ec37f5e02cac79d4901ad0538400bacbf4b6614042b9150165e6cbd415dae5
4
- data.tar.gz: 7b337bce70d91e3d57ef0b7728a948b311322248776ca3517d45f3f8b0a942a1
3
+ metadata.gz: 255d2fe2c7ab9d9324f2b2c0b71b69a68f3e11abd5ce2f1866a189098ff4fd0c
4
+ data.tar.gz: adbeb37379bab6faae3b0e7fff4a9ceff972e7f38f98c398937fcbba35eb964f
5
5
  SHA512:
6
- metadata.gz: 79da43c9637bc93f00de089075d484aa93971d6936d51d35605a409f3cf3d9ce43034fbd830770c34e6af13a3d409d980e193ab2982eb429d4dbd1f8063d3aab
7
- data.tar.gz: 152b161306540e6cb2619b4d171de05376f2c43039f15dbdf52afa79930b88e482a131bffe3c2abe6f834675fb6d2c00038637deebaf949c858afaf8687e8d57
6
+ metadata.gz: 519126ed69768a715327ccb20e6fb2c8d574155010f9cbf5c12584f23977ffc822ceab954cd8ffc51c3b3236421cdf03dbb426ffcd98821c522b78b45c6ec8eb
7
+ data.tar.gz: b39dec563bbe53682c7493792b869eaa9dfb9b09ddd8fcd1901f67047e451fee529935af8a0404637bc4ad3e3278735a25cc6c6a47033f272b143ada9fadf02c
data/.yardopts CHANGED
@@ -1,6 +1,7 @@
1
1
  --no-private
2
2
  --title=Google Cloud Translation API
3
3
  --markup markdown
4
+ --markup-provider redcarpet
4
5
 
5
6
  ./lib/**/*.rb
6
7
  -
data/README.md CHANGED
@@ -40,9 +40,38 @@ translation.to #=> "la"
40
40
  translation.text #=> "Salve mundi!"
41
41
  ```
42
42
 
43
+ ## Enabling Logging
44
+
45
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.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/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
46
+
47
+ Configuring a Ruby stdlib logger:
48
+
49
+ ```ruby
50
+ require "logger"
51
+
52
+ module MyLogger
53
+ LOGGER = Logger.new $stderr, level: Logger::WARN
54
+ def logger
55
+ LOGGER
56
+ end
57
+ end
58
+
59
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
60
+ module GRPC
61
+ extend MyLogger
62
+ end
63
+ ```
64
+
43
65
  ## Supported Ruby Versions
44
66
 
45
- This library is supported on Ruby 2.0+.
67
+ This library is supported on Ruby 2.3+.
68
+
69
+ Google provides official support for Ruby versions that are actively supported
70
+ by Ruby Core—that is, Ruby versions that are either in normal maintenance or
71
+ in security maintenance, and not end of life. Currently, this means Ruby 2.3
72
+ and later. Older versions of Ruby _may_ still work, but are unsupported and not
73
+ recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
74
+ about the Ruby support schedule.
46
75
 
47
76
  ## Versioning
48
77
 
@@ -45,6 +45,39 @@ module Google
45
45
  # will be used.) Instructions and configuration options are covered in the
46
46
  # [Authentication Guide](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-translate/guides/authentication).
47
47
  #
48
+ # ## Enabling Logging
49
+ #
50
+ # To enable logging for this library, set the logger for the underlying
51
+ # [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The
52
+ # logger that you set may be a Ruby stdlib
53
+ # [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html)
54
+ # as shown below, or a
55
+ # [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
56
+ # that will write logs to [Stackdriver
57
+ # Logging](https://cloud.google.com/logging/). See
58
+ # [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
59
+ # and the gRPC
60
+ # [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb)
61
+ # for additional information.
62
+ #
63
+ # Configuring a Ruby stdlib logger:
64
+ #
65
+ # ```ruby
66
+ # require "logger"
67
+ #
68
+ # module MyLogger
69
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
70
+ # def logger
71
+ # LOGGER
72
+ # end
73
+ # end
74
+ #
75
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
76
+ # module GRPC
77
+ # extend MyLogger
78
+ # end
79
+ # ```
80
+ #
48
81
  # ## Translating texts
49
82
  #
50
83
  # Translating text from one language to another is easy (and extremely
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Translate
19
- VERSION = "1.2.0".freeze
19
+ VERSION = "1.2.1".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-translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
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-02-28 00:00:00.000000000 Z
12
+ date: 2018-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
125
  version: '1.1'
126
+ - !ruby/object:Gem::Dependency
127
+ name: redcarpet
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '3.0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '3.0'
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: rubocop
128
142
  requirement: !ruby/object:Gem::Requirement
@@ -220,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
234
  version: '0'
221
235
  requirements: []
222
236
  rubyforge_project:
223
- rubygems_version: 2.7.6
237
+ rubygems_version: 2.7.7
224
238
  signing_key:
225
239
  specification_version: 4
226
240
  summary: API Client library for Google Cloud Translation API