This is an automated email from the ASF dual-hosted git repository. tjwp pushed a commit to branch tjwp-rubocop-1.14 in repository https://gitbox.apache.org/repos/asf/avro.git
commit 7253d7bbe576181ec38f118bc40506bf0f5cfb3e Author: Tim Perkins <[email protected]> AuthorDate: Sat May 15 10:46:50 2021 -0400 Enable and fix Security cops --- lang/ruby/.rubocop.yml | 2 +- lang/ruby/test/tool.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/ruby/.rubocop.yml b/lang/ruby/.rubocop.yml index 055f94d..93c6a8e 100644 --- a/lang/ruby/.rubocop.yml +++ b/lang/ruby/.rubocop.yml @@ -35,7 +35,7 @@ Naming: Enabled: false Security: - Enabled: false + Enabled: true Style: Enabled: false diff --git a/lang/ruby/test/tool.rb b/lang/ruby/test/tool.rb index c91ae43..0e73a24 100644 --- a/lang/ruby/test/tool.rb +++ b/lang/ruby/test/tool.rb @@ -22,7 +22,7 @@ require 'logger' class GenericResponder < Avro::IPC::Responder def initialize(proto, msg, datum) - proto_json = open(proto).read + proto_json = File.open(proto).read super(Avro::Protocol.parse(proto_json)) @msg = msg @datum = datum @@ -63,14 +63,14 @@ end def send_message(uri, proto, msg, datum) uri = URI.parse(uri) trans = Avro::IPC::HTTPTransceiver.new(uri.host, uri.port) - proto_json = open(proto).read + proto_json = File.open(proto).read requestor = Avro::IPC::Requestor.new(Avro::Protocol.parse(proto_json), trans) p requestor.request(msg, datum) end def file_or_stdin(f) - f == "-" ? STDIN : open(f) + f == "-" ? STDIN : File.open(f) end def main
