paperclip 5.3.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 823fa4ed80655c6ae50b1d241142e5afb3ed9e22
4
- data.tar.gz: bb9ceacd62b0e1f6167f6d0c6392a696b788ca73
3
+ metadata.gz: 610c7d5a2752fdd632262c73bcfbdf2cfc170663
4
+ data.tar.gz: 4c8484cdd5426d92a272d45e0bd9ee46e77e9c07
5
5
  SHA512:
6
- metadata.gz: 4e5b7a64e9db33be68a6a5b8467a8df6c074d16990e51c93bea5a070896b2ce3905ccdc0cad6323148229f3a03209974791a90234d948bb65f7f85868cab35f2
7
- data.tar.gz: 376768f292bdc225375aee8dce8c22b58e22904dabbf5044a7a2383b760b362e7a39830e9c63091e5ff1774b49ecd6f1dfbfdb293f198c66f80d3d8bb1fe1987
6
+ metadata.gz: 9d03df62f808fe6cb43b50389ed78071a592bd5b72ad73477ccebd08b12bba0f3e6810209e8d00bcb15128c9f359efccf04f874dddc84e1c89c7adcb16fb6ad0
7
+ data.tar.gz: e8c3f8a23d4d42d75460a1204f37e5ba75fd4e3a6b58859d1d3e33929a46e253e60d5cbd923e11dda6856ec43d5c19fff3cc57f83a3e08dbe8d2f6574c059286
data/NEWS CHANGED
@@ -1,3 +1,7 @@
1
+ 6.0.0 (2018-03-09):
2
+
3
+ * Improvement: Depend only on `aws-sdk-s3` instead of `aws-sdk` (https://github.com/thoughtbot/paperclip/pull/2481)
4
+
1
5
  5.3.0 (2018-03-09):
2
6
 
3
7
  * Improvement: Use `FactoryBot` instead of `FactoryGirl` (https://github.com/thoughtbot/paperclip/pull/2501)
data/README.md CHANGED
@@ -567,7 +567,7 @@ Storage
567
567
  Paperclip ships with 3 storage adapters:
568
568
 
569
569
  * File Storage
570
- * S3 Storage (via `aws-sdk`)
570
+ * S3 Storage (via `aws-sdk-s3`)
571
571
  * Fog Storage
572
572
 
573
573
  If you would like to use Paperclip with another storage, you can install these
@@ -593,10 +593,10 @@ _**NOTE**: This is a change from previous versions of Paperclip, but is overall
593
593
  safer choice for the default file store._
594
594
 
595
595
  You may also choose to store your files using Amazon's S3 service. To do so, include
596
- the `aws-sdk` gem in your Gemfile:
596
+ the `aws-sdk-s3` gem in your Gemfile:
597
597
 
598
598
  ```ruby
599
- gem 'aws-sdk', '~> 2.3.0'
599
+ gem 'aws-sdk-s3'
600
600
  ```
601
601
 
602
602
  And then you can specify using S3 from `has_attached_file`.
@@ -17,7 +17,7 @@ Given /^I generate a new rails application$/ do
17
17
  gem "jruby-openssl", :platform => :jruby
18
18
  gem "capybara"
19
19
  gem "gherkin"
20
- gem "aws-sdk", "~> 2.0.0"
20
+ gem "aws-sdk-s3"
21
21
  gem "racc", :platform => :rbx
22
22
  gem "rubysl", :platform => :rbx
23
23
  """
@@ -3,8 +3,8 @@ module Paperclip
3
3
  # Amazon's S3 file hosting service is a scalable, easy place to store files for
4
4
  # distribution. You can find out more about it at http://aws.amazon.com/s3
5
5
  #
6
- # To use Paperclip with S3, include the +aws-sdk+ gem in your Gemfile:
7
- # gem 'aws-sdk'
6
+ # To use Paperclip with S3, include the +aws-sdk-s3+ gem in your Gemfile:
7
+ # gem 'aws-sdk-s3'
8
8
  # There are a few S3-specific options for has_attached_file:
9
9
  # * +s3_credentials+: Takes a path, a File, a Hash or a Proc. The path (or File) must point
10
10
  # to a YAML file containing the +access_key_id+ and +secret_access_key+ that Amazon
@@ -96,7 +96,7 @@ module Paperclip
96
96
  # separate parts of your file name.
97
97
  # * +s3_host_name+: If you are using your bucket in Tokyo region
98
98
  # etc, write host_name (e.g., 's3-ap-northeast-1.amazonaws.com').
99
- # * +s3_region+: For aws-sdk v2, s3_region is required.
99
+ # * +s3_region+: For aws-sdk-s3, s3_region is required.
100
100
  # * +s3_metadata+: These key/value pairs will be stored with the
101
101
  # object. This option works by prefixing each key with
102
102
  # "x-amz-meta-" before sending it as a header on the object
@@ -118,20 +118,16 @@ module Paperclip
118
118
  # :s3_storage_class => :REDUCED_REDUNDANCY
119
119
  #
120
120
  # Other storage classes, such as <tt>:STANDARD_IA</tt>, are also available—see the
121
- # documentation for the <tt>aws-sdk</tt> gem for the full list.
121
+ # documentation for the <tt>aws-sdk-s3</tt> gem for the full list.
122
122
 
123
123
  module S3
124
124
  def self.extended base
125
125
  begin
126
- require 'aws-sdk'
126
+ require "aws-sdk-s3"
127
127
  rescue LoadError => e
128
- e.message << " (You may need to install the aws-sdk gem)"
128
+ e.message << " (You may need to install the aws-sdk-s3 gem)"
129
129
  raise e
130
130
  end
131
- if Gem::Version.new(Aws::VERSION) >= Gem::Version.new(2) &&
132
- Gem::Version.new(Aws::VERSION) <= Gem::Version.new("2.0.33")
133
- raise LoadError, "paperclip does not support aws-sdk versions 2.0.0 - 2.0.33. Please upgrade aws-sdk to a newer version."
134
- end
135
131
 
136
132
  base.instance_eval do
137
133
  @s3_options = @options[:s3_options] || {}
@@ -159,11 +155,6 @@ module Paperclip
159
155
 
160
156
  @http_proxy = @options[:http_proxy] || nil
161
157
 
162
- if @options.has_key?(:use_accelerate_endpoint) &&
163
- Gem::Version.new(Aws::VERSION) < Gem::Version.new("2.3.0")
164
- raise LoadError, ":use_accelerate_endpoint is only available from aws-sdk version 2.3.0. Please upgrade aws-sdk to a newer version."
165
- end
166
-
167
158
  @use_accelerate_endpoint = @options[:use_accelerate_endpoint]
168
159
  end
169
160
 
@@ -1,5 +1,5 @@
1
1
  module Paperclip
2
2
  unless defined?(Paperclip::VERSION)
3
- VERSION = "5.3.0".freeze
3
+ VERSION = "6.0.0".freeze
4
4
  end
5
5
  end
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
35
35
  s.add_development_dependency('rspec', '~> 3.0')
36
36
  s.add_development_dependency('appraisal')
37
37
  s.add_development_dependency('mocha')
38
- s.add_development_dependency('aws-sdk', '>= 2.3.0', '< 3.0')
38
+ s.add_development_dependency('aws-sdk-s3')
39
39
  s.add_development_dependency('bourne')
40
40
  s.add_development_dependency('cucumber-rails')
41
41
  s.add_development_dependency('cucumber-expressions', '4.0.3') # TODO: investigate failures on 4.0.4
@@ -1,5 +1,5 @@
1
- require 'spec_helper'
2
- require 'aws-sdk'
1
+ require "spec_helper"
2
+ require "aws-sdk-s3"
3
3
 
4
4
  describe Paperclip::Storage::S3 do
5
5
  before do
@@ -237,7 +237,7 @@ describe Paperclip::Storage::S3 do
237
237
  end
238
238
  end
239
239
 
240
- # if using aws-sdk-v2, the s3_host_name will be defined by the s3_region
240
+ # the s3_host_name will be defined by the s3_region
241
241
  context "s3_host_name" do
242
242
  before do
243
243
  rebuild_model storage: :s3,
@@ -282,7 +282,7 @@ describe Paperclip::Storage::S3 do
282
282
  end
283
283
  end
284
284
 
285
- context "use_accelerate_endpoint", if: aws_accelerate_available? do
285
+ context "use_accelerate_endpoint" do
286
286
  context "defaults to false" do
287
287
  before do
288
288
  rebuild_model(
@@ -308,7 +308,7 @@ describe Paperclip::Storage::S3 do
308
308
  end
309
309
  end
310
310
 
311
- context "set to true", if: aws_accelerate_available? do
311
+ context "set to true" do
312
312
  before do
313
313
  rebuild_model(
314
314
  storage: :s3,
@@ -793,7 +793,7 @@ describe Paperclip::Storage::S3 do
793
793
  end
794
794
  end
795
795
 
796
- # for aws-sdk-v2 the bucket.name is determined by the :s3_region
796
+ # the bucket.name is determined by the :s3_region
797
797
  context "Parsing S3 credentials with a s3_host_name in them" do
798
798
  before do
799
799
  rebuild_model storage: :s3,
@@ -39,7 +39,6 @@ RSpec.configure do |config|
39
39
  config.include TestData
40
40
  config.include Reporting
41
41
  config.extend VersionHelper
42
- config.extend ConditionalFilterHelper
43
42
  config.mock_framework = :mocha
44
43
  config.before(:all) do
45
44
  rebuild_model
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Yurek
@@ -151,25 +151,19 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: aws-sdk
154
+ name: aws-sdk-s3
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: 2.3.0
160
- - - "<"
161
- - !ruby/object:Gem::Version
162
- version: '3.0'
159
+ version: '0'
163
160
  type: :development
164
161
  prerelease: false
165
162
  version_requirements: !ruby/object:Gem::Requirement
166
163
  requirements:
167
164
  - - ">="
168
165
  - !ruby/object:Gem::Version
169
- version: 2.3.0
170
- - - "<"
171
- - !ruby/object:Gem::Version
172
- version: '3.0'
166
+ version: '0'
173
167
  - !ruby/object:Gem::Dependency
174
168
  name: bourne
175
169
  requirement: !ruby/object:Gem::Requirement
@@ -543,7 +537,6 @@ files:
543
537
  - spec/paperclip/validators_spec.rb
544
538
  - spec/spec_helper.rb
545
539
  - spec/support/assertions.rb
546
- - spec/support/conditional_filter_helper.rb
547
540
  - spec/support/fake_model.rb
548
541
  - spec/support/fake_rails.rb
549
542
  - spec/support/fixtures/12k.png
@@ -691,7 +684,6 @@ test_files:
691
684
  - spec/paperclip/validators_spec.rb
692
685
  - spec/spec_helper.rb
693
686
  - spec/support/assertions.rb
694
- - spec/support/conditional_filter_helper.rb
695
687
  - spec/support/fake_model.rb
696
688
  - spec/support/fake_rails.rb
697
689
  - spec/support/fixtures/12k.png
@@ -1,5 +0,0 @@
1
- module ConditionalFilterHelper
2
- def aws_accelerate_available?
3
- (Gem::Version.new(Aws::VERSION) >= Gem::Version.new("2.3.0"))
4
- end
5
- end