test/plugin/constants.rb in fluent-plugin-google-cloud-0.12.11 vs test/plugin/constants.rb in fluent-plugin-google-cloud-0.13.0

- old
+ new

@@ -10,24 +10,13 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +require 'google/rpc/error_details_pb' + # Add some helper methods to standard classes. -module Google - module Protobuf - Any.class_eval do - # TODO(igorpeshansky): Remove this once - # https://github.com/google/protobuf/pull/4719 gets released. - def self.pack(msg, type_url_prefix = 'type.googleapis.com/') - any = Google::Protobuf::Any.new - any.pack(msg, type_url_prefix) - any - end - end - end -end String.class_eval do def inspect_octal specials = { 'a' => '\\007', 'b' => '\\010', @@ -1016,10 +1005,10 @@ ] } }.freeze PARTIAL_SUCCESS_GRPC_METADATA = begin - partial_errors = Google::Logging::V2::WriteLogEntriesPartialErrors.new( + partial_errors = Google::Cloud::Logging::V2::WriteLogEntriesPartialErrors.new( log_entry_errors: { 0 => Google::Rpc::Status.new( code: GRPC::Core::StatusCodes::PERMISSION_DENIED, message: 'User not authorized.', details: []