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.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +1066 -0
  3. data/.rubocop.yml +1 -0
  4. data/.travis.yml +18 -15
  5. data/Appraisals +20 -12
  6. data/CONTRIBUTING.md +19 -8
  7. data/Gemfile +4 -9
  8. data/LICENSE +1 -1
  9. data/NEWS +101 -31
  10. data/README.md +243 -159
  11. data/RELEASING.md +17 -0
  12. data/Rakefile +1 -1
  13. data/UPGRADING +12 -9
  14. data/features/basic_integration.feature +8 -4
  15. data/features/migration.feature +0 -24
  16. data/features/step_definitions/attachment_steps.rb +27 -21
  17. data/features/step_definitions/html_steps.rb +2 -2
  18. data/features/step_definitions/rails_steps.rb +11 -17
  19. data/features/step_definitions/s3_steps.rb +2 -2
  20. data/features/step_definitions/web_steps.rb +1 -103
  21. data/features/support/file_helpers.rb +2 -2
  22. data/gemfiles/4.2.awsv2.0.gemfile +17 -0
  23. data/gemfiles/4.2.awsv2.1.gemfile +17 -0
  24. data/gemfiles/{4.1.gemfile → 4.2.awsv2.gemfile} +4 -3
  25. data/gemfiles/5.0.awsv2.0.gemfile +17 -0
  26. data/gemfiles/5.0.awsv2.1.gemfile +17 -0
  27. data/gemfiles/{4.2.gemfile → 5.0.awsv2.gemfile} +4 -3
  28. data/lib/paperclip/attachment.rb +19 -16
  29. data/lib/paperclip/attachment_registry.rb +3 -2
  30. data/lib/paperclip/callbacks.rb +8 -6
  31. data/lib/paperclip/content_type_detector.rb +27 -11
  32. data/lib/paperclip/errors.rb +3 -1
  33. data/lib/paperclip/file_command_content_type_detector.rb +6 -8
  34. data/lib/paperclip/geometry_parser_factory.rb +1 -1
  35. data/lib/paperclip/glue.rb +1 -1
  36. data/lib/paperclip/has_attached_file.rb +9 -2
  37. data/lib/paperclip/helpers.rb +14 -10
  38. data/lib/paperclip/interpolations/plural_cache.rb +6 -5
  39. data/lib/paperclip/interpolations.rb +18 -13
  40. data/lib/paperclip/io_adapters/abstract_adapter.rb +1 -0
  41. data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +1 -1
  42. data/lib/paperclip/io_adapters/uri_adapter.rb +3 -1
  43. data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +4 -4
  44. data/lib/paperclip/media_type_spoof_detector.rb +2 -2
  45. data/lib/paperclip/rails_environment.rb +25 -0
  46. data/lib/paperclip/schema.rb +3 -9
  47. data/lib/paperclip/storage/fog.rb +21 -12
  48. data/lib/paperclip/storage/s3.rb +51 -50
  49. data/lib/paperclip/thumbnail.rb +2 -3
  50. data/lib/paperclip/validators/attachment_size_validator.rb +1 -7
  51. data/lib/paperclip/version.rb +3 -1
  52. data/lib/paperclip.rb +15 -4
  53. data/lib/tasks/paperclip.rake +17 -1
  54. data/paperclip.gemspec +18 -15
  55. data/spec/paperclip/attachment_definitions_spec.rb +1 -1
  56. data/spec/paperclip/attachment_processing_spec.rb +2 -4
  57. data/spec/paperclip/attachment_registry_spec.rb +84 -13
  58. data/spec/paperclip/attachment_spec.rb +91 -31
  59. data/spec/paperclip/content_type_detector_spec.rb +8 -1
  60. data/spec/paperclip/file_command_content_type_detector_spec.rb +0 -1
  61. data/spec/paperclip/geometry_spec.rb +1 -1
  62. data/spec/paperclip/glue_spec.rb +44 -0
  63. data/spec/paperclip/has_attached_file_spec.rb +24 -8
  64. data/spec/paperclip/integration_spec.rb +4 -3
  65. data/spec/paperclip/interpolations_spec.rb +16 -13
  66. data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +2 -1
  67. data/spec/paperclip/io_adapters/file_adapter_spec.rb +4 -1
  68. data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +12 -0
  69. data/spec/paperclip/io_adapters/stringio_adapter_spec.rb +4 -0
  70. data/spec/paperclip/io_adapters/uri_adapter_spec.rb +27 -0
  71. data/spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb +10 -0
  72. data/spec/paperclip/media_type_spoof_detector_spec.rb +34 -11
  73. data/spec/paperclip/paperclip_spec.rb +4 -29
  74. data/spec/paperclip/plural_cache_spec.rb +17 -16
  75. data/spec/paperclip/rails_environment_spec.rb +33 -0
  76. data/spec/paperclip/storage/fog_spec.rb +42 -3
  77. data/spec/paperclip/storage/s3_live_spec.rb +8 -4
  78. data/spec/paperclip/storage/s3_spec.rb +255 -180
  79. data/spec/paperclip/tempfile_factory_spec.rb +4 -0
  80. data/spec/paperclip/thumbnail_spec.rb +16 -0
  81. data/spec/paperclip/url_generator_spec.rb +1 -1
  82. data/spec/paperclip/validators/attachment_size_validator_spec.rb +26 -20
  83. data/spec/paperclip/validators_spec.rb +3 -3
  84. data/spec/spec_helper.rb +6 -1
  85. data/spec/support/assertions.rb +7 -0
  86. data/spec/support/fake_model.rb +4 -0
  87. data/spec/support/fixtures/empty.xlsx +0 -0
  88. data/spec/support/matchers/have_column.rb +11 -2
  89. data/spec/support/model_reconstruction.rb +9 -1
  90. data/spec/support/reporting.rb +11 -0
  91. metadata +105 -54
  92. data/RUNNING_TESTS.md +0 -4
  93. data/cucumber/paperclip_steps.rb +0 -6
  94. data/gemfiles/3.2.gemfile +0 -19
  95. data/gemfiles/4.0.gemfile +0 -19
  96. data/lib/paperclip/locales/de.yml +0 -18
  97. data/lib/paperclip/locales/es.yml +0 -18
  98. data/lib/paperclip/locales/ja.yml +0 -18
  99. data/lib/paperclip/locales/pt-BR.yml +0 -18
  100. data/lib/paperclip/locales/zh-CN.yml +0 -18
  101. data/lib/paperclip/locales/zh-HK.yml +0 -18
  102. data/lib/paperclip/locales/zh-TW.yml +0 -18
  103. data/spec/support/mock_model.rb +0 -2
  104. data/spec/support/rails_helpers.rb +0 -7
@@ -26,4 +26,8 @@ describe Paperclip::TempfileFactory do
26
26
  file = subject.generate
27
27
  assert File.exist?(file.path)
28
28
  end
29
+
30
+ it "does not throw Errno::ENAMETOOLONG when it has a really long name" do
31
+ expect { subject.generate("o" * 255) }.to_not raise_error
32
+ end
29
33
  end
@@ -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 = MockModel.new
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 11.kilobytes,
162
- message: "is invalid. (Between #{storage_units[5120]} and #{storage_units[10240]} please.)"
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 11.kilobytes,
173
- message: "is invalid. (Between #{storage_units[5120]} and #{storage_units[10240]} please.)"
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 11.kilobytes,
185
- message: "must be less than #{storage_units[10240]}"
186
- should_not_allow_attachment_file_size 4.kilobytes,
187
- message: "must be greater than #{storage_units[5120]}"
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 11.kilobytes,
196
- message: "must be in between #{storage_units[5120]} and #{storage_units[10240]}"
197
- should_not_allow_attachment_file_size 4.kilobytes,
198
- message: "must be in between #{storage_units[5120]} and #{storage_units[10240]}"
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 violates these validations' do
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.keys).to match_array []
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
@@ -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 |
@@ -18,4 +18,8 @@ class FakeModel
18
18
  def valid?
19
19
  errors.empty?
20
20
  end
21
+
22
+ def new_record?
23
+ false
24
+ end
21
25
  end
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
- failure_message_for_should do |columns|
12
- "expected to find '#{column_name}', default '#{@default}' in #{columns.map{|column| [column.name, column.default] }}"
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
- klass.connection.schema_cache.clear_table_cache!(klass.table_name) if klass.connection.respond_to?(:schema_cache)
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
 
@@ -0,0 +1,11 @@
1
+ module Reporting
2
+ def silence_stream(stream)
3
+ old_stream = stream.dup
4
+ stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
5
+ stream.sync = true
6
+ yield
7
+ ensure
8
+ stream.reopen(old_stream)
9
+ old_stream.close
10
+ end
11
+ 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.2.2
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: 2015-06-05 00:00:00.000000000 Z
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: 3.0.0
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: 3.0.0
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: 3.0.0
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: 3.0.0
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.3
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.3
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: 3.0.0
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: 3.0.0
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: 1.5.7
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: 1.5.7
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.11
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.11
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: nokogiri
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: capybara
244
+ name: bundler
211
245
  requirement: !ruby/object:Gem::Requirement
212
246
  requirements:
213
- - - '='
247
+ - - ">="
214
248
  - !ruby/object:Gem::Version
215
- version: 2.0.3
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: 2.0.3
256
+ version: '0'
223
257
  - !ruby/object:Gem::Dependency
224
- name: bundler
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: '1.0'
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: '1.0'
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: 3.0.0
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: 3.0.0
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
- - RUNNING_TESTS.md
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/3.2.gemfile
386
- - gemfiles/4.0.gemfile
387
- - gemfiles/4.1.gemfile
388
- - gemfiles/4.2.gemfile
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/rails_helpers.rb
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.9.2
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: paperclip
565
- rubygems_version: 2.4.5
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/rails_helpers.rb
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
@@ -1,4 +0,0 @@
1
- Running Tests
2
- =============
3
-
4
- Please see `CONTRIBUTING.md` in "Running Tests" section for more information.