From 322eb7f80f117d32707923a29b8708705e0603bd Mon Sep 17 00:00:00 2001 From: Colin Mitchell Date: Tue, 23 Jan 2018 08:39:11 -0500 Subject: [PATCH] Remove references to old AWS SDK --- lib/paperclip/storage/s3.rb | 9 --------- paperclip.gemspec | 2 +- spec/paperclip/storage/s3_spec.rb | 2 +- spec/support/conditional_filter_helper.rb | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/paperclip/storage/s3.rb b/lib/paperclip/storage/s3.rb index 5c06eed7c..9b7cc4168 100644 --- a/lib/paperclip/storage/s3.rb +++ b/lib/paperclip/storage/s3.rb @@ -127,10 +127,6 @@ def self.extended base e.message << " (You may need to install the aws-sdk-s3 gem)" raise e end - if Gem::Version.new(Aws::VERSION) >= Gem::Version.new(2) && - Gem::Version.new(Aws::VERSION) <= Gem::Version.new("2.0.33") - raise LoadError, "paperclip does not support aws-sdk versions 2.0.0 - 2.0.33. Please upgrade aws-sdk to a newer version." - end base.instance_eval do @s3_options = @options[:s3_options] || {} @@ -158,11 +154,6 @@ def self.extended base @http_proxy = @options[:http_proxy] || nil - if @options.has_key?(:use_accelerate_endpoint) && - Gem::Version.new(Aws::VERSION) < Gem::Version.new("2.3.0") - raise LoadError, ":use_accelerate_endpoint is only available from aws-sdk version 2.3.0. Please upgrade aws-sdk to a newer version." - end - @use_accelerate_endpoint = @options[:use_accelerate_endpoint] end diff --git a/paperclip.gemspec b/paperclip.gemspec index e70a8996a..12f8688ac 100644 --- a/paperclip.gemspec +++ b/paperclip.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |s| s.add_development_dependency('rspec', '~> 3.0') s.add_development_dependency('appraisal') s.add_development_dependency('mocha') - s.add_development_dependency('aws-sdk', '>= 2.3.0', '< 3.0') + s.add_development_dependency('aws-sdk-s3') s.add_development_dependency('bourne') s.add_development_dependency('cucumber-rails') s.add_development_dependency('cucumber-expressions', '4.0.3') # TODO: investigate failures on 4.0.4 diff --git a/spec/paperclip/storage/s3_spec.rb b/spec/paperclip/storage/s3_spec.rb index 29f4425a2..35a532999 100644 --- a/spec/paperclip/storage/s3_spec.rb +++ b/spec/paperclip/storage/s3_spec.rb @@ -1,5 +1,5 @@ require 'spec_helper' -require 'aws-sdk' +require 'aws-sdk-s3' describe Paperclip::Storage::S3 do before do diff --git a/spec/support/conditional_filter_helper.rb b/spec/support/conditional_filter_helper.rb index 1277552e7..d5c6ec1f9 100644 --- a/spec/support/conditional_filter_helper.rb +++ b/spec/support/conditional_filter_helper.rb @@ -1,5 +1,5 @@ module ConditionalFilterHelper def aws_accelerate_available? - (Gem::Version.new(Aws::VERSION) >= Gem::Version.new("2.3.0")) + true end end