From 13f98d4dbb65181350a7d4cf3b8a88d902a7d6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= <johannes.wuerbach@googlemail.com> Date: Mon, 26 Feb 2018 17:17:34 +0100 Subject: [PATCH 1/2] Use aws-sdk v3 --- fluent-plugin-sns.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fluent-plugin-sns.gemspec b/fluent-plugin-sns.gemspec index 2d79901..1db5ada 100644 --- a/fluent-plugin-sns.gemspec +++ b/fluent-plugin-sns.gemspec @@ -31,14 +31,14 @@ Gem::Specification.new do |s| if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q<fluentd>, ["< 2", ">= 0.10.0"]) - s.add_runtime_dependency(%q<aws-sdk>, ["~> 2"]) + s.add_runtime_dependency(%q<aws-sdk>, ["~> 3"]) else s.add_dependency(%q<fluentd>, ["< 2", ">= 0.10.0"]) - s.add_dependency(%q<aws-sdk>, ["~> 2"]) + s.add_dependency(%q<aws-sdk>, ["~> 3"]) end else s.add_dependency(%q<fluentd>, ["< 2", ">= 0.10.0"]) - s.add_dependency(%q<aws-sdk>, ["~> 2"]) + s.add_dependency(%q<aws-sdk>, ["~> 3"]) end end From b9edf36867a531da96021eeb3557d987a40faf97 Mon Sep 17 00:00:00 2001 From: Christoph Grabo <christoph@contentful.com> Date: Sat, 20 Oct 2018 20:18:45 +0200 Subject: [PATCH 2/2] Use only the sns resource from aws-sdk --- Rakefile | 2 +- fluent-plugin-sns.gemspec | 7 +++---- lib/fluent/plugin/out_sns.rb | 5 +---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Rakefile b/Rakefile index e6306d7..4702387 100644 --- a/Rakefile +++ b/Rakefile @@ -13,7 +13,7 @@ begin gemspec.has_rdoc = false gemspec.require_paths = ["lib"] gemspec.add_dependency "fluentd", ">= 0.10.0", "< 2" - gemspec.add_dependency "aws-sdk", "~> 2" + gemspec.add_dependency "aws-sdk-sns", "~> 1.5" gemspec.test_files = Dir["test/**/*.rb"] gemspec.files = Dir["lib/**/*", "test/**/*.rb"] + %w[VERSION AUTHORS Rakefile] gemspec.executables = [] diff --git a/fluent-plugin-sns.gemspec b/fluent-plugin-sns.gemspec index 1db5ada..f7c35a7 100644 --- a/fluent-plugin-sns.gemspec +++ b/fluent-plugin-sns.gemspec @@ -31,14 +31,13 @@ Gem::Specification.new do |s| if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q<fluentd>, ["< 2", ">= 0.10.0"]) - s.add_runtime_dependency(%q<aws-sdk>, ["~> 3"]) + s.add_runtime_dependency(%q<aws-sdk-sns>, ["~> 1.5"]) else s.add_dependency(%q<fluentd>, ["< 2", ">= 0.10.0"]) - s.add_dependency(%q<aws-sdk>, ["~> 3"]) + s.add_dependency(%q<aws-sdk-sns>, ["~> 1.5"]) end else s.add_dependency(%q<fluentd>, ["< 2", ">= 0.10.0"]) - s.add_dependency(%q<aws-sdk>, ["~> 3"]) + s.add_dependency(%q<aws-sdk-sns>, ["~> 1.5"]) end end - diff --git a/lib/fluent/plugin/out_sns.rb b/lib/fluent/plugin/out_sns.rb index 70d3b43..048cced 100644 --- a/lib/fluent/plugin/out_sns.rb +++ b/lib/fluent/plugin/out_sns.rb @@ -1,10 +1,7 @@ require 'fluent/output' - +require 'aws-sdk-sns' module Fluent - - require 'aws-sdk' - class SNSOutput < Output Fluent::Plugin.register_output('sns', self)