Skip to content

Commit

Permalink
Add missing second argument to to_bson methods, introduced with under…
Browse files Browse the repository at this point in the history
…lying Mongo driver update (fixes issues logstash-plugins#60, logstash-plugins#64, logstash-plugins#65)
  • Loading branch information
rmmorrison committed Aug 23, 2019
1 parent 7316503 commit 57062d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/logstash/outputs/bson/big_decimal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module BigDecimal
# 1.221311.to_bson
# @return [ String ] The encoded string.
# @see http://bsonspec.org/#/specification
def to_bson(buffer = ByteBuffer.new)
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
buffer.put_bytes([ self ].pack(PACK))
end

Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/outputs/bson/logstash_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module LogStashEvent
# Event.new("field" => "value").to_bson
# @return [ String ] The encoded string.
# @see http://bsonspec.org/#/specification
def to_bson(buffer = ByteBuffer.new)
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
position = buffer.length
buffer.put_int32(0)
to_hash.each do |field, value|
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/outputs/bson/logstash_timestamp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module LogStashTimestamp
# A time is type 0x09 in the BSON spec.
BSON_TYPE = 9.chr.force_encoding(BINARY).freeze

def to_bson(buffer = ByteBuffer.new)
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
time.to_bson(buffer)
end

Expand Down

0 comments on commit 57062d5

Please sign in to comment.