paperclip 4.3.7 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.codeclimate.yml +17 -0
- data/.github/issue_template.md +3 -0
- data/.hound.yml +5 -16
- data/.travis.yml +15 -12
- data/Appraisals +4 -8
- data/CONTRIBUTING.md +16 -5
- data/Gemfile +3 -8
- data/LICENSE +1 -1
- data/MIGRATING-ES.md +317 -0
- data/MIGRATING.md +375 -0
- data/NEWS +126 -31
- data/README.md +264 -156
- data/Rakefile +1 -1
- data/UPGRADING +12 -9
- data/features/basic_integration.feature +3 -2
- data/features/migration.feature +0 -24
- data/features/step_definitions/attachment_steps.rb +14 -14
- data/features/step_definitions/rails_steps.rb +29 -28
- data/features/step_definitions/s3_steps.rb +2 -2
- data/features/support/env.rb +1 -0
- data/features/support/paths.rb +1 -1
- data/features/support/rails.rb +0 -24
- data/gemfiles/4.2.gemfile +3 -5
- data/gemfiles/{3.2.gemfile → 5.0.gemfile} +4 -6
- data/lib/generators/paperclip/paperclip_generator.rb +9 -1
- data/lib/generators/paperclip/templates/paperclip_migration.rb.erb +1 -1
- data/lib/paperclip.rb +14 -12
- data/lib/paperclip/attachment.rb +44 -20
- data/lib/paperclip/attachment_registry.rb +2 -1
- data/lib/paperclip/callbacks.rb +8 -6
- data/lib/paperclip/content_type_detector.rb +3 -2
- data/lib/paperclip/errors.rb +3 -1
- data/lib/paperclip/file_command_content_type_detector.rb +1 -1
- data/lib/paperclip/filename_cleaner.rb +0 -1
- data/lib/paperclip/geometry_detector_factory.rb +3 -3
- data/lib/paperclip/glue.rb +1 -1
- data/lib/paperclip/has_attached_file.rb +7 -1
- data/lib/paperclip/helpers.rb +15 -11
- data/lib/paperclip/interpolations.rb +7 -2
- data/lib/paperclip/io_adapters/abstract_adapter.rb +31 -4
- data/lib/paperclip/io_adapters/attachment_adapter.rb +17 -6
- data/lib/paperclip/io_adapters/data_uri_adapter.rb +8 -8
- data/lib/paperclip/io_adapters/empty_string_adapter.rb +5 -4
- data/lib/paperclip/io_adapters/file_adapter.rb +12 -6
- data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +8 -7
- data/lib/paperclip/io_adapters/identity_adapter.rb +12 -6
- data/lib/paperclip/io_adapters/nil_adapter.rb +8 -5
- data/lib/paperclip/io_adapters/registry.rb +6 -2
- data/lib/paperclip/io_adapters/stringio_adapter.rb +9 -6
- data/lib/paperclip/io_adapters/uploaded_file_adapter.rb +10 -6
- data/lib/paperclip/io_adapters/uri_adapter.rb +22 -17
- data/lib/paperclip/logger.rb +1 -1
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +4 -4
- data/lib/paperclip/media_type_spoof_detector.rb +11 -7
- data/lib/paperclip/processor.rb +15 -6
- data/lib/paperclip/schema.rb +3 -9
- data/lib/paperclip/storage/filesystem.rb +13 -2
- data/lib/paperclip/storage/fog.rb +21 -14
- data/lib/paperclip/storage/s3.rb +81 -61
- data/lib/paperclip/style.rb +0 -1
- data/lib/paperclip/thumbnail.rb +22 -9
- data/lib/paperclip/url_generator.rb +17 -13
- data/lib/paperclip/validators.rb +1 -1
- data/lib/paperclip/validators/attachment_size_validator.rb +1 -7
- data/lib/paperclip/validators/media_type_spoof_detection_validator.rb +4 -0
- data/lib/paperclip/version.rb +3 -1
- data/lib/tasks/paperclip.rake +18 -4
- data/paperclip.gemspec +13 -10
- data/spec/paperclip/attachment_processing_spec.rb +2 -5
- data/spec/paperclip/attachment_registry_spec.rb +28 -0
- data/spec/paperclip/attachment_spec.rb +89 -20
- data/spec/paperclip/content_type_detector_spec.rb +1 -1
- data/spec/paperclip/file_command_content_type_detector_spec.rb +15 -1
- data/spec/paperclip/filename_cleaner_spec.rb +0 -1
- data/spec/paperclip/has_attached_file_spec.rb +24 -8
- data/spec/paperclip/integration_spec.rb +42 -5
- data/spec/paperclip/interpolations_spec.rb +9 -0
- data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +104 -22
- data/spec/paperclip/io_adapters/attachment_adapter_spec.rb +6 -3
- data/spec/paperclip/io_adapters/data_uri_adapter_spec.rb +7 -1
- data/spec/paperclip/io_adapters/file_adapter_spec.rb +2 -2
- data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +47 -13
- data/spec/paperclip/io_adapters/identity_adapter_spec.rb +1 -1
- data/spec/paperclip/io_adapters/registry_spec.rb +2 -2
- data/spec/paperclip/io_adapters/stringio_adapter_spec.rb +1 -1
- data/spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb +5 -5
- data/spec/paperclip/io_adapters/uri_adapter_spec.rb +104 -11
- data/spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb +10 -0
- data/spec/paperclip/matchers/validate_attachment_size_matcher_spec.rb +1 -1
- data/spec/paperclip/media_type_spoof_detector_spec.rb +41 -0
- data/spec/paperclip/paperclip_spec.rb +15 -45
- data/spec/paperclip/processor_spec.rb +4 -4
- data/spec/paperclip/schema_spec.rb +46 -46
- data/spec/paperclip/storage/fog_spec.rb +31 -0
- data/spec/paperclip/storage/s3_live_spec.rb +20 -14
- data/spec/paperclip/storage/s3_spec.rb +359 -192
- data/spec/paperclip/style_spec.rb +0 -1
- data/spec/paperclip/tempfile_spec.rb +35 -0
- data/spec/paperclip/thumbnail_spec.rb +43 -38
- data/spec/paperclip/url_generator_spec.rb +54 -44
- data/spec/paperclip/validators/attachment_size_validator_spec.rb +26 -20
- data/spec/paperclip/validators_spec.rb +5 -5
- data/spec/spec_helper.rb +5 -2
- data/spec/support/assertions.rb +12 -1
- data/spec/support/mock_attachment.rb +2 -0
- data/spec/support/mock_url_generator_builder.rb +2 -2
- data/spec/support/model_reconstruction.rb +11 -3
- data/spec/support/reporting.rb +11 -0
- metadata +64 -61
- data/cucumber/paperclip_steps.rb +0 -6
- data/gemfiles/4.1.gemfile +0 -19
- data/lib/paperclip/deprecations.rb +0 -42
- data/lib/paperclip/locales/de.yml +0 -18
- data/lib/paperclip/locales/es.yml +0 -18
- data/lib/paperclip/locales/ja.yml +0 -18
- data/lib/paperclip/locales/pt-BR.yml +0 -18
- data/lib/paperclip/locales/zh-CN.yml +0 -18
- data/lib/paperclip/locales/zh-HK.yml +0 -18
- data/lib/paperclip/locales/zh-TW.yml +0 -18
- data/spec/paperclip/deprecations_spec.rb +0 -65
- data/spec/support/deprecations.rb +0 -9
- data/spec/support/rails_helpers.rb +0 -7
@@ -3,6 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe Paperclip::Validators do
|
4
4
|
context "using the helper" do
|
5
5
|
before do
|
6
|
+
rebuild_class
|
6
7
|
Dummy.validates_attachment :avatar, presence: true, content_type: { content_type: "image/jpeg" }, size: { in: 0..10240 }
|
7
8
|
end
|
8
9
|
|
@@ -30,8 +31,8 @@ describe Paperclip::Validators do
|
|
30
31
|
before do
|
31
32
|
rebuild_class
|
32
33
|
Dummy.validates_attachment :avatar, file_type_ignorance: true, file_name: [
|
33
|
-
{ matches: /\A.*\.jpe?g\
|
34
|
-
{ matches: /\A.{,8}\..+\
|
34
|
+
{ matches: /\A.*\.jpe?g\z/i, message: :invalid_extension },
|
35
|
+
{ matches: /\A.{,8}\..+\z/i, message: [:too_long, count: 8] },
|
35
36
|
]
|
36
37
|
end
|
37
38
|
|
@@ -64,12 +65,11 @@ describe Paperclip::Validators do
|
|
64
65
|
assert_raises(RuntimeError){ dummy.valid? }
|
65
66
|
end
|
66
67
|
|
67
|
-
it 'allows you to attach a file that does not
|
68
|
+
it 'allows you to attach a file that does not violate these validations' do
|
68
69
|
dummy = Dummy.new(avatar: File.new(fixture_file('rotated.jpg')))
|
69
|
-
expect(dummy.errors.
|
70
|
+
expect(dummy.errors.full_messages).to be_empty
|
70
71
|
assert dummy.valid?
|
71
72
|
end
|
72
|
-
|
73
73
|
end
|
74
74
|
|
75
75
|
context "using the helper with a conditional" do
|
data/spec/spec_helper.rb
CHANGED
@@ -7,6 +7,8 @@ require 'active_support/core_ext'
|
|
7
7
|
require 'mocha/api'
|
8
8
|
require 'bourne'
|
9
9
|
require 'ostruct'
|
10
|
+
require 'pathname'
|
11
|
+
require 'activerecord-import'
|
10
12
|
|
11
13
|
ROOT = Pathname(File.expand_path(File.join(File.dirname(__FILE__), '..')))
|
12
14
|
|
@@ -20,7 +22,8 @@ FIXTURES_DIR = File.join(File.dirname(__FILE__), "fixtures")
|
|
20
22
|
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
21
23
|
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
22
24
|
ActiveRecord::Base.establish_connection(config['test'])
|
23
|
-
|
25
|
+
if ActiveRecord::VERSION::STRING >= "4.2" &&
|
26
|
+
ActiveRecord::VERSION::STRING < "5.0"
|
24
27
|
ActiveRecord::Base.raise_in_transactional_callbacks = true
|
25
28
|
end
|
26
29
|
Paperclip.options[:logger] = ActiveRecord::Base.logger
|
@@ -34,8 +37,8 @@ RSpec.configure do |config|
|
|
34
37
|
config.include Assertions
|
35
38
|
config.include ModelReconstruction
|
36
39
|
config.include TestData
|
40
|
+
config.include Reporting
|
37
41
|
config.extend VersionHelper
|
38
|
-
config.extend RailsHelpers::ClassMethods
|
39
42
|
config.mock_framework = :mocha
|
40
43
|
config.before(:all) do
|
41
44
|
rebuild_model
|
data/spec/support/assertions.rb
CHANGED
@@ -48,19 +48,30 @@ module Assertions
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def assert_success_response(url)
|
51
|
+
url = "http:#{url}" unless url =~ /http/
|
51
52
|
Net::HTTP.get_response(URI.parse(url)) do |response|
|
52
|
-
assert_equal "200",
|
53
|
+
assert_equal "200",
|
54
|
+
response.code,
|
53
55
|
"Expected HTTP response code 200, got #{response.code}"
|
54
56
|
end
|
55
57
|
end
|
56
58
|
|
57
59
|
def assert_not_found_response(url)
|
60
|
+
url = "http:#{url}" unless url =~ /http/
|
58
61
|
Net::HTTP.get_response(URI.parse(url)) do |response|
|
59
62
|
assert_equal "404", response.code,
|
60
63
|
"Expected HTTP response code 404, got #{response.code}"
|
61
64
|
end
|
62
65
|
end
|
63
66
|
|
67
|
+
def assert_forbidden_response(url)
|
68
|
+
url = "http:#{url}" unless url =~ /http/
|
69
|
+
Net::HTTP.get_response(URI.parse(url)) do |response|
|
70
|
+
assert_equal "403", response.code,
|
71
|
+
"Expected HTTP response code 403, got #{response.code}"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
64
75
|
def assert_frame_dimensions(range, frames)
|
65
76
|
frames.each_with_index do |frame, frame_index|
|
66
77
|
frame.split('x').each_with_index do |dimension, dimension_index |
|
@@ -1,7 +1,9 @@
|
|
1
1
|
class MockAttachment
|
2
2
|
attr_accessor :updated_at, :original_filename
|
3
|
+
attr_reader :options
|
3
4
|
|
4
5
|
def initialize(options = {})
|
6
|
+
@options = options
|
5
7
|
@model = options[:model]
|
6
8
|
@responds_to_updated_at = options[:responds_to_updated_at]
|
7
9
|
@updated_at = options[:updated_at]
|
@@ -10,7 +10,15 @@ module ModelReconstruction
|
|
10
10
|
|
11
11
|
klass.reset_column_information
|
12
12
|
klass.connection_pool.clear_table_cache!(klass.table_name) if klass.connection_pool.respond_to?(:clear_table_cache!)
|
13
|
-
|
13
|
+
|
14
|
+
if klass.connection.respond_to?(:schema_cache)
|
15
|
+
if ActiveRecord::VERSION::STRING >= "5.0"
|
16
|
+
klass.connection.schema_cache.clear_data_source_cache!(klass.table_name)
|
17
|
+
else
|
18
|
+
klass.connection.schema_cache.clear_table_cache!(klass.table_name)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
14
22
|
klass
|
15
23
|
end
|
16
24
|
|
@@ -19,7 +27,7 @@ module ModelReconstruction
|
|
19
27
|
ActiveRecord::Base.connection.create_table :dummies, {force: true}, &block
|
20
28
|
end
|
21
29
|
|
22
|
-
def modify_table
|
30
|
+
def modify_table &block
|
23
31
|
ActiveRecord::Base.connection.change_table :dummies, &block
|
24
32
|
end
|
25
33
|
|
@@ -29,7 +37,7 @@ module ModelReconstruction
|
|
29
37
|
table.column :other, :string
|
30
38
|
table.column :avatar_file_name, :string
|
31
39
|
table.column :avatar_content_type, :string
|
32
|
-
table.column :avatar_file_size, :
|
40
|
+
table.column :avatar_file_size, :bigint
|
33
41
|
table.column :avatar_updated_at, :datetime
|
34
42
|
table.column :avatar_fingerprint, :string
|
35
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Yurek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 4.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 4.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 4.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: terrapin
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.6.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.6.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mime-types
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
name: mimemagic
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.3.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.3.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 4.2.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 4.2.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: shoulda
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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:
|
160
|
-
- - "<="
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
version: '2.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:
|
170
|
-
- - "<="
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '2.0'
|
166
|
+
version: '0'
|
173
167
|
- !ruby/object:Gem::Dependency
|
174
168
|
name: bourne
|
175
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,19 +179,33 @@ dependencies:
|
|
185
179
|
- !ruby/object:Gem::Version
|
186
180
|
version: '0'
|
187
181
|
- !ruby/object:Gem::Dependency
|
188
|
-
name: cucumber
|
182
|
+
name: cucumber-rails
|
189
183
|
requirement: !ruby/object:Gem::Requirement
|
190
184
|
requirements:
|
191
|
-
- - "
|
185
|
+
- - ">="
|
192
186
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
187
|
+
version: '0'
|
194
188
|
type: :development
|
195
189
|
prerelease: false
|
196
190
|
version_requirements: !ruby/object:Gem::Requirement
|
197
191
|
requirements:
|
198
|
-
- - "
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: cucumber-expressions
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - '='
|
199
200
|
- !ruby/object:Gem::Version
|
200
|
-
version:
|
201
|
+
version: 4.0.3
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - '='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 4.0.3
|
201
209
|
- !ruby/object:Gem::Dependency
|
202
210
|
name: aruba
|
203
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -338,20 +346,6 @@ dependencies:
|
|
338
346
|
- - ">="
|
339
347
|
- !ruby/object:Gem::Version
|
340
348
|
version: '0'
|
341
|
-
- !ruby/object:Gem::Dependency
|
342
|
-
name: actionmailer
|
343
|
-
requirement: !ruby/object:Gem::Requirement
|
344
|
-
requirements:
|
345
|
-
- - ">="
|
346
|
-
- !ruby/object:Gem::Version
|
347
|
-
version: 3.2.0
|
348
|
-
type: :development
|
349
|
-
prerelease: false
|
350
|
-
version_requirements: !ruby/object:Gem::Requirement
|
351
|
-
requirements:
|
352
|
-
- - ">="
|
353
|
-
- !ruby/object:Gem::Version
|
354
|
-
version: 3.2.0
|
355
349
|
- !ruby/object:Gem::Dependency
|
356
350
|
name: generator_spec
|
357
351
|
requirement: !ruby/object:Gem::Requirement
|
@@ -387,6 +381,8 @@ executables: []
|
|
387
381
|
extensions: []
|
388
382
|
extra_rdoc_files: []
|
389
383
|
files:
|
384
|
+
- ".codeclimate.yml"
|
385
|
+
- ".github/issue_template.md"
|
390
386
|
- ".gitignore"
|
391
387
|
- ".hound.yml"
|
392
388
|
- ".rubocop.yml"
|
@@ -395,12 +391,13 @@ files:
|
|
395
391
|
- CONTRIBUTING.md
|
396
392
|
- Gemfile
|
397
393
|
- LICENSE
|
394
|
+
- MIGRATING-ES.md
|
395
|
+
- MIGRATING.md
|
398
396
|
- NEWS
|
399
397
|
- README.md
|
400
398
|
- RELEASING.md
|
401
399
|
- Rakefile
|
402
400
|
- UPGRADING
|
403
|
-
- cucumber/paperclip_steps.rb
|
404
401
|
- features/basic_integration.feature
|
405
402
|
- features/migration.feature
|
406
403
|
- features/rake_tasks.feature
|
@@ -418,9 +415,8 @@ files:
|
|
418
415
|
- features/support/paths.rb
|
419
416
|
- features/support/rails.rb
|
420
417
|
- features/support/selectors.rb
|
421
|
-
- gemfiles/3.2.gemfile
|
422
|
-
- gemfiles/4.1.gemfile
|
423
418
|
- gemfiles/4.2.gemfile
|
419
|
+
- gemfiles/5.0.gemfile
|
424
420
|
- lib/generators/paperclip/USAGE
|
425
421
|
- lib/generators/paperclip/paperclip_generator.rb
|
426
422
|
- lib/generators/paperclip/templates/paperclip_migration.rb.erb
|
@@ -429,7 +425,6 @@ files:
|
|
429
425
|
- lib/paperclip/attachment_registry.rb
|
430
426
|
- lib/paperclip/callbacks.rb
|
431
427
|
- lib/paperclip/content_type_detector.rb
|
432
|
-
- lib/paperclip/deprecations.rb
|
433
428
|
- lib/paperclip/errors.rb
|
434
429
|
- lib/paperclip/file_command_content_type_detector.rb
|
435
430
|
- lib/paperclip/filename_cleaner.rb
|
@@ -453,14 +448,7 @@ files:
|
|
453
448
|
- lib/paperclip/io_adapters/stringio_adapter.rb
|
454
449
|
- lib/paperclip/io_adapters/uploaded_file_adapter.rb
|
455
450
|
- lib/paperclip/io_adapters/uri_adapter.rb
|
456
|
-
- lib/paperclip/locales/de.yml
|
457
451
|
- lib/paperclip/locales/en.yml
|
458
|
-
- lib/paperclip/locales/es.yml
|
459
|
-
- lib/paperclip/locales/ja.yml
|
460
|
-
- lib/paperclip/locales/pt-BR.yml
|
461
|
-
- lib/paperclip/locales/zh-CN.yml
|
462
|
-
- lib/paperclip/locales/zh-HK.yml
|
463
|
-
- lib/paperclip/locales/zh-TW.yml
|
464
452
|
- lib/paperclip/logger.rb
|
465
453
|
- lib/paperclip/matchers.rb
|
466
454
|
- lib/paperclip/matchers/have_attached_file_matcher.rb
|
@@ -500,7 +488,6 @@ files:
|
|
500
488
|
- spec/paperclip/attachment_registry_spec.rb
|
501
489
|
- spec/paperclip/attachment_spec.rb
|
502
490
|
- spec/paperclip/content_type_detector_spec.rb
|
503
|
-
- spec/paperclip/deprecations_spec.rb
|
504
491
|
- spec/paperclip/file_command_content_type_detector_spec.rb
|
505
492
|
- spec/paperclip/filename_cleaner_spec.rb
|
506
493
|
- spec/paperclip/geometry_detector_spec.rb
|
@@ -542,6 +529,7 @@ files:
|
|
542
529
|
- spec/paperclip/storage/s3_spec.rb
|
543
530
|
- spec/paperclip/style_spec.rb
|
544
531
|
- spec/paperclip/tempfile_factory_spec.rb
|
532
|
+
- spec/paperclip/tempfile_spec.rb
|
545
533
|
- spec/paperclip/thumbnail_spec.rb
|
546
534
|
- spec/paperclip/url_generator_spec.rb
|
547
535
|
- spec/paperclip/validators/attachment_content_type_validator_spec.rb
|
@@ -552,7 +540,6 @@ files:
|
|
552
540
|
- spec/paperclip/validators_spec.rb
|
553
541
|
- spec/spec_helper.rb
|
554
542
|
- spec/support/assertions.rb
|
555
|
-
- spec/support/deprecations.rb
|
556
543
|
- spec/support/fake_model.rb
|
557
544
|
- spec/support/fake_rails.rb
|
558
545
|
- spec/support/fixtures/12k.png
|
@@ -579,14 +566,31 @@ files:
|
|
579
566
|
- spec/support/mock_interpolator.rb
|
580
567
|
- spec/support/mock_url_generator_builder.rb
|
581
568
|
- spec/support/model_reconstruction.rb
|
582
|
-
- spec/support/
|
569
|
+
- spec/support/reporting.rb
|
583
570
|
- spec/support/test_data.rb
|
584
571
|
- spec/support/version_helper.rb
|
585
572
|
homepage: https://github.com/thoughtbot/paperclip
|
586
573
|
licenses:
|
587
574
|
- MIT
|
588
575
|
metadata: {}
|
589
|
-
post_install_message:
|
576
|
+
post_install_message: |
|
577
|
+
##################################################
|
578
|
+
# NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER #
|
579
|
+
##################################################
|
580
|
+
|
581
|
+
Paperclip is now compatible with aws-sdk-s3.
|
582
|
+
|
583
|
+
If you are using S3 storage, aws-sdk-s3 requires you to make a few small
|
584
|
+
changes:
|
585
|
+
|
586
|
+
* You must set the `s3_region`
|
587
|
+
* If you are explicitly setting permissions anywhere, such as in an initializer,
|
588
|
+
note that the format of the permissions changed from using an underscore to
|
589
|
+
using a hyphen. For example, `:public_read` needs to be changed to
|
590
|
+
`public-read`.
|
591
|
+
|
592
|
+
For a walkthrough of upgrading from 4 to *5* (not 6) and aws-sdk >= 2.0 you can watch
|
593
|
+
http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5
|
590
594
|
rdoc_options: []
|
591
595
|
require_paths:
|
592
596
|
- lib
|
@@ -594,7 +598,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
594
598
|
requirements:
|
595
599
|
- - ">="
|
596
600
|
- !ruby/object:Gem::Version
|
597
|
-
version: 1.
|
601
|
+
version: 2.1.0
|
598
602
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
599
603
|
requirements:
|
600
604
|
- - ">="
|
@@ -603,7 +607,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
603
607
|
requirements:
|
604
608
|
- ImageMagick
|
605
609
|
rubyforge_project:
|
606
|
-
rubygems_version: 2.
|
610
|
+
rubygems_version: 2.7.4
|
607
611
|
signing_key:
|
608
612
|
specification_version: 4
|
609
613
|
summary: File attachments as attributes for ActiveRecord
|
@@ -631,7 +635,6 @@ test_files:
|
|
631
635
|
- spec/paperclip/attachment_registry_spec.rb
|
632
636
|
- spec/paperclip/attachment_spec.rb
|
633
637
|
- spec/paperclip/content_type_detector_spec.rb
|
634
|
-
- spec/paperclip/deprecations_spec.rb
|
635
638
|
- spec/paperclip/file_command_content_type_detector_spec.rb
|
636
639
|
- spec/paperclip/filename_cleaner_spec.rb
|
637
640
|
- spec/paperclip/geometry_detector_spec.rb
|
@@ -673,6 +676,7 @@ test_files:
|
|
673
676
|
- spec/paperclip/storage/s3_spec.rb
|
674
677
|
- spec/paperclip/style_spec.rb
|
675
678
|
- spec/paperclip/tempfile_factory_spec.rb
|
679
|
+
- spec/paperclip/tempfile_spec.rb
|
676
680
|
- spec/paperclip/thumbnail_spec.rb
|
677
681
|
- spec/paperclip/url_generator_spec.rb
|
678
682
|
- spec/paperclip/validators/attachment_content_type_validator_spec.rb
|
@@ -683,7 +687,6 @@ test_files:
|
|
683
687
|
- spec/paperclip/validators_spec.rb
|
684
688
|
- spec/spec_helper.rb
|
685
689
|
- spec/support/assertions.rb
|
686
|
-
- spec/support/deprecations.rb
|
687
690
|
- spec/support/fake_model.rb
|
688
691
|
- spec/support/fake_rails.rb
|
689
692
|
- spec/support/fixtures/12k.png
|
@@ -710,6 +713,6 @@ test_files:
|
|
710
713
|
- spec/support/mock_interpolator.rb
|
711
714
|
- spec/support/mock_url_generator_builder.rb
|
712
715
|
- spec/support/model_reconstruction.rb
|
713
|
-
- spec/support/
|
716
|
+
- spec/support/reporting.rb
|
714
717
|
- spec/support/test_data.rb
|
715
718
|
- spec/support/version_helper.rb
|