paperclip 3.4.0 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of paperclip might be problematic. Click here for more details.

@@ -1,3 +1,3 @@
1
1
  module Paperclip
2
- VERSION = "3.4.0" unless defined? Paperclip::VERSION
2
+ VERSION = "3.4.1" unless defined? Paperclip::VERSION
3
3
  end
@@ -28,13 +28,13 @@ Gem::Specification.new do |s|
28
28
  s.add_dependency('activerecord', '>= 3.0.0')
29
29
  s.add_dependency('activemodel', '>= 3.0.0')
30
30
  s.add_dependency('activesupport', '>= 3.0.0')
31
- s.add_dependency('cocaine', '~> 0.4.0')
31
+ s.add_dependency('cocaine', '~> 0.5.0')
32
32
  s.add_dependency('mime-types')
33
33
 
34
34
  s.add_development_dependency('shoulda')
35
35
  s.add_development_dependency('appraisal')
36
36
  s.add_development_dependency('mocha')
37
- s.add_development_dependency('aws-sdk', '>= 1.2.0')
37
+ s.add_development_dependency('aws-sdk', '>= 1.5.7')
38
38
  s.add_development_dependency('bourne')
39
39
  s.add_development_dependency('sqlite3', '~> 1.3.4')
40
40
  s.add_development_dependency('cucumber', '~> 1.2.1')
@@ -42,7 +42,6 @@ Gem::Specification.new do |s|
42
42
  s.add_development_dependency('nokogiri')
43
43
  s.add_development_dependency('capybara')
44
44
  s.add_development_dependency('bundler')
45
- s.add_development_dependency('cocaine', '~> 0.2')
46
45
  s.add_development_dependency('fog', '>= 1.4.0', "< 1.7.0")
47
46
  s.add_development_dependency('pry')
48
47
  s.add_development_dependency('launchy')
@@ -1207,6 +1207,13 @@ class AttachmentTest < Test::Unit::TestCase
1207
1207
  assert_equal creation.to_i, @dummy.avatar.created_at
1208
1208
  assert_not_equal now.to_i, @dummy.avatar.created_at
1209
1209
  end
1210
+
1211
+ should "set changed? to true on attachment assignment" do
1212
+ @dummy.avatar = @file
1213
+ @dummy.save!
1214
+ @dummy.avatar = @file
1215
+ assert @dummy.changed?
1216
+ end
1210
1217
  end
1211
1218
 
1212
1219
  context "and avatar_updated_at column" do
@@ -1317,6 +1324,12 @@ class AttachmentTest < Test::Unit::TestCase
1317
1324
  assert_file_exists(@path)
1318
1325
  end
1319
1326
 
1327
+ should "clear out attachment data when attachment is destroyed" do
1328
+ @attachment.destroy
1329
+ assert !@attachment.exists?
1330
+ assert_nil @dummy.avatar_file_name
1331
+ end
1332
+
1320
1333
  should "not delete the file when model is destroyed" do
1321
1334
  @dummy.destroy
1322
1335
  assert_file_exists(@path)
@@ -56,6 +56,31 @@ class AttachmentAdapterTest < Test::Unit::TestCase
56
56
 
57
57
  end
58
58
 
59
+ context "for a file with restricted characters in the name" do
60
+ setup do
61
+ file_contents = File.new(fixture_file("animated.gif"))
62
+ @file = StringIO.new(file_contents.read)
63
+ @file.stubs(:original_filename).returns('image:restricted.gif')
64
+ @file.binmode
65
+
66
+ @attachment.assign(@file)
67
+ @attachment.save
68
+ @subject = Paperclip.io_adapters.for(@attachment)
69
+ end
70
+
71
+ teardown do
72
+ @file.close
73
+ end
74
+
75
+ should "not generate paths that include restricted characters" do
76
+ assert_no_match /:/, @subject.path
77
+ end
78
+
79
+ should "not generate filenames that include restricted characters" do
80
+ assert_equal 'image_restricted.gif', @subject.original_filename
81
+ end
82
+ end
83
+
59
84
  context "for a style" do
60
85
  setup do
61
86
  @file = File.new(fixture_file("5k.png"))
@@ -84,6 +84,25 @@ class FileAdapterTest < Test::Unit::TestCase
84
84
  end
85
85
  end
86
86
 
87
+ context "filename with restricted characters" do
88
+ setup do
89
+ file_contents = File.new(fixture_file("animated.gif"))
90
+ @file = StringIO.new(file_contents.read)
91
+ @file.stubs(:original_filename).returns('image:restricted.gif')
92
+ @subject = Paperclip.io_adapters.for(@file)
93
+ end
94
+
95
+ teardown { @file.close }
96
+
97
+ should "not generate filenames that include restricted characters" do
98
+ assert_equal 'image_restricted.gif', @subject.original_filename
99
+ end
100
+
101
+ should "not generate paths that include restricted characters" do
102
+ assert_no_match /:/, @subject.path
103
+ end
104
+ end
105
+
87
106
  context "empty file" do
88
107
  setup do
89
108
  @file = Tempfile.new("file_adapter_test")
@@ -42,10 +42,20 @@ class StringioFileProxyTest < Test::Unit::TestCase
42
42
  assert_equal 'image/png', @subject.content_type
43
43
  end
44
44
 
45
- should 'accept an orgiginal_filename' do
45
+ should 'accept an original_filename' do
46
46
  @subject.original_filename = 'image.png'
47
47
  assert_equal 'image.png', @subject.original_filename
48
48
  end
49
49
 
50
+ should "not generate filenames that include restricted characters" do
51
+ @subject.original_filename = 'image:restricted.png'
52
+ assert_equal 'image_restricted.png', @subject.original_filename
53
+ end
54
+
55
+ should "not generate paths that include restricted characters" do
56
+ @subject.original_filename = 'image:restricted.png'
57
+ assert_no_match /:/, @subject.path
58
+ end
59
+
50
60
  end
51
61
  end
@@ -52,6 +52,29 @@ class UploadedFileAdapterTest < Test::Unit::TestCase
52
52
  end
53
53
  end
54
54
 
55
+ context "with UploadedFile that has restricted characters" do
56
+ setup do
57
+ Paperclip::UploadedFileAdapter.content_type_detector = nil
58
+
59
+ class UploadedFile < OpenStruct; end
60
+ @file = UploadedFile.new(
61
+ :original_filename => "image:restricted.gif",
62
+ :content_type => "image/x-png-by-browser",
63
+ :head => "",
64
+ :path => fixture_file("5k.png")
65
+ )
66
+ @subject = Paperclip.io_adapters.for(@file)
67
+ end
68
+
69
+ should "not generate paths that include restricted characters" do
70
+ assert_no_match /:/, @subject.path
71
+ end
72
+
73
+ should "not generate filenames that include restricted characters" do
74
+ assert_equal 'image_restricted.gif', @subject.original_filename
75
+ end
76
+ end
77
+
55
78
  context "with UploadFile responding to #path" do
56
79
  setup do
57
80
  Paperclip::UploadedFileAdapter.content_type_detector = nil
@@ -83,4 +83,20 @@ class UriProxyTest < Test::Unit::TestCase
83
83
  end
84
84
  end
85
85
 
86
+ context "a url with restricted characters in the filename" do
87
+ setup do
88
+ Paperclip::UriAdapter.any_instance.stubs(:download_content).returns(StringIO.new("xxx"))
89
+ @uri = URI.parse("https://github.com/thoughtbot/paper:clip.jpg")
90
+ @subject = Paperclip.io_adapters.for(@uri)
91
+ end
92
+
93
+ should "not generate filenames that include restricted characters" do
94
+ assert_equal "paper_clip.jpg", @subject.original_filename
95
+ end
96
+
97
+ should "not generate paths that include restricted characters" do
98
+ assert_no_match /:/, @subject.path
99
+ end
100
+ end
101
+
86
102
  end
@@ -0,0 +1,36 @@
1
+ require './test/helper'
2
+
3
+ class PluralCacheTest < Test::Unit::TestCase
4
+ should 'cache pluralizations' do
5
+ cache = Paperclip::Interpolations::PluralCache.new
6
+ word = "box"
7
+
8
+ word.expects(:pluralize).returns("boxes").once
9
+
10
+ cache.pluralize(word)
11
+ cache.pluralize(word)
12
+ end
13
+
14
+ should 'cache pluralizations and underscores' do
15
+ cache = Paperclip::Interpolations::PluralCache.new
16
+ word = "BigBox"
17
+
18
+ word.expects(:pluralize).returns(word).once
19
+ word.expects(:underscore).returns(word).once
20
+
21
+ cache.underscore_and_pluralize(word)
22
+ cache.underscore_and_pluralize(word)
23
+ end
24
+
25
+ should 'pluralize words' do
26
+ cache = Paperclip::Interpolations::PluralCache.new
27
+ word = "box"
28
+ assert_equal "boxes", cache.pluralize(word)
29
+ end
30
+
31
+ should 'pluralize and underscore words' do
32
+ cache = Paperclip::Interpolations::PluralCache.new
33
+ word = "BigBox"
34
+ assert_equal "big_boxes", cache.underscore_and_pluralize(word)
35
+ end
36
+ end
@@ -238,6 +238,26 @@ class S3Test < Test::Unit::TestCase
238
238
  end
239
239
  end
240
240
 
241
+ context "dynamic s3_host_name" do
242
+ setup do
243
+ rebuild_model :storage => :s3,
244
+ :s3_credentials => {},
245
+ :bucket => "bucket",
246
+ :path => ":attachment/:basename.:extension",
247
+ :s3_host_name => lambda {|a| a.instance.value }
248
+ @dummy = Dummy.new
249
+ class << @dummy
250
+ attr_accessor :value
251
+ end
252
+ @dummy.avatar = StringIO.new(".")
253
+ end
254
+
255
+ should "use s3_host_name as a proc if available" do
256
+ @dummy.value = "s3.something.com"
257
+ assert_equal "http://s3.something.com/bucket/avatars/stringio.txt", @dummy.avatar.url(:original, :timestamp => false)
258
+ end
259
+ end
260
+
241
261
  context "An attachment that uses S3 for storage and has styles that return different file types" do
242
262
  setup do
243
263
  rebuild_model :styles => { :large => ['500x500#', :jpg] },
@@ -272,6 +292,45 @@ class S3Test < Test::Unit::TestCase
272
292
  end
273
293
  end
274
294
 
295
+ context "An attachment that uses S3 for storage and has a proc for styles" do
296
+ setup do
297
+ rebuild_model :styles => lambda { |attachment| attachment.instance.counter; {:thumbnail => { :geometry => "50x50#", :s3_headers => {'Cache-Control' => 'max-age=31557600'}} }},
298
+ :storage => :s3,
299
+ :bucket => "bucket",
300
+ :path => ":attachment/:style/:basename.:extension",
301
+ :s3_credentials => {
302
+ 'access_key_id' => "12345",
303
+ 'secret_access_key' => "54321"
304
+ }
305
+
306
+ @file = File.new(fixture_file('5k.png'), 'rb')
307
+
308
+ Dummy.class_eval do
309
+ def counter
310
+ @counter ||= 0
311
+ @counter += 1
312
+ @counter
313
+ end
314
+ end
315
+
316
+ @dummy = Dummy.new
317
+ @dummy.avatar = @file
318
+
319
+ object = stub
320
+ @dummy.avatar.stubs(:s3_object).with(:original).returns(object)
321
+ @dummy.avatar.stubs(:s3_object).with(:thumbnail).returns(object)
322
+ object.expects(:write).with(anything, :content_type => 'image/png', :acl => :public_read)
323
+ object.expects(:write).with(anything, :content_type => 'image/png', :acl => :public_read, :cache_control => 'max-age=31557600')
324
+ @dummy.save
325
+ end
326
+
327
+ teardown { @file.close }
328
+
329
+ should "succeed" do
330
+ assert_equal @dummy.counter, 7
331
+ end
332
+ end
333
+
275
334
  context "An attachment that uses S3 for storage and has spaces in file name" do
276
335
  setup do
277
336
  rebuild_model :styles => { :large => ['500x500#', :jpg] },
@@ -700,6 +759,47 @@ class S3Test < Test::Unit::TestCase
700
759
  end
701
760
  end
702
761
 
762
+ context "An attachment with S3 storage and S3 credentials with a :credential_provider" do
763
+ setup do
764
+ class DummyCredentialProvider; end
765
+
766
+ rebuild_model :storage => :s3,
767
+ :bucket => "testing",
768
+ :s3_credentials => {
769
+ :credential_provider => DummyCredentialProvider.new
770
+ }
771
+ @dummy = Dummy.new
772
+ end
773
+
774
+ should "set the credential-provider" do
775
+ assert_kind_of DummyCredentialProvider, @dummy.avatar.s3_bucket.config.credential_provider
776
+ end
777
+ end
778
+
779
+ context "An attachment with S3 storage and S3 credentials in an unsupported manor" do
780
+ setup do
781
+ rebuild_model :storage => :s3, :bucket => "testing", :s3_credentials => ["unsupported"]
782
+ @dummy = Dummy.new
783
+ end
784
+
785
+ should "not accept the credentials" do
786
+ assert_raise(ArgumentError) do
787
+ @dummy.avatar.s3_credentials
788
+ end
789
+ end
790
+ end
791
+
792
+ context "An attachment with S3 storage and S3 credentials not supplied" do
793
+ setup do
794
+ rebuild_model :storage => :s3, :bucket => "testing"
795
+ @dummy = Dummy.new
796
+ end
797
+
798
+ should "not parse any credentials" do
799
+ assert_equal({}, @dummy.avatar.s3_credentials)
800
+ end
801
+ end
802
+
703
803
  context "An attachment with S3 storage and specific s3 headers set" do
704
804
  setup do
705
805
  rebuild_model :storage => :s3,
metadata CHANGED
@@ -1,290 +1,276 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip
3
3
  version: !ruby/object:Gem::Version
4
+ version: 3.4.1
4
5
  prerelease:
5
- version: 3.4.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jon Yurek
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-21 00:00:00.000000000 Z
12
+ date: 2013-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- version_requirements: !ruby/object:Gem::Requirement
15
+ name: activerecord
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: 3.0.0
20
- none: false
21
- name: activerecord
22
22
  type: :runtime
23
23
  prerelease: false
24
- requirement: !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
25
26
  requirements:
26
27
  - - ! '>='
27
28
  - !ruby/object:Gem::Version
28
29
  version: 3.0.0
29
- none: false
30
30
  - !ruby/object:Gem::Dependency
31
- version_requirements: !ruby/object:Gem::Requirement
31
+ name: activemodel
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
32
34
  requirements:
33
35
  - - ! '>='
34
36
  - !ruby/object:Gem::Version
35
37
  version: 3.0.0
36
- none: false
37
- name: activemodel
38
38
  type: :runtime
39
39
  prerelease: false
40
- requirement: !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
41
42
  requirements:
42
43
  - - ! '>='
43
44
  - !ruby/object:Gem::Version
44
45
  version: 3.0.0
45
- none: false
46
46
  - !ruby/object:Gem::Dependency
47
- version_requirements: !ruby/object:Gem::Requirement
47
+ name: activesupport
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
48
50
  requirements:
49
51
  - - ! '>='
50
52
  - !ruby/object:Gem::Version
51
53
  version: 3.0.0
52
- none: false
53
- name: activesupport
54
54
  type: :runtime
55
55
  prerelease: false
56
- requirement: !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
57
58
  requirements:
58
59
  - - ! '>='
59
60
  - !ruby/object:Gem::Version
60
61
  version: 3.0.0
61
- none: false
62
62
  - !ruby/object:Gem::Dependency
63
- version_requirements: !ruby/object:Gem::Requirement
63
+ name: cocaine
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
64
66
  requirements:
65
67
  - - ~>
66
68
  - !ruby/object:Gem::Version
67
- version: 0.4.0
68
- none: false
69
- name: cocaine
69
+ version: 0.5.0
70
70
  type: :runtime
71
71
  prerelease: false
72
- requirement: !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
73
74
  requirements:
74
75
  - - ~>
75
76
  - !ruby/object:Gem::Version
76
- version: 0.4.0
77
- none: false
77
+ version: 0.5.0
78
78
  - !ruby/object:Gem::Dependency
79
- version_requirements: !ruby/object:Gem::Requirement
79
+ name: mime-types
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
80
82
  requirements:
81
83
  - - ! '>='
82
84
  - !ruby/object:Gem::Version
83
85
  version: '0'
84
- none: false
85
- name: mime-types
86
86
  type: :runtime
87
87
  prerelease: false
88
- requirement: !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
89
90
  requirements:
90
91
  - - ! '>='
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
- none: false
94
94
  - !ruby/object:Gem::Dependency
95
- version_requirements: !ruby/object:Gem::Requirement
95
+ name: shoulda
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
96
98
  requirements:
97
99
  - - ! '>='
98
100
  - !ruby/object:Gem::Version
99
101
  version: '0'
100
- none: false
101
- name: shoulda
102
102
  type: :development
103
103
  prerelease: false
104
- requirement: !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
105
106
  requirements:
106
107
  - - ! '>='
107
108
  - !ruby/object:Gem::Version
108
109
  version: '0'
109
- none: false
110
110
  - !ruby/object:Gem::Dependency
111
- version_requirements: !ruby/object:Gem::Requirement
111
+ name: appraisal
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
112
114
  requirements:
113
115
  - - ! '>='
114
116
  - !ruby/object:Gem::Version
115
117
  version: '0'
116
- none: false
117
- name: appraisal
118
118
  type: :development
119
119
  prerelease: false
120
- requirement: !ruby/object:Gem::Requirement
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
121
122
  requirements:
122
123
  - - ! '>='
123
124
  - !ruby/object:Gem::Version
124
125
  version: '0'
125
- none: false
126
126
  - !ruby/object:Gem::Dependency
127
- version_requirements: !ruby/object:Gem::Requirement
127
+ name: mocha
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
128
130
  requirements:
129
131
  - - ! '>='
130
132
  - !ruby/object:Gem::Version
131
133
  version: '0'
132
- none: false
133
- name: mocha
134
134
  type: :development
135
135
  prerelease: false
136
- requirement: !ruby/object:Gem::Requirement
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
137
138
  requirements:
138
139
  - - ! '>='
139
140
  - !ruby/object:Gem::Version
140
141
  version: '0'
141
- none: false
142
142
  - !ruby/object:Gem::Dependency
143
- version_requirements: !ruby/object:Gem::Requirement
143
+ name: aws-sdk
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
144
146
  requirements:
145
147
  - - ! '>='
146
148
  - !ruby/object:Gem::Version
147
- version: 1.2.0
148
- none: false
149
- name: aws-sdk
149
+ version: 1.5.7
150
150
  type: :development
151
151
  prerelease: false
152
- requirement: !ruby/object:Gem::Requirement
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
153
154
  requirements:
154
155
  - - ! '>='
155
156
  - !ruby/object:Gem::Version
156
- version: 1.2.0
157
- none: false
157
+ version: 1.5.7
158
158
  - !ruby/object:Gem::Dependency
159
- version_requirements: !ruby/object:Gem::Requirement
159
+ name: bourne
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
160
162
  requirements:
161
163
  - - ! '>='
162
164
  - !ruby/object:Gem::Version
163
165
  version: '0'
164
- none: false
165
- name: bourne
166
166
  type: :development
167
167
  prerelease: false
168
- requirement: !ruby/object:Gem::Requirement
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
169
170
  requirements:
170
171
  - - ! '>='
171
172
  - !ruby/object:Gem::Version
172
173
  version: '0'
173
- none: false
174
174
  - !ruby/object:Gem::Dependency
175
- version_requirements: !ruby/object:Gem::Requirement
175
+ name: sqlite3
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
176
178
  requirements:
177
179
  - - ~>
178
180
  - !ruby/object:Gem::Version
179
181
  version: 1.3.4
180
- none: false
181
- name: sqlite3
182
182
  type: :development
183
183
  prerelease: false
184
- requirement: !ruby/object:Gem::Requirement
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
185
186
  requirements:
186
187
  - - ~>
187
188
  - !ruby/object:Gem::Version
188
189
  version: 1.3.4
189
- none: false
190
190
  - !ruby/object:Gem::Dependency
191
- version_requirements: !ruby/object:Gem::Requirement
191
+ name: cucumber
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
192
194
  requirements:
193
195
  - - ~>
194
196
  - !ruby/object:Gem::Version
195
197
  version: 1.2.1
196
- none: false
197
- name: cucumber
198
198
  type: :development
199
199
  prerelease: false
200
- requirement: !ruby/object:Gem::Requirement
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
201
202
  requirements:
202
203
  - - ~>
203
204
  - !ruby/object:Gem::Version
204
205
  version: 1.2.1
205
- none: false
206
206
  - !ruby/object:Gem::Dependency
207
- version_requirements: !ruby/object:Gem::Requirement
207
+ name: aruba
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
208
210
  requirements:
209
211
  - - ! '>='
210
212
  - !ruby/object:Gem::Version
211
213
  version: '0'
212
- none: false
213
- name: aruba
214
214
  type: :development
215
215
  prerelease: false
216
- requirement: !ruby/object:Gem::Requirement
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
217
218
  requirements:
218
219
  - - ! '>='
219
220
  - !ruby/object:Gem::Version
220
221
  version: '0'
221
- none: false
222
222
  - !ruby/object:Gem::Dependency
223
- version_requirements: !ruby/object:Gem::Requirement
223
+ name: nokogiri
224
+ requirement: !ruby/object:Gem::Requirement
225
+ none: false
224
226
  requirements:
225
227
  - - ! '>='
226
228
  - !ruby/object:Gem::Version
227
229
  version: '0'
228
- none: false
229
- name: nokogiri
230
230
  type: :development
231
231
  prerelease: false
232
- requirement: !ruby/object:Gem::Requirement
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
233
234
  requirements:
234
235
  - - ! '>='
235
236
  - !ruby/object:Gem::Version
236
237
  version: '0'
237
- none: false
238
238
  - !ruby/object:Gem::Dependency
239
- version_requirements: !ruby/object:Gem::Requirement
239
+ name: capybara
240
+ requirement: !ruby/object:Gem::Requirement
241
+ none: false
240
242
  requirements:
241
243
  - - ! '>='
242
244
  - !ruby/object:Gem::Version
243
245
  version: '0'
244
- none: false
245
- name: capybara
246
246
  type: :development
247
247
  prerelease: false
248
- requirement: !ruby/object:Gem::Requirement
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
249
250
  requirements:
250
251
  - - ! '>='
251
252
  - !ruby/object:Gem::Version
252
253
  version: '0'
253
- none: false
254
254
  - !ruby/object:Gem::Dependency
255
- version_requirements: !ruby/object:Gem::Requirement
255
+ name: bundler
256
+ requirement: !ruby/object:Gem::Requirement
257
+ none: false
256
258
  requirements:
257
259
  - - ! '>='
258
260
  - !ruby/object:Gem::Version
259
261
  version: '0'
260
- none: false
261
- name: bundler
262
262
  type: :development
263
263
  prerelease: false
264
- requirement: !ruby/object:Gem::Requirement
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
265
266
  requirements:
266
267
  - - ! '>='
267
268
  - !ruby/object:Gem::Version
268
269
  version: '0'
269
- none: false
270
270
  - !ruby/object:Gem::Dependency
271
- version_requirements: !ruby/object:Gem::Requirement
272
- requirements:
273
- - - ~>
274
- - !ruby/object:Gem::Version
275
- version: '0.2'
276
- none: false
277
- name: cocaine
278
- type: :development
279
- prerelease: false
271
+ name: fog
280
272
  requirement: !ruby/object:Gem::Requirement
281
- requirements:
282
- - - ~>
283
- - !ruby/object:Gem::Version
284
- version: '0.2'
285
273
  none: false
286
- - !ruby/object:Gem::Dependency
287
- version_requirements: !ruby/object:Gem::Requirement
288
274
  requirements:
289
275
  - - ! '>='
290
276
  - !ruby/object:Gem::Version
@@ -292,11 +278,10 @@ dependencies:
292
278
  - - <
293
279
  - !ruby/object:Gem::Version
294
280
  version: 1.7.0
295
- none: false
296
- name: fog
297
281
  type: :development
298
282
  prerelease: false
299
- requirement: !ruby/object:Gem::Requirement
283
+ version_requirements: !ruby/object:Gem::Requirement
284
+ none: false
300
285
  requirements:
301
286
  - - ! '>='
302
287
  - !ruby/object:Gem::Version
@@ -304,103 +289,102 @@ dependencies:
304
289
  - - <
305
290
  - !ruby/object:Gem::Version
306
291
  version: 1.7.0
307
- none: false
308
292
  - !ruby/object:Gem::Dependency
309
- version_requirements: !ruby/object:Gem::Requirement
293
+ name: pry
294
+ requirement: !ruby/object:Gem::Requirement
295
+ none: false
310
296
  requirements:
311
297
  - - ! '>='
312
298
  - !ruby/object:Gem::Version
313
299
  version: '0'
314
- none: false
315
- name: pry
316
300
  type: :development
317
301
  prerelease: false
318
- requirement: !ruby/object:Gem::Requirement
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ none: false
319
304
  requirements:
320
305
  - - ! '>='
321
306
  - !ruby/object:Gem::Version
322
307
  version: '0'
323
- none: false
324
308
  - !ruby/object:Gem::Dependency
325
- version_requirements: !ruby/object:Gem::Requirement
309
+ name: launchy
310
+ requirement: !ruby/object:Gem::Requirement
311
+ none: false
326
312
  requirements:
327
313
  - - ! '>='
328
314
  - !ruby/object:Gem::Version
329
315
  version: '0'
330
- none: false
331
- name: launchy
332
316
  type: :development
333
317
  prerelease: false
334
- requirement: !ruby/object:Gem::Requirement
318
+ version_requirements: !ruby/object:Gem::Requirement
319
+ none: false
335
320
  requirements:
336
321
  - - ! '>='
337
322
  - !ruby/object:Gem::Version
338
323
  version: '0'
339
- none: false
340
324
  - !ruby/object:Gem::Dependency
341
- version_requirements: !ruby/object:Gem::Requirement
325
+ name: rake
326
+ requirement: !ruby/object:Gem::Requirement
327
+ none: false
342
328
  requirements:
343
329
  - - ! '>='
344
330
  - !ruby/object:Gem::Version
345
331
  version: '0'
346
- none: false
347
- name: rake
348
332
  type: :development
349
333
  prerelease: false
350
- requirement: !ruby/object:Gem::Requirement
334
+ version_requirements: !ruby/object:Gem::Requirement
335
+ none: false
351
336
  requirements:
352
337
  - - ! '>='
353
338
  - !ruby/object:Gem::Version
354
339
  version: '0'
355
- none: false
356
340
  - !ruby/object:Gem::Dependency
357
- version_requirements: !ruby/object:Gem::Requirement
341
+ name: fakeweb
342
+ requirement: !ruby/object:Gem::Requirement
343
+ none: false
358
344
  requirements:
359
345
  - - ! '>='
360
346
  - !ruby/object:Gem::Version
361
347
  version: '0'
362
- none: false
363
- name: fakeweb
364
348
  type: :development
365
349
  prerelease: false
366
- requirement: !ruby/object:Gem::Requirement
350
+ version_requirements: !ruby/object:Gem::Requirement
351
+ none: false
367
352
  requirements:
368
353
  - - ! '>='
369
354
  - !ruby/object:Gem::Version
370
355
  version: '0'
371
- none: false
372
356
  - !ruby/object:Gem::Dependency
373
- version_requirements: !ruby/object:Gem::Requirement
357
+ name: railties
358
+ requirement: !ruby/object:Gem::Requirement
359
+ none: false
374
360
  requirements:
375
361
  - - ! '>='
376
362
  - !ruby/object:Gem::Version
377
363
  version: '0'
378
- none: false
379
- name: railties
380
364
  type: :development
381
365
  prerelease: false
382
- requirement: !ruby/object:Gem::Requirement
366
+ version_requirements: !ruby/object:Gem::Requirement
367
+ none: false
383
368
  requirements:
384
369
  - - ! '>='
385
370
  - !ruby/object:Gem::Version
386
371
  version: '0'
387
- none: false
388
372
  - !ruby/object:Gem::Dependency
389
- version_requirements: !ruby/object:Gem::Requirement
373
+ name: actionmailer
374
+ requirement: !ruby/object:Gem::Requirement
375
+ none: false
390
376
  requirements:
391
377
  - - ! '>='
392
378
  - !ruby/object:Gem::Version
393
379
  version: '0'
394
- none: false
395
- name: actionmailer
396
380
  type: :development
397
381
  prerelease: false
398
- requirement: !ruby/object:Gem::Requirement
382
+ version_requirements: !ruby/object:Gem::Requirement
383
+ none: false
399
384
  requirements:
400
385
  - - ! '>='
401
386
  - !ruby/object:Gem::Version
402
387
  version: '0'
403
- none: false
404
388
  description: Easy upload management for ActiveRecord
405
389
  email:
406
390
  - jyurek@thoughtbot.com
@@ -458,6 +442,7 @@ files:
458
442
  - lib/paperclip/helpers.rb
459
443
  - lib/paperclip/instance_methods.rb
460
444
  - lib/paperclip/interpolations.rb
445
+ - lib/paperclip/interpolations/plural_cache.rb
461
446
  - lib/paperclip/io_adapters/abstract_adapter.rb
462
447
  - lib/paperclip/io_adapters/attachment_adapter.rb
463
448
  - lib/paperclip/io_adapters/file_adapter.rb
@@ -538,6 +523,7 @@ files:
538
523
  - test/meta_class_test.rb
539
524
  - test/paperclip_missing_attachment_styles_test.rb
540
525
  - test/paperclip_test.rb
526
+ - test/plural_cache_test.rb
541
527
  - test/processor_test.rb
542
528
  - test/schema_test.rb
543
529
  - test/storage/filesystem_test.rb
@@ -570,21 +556,21 @@ rdoc_options: []
570
556
  require_paths:
571
557
  - lib
572
558
  required_ruby_version: !ruby/object:Gem::Requirement
559
+ none: false
573
560
  requirements:
574
561
  - - ! '>='
575
562
  - !ruby/object:Gem::Version
576
563
  version: 1.9.2
577
- none: false
578
564
  required_rubygems_version: !ruby/object:Gem::Requirement
565
+ none: false
579
566
  requirements:
580
567
  - - ! '>='
581
568
  - !ruby/object:Gem::Version
582
569
  version: '0'
583
- none: false
584
570
  requirements:
585
571
  - ImageMagick
586
572
  rubyforge_project: paperclip
587
- rubygems_version: 1.8.24
573
+ rubygems_version: 1.8.23
588
574
  signing_key:
589
575
  specification_version: 3
590
576
  summary: File attachments as attributes for ActiveRecord
@@ -649,6 +635,7 @@ test_files:
649
635
  - test/meta_class_test.rb
650
636
  - test/paperclip_missing_attachment_styles_test.rb
651
637
  - test/paperclip_test.rb
638
+ - test/plural_cache_test.rb
652
639
  - test/processor_test.rb
653
640
  - test/schema_test.rb
654
641
  - test/storage/filesystem_test.rb
@@ -667,3 +654,4 @@ test_files:
667
654
  - test/validators/attachment_presence_validator_test.rb
668
655
  - test/validators/attachment_size_validator_test.rb
669
656
  - test/validators_test.rb
657
+ has_rdoc: