Sha256: e052c87124c938bfc0aa54af034e7b1f6087d901f0b23dc7941461b58fe2be7d

Contents?: true

Size: 666 Bytes

Versions: 10

Compression:

Stored size: 666 Bytes

Contents

# This patch was stolen from logstash-plugins/logstash-output-s3#102.
#
# This patch is a workaround for a JRuby issue which has been fixed in JRuby
# 9000, but not in JRuby 1.7. See https://github.com/jruby/jruby/issues/3645
# and https://github.com/jruby/jruby/issues/3920. This is necessary because the
# `aws-sdk` is doing tricky name discovery to generate the correct error class.
#
# As per https://github.com/aws/aws-sdk-ruby/issues/1301#issuecomment-261115960,
# this patch may be short-lived anyway.
require 'aws-sdk'

begin
  old_stderr = $stderr
  $stderr = StringIO.new

  module Aws
    const_set(:SQS, Aws::SQS)
  end
ensure
  $stderr = old_stderr
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
logstash-output-sqs-5.1.2 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-5.1.1 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-5.1.0 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-5.0.2 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-4.0.3 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-5.0.1 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-5.0.0 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-4.0.2 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-4.0.1 lib/logstash/outputs/sqs/patch.rb
logstash-output-sqs-4.0.0 lib/logstash/outputs/sqs/patch.rb