Skip to content

Commit 83e3b50

Browse files
Fixed bson arguement error and changed mongo and bson version (#1)
Co-authored-by: singhksandeep <singhksandeep7@gmail.com>
1 parent c38344c commit 83e3b50

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

lib/logstash/outputs/bson/big_decimal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module BigDecimal
3333
# 1.221311.to_bson
3434
# @return [ String ] The encoded string.
3535
# @see http://bsonspec.org/#/specification
36-
def to_bson(buffer = ByteBuffer.new)
36+
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
3737
buffer.put_bytes([ self ].pack(PACK))
3838
end
3939

lib/logstash/outputs/bson/logstash_event.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module LogStashEvent
3030
# Event.new("field" => "value").to_bson
3131
# @return [ String ] The encoded string.
3232
# @see http://bsonspec.org/#/specification
33-
def to_bson(buffer = ByteBuffer.new)
33+
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
3434
position = buffer.length
3535
buffer.put_int32(0)
3636
to_hash.each do |field, value|

lib/logstash/outputs/bson/logstash_timestamp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module LogStashTimestamp
2525
# A time is type 0x09 in the BSON spec.
2626
BSON_TYPE = 9.chr.force_encoding(BINARY).freeze
2727

28-
def to_bson(buffer = ByteBuffer.new)
28+
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
2929
time.to_bson(buffer)
3030
end
3131

logstash-output-mongodb.gemspec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |s|
22
s.name = 'logstash-output-mongodb'
3-
s.version = '3.1.6'
4-
s.licenses = ['Apache License (2.0)']
3+
s.version = '3.1.7'
4+
s.licenses = ['Apache-2.0']
55
s.summary = "Writes events to MongoDB"
66
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
77
s.authors = ["Elastic"]
@@ -21,7 +21,8 @@ Gem::Specification.new do |s|
2121
# Gem dependencies
2222
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
2323
s.add_runtime_dependency 'logstash-codec-plain'
24-
s.add_runtime_dependency 'mongo', '~> 2.6'
24+
s.add_runtime_dependency 'mongo', '~> 2.11.4'
25+
s.add_runtime_dependency 'bson', '~> 4.8.2'
2526

2627
s.add_development_dependency 'logstash-devutils'
2728
end

0 commit comments

Comments
 (0)