paperclip 4.2.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.hound.yml +1066 -0
- data/.rubocop.yml +1 -0
- data/.travis.yml +18 -15
- data/Appraisals +20 -12
- data/CONTRIBUTING.md +19 -8
- data/Gemfile +4 -9
- data/LICENSE +1 -1
- data/NEWS +101 -31
- data/README.md +243 -159
- data/RELEASING.md +17 -0
- data/Rakefile +1 -1
- data/UPGRADING +12 -9
- data/features/basic_integration.feature +8 -4
- data/features/migration.feature +0 -24
- data/features/step_definitions/attachment_steps.rb +27 -21
- data/features/step_definitions/html_steps.rb +2 -2
- data/features/step_definitions/rails_steps.rb +11 -17
- data/features/step_definitions/s3_steps.rb +2 -2
- data/features/step_definitions/web_steps.rb +1 -103
- data/features/support/file_helpers.rb +2 -2
- data/gemfiles/4.2.awsv2.0.gemfile +17 -0
- data/gemfiles/4.2.awsv2.1.gemfile +17 -0
- data/gemfiles/{4.1.gemfile → 4.2.awsv2.gemfile} +4 -3
- data/gemfiles/5.0.awsv2.0.gemfile +17 -0
- data/gemfiles/5.0.awsv2.1.gemfile +17 -0
- data/gemfiles/{4.2.gemfile → 5.0.awsv2.gemfile} +4 -3
- data/lib/paperclip/attachment.rb +19 -16
- data/lib/paperclip/attachment_registry.rb +3 -2
- data/lib/paperclip/callbacks.rb +8 -6
- data/lib/paperclip/content_type_detector.rb +27 -11
- data/lib/paperclip/errors.rb +3 -1
- data/lib/paperclip/file_command_content_type_detector.rb +6 -8
- data/lib/paperclip/geometry_parser_factory.rb +1 -1
- data/lib/paperclip/glue.rb +1 -1
- data/lib/paperclip/has_attached_file.rb +9 -2
- data/lib/paperclip/helpers.rb +14 -10
- data/lib/paperclip/interpolations/plural_cache.rb +6 -5
- data/lib/paperclip/interpolations.rb +18 -13
- data/lib/paperclip/io_adapters/abstract_adapter.rb +1 -0
- data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +1 -1
- data/lib/paperclip/io_adapters/uri_adapter.rb +3 -1
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +4 -4
- data/lib/paperclip/media_type_spoof_detector.rb +2 -2
- data/lib/paperclip/rails_environment.rb +25 -0
- data/lib/paperclip/schema.rb +3 -9
- data/lib/paperclip/storage/fog.rb +21 -12
- data/lib/paperclip/storage/s3.rb +51 -50
- data/lib/paperclip/thumbnail.rb +2 -3
- data/lib/paperclip/validators/attachment_size_validator.rb +1 -7
- data/lib/paperclip/version.rb +3 -1
- data/lib/paperclip.rb +15 -4
- data/lib/tasks/paperclip.rake +17 -1
- data/paperclip.gemspec +18 -15
- data/spec/paperclip/attachment_definitions_spec.rb +1 -1
- data/spec/paperclip/attachment_processing_spec.rb +2 -4
- data/spec/paperclip/attachment_registry_spec.rb +84 -13
- data/spec/paperclip/attachment_spec.rb +91 -31
- data/spec/paperclip/content_type_detector_spec.rb +8 -1
- data/spec/paperclip/file_command_content_type_detector_spec.rb +0 -1
- data/spec/paperclip/geometry_spec.rb +1 -1
- data/spec/paperclip/glue_spec.rb +44 -0
- data/spec/paperclip/has_attached_file_spec.rb +24 -8
- data/spec/paperclip/integration_spec.rb +4 -3
- data/spec/paperclip/interpolations_spec.rb +16 -13
- data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +2 -1
- data/spec/paperclip/io_adapters/file_adapter_spec.rb +4 -1
- data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +12 -0
- data/spec/paperclip/io_adapters/stringio_adapter_spec.rb +4 -0
- data/spec/paperclip/io_adapters/uri_adapter_spec.rb +27 -0
- data/spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb +10 -0
- data/spec/paperclip/media_type_spoof_detector_spec.rb +34 -11
- data/spec/paperclip/paperclip_spec.rb +4 -29
- data/spec/paperclip/plural_cache_spec.rb +17 -16
- data/spec/paperclip/rails_environment_spec.rb +33 -0
- data/spec/paperclip/storage/fog_spec.rb +42 -3
- data/spec/paperclip/storage/s3_live_spec.rb +8 -4
- data/spec/paperclip/storage/s3_spec.rb +255 -180
- data/spec/paperclip/tempfile_factory_spec.rb +4 -0
- data/spec/paperclip/thumbnail_spec.rb +16 -0
- data/spec/paperclip/url_generator_spec.rb +1 -1
- data/spec/paperclip/validators/attachment_size_validator_spec.rb +26 -20
- data/spec/paperclip/validators_spec.rb +3 -3
- data/spec/spec_helper.rb +6 -1
- data/spec/support/assertions.rb +7 -0
- data/spec/support/fake_model.rb +4 -0
- data/spec/support/fixtures/empty.xlsx +0 -0
- data/spec/support/matchers/have_column.rb +11 -2
- data/spec/support/model_reconstruction.rb +9 -1
- data/spec/support/reporting.rb +11 -0
- metadata +105 -54
- data/RUNNING_TESTS.md +0 -4
- data/cucumber/paperclip_steps.rb +0 -6
- data/gemfiles/3.2.gemfile +0 -19
- data/gemfiles/4.0.gemfile +0 -19
- 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/support/mock_model.rb +0 -2
- data/spec/support/rails_helpers.rb +0 -7
|
@@ -481,4 +481,20 @@ describe Paperclip::Thumbnail do
|
|
|
481
481
|
end
|
|
482
482
|
end
|
|
483
483
|
end
|
|
484
|
+
|
|
485
|
+
context "with a really long file name" do
|
|
486
|
+
before do
|
|
487
|
+
tempfile = Tempfile.new("f")
|
|
488
|
+
tempfile_additional_chars = tempfile.path.split("/")[-1].length + 15
|
|
489
|
+
image_file = File.new(fixture_file("5k.png"), "rb")
|
|
490
|
+
@file = Tempfile.new("f" * (255 - tempfile_additional_chars))
|
|
491
|
+
@file.write(image_file.read)
|
|
492
|
+
@file.rewind
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
it "does not throw Errno::ENAMETOOLONG" do
|
|
496
|
+
thumb = Paperclip::Thumbnail.new(@file, geometry: "50x50", format: :gif)
|
|
497
|
+
expect { thumb.make }.to_not raise_error
|
|
498
|
+
end
|
|
499
|
+
end
|
|
484
500
|
end
|
|
@@ -43,7 +43,7 @@ describe Paperclip::UrlGenerator do
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
it "executes the method named by the symbol as the default URL when no file is assigned" do
|
|
46
|
-
mock_model =
|
|
46
|
+
mock_model = FakeModel.new
|
|
47
47
|
mock_attachment = MockAttachment.new(model: mock_model)
|
|
48
48
|
mock_interpolator = MockInterpolator.new
|
|
49
49
|
default_url = :to_s
|
|
@@ -12,14 +12,6 @@ describe Paperclip::Validators::AttachmentSizeValidator do
|
|
|
12
12
|
))
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def self.storage_units
|
|
16
|
-
if defined?(ActiveSupport::NumberHelper) # Rails 4.0+
|
|
17
|
-
{ 5120 => '5 KB', 10240 => '10 KB' }
|
|
18
|
-
else
|
|
19
|
-
{ 5120 => '5120 Bytes', 10240 => '10240 Bytes' }
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
15
|
def self.should_allow_attachment_file_size(size)
|
|
24
16
|
context "when the attachment size is #{size}" do
|
|
25
17
|
it "adds error to dummy object" do
|
|
@@ -158,8 +150,10 @@ describe Paperclip::Validators::AttachmentSizeValidator do
|
|
|
158
150
|
message: "is invalid. (Between %{min} and %{max} please.)"
|
|
159
151
|
end
|
|
160
152
|
|
|
161
|
-
should_not_allow_attachment_file_size
|
|
162
|
-
|
|
153
|
+
should_not_allow_attachment_file_size(
|
|
154
|
+
11.kilobytes,
|
|
155
|
+
message: "is invalid. (Between 5 KB and 10 KB please.)"
|
|
156
|
+
)
|
|
163
157
|
end
|
|
164
158
|
|
|
165
159
|
context "given :less_than and :greater_than" do
|
|
@@ -169,8 +163,10 @@ describe Paperclip::Validators::AttachmentSizeValidator do
|
|
|
169
163
|
message: "is invalid. (Between %{min} and %{max} please.)"
|
|
170
164
|
end
|
|
171
165
|
|
|
172
|
-
should_not_allow_attachment_file_size
|
|
173
|
-
|
|
166
|
+
should_not_allow_attachment_file_size(
|
|
167
|
+
11.kilobytes,
|
|
168
|
+
message: "is invalid. (Between 5 KB and 10 KB please.)"
|
|
169
|
+
)
|
|
174
170
|
end
|
|
175
171
|
end
|
|
176
172
|
|
|
@@ -181,10 +177,15 @@ describe Paperclip::Validators::AttachmentSizeValidator do
|
|
|
181
177
|
less_than: 10.kilobytes
|
|
182
178
|
end
|
|
183
179
|
|
|
184
|
-
should_not_allow_attachment_file_size
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
180
|
+
should_not_allow_attachment_file_size(
|
|
181
|
+
11.kilobytes,
|
|
182
|
+
message: "must be less than 10 KB"
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
should_not_allow_attachment_file_size(
|
|
186
|
+
4.kilobytes,
|
|
187
|
+
message: "must be greater than 5 KB"
|
|
188
|
+
)
|
|
188
189
|
end
|
|
189
190
|
|
|
190
191
|
context "given a size range" do
|
|
@@ -192,10 +193,15 @@ describe Paperclip::Validators::AttachmentSizeValidator do
|
|
|
192
193
|
build_validator in: (5.kilobytes..10.kilobytes)
|
|
193
194
|
end
|
|
194
195
|
|
|
195
|
-
should_not_allow_attachment_file_size
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
should_not_allow_attachment_file_size(
|
|
197
|
+
11.kilobytes,
|
|
198
|
+
message: "must be in between 5 KB and 10 KB"
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
should_not_allow_attachment_file_size(
|
|
202
|
+
4.kilobytes,
|
|
203
|
+
message: "must be in between 5 KB and 10 KB"
|
|
204
|
+
)
|
|
199
205
|
end
|
|
200
206
|
end
|
|
201
207
|
|
|
@@ -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
|
|
|
@@ -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,6 +22,9 @@ 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'])
|
|
25
|
+
unless ActiveRecord::VERSION::STRING < "4.2"
|
|
26
|
+
ActiveRecord::Base.raise_in_transactional_callbacks = true
|
|
27
|
+
end
|
|
23
28
|
Paperclip.options[:logger] = ActiveRecord::Base.logger
|
|
24
29
|
|
|
25
30
|
Dir[File.join(ROOT, 'spec', 'support', '**', '*.rb')].each{|f| require f }
|
|
@@ -31,8 +36,8 @@ RSpec.configure do |config|
|
|
|
31
36
|
config.include Assertions
|
|
32
37
|
config.include ModelReconstruction
|
|
33
38
|
config.include TestData
|
|
39
|
+
config.include Reporting
|
|
34
40
|
config.extend VersionHelper
|
|
35
|
-
config.extend RailsHelpers::ClassMethods
|
|
36
41
|
config.mock_framework = :mocha
|
|
37
42
|
config.before(:all) do
|
|
38
43
|
rebuild_model
|
data/spec/support/assertions.rb
CHANGED
|
@@ -61,6 +61,13 @@ module Assertions
|
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
def assert_forbidden_response(url)
|
|
65
|
+
Net::HTTP.get_response(URI.parse(url)) do |response|
|
|
66
|
+
assert_equal "403", response.code,
|
|
67
|
+
"Expected HTTP response code 403, got #{response.code}"
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
64
71
|
def assert_frame_dimensions(range, frames)
|
|
65
72
|
frames.each_with_index do |frame, frame_index|
|
|
66
73
|
frame.split('x').each_with_index do |dimension, dimension_index |
|
data/spec/support/fake_model.rb
CHANGED
|
Binary file
|
|
@@ -8,7 +8,16 @@ RSpec::Matchers.define :have_column do |column_name|
|
|
|
8
8
|
column && column.default.to_s == @default.to_s
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
failure_message_method =
|
|
12
|
+
if RSpec::Version::STRING.to_i >= 3
|
|
13
|
+
:failure_message
|
|
14
|
+
else
|
|
15
|
+
:failure_message_for_should
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
send(failure_message_method) do |columns|
|
|
19
|
+
"expected to find '#{column_name}', " +
|
|
20
|
+
"default '#{@default}' " +
|
|
21
|
+
"in #{columns.map { |column| [column.name, column.default] }}"
|
|
13
22
|
end
|
|
14
23
|
end
|
|
@@ -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
|
|
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: 5.0.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: 2016-07-01 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
42
|
name: cocaine
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.5.
|
|
47
|
+
version: 0.5.5
|
|
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.5.
|
|
54
|
+
version: 0.5.5
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: mime-types
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -66,20 +66,34 @@ dependencies:
|
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: mimemagic
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 0.3.0
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 0.3.0
|
|
69
83
|
- !ruby/object:Gem::Dependency
|
|
70
84
|
name: activerecord
|
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
|
72
86
|
requirements:
|
|
73
87
|
- - ">="
|
|
74
88
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
89
|
+
version: 4.2.0
|
|
76
90
|
type: :development
|
|
77
91
|
prerelease: false
|
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
93
|
requirements:
|
|
80
94
|
- - ">="
|
|
81
95
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
96
|
+
version: 4.2.0
|
|
83
97
|
- !ruby/object:Gem::Dependency
|
|
84
98
|
name: shoulda
|
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -98,16 +112,16 @@ dependencies:
|
|
|
98
112
|
name: rspec
|
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
|
100
114
|
requirements:
|
|
101
|
-
- - "
|
|
115
|
+
- - "~>"
|
|
102
116
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0'
|
|
117
|
+
version: '3.0'
|
|
104
118
|
type: :development
|
|
105
119
|
prerelease: false
|
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
121
|
requirements:
|
|
108
|
-
- - "
|
|
122
|
+
- - "~>"
|
|
109
123
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0'
|
|
124
|
+
version: '3.0'
|
|
111
125
|
- !ruby/object:Gem::Dependency
|
|
112
126
|
name: appraisal
|
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -142,14 +156,20 @@ dependencies:
|
|
|
142
156
|
requirements:
|
|
143
157
|
- - ">="
|
|
144
158
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
159
|
+
version: 2.0.34
|
|
160
|
+
- - "<"
|
|
161
|
+
- !ruby/object:Gem::Version
|
|
162
|
+
version: '3.0'
|
|
146
163
|
type: :development
|
|
147
164
|
prerelease: false
|
|
148
165
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
166
|
requirements:
|
|
150
167
|
- - ">="
|
|
151
168
|
- !ruby/object:Gem::Version
|
|
152
|
-
version:
|
|
169
|
+
version: 2.0.34
|
|
170
|
+
- - "<"
|
|
171
|
+
- !ruby/object:Gem::Version
|
|
172
|
+
version: '3.0'
|
|
153
173
|
- !ruby/object:Gem::Dependency
|
|
154
174
|
name: bourne
|
|
155
175
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -170,16 +190,30 @@ dependencies:
|
|
|
170
190
|
requirements:
|
|
171
191
|
- - "~>"
|
|
172
192
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: 1.3.
|
|
193
|
+
version: 1.3.18
|
|
174
194
|
type: :development
|
|
175
195
|
prerelease: false
|
|
176
196
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
197
|
requirements:
|
|
178
198
|
- - "~>"
|
|
179
199
|
- !ruby/object:Gem::Version
|
|
180
|
-
version: 1.3.
|
|
200
|
+
version: 1.3.18
|
|
181
201
|
- !ruby/object:Gem::Dependency
|
|
182
202
|
name: aruba
|
|
203
|
+
requirement: !ruby/object:Gem::Requirement
|
|
204
|
+
requirements:
|
|
205
|
+
- - "~>"
|
|
206
|
+
- !ruby/object:Gem::Version
|
|
207
|
+
version: 0.9.0
|
|
208
|
+
type: :development
|
|
209
|
+
prerelease: false
|
|
210
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
211
|
+
requirements:
|
|
212
|
+
- - "~>"
|
|
213
|
+
- !ruby/object:Gem::Version
|
|
214
|
+
version: 0.9.0
|
|
215
|
+
- !ruby/object:Gem::Dependency
|
|
216
|
+
name: nokogiri
|
|
183
217
|
requirement: !ruby/object:Gem::Requirement
|
|
184
218
|
requirements:
|
|
185
219
|
- - ">="
|
|
@@ -193,7 +227,7 @@ dependencies:
|
|
|
193
227
|
- !ruby/object:Gem::Version
|
|
194
228
|
version: '0'
|
|
195
229
|
- !ruby/object:Gem::Dependency
|
|
196
|
-
name:
|
|
230
|
+
name: capybara
|
|
197
231
|
requirement: !ruby/object:Gem::Requirement
|
|
198
232
|
requirements:
|
|
199
233
|
- - ">="
|
|
@@ -207,21 +241,21 @@ dependencies:
|
|
|
207
241
|
- !ruby/object:Gem::Version
|
|
208
242
|
version: '0'
|
|
209
243
|
- !ruby/object:Gem::Dependency
|
|
210
|
-
name:
|
|
244
|
+
name: bundler
|
|
211
245
|
requirement: !ruby/object:Gem::Requirement
|
|
212
246
|
requirements:
|
|
213
|
-
- -
|
|
247
|
+
- - ">="
|
|
214
248
|
- !ruby/object:Gem::Version
|
|
215
|
-
version:
|
|
249
|
+
version: '0'
|
|
216
250
|
type: :development
|
|
217
251
|
prerelease: false
|
|
218
252
|
version_requirements: !ruby/object:Gem::Requirement
|
|
219
253
|
requirements:
|
|
220
|
-
- -
|
|
254
|
+
- - ">="
|
|
221
255
|
- !ruby/object:Gem::Version
|
|
222
|
-
version:
|
|
256
|
+
version: '0'
|
|
223
257
|
- !ruby/object:Gem::Dependency
|
|
224
|
-
name:
|
|
258
|
+
name: fog-aws
|
|
225
259
|
requirement: !ruby/object:Gem::Requirement
|
|
226
260
|
requirements:
|
|
227
261
|
- - ">="
|
|
@@ -235,19 +269,19 @@ dependencies:
|
|
|
235
269
|
- !ruby/object:Gem::Version
|
|
236
270
|
version: '0'
|
|
237
271
|
- !ruby/object:Gem::Dependency
|
|
238
|
-
name: fog
|
|
272
|
+
name: fog-local
|
|
239
273
|
requirement: !ruby/object:Gem::Requirement
|
|
240
274
|
requirements:
|
|
241
|
-
- - "
|
|
275
|
+
- - ">="
|
|
242
276
|
- !ruby/object:Gem::Version
|
|
243
|
-
version: '
|
|
277
|
+
version: '0'
|
|
244
278
|
type: :development
|
|
245
279
|
prerelease: false
|
|
246
280
|
version_requirements: !ruby/object:Gem::Requirement
|
|
247
281
|
requirements:
|
|
248
|
-
- - "
|
|
282
|
+
- - ">="
|
|
249
283
|
- !ruby/object:Gem::Version
|
|
250
|
-
version: '
|
|
284
|
+
version: '0'
|
|
251
285
|
- !ruby/object:Gem::Dependency
|
|
252
286
|
name: launchy
|
|
253
287
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -310,14 +344,14 @@ dependencies:
|
|
|
310
344
|
requirements:
|
|
311
345
|
- - ">="
|
|
312
346
|
- !ruby/object:Gem::Version
|
|
313
|
-
version:
|
|
347
|
+
version: 4.2.0
|
|
314
348
|
type: :development
|
|
315
349
|
prerelease: false
|
|
316
350
|
version_requirements: !ruby/object:Gem::Requirement
|
|
317
351
|
requirements:
|
|
318
352
|
- - ">="
|
|
319
353
|
- !ruby/object:Gem::Version
|
|
320
|
-
version:
|
|
354
|
+
version: 4.2.0
|
|
321
355
|
- !ruby/object:Gem::Dependency
|
|
322
356
|
name: generator_spec
|
|
323
357
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -354,6 +388,8 @@ extensions: []
|
|
|
354
388
|
extra_rdoc_files: []
|
|
355
389
|
files:
|
|
356
390
|
- ".gitignore"
|
|
391
|
+
- ".hound.yml"
|
|
392
|
+
- ".rubocop.yml"
|
|
357
393
|
- ".travis.yml"
|
|
358
394
|
- Appraisals
|
|
359
395
|
- CONTRIBUTING.md
|
|
@@ -361,10 +397,9 @@ files:
|
|
|
361
397
|
- LICENSE
|
|
362
398
|
- NEWS
|
|
363
399
|
- README.md
|
|
364
|
-
-
|
|
400
|
+
- RELEASING.md
|
|
365
401
|
- Rakefile
|
|
366
402
|
- UPGRADING
|
|
367
|
-
- cucumber/paperclip_steps.rb
|
|
368
403
|
- features/basic_integration.feature
|
|
369
404
|
- features/migration.feature
|
|
370
405
|
- features/rake_tasks.feature
|
|
@@ -382,10 +417,12 @@ files:
|
|
|
382
417
|
- features/support/paths.rb
|
|
383
418
|
- features/support/rails.rb
|
|
384
419
|
- features/support/selectors.rb
|
|
385
|
-
- gemfiles/
|
|
386
|
-
- gemfiles/4.
|
|
387
|
-
- gemfiles/4.
|
|
388
|
-
- gemfiles/
|
|
420
|
+
- gemfiles/4.2.awsv2.0.gemfile
|
|
421
|
+
- gemfiles/4.2.awsv2.1.gemfile
|
|
422
|
+
- gemfiles/4.2.awsv2.gemfile
|
|
423
|
+
- gemfiles/5.0.awsv2.0.gemfile
|
|
424
|
+
- gemfiles/5.0.awsv2.1.gemfile
|
|
425
|
+
- gemfiles/5.0.awsv2.gemfile
|
|
389
426
|
- lib/generators/paperclip/USAGE
|
|
390
427
|
- lib/generators/paperclip/paperclip_generator.rb
|
|
391
428
|
- lib/generators/paperclip/templates/paperclip_migration.rb.erb
|
|
@@ -417,14 +454,7 @@ files:
|
|
|
417
454
|
- lib/paperclip/io_adapters/stringio_adapter.rb
|
|
418
455
|
- lib/paperclip/io_adapters/uploaded_file_adapter.rb
|
|
419
456
|
- lib/paperclip/io_adapters/uri_adapter.rb
|
|
420
|
-
- lib/paperclip/locales/de.yml
|
|
421
457
|
- lib/paperclip/locales/en.yml
|
|
422
|
-
- lib/paperclip/locales/es.yml
|
|
423
|
-
- lib/paperclip/locales/ja.yml
|
|
424
|
-
- lib/paperclip/locales/pt-BR.yml
|
|
425
|
-
- lib/paperclip/locales/zh-CN.yml
|
|
426
|
-
- lib/paperclip/locales/zh-HK.yml
|
|
427
|
-
- lib/paperclip/locales/zh-TW.yml
|
|
428
458
|
- lib/paperclip/logger.rb
|
|
429
459
|
- lib/paperclip/matchers.rb
|
|
430
460
|
- lib/paperclip/matchers/have_attached_file_matcher.rb
|
|
@@ -435,6 +465,7 @@ files:
|
|
|
435
465
|
- lib/paperclip/missing_attachment_styles.rb
|
|
436
466
|
- lib/paperclip/processor.rb
|
|
437
467
|
- lib/paperclip/processor_helpers.rb
|
|
468
|
+
- lib/paperclip/rails_environment.rb
|
|
438
469
|
- lib/paperclip/railtie.rb
|
|
439
470
|
- lib/paperclip/schema.rb
|
|
440
471
|
- lib/paperclip/storage.rb
|
|
@@ -468,6 +499,7 @@ files:
|
|
|
468
499
|
- spec/paperclip/geometry_detector_spec.rb
|
|
469
500
|
- spec/paperclip/geometry_parser_spec.rb
|
|
470
501
|
- spec/paperclip/geometry_spec.rb
|
|
502
|
+
- spec/paperclip/glue_spec.rb
|
|
471
503
|
- spec/paperclip/has_attached_file_spec.rb
|
|
472
504
|
- spec/paperclip/integration_spec.rb
|
|
473
505
|
- spec/paperclip/interpolations_spec.rb
|
|
@@ -494,6 +526,7 @@ files:
|
|
|
494
526
|
- spec/paperclip/plural_cache_spec.rb
|
|
495
527
|
- spec/paperclip/processor_helpers_spec.rb
|
|
496
528
|
- spec/paperclip/processor_spec.rb
|
|
529
|
+
- spec/paperclip/rails_environment_spec.rb
|
|
497
530
|
- spec/paperclip/rake_spec.rb
|
|
498
531
|
- spec/paperclip/schema_spec.rb
|
|
499
532
|
- spec/paperclip/storage/filesystem_spec.rb
|
|
@@ -522,6 +555,7 @@ files:
|
|
|
522
555
|
- spec/support/fixtures/animated.unknown
|
|
523
556
|
- spec/support/fixtures/bad.png
|
|
524
557
|
- spec/support/fixtures/empty.html
|
|
558
|
+
- spec/support/fixtures/empty.xlsx
|
|
525
559
|
- spec/support/fixtures/fog.yml
|
|
526
560
|
- spec/support/fixtures/rotated.jpg
|
|
527
561
|
- spec/support/fixtures/s3.yml
|
|
@@ -535,17 +569,33 @@ files:
|
|
|
535
569
|
- spec/support/matchers/have_column.rb
|
|
536
570
|
- spec/support/mock_attachment.rb
|
|
537
571
|
- spec/support/mock_interpolator.rb
|
|
538
|
-
- spec/support/mock_model.rb
|
|
539
572
|
- spec/support/mock_url_generator_builder.rb
|
|
540
573
|
- spec/support/model_reconstruction.rb
|
|
541
|
-
- spec/support/
|
|
574
|
+
- spec/support/reporting.rb
|
|
542
575
|
- spec/support/test_data.rb
|
|
543
576
|
- spec/support/version_helper.rb
|
|
544
577
|
homepage: https://github.com/thoughtbot/paperclip
|
|
545
578
|
licenses:
|
|
546
579
|
- MIT
|
|
547
580
|
metadata: {}
|
|
548
|
-
post_install_message:
|
|
581
|
+
post_install_message: |
|
|
582
|
+
##################################################
|
|
583
|
+
# NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER #
|
|
584
|
+
##################################################
|
|
585
|
+
|
|
586
|
+
Paperclip is now compatible with aws-sdk >= 2.0.0.
|
|
587
|
+
|
|
588
|
+
If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small
|
|
589
|
+
changes:
|
|
590
|
+
|
|
591
|
+
* You must set the `s3_region`
|
|
592
|
+
* If you are explicitly setting permissions anywhere, such as in an initializer,
|
|
593
|
+
note that the format of the permissions changed from using an underscore to
|
|
594
|
+
using a hyphen. For example, `:public_read` needs to be changed to
|
|
595
|
+
`public-read`.
|
|
596
|
+
|
|
597
|
+
For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch
|
|
598
|
+
http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5
|
|
549
599
|
rdoc_options: []
|
|
550
600
|
require_paths:
|
|
551
601
|
- lib
|
|
@@ -553,7 +603,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
553
603
|
requirements:
|
|
554
604
|
- - ">="
|
|
555
605
|
- !ruby/object:Gem::Version
|
|
556
|
-
version: 1.
|
|
606
|
+
version: 2.1.0
|
|
557
607
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
558
608
|
requirements:
|
|
559
609
|
- - ">="
|
|
@@ -561,8 +611,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
561
611
|
version: '0'
|
|
562
612
|
requirements:
|
|
563
613
|
- ImageMagick
|
|
564
|
-
rubyforge_project:
|
|
565
|
-
rubygems_version: 2.
|
|
614
|
+
rubyforge_project:
|
|
615
|
+
rubygems_version: 2.6.2
|
|
566
616
|
signing_key:
|
|
567
617
|
specification_version: 4
|
|
568
618
|
summary: File attachments as attributes for ActiveRecord
|
|
@@ -595,6 +645,7 @@ test_files:
|
|
|
595
645
|
- spec/paperclip/geometry_detector_spec.rb
|
|
596
646
|
- spec/paperclip/geometry_parser_spec.rb
|
|
597
647
|
- spec/paperclip/geometry_spec.rb
|
|
648
|
+
- spec/paperclip/glue_spec.rb
|
|
598
649
|
- spec/paperclip/has_attached_file_spec.rb
|
|
599
650
|
- spec/paperclip/integration_spec.rb
|
|
600
651
|
- spec/paperclip/interpolations_spec.rb
|
|
@@ -621,6 +672,7 @@ test_files:
|
|
|
621
672
|
- spec/paperclip/plural_cache_spec.rb
|
|
622
673
|
- spec/paperclip/processor_helpers_spec.rb
|
|
623
674
|
- spec/paperclip/processor_spec.rb
|
|
675
|
+
- spec/paperclip/rails_environment_spec.rb
|
|
624
676
|
- spec/paperclip/rake_spec.rb
|
|
625
677
|
- spec/paperclip/schema_spec.rb
|
|
626
678
|
- spec/paperclip/storage/filesystem_spec.rb
|
|
@@ -649,6 +701,7 @@ test_files:
|
|
|
649
701
|
- spec/support/fixtures/animated.unknown
|
|
650
702
|
- spec/support/fixtures/bad.png
|
|
651
703
|
- spec/support/fixtures/empty.html
|
|
704
|
+
- spec/support/fixtures/empty.xlsx
|
|
652
705
|
- spec/support/fixtures/fog.yml
|
|
653
706
|
- spec/support/fixtures/rotated.jpg
|
|
654
707
|
- spec/support/fixtures/s3.yml
|
|
@@ -662,10 +715,8 @@ test_files:
|
|
|
662
715
|
- spec/support/matchers/have_column.rb
|
|
663
716
|
- spec/support/mock_attachment.rb
|
|
664
717
|
- spec/support/mock_interpolator.rb
|
|
665
|
-
- spec/support/mock_model.rb
|
|
666
718
|
- spec/support/mock_url_generator_builder.rb
|
|
667
719
|
- spec/support/model_reconstruction.rb
|
|
668
|
-
- spec/support/
|
|
720
|
+
- spec/support/reporting.rb
|
|
669
721
|
- spec/support/test_data.rb
|
|
670
722
|
- spec/support/version_helper.rb
|
|
671
|
-
has_rdoc:
|
data/RUNNING_TESTS.md
DELETED