paperclip 5.2.1 → 6.1.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.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/.github/issue_template.md +3 -0
  3. data/MIGRATING-ES.md +317 -0
  4. data/MIGRATING.md +375 -0
  5. data/NEWS +36 -0
  6. data/README.md +52 -18
  7. data/UPGRADING +3 -3
  8. data/features/step_definitions/attachment_steps.rb +10 -10
  9. data/features/step_definitions/rails_steps.rb +1 -1
  10. data/lib/generators/paperclip/paperclip_generator.rb +9 -1
  11. data/lib/generators/paperclip/templates/paperclip_migration.rb.erb +1 -1
  12. data/lib/paperclip/attachment.rb +19 -6
  13. data/lib/paperclip/file_command_content_type_detector.rb +1 -1
  14. data/lib/paperclip/filename_cleaner.rb +0 -1
  15. data/lib/paperclip/geometry_detector_factory.rb +3 -3
  16. data/lib/paperclip/helpers.rb +3 -3
  17. data/lib/paperclip/interpolations.rb +6 -1
  18. data/lib/paperclip/io_adapters/abstract_adapter.rb +11 -6
  19. data/lib/paperclip/io_adapters/attachment_adapter.rb +7 -1
  20. data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +2 -1
  21. data/lib/paperclip/io_adapters/uri_adapter.rb +8 -6
  22. data/lib/paperclip/logger.rb +1 -1
  23. data/lib/paperclip/media_type_spoof_detector.rb +11 -7
  24. data/lib/paperclip/processor.rb +10 -2
  25. data/lib/paperclip/schema.rb +1 -1
  26. data/lib/paperclip/storage/fog.rb +3 -2
  27. data/lib/paperclip/storage/s3.rb +8 -16
  28. data/lib/paperclip/style.rb +0 -1
  29. data/lib/paperclip/thumbnail.rb +8 -5
  30. data/lib/paperclip/url_generator.rb +1 -0
  31. data/lib/paperclip/validators/media_type_spoof_detection_validator.rb +4 -0
  32. data/lib/paperclip/version.rb +1 -1
  33. data/lib/paperclip.rb +2 -1
  34. data/paperclip.gemspec +2 -2
  35. data/spec/paperclip/attachment_processing_spec.rb +0 -1
  36. data/spec/paperclip/attachment_spec.rb +17 -2
  37. data/spec/paperclip/content_type_detector_spec.rb +1 -1
  38. data/spec/paperclip/file_command_content_type_detector_spec.rb +15 -1
  39. data/spec/paperclip/filename_cleaner_spec.rb +0 -1
  40. data/spec/paperclip/integration_spec.rb +41 -5
  41. data/spec/paperclip/interpolations_spec.rb +9 -0
  42. data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +59 -0
  43. data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +33 -16
  44. data/spec/paperclip/io_adapters/uri_adapter_spec.rb +56 -8
  45. data/spec/paperclip/matchers/validate_attachment_size_matcher_spec.rb +1 -1
  46. data/spec/paperclip/media_type_spoof_detector_spec.rb +41 -0
  47. data/spec/paperclip/paperclip_spec.rb +13 -13
  48. data/spec/paperclip/processor_spec.rb +4 -4
  49. data/spec/paperclip/schema_spec.rb +46 -46
  50. data/spec/paperclip/storage/fog_spec.rb +5 -0
  51. data/spec/paperclip/storage/s3_spec.rb +6 -6
  52. data/spec/paperclip/style_spec.rb +0 -1
  53. data/spec/paperclip/thumbnail_spec.rb +8 -6
  54. data/spec/paperclip/url_generator_spec.rb +0 -1
  55. data/spec/spec_helper.rb +0 -1
  56. data/spec/support/model_reconstruction.rb +2 -2
  57. metadata +120 -20
  58. data/spec/support/conditional_filter_helper.rb +0 -5
@@ -58,6 +58,32 @@ describe Paperclip::MediaTypeSpoofDetector do
58
58
  end
59
59
  end
60
60
 
61
+ context "GIF file named without extension, but we're told GIF" do
62
+ let(:file) { File.open(fixture_file("animated")) }
63
+ let(:spoofed?) do
64
+ Paperclip::MediaTypeSpoofDetector.
65
+ using(file, "animated", "image/gif").
66
+ spoofed?
67
+ end
68
+
69
+ it "accepts the file" do
70
+ assert !spoofed?
71
+ end
72
+ end
73
+
74
+ context "GIF file named without extension, but we're told HTML" do
75
+ let(:file) { File.open(fixture_file("animated")) }
76
+ let(:spoofed?) do
77
+ Paperclip::MediaTypeSpoofDetector.
78
+ using(file, "animated", "text/html").
79
+ spoofed?
80
+ end
81
+
82
+ it "rejects the file" do
83
+ assert spoofed?
84
+ end
85
+ end
86
+
61
87
  it "does not reject if content_type is empty but otherwise checks out" do
62
88
  file = File.open(fixture_file("empty.html"))
63
89
  assert ! Paperclip::MediaTypeSpoofDetector.using(file, "empty.html", "").spoofed?
@@ -76,4 +102,19 @@ describe Paperclip::MediaTypeSpoofDetector do
76
102
  Paperclip.options[:content_type_mappings] = {}
77
103
  end
78
104
  end
105
+
106
+ context "#type_from_file_command" do
107
+ let(:file) { File.new(fixture_file("empty.html")) }
108
+ let(:detector) { Paperclip::MediaTypeSpoofDetector.new(file, "html", "") }
109
+
110
+ it "does work with the output of old versions of file" do
111
+ Paperclip.stubs(:run).returns("text/html charset=us-ascii")
112
+ expect(detector.send(:type_from_file_command)).to eq("text/html")
113
+ end
114
+
115
+ it "does work with the output of new versions of file" do
116
+ Paperclip.stubs(:run).returns("text/html; charset=us-ascii")
117
+ expect(detector.send(:type_from_file_command)).to eq("text/html")
118
+ end
119
+ end
79
120
  end
@@ -4,40 +4,40 @@ describe Paperclip do
4
4
  context ".run" do
5
5
  before do
6
6
  Paperclip.options[:log_command] = false
7
- Cocaine::CommandLine.expects(:new).with("convert", "stuff", {}).returns(stub(:run))
8
- @original_command_line_path = Cocaine::CommandLine.path
7
+ Terrapin::CommandLine.expects(:new).with("convert", "stuff", {}).returns(stub(:run))
8
+ @original_command_line_path = Terrapin::CommandLine.path
9
9
  end
10
10
 
11
11
  after do
12
12
  Paperclip.options[:log_command] = true
13
- Cocaine::CommandLine.path = @original_command_line_path
13
+ Terrapin::CommandLine.path = @original_command_line_path
14
14
  end
15
15
 
16
- it "runs the command with Cocaine" do
16
+ it "runs the command with Terrapin" do
17
17
  Paperclip.run("convert", "stuff")
18
18
  end
19
19
 
20
- it "saves Cocaine::CommandLine.path that set before" do
21
- Cocaine::CommandLine.path = "/opt/my_app/bin"
20
+ it "saves Terrapin::CommandLine.path that set before" do
21
+ Terrapin::CommandLine.path = "/opt/my_app/bin"
22
22
  Paperclip.run("convert", "stuff")
23
- expect(Cocaine::CommandLine.path).to match("/opt/my_app/bin")
23
+ expect(Terrapin::CommandLine.path).to match("/opt/my_app/bin")
24
24
  end
25
25
 
26
- it "does not duplicate Cocaine::CommandLine.path on multiple runs" do
27
- Cocaine::CommandLine.expects(:new).with("convert", "more_stuff", {}).returns(stub(:run))
28
- Cocaine::CommandLine.path = nil
26
+ it "does not duplicate Terrapin::CommandLine.path on multiple runs" do
27
+ Terrapin::CommandLine.expects(:new).with("convert", "more_stuff", {}).returns(stub(:run))
28
+ Terrapin::CommandLine.path = nil
29
29
  Paperclip.options[:command_path] = "/opt/my_app/bin"
30
30
  Paperclip.run("convert", "stuff")
31
31
  Paperclip.run("convert", "more_stuff")
32
32
 
33
33
  cmd_path = Paperclip.options[:command_path]
34
- assert_equal 1, Cocaine::CommandLine.path.scan(cmd_path).count
34
+ assert_equal 1, Terrapin::CommandLine.path.scan(cmd_path).count
35
35
  end
36
36
  end
37
37
 
38
38
  it 'does not raise errors when doing a lot of running' do
39
39
  Paperclip.options[:command_path] = ["/usr/local/bin"] * 1024
40
- Cocaine::CommandLine.path = "/something/else"
40
+ Terrapin::CommandLine.path = "/something/else"
41
41
  100.times do |x|
42
42
  Paperclip.run("echo", x.to_s)
43
43
  end
@@ -63,7 +63,7 @@ describe Paperclip do
63
63
  context "Calling Paperclip.run with a logger" do
64
64
  it "passes the defined logger if :log_command is set" do
65
65
  Paperclip.options[:log_command] = true
66
- Cocaine::CommandLine.expects(:new).with("convert", "stuff", logger: Paperclip.logger).returns(stub(:run))
66
+ Terrapin::CommandLine.expects(:new).with("convert", "stuff", logger: Paperclip.logger).returns(stub(:run))
67
67
  Paperclip.run("convert", "stuff")
68
68
  end
69
69
  end
@@ -9,17 +9,17 @@ describe Paperclip::Processor do
9
9
  end
10
10
 
11
11
  context "Calling #convert" do
12
- it "runs the convert command with Cocaine" do
12
+ it "runs the convert command with Terrapin" do
13
13
  Paperclip.options[:log_command] = false
14
- Cocaine::CommandLine.expects(:new).with("convert", "stuff", {}).returns(stub(:run))
14
+ Terrapin::CommandLine.expects(:new).with("convert", "stuff", {}).returns(stub(:run))
15
15
  Paperclip::Processor.new('filename').convert("stuff")
16
16
  end
17
17
  end
18
18
 
19
19
  context "Calling #identify" do
20
- it "runs the identify command with Cocaine" do
20
+ it "runs the identify command with Terrapin" do
21
21
  Paperclip.options[:log_command] = false
22
- Cocaine::CommandLine.expects(:new).with("identify", "stuff", {}).returns(stub(:run))
22
+ Terrapin::CommandLine.expects(:new).with("identify", "stuff", {}).returns(stub(:run))
23
23
  Paperclip::Processor.new('filename').identify("stuff")
24
24
  end
25
25
  end
@@ -25,12 +25,12 @@ describe Paperclip::Schema do
25
25
  end
26
26
  end
27
27
 
28
- columns = Dummy.columns.map{ |column| [column.name, column.type] }
28
+ columns = Dummy.columns.map{ |column| [column.name, column.sql_type] }
29
29
 
30
- expect(columns).to include(['avatar_file_name', :string])
31
- expect(columns).to include(['avatar_content_type', :string])
32
- expect(columns).to include(['avatar_file_size', :integer])
33
- expect(columns).to include(['avatar_updated_at', :datetime])
30
+ expect(columns).to include(['avatar_file_name', "varchar"])
31
+ expect(columns).to include(['avatar_content_type', "varchar"])
32
+ expect(columns).to include(['avatar_file_size', "bigint"])
33
+ expect(columns).to include(['avatar_updated_at', "datetime"])
34
34
  end
35
35
 
36
36
  it "displays deprecation warning" do
@@ -50,12 +50,12 @@ describe Paperclip::Schema do
50
50
  end
51
51
 
52
52
  it "creates attachment columns" do
53
- columns = Dummy.columns.map{ |column| [column.name, column.type] }
53
+ columns = Dummy.columns.map{ |column| [column.name, column.sql_type] }
54
54
 
55
- expect(columns).to include(['avatar_file_name', :string])
56
- expect(columns).to include(['avatar_content_type', :string])
57
- expect(columns).to include(['avatar_file_size', :integer])
58
- expect(columns).to include(['avatar_updated_at', :datetime])
55
+ expect(columns).to include(['avatar_file_name', "varchar"])
56
+ expect(columns).to include(['avatar_content_type', "varchar"])
57
+ expect(columns).to include(['avatar_file_size', "bigint"])
58
+ expect(columns).to include(['avatar_updated_at', "datetime"])
59
59
  end
60
60
  end
61
61
 
@@ -89,12 +89,12 @@ describe Paperclip::Schema do
89
89
  end
90
90
 
91
91
  it "creates attachment columns" do
92
- columns = Dummy.columns.map{ |column| [column.name, column.type] }
92
+ columns = Dummy.columns.map{ |column| [column.name, column.sql_type] }
93
93
 
94
- expect(columns).to include(['avatar_file_name', :string])
95
- expect(columns).to include(['avatar_content_type', :string])
96
- expect(columns).to include(['avatar_file_size', :integer])
97
- expect(columns).to include(['avatar_updated_at', :datetime])
94
+ expect(columns).to include(['avatar_file_name', "varchar"])
95
+ expect(columns).to include(['avatar_content_type', "varchar"])
96
+ expect(columns).to include(['avatar_file_size', "bigint"])
97
+ expect(columns).to include(['avatar_updated_at', "datetime"])
98
98
  end
99
99
  end
100
100
 
@@ -119,16 +119,16 @@ describe Paperclip::Schema do
119
119
  end
120
120
 
121
121
  it "creates attachment columns" do
122
- columns = Dummy.columns.map{ |column| [column.name, column.type] }
122
+ columns = Dummy.columns.map{ |column| [column.name, column.sql_type] }
123
123
 
124
- expect(columns).to include(['avatar_file_name', :string])
125
- expect(columns).to include(['avatar_content_type', :string])
126
- expect(columns).to include(['avatar_file_size', :integer])
127
- expect(columns).to include(['avatar_updated_at', :datetime])
128
- expect(columns).to include(['photo_file_name', :string])
129
- expect(columns).to include(['photo_content_type', :string])
130
- expect(columns).to include(['photo_file_size', :integer])
131
- expect(columns).to include(['photo_updated_at', :datetime])
124
+ expect(columns).to include(['avatar_file_name', "varchar"])
125
+ expect(columns).to include(['avatar_content_type', "varchar"])
126
+ expect(columns).to include(['avatar_file_size', "bigint"])
127
+ expect(columns).to include(['avatar_updated_at', "datetime"])
128
+ expect(columns).to include(['photo_file_name', "varchar"])
129
+ expect(columns).to include(['photo_content_type', "varchar"])
130
+ expect(columns).to include(['photo_file_size', "bigint"])
131
+ expect(columns).to include(['photo_updated_at', "datetime"])
132
132
  end
133
133
  end
134
134
 
@@ -164,7 +164,7 @@ describe Paperclip::Schema do
164
164
  Dummy.connection.change_table :dummies do |t|
165
165
  t.column :avatar_file_name, :string
166
166
  t.column :avatar_content_type, :string
167
- t.column :avatar_file_size, :integer
167
+ t.column :avatar_file_size, :bigint
168
168
  t.column :avatar_updated_at, :datetime
169
169
  end
170
170
  end
@@ -178,12 +178,12 @@ describe Paperclip::Schema do
178
178
  Dummy.connection.drop_attached_file :dummies, :avatar
179
179
  end
180
180
 
181
- columns = Dummy.columns.map{ |column| [column.name, column.type] }
181
+ columns = Dummy.columns.map{ |column| [column.name, column.sql_type] }
182
182
 
183
- expect(columns).to_not include(['avatar_file_name', :string])
184
- expect(columns).to_not include(['avatar_content_type', :string])
185
- expect(columns).to_not include(['avatar_file_size', :integer])
186
- expect(columns).to_not include(['avatar_updated_at', :datetime])
183
+ expect(columns).to_not include(['avatar_file_name', "varchar"])
184
+ expect(columns).to_not include(['avatar_content_type', "varchar"])
185
+ expect(columns).to_not include(['avatar_file_size', "bigint"])
186
+ expect(columns).to_not include(['avatar_updated_at', "datetime"])
187
187
  end
188
188
 
189
189
  it "displays a deprecation warning" do
@@ -200,12 +200,12 @@ describe Paperclip::Schema do
200
200
  end
201
201
 
202
202
  it "removes the attachment columns" do
203
- columns = Dummy.columns.map{ |column| [column.name, column.type] }
203
+ columns = Dummy.columns.map{ |column| [column.name, column.sql_type] }
204
204
 
205
- expect(columns).to_not include(['avatar_file_name', :string])
206
- expect(columns).to_not include(['avatar_content_type', :string])
207
- expect(columns).to_not include(['avatar_file_size', :integer])
208
- expect(columns).to_not include(['avatar_updated_at', :datetime])
205
+ expect(columns).to_not include(['avatar_file_name', "varchar"])
206
+ expect(columns).to_not include(['avatar_content_type', "varchar"])
207
+ expect(columns).to_not include(['avatar_file_size', "bigint"])
208
+ expect(columns).to_not include(['avatar_updated_at', "datetime"])
209
209
  end
210
210
  end
211
211
 
@@ -214,7 +214,7 @@ describe Paperclip::Schema do
214
214
  Dummy.connection.change_table :dummies do |t|
215
215
  t.column :photo_file_name, :string
216
216
  t.column :photo_content_type, :string
217
- t.column :photo_file_size, :integer
217
+ t.column :photo_file_size, :bigint
218
218
  t.column :photo_updated_at, :datetime
219
219
  end
220
220
 
@@ -222,16 +222,16 @@ describe Paperclip::Schema do
222
222
  end
223
223
 
224
224
  it "removes the attachment columns" do
225
- columns = Dummy.columns.map{ |column| [column.name, column.type] }
226
-
227
- expect(columns).to_not include(['avatar_file_name', :string])
228
- expect(columns).to_not include(['avatar_content_type', :string])
229
- expect(columns).to_not include(['avatar_file_size', :integer])
230
- expect(columns).to_not include(['avatar_updated_at', :datetime])
231
- expect(columns).to_not include(['photo_file_name', :string])
232
- expect(columns).to_not include(['photo_content_type', :string])
233
- expect(columns).to_not include(['photo_file_size', :integer])
234
- expect(columns).to_not include(['photo_updated_at', :datetime])
225
+ columns = Dummy.columns.map{ |column| [column.name, column.sql_type] }
226
+
227
+ expect(columns).to_not include(['avatar_file_name', "varchar"])
228
+ expect(columns).to_not include(['avatar_content_type', "varchar"])
229
+ expect(columns).to_not include(['avatar_file_size', "bigint"])
230
+ expect(columns).to_not include(['avatar_updated_at', "datetime"])
231
+ expect(columns).to_not include(['photo_file_name', "varchar"])
232
+ expect(columns).to_not include(['photo_content_type', "varchar"])
233
+ expect(columns).to_not include(['photo_file_size', "bigint"])
234
+ expect(columns).to_not include(['photo_updated_at', "datetime"])
235
235
  end
236
236
  end
237
237
 
@@ -206,6 +206,11 @@ describe Paperclip::Storage::Fog do
206
206
  assert @dummy.save
207
207
  assert @connection.directories.get(@fog_directory)
208
208
  end
209
+
210
+ it "sucessfully rewinds the file during bucket creation" do
211
+ assert @dummy.save
212
+ expect(Paperclip.io_adapters.for(@dummy.avatar).read.length).to be > 0
213
+ end
209
214
  end
210
215
 
211
216
  context "with a bucket" do
@@ -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,
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  require 'spec_helper'
3
2
 
4
3
  describe Paperclip::Style do
@@ -48,7 +48,7 @@ describe Paperclip::Thumbnail do
48
48
  it "lets us know when a command isn't found versus a processing error" do
49
49
  old_path = ENV['PATH']
50
50
  begin
51
- Cocaine::CommandLine.path = ''
51
+ Terrapin::CommandLine.path = ''
52
52
  Paperclip.options[:command_path] = ''
53
53
  ENV['PATH'] = ''
54
54
  assert_raises(Paperclip::Errors::CommandNotFoundError) do
@@ -102,7 +102,7 @@ describe Paperclip::Thumbnail do
102
102
 
103
103
  output_file = thumb.make
104
104
 
105
- command = Cocaine::CommandLine.new("identify", "-format %wx%h :file")
105
+ command = Terrapin::CommandLine.new("identify", "-format %wx%h :file")
106
106
  assert_equal "50x50", command.run(file: output_file.path).strip
107
107
  end
108
108
 
@@ -179,17 +179,19 @@ describe Paperclip::Thumbnail do
179
179
  end
180
180
 
181
181
  it "errors when trying to create the thumbnail" do
182
- assert_raises(Paperclip::Error) do
183
- silence_stream(STDERR) do
182
+ silence_stream(STDERR) do
183
+ expect {
184
184
  @thumb.make
185
- end
185
+ }.to raise_error(
186
+ Paperclip::Error, /unrecognized option `-this-aint-no-option'/
187
+ )
186
188
  end
187
189
  end
188
190
 
189
191
  it "lets us know when a command isn't found versus a processing error" do
190
192
  old_path = ENV['PATH']
191
193
  begin
192
- Cocaine::CommandLine.path = ''
194
+ Terrapin::CommandLine.path = ''
193
195
  Paperclip.options[:command_path] = ''
194
196
  ENV['PATH'] = ''
195
197
  assert_raises(Paperclip::Errors::CommandNotFoundError) do
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  require 'spec_helper'
3
2
 
4
3
  describe Paperclip::UrlGenerator do
data/spec/spec_helper.rb CHANGED
@@ -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
@@ -27,7 +27,7 @@ module ModelReconstruction
27
27
  ActiveRecord::Base.connection.create_table :dummies, {force: true}, &block
28
28
  end
29
29
 
30
- def modify_table table_name, &block
30
+ def modify_table &block
31
31
  ActiveRecord::Base.connection.change_table :dummies, &block
32
32
  end
33
33
 
@@ -37,7 +37,7 @@ module ModelReconstruction
37
37
  table.column :other, :string
38
38
  table.column :avatar_file_name, :string
39
39
  table.column :avatar_content_type, :string
40
- table.column :avatar_file_size, :integer
40
+ table.column :avatar_file_size, :bigint
41
41
  table.column :avatar_updated_at, :datetime
42
42
  table.column :avatar_fingerprint, :string
43
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: 5.2.1
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: 2018-01-25 00:00:00.000000000 Z
11
+ date: 2018-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 4.2.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: cocaine
42
+ name: terrapin
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.5.5
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.5.5
54
+ version: 0.6.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mime-types
57
57
  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: 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
@@ -388,6 +382,7 @@ extensions: []
388
382
  extra_rdoc_files: []
389
383
  files:
390
384
  - ".codeclimate.yml"
385
+ - ".github/issue_template.md"
391
386
  - ".gitignore"
392
387
  - ".hound.yml"
393
388
  - ".rubocop.yml"
@@ -396,6 +391,8 @@ files:
396
391
  - CONTRIBUTING.md
397
392
  - Gemfile
398
393
  - LICENSE
394
+ - MIGRATING-ES.md
395
+ - MIGRATING.md
399
396
  - NEWS
400
397
  - README.md
401
398
  - RELEASING.md
@@ -543,7 +540,6 @@ files:
543
540
  - spec/paperclip/validators_spec.rb
544
541
  - spec/spec_helper.rb
545
542
  - spec/support/assertions.rb
546
- - spec/support/conditional_filter_helper.rb
547
543
  - spec/support/fake_model.rb
548
544
  - spec/support/fake_rails.rb
549
545
  - spec/support/fixtures/12k.png
@@ -582,9 +578,9 @@ post_install_message: |
582
578
  # NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER #
583
579
  ##################################################
584
580
 
585
- Paperclip is now compatible with aws-sdk >= 2.0.0.
581
+ Paperclip is now compatible with aws-sdk-s3.
586
582
 
587
- If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small
583
+ If you are using S3 storage, aws-sdk-s3 requires you to make a few small
588
584
  changes:
589
585
 
590
586
  * You must set the `s3_region`
@@ -593,7 +589,7 @@ post_install_message: |
593
589
  using a hyphen. For example, `:public_read` needs to be changed to
594
590
  `public-read`.
595
591
 
596
- For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch
592
+ For a walkthrough of upgrading from 4 to *5* (not 6) and aws-sdk >= 2.0 you can watch
597
593
  http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5
598
594
  rdoc_options: []
599
595
  require_paths:
@@ -611,8 +607,112 @@ required_rubygems_version: !ruby/object:Gem::Requirement
611
607
  requirements:
612
608
  - ImageMagick
613
609
  rubyforge_project:
614
- rubygems_version: 2.6.13
610
+ rubygems_version: 2.7.4
615
611
  signing_key:
616
612
  specification_version: 4
617
613
  summary: File attachments as attributes for ActiveRecord
618
- test_files: []
614
+ test_files:
615
+ - features/basic_integration.feature
616
+ - features/migration.feature
617
+ - features/rake_tasks.feature
618
+ - features/step_definitions/attachment_steps.rb
619
+ - features/step_definitions/html_steps.rb
620
+ - features/step_definitions/rails_steps.rb
621
+ - features/step_definitions/s3_steps.rb
622
+ - features/step_definitions/web_steps.rb
623
+ - features/support/env.rb
624
+ - features/support/fakeweb.rb
625
+ - features/support/file_helpers.rb
626
+ - features/support/fixtures/boot_config.txt
627
+ - features/support/fixtures/gemfile.txt
628
+ - features/support/fixtures/preinitializer.txt
629
+ - features/support/paths.rb
630
+ - features/support/rails.rb
631
+ - features/support/selectors.rb
632
+ - spec/database.yml
633
+ - spec/paperclip/attachment_definitions_spec.rb
634
+ - spec/paperclip/attachment_processing_spec.rb
635
+ - spec/paperclip/attachment_registry_spec.rb
636
+ - spec/paperclip/attachment_spec.rb
637
+ - spec/paperclip/content_type_detector_spec.rb
638
+ - spec/paperclip/file_command_content_type_detector_spec.rb
639
+ - spec/paperclip/filename_cleaner_spec.rb
640
+ - spec/paperclip/geometry_detector_spec.rb
641
+ - spec/paperclip/geometry_parser_spec.rb
642
+ - spec/paperclip/geometry_spec.rb
643
+ - spec/paperclip/glue_spec.rb
644
+ - spec/paperclip/has_attached_file_spec.rb
645
+ - spec/paperclip/integration_spec.rb
646
+ - spec/paperclip/interpolations_spec.rb
647
+ - spec/paperclip/io_adapters/abstract_adapter_spec.rb
648
+ - spec/paperclip/io_adapters/attachment_adapter_spec.rb
649
+ - spec/paperclip/io_adapters/data_uri_adapter_spec.rb
650
+ - spec/paperclip/io_adapters/empty_string_adapter_spec.rb
651
+ - spec/paperclip/io_adapters/file_adapter_spec.rb
652
+ - spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb
653
+ - spec/paperclip/io_adapters/identity_adapter_spec.rb
654
+ - spec/paperclip/io_adapters/nil_adapter_spec.rb
655
+ - spec/paperclip/io_adapters/registry_spec.rb
656
+ - spec/paperclip/io_adapters/stringio_adapter_spec.rb
657
+ - spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb
658
+ - spec/paperclip/io_adapters/uri_adapter_spec.rb
659
+ - spec/paperclip/matchers/have_attached_file_matcher_spec.rb
660
+ - spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb
661
+ - spec/paperclip/matchers/validate_attachment_presence_matcher_spec.rb
662
+ - spec/paperclip/matchers/validate_attachment_size_matcher_spec.rb
663
+ - spec/paperclip/media_type_spoof_detector_spec.rb
664
+ - spec/paperclip/meta_class_spec.rb
665
+ - spec/paperclip/paperclip_missing_attachment_styles_spec.rb
666
+ - spec/paperclip/paperclip_spec.rb
667
+ - spec/paperclip/plural_cache_spec.rb
668
+ - spec/paperclip/processor_helpers_spec.rb
669
+ - spec/paperclip/processor_spec.rb
670
+ - spec/paperclip/rails_environment_spec.rb
671
+ - spec/paperclip/rake_spec.rb
672
+ - spec/paperclip/schema_spec.rb
673
+ - spec/paperclip/storage/filesystem_spec.rb
674
+ - spec/paperclip/storage/fog_spec.rb
675
+ - spec/paperclip/storage/s3_live_spec.rb
676
+ - spec/paperclip/storage/s3_spec.rb
677
+ - spec/paperclip/style_spec.rb
678
+ - spec/paperclip/tempfile_factory_spec.rb
679
+ - spec/paperclip/tempfile_spec.rb
680
+ - spec/paperclip/thumbnail_spec.rb
681
+ - spec/paperclip/url_generator_spec.rb
682
+ - spec/paperclip/validators/attachment_content_type_validator_spec.rb
683
+ - spec/paperclip/validators/attachment_file_name_validator_spec.rb
684
+ - spec/paperclip/validators/attachment_presence_validator_spec.rb
685
+ - spec/paperclip/validators/attachment_size_validator_spec.rb
686
+ - spec/paperclip/validators/media_type_spoof_detection_validator_spec.rb
687
+ - spec/paperclip/validators_spec.rb
688
+ - spec/spec_helper.rb
689
+ - spec/support/assertions.rb
690
+ - spec/support/fake_model.rb
691
+ - spec/support/fake_rails.rb
692
+ - spec/support/fixtures/12k.png
693
+ - spec/support/fixtures/50x50.png
694
+ - spec/support/fixtures/5k.png
695
+ - spec/support/fixtures/animated
696
+ - spec/support/fixtures/animated.gif
697
+ - spec/support/fixtures/animated.unknown
698
+ - spec/support/fixtures/bad.png
699
+ - spec/support/fixtures/empty.html
700
+ - spec/support/fixtures/empty.xlsx
701
+ - spec/support/fixtures/fog.yml
702
+ - spec/support/fixtures/rotated.jpg
703
+ - spec/support/fixtures/s3.yml
704
+ - spec/support/fixtures/spaced file.jpg
705
+ - spec/support/fixtures/spaced file.png
706
+ - spec/support/fixtures/text.txt
707
+ - spec/support/fixtures/twopage.pdf
708
+ - spec/support/fixtures/uppercase.PNG
709
+ - spec/support/matchers/accept.rb
710
+ - spec/support/matchers/exist.rb
711
+ - spec/support/matchers/have_column.rb
712
+ - spec/support/mock_attachment.rb
713
+ - spec/support/mock_interpolator.rb
714
+ - spec/support/mock_url_generator_builder.rb
715
+ - spec/support/model_reconstruction.rb
716
+ - spec/support/reporting.rb
717
+ - spec/support/test_data.rb
718
+ - spec/support/version_helper.rb