dynamic_paperclip 1.0.0.alpha.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 520ff66ae208d8c9fd390b036848638a68712442
4
- data.tar.gz: 361cb3f76ed5bc35d812833a5c312b12c6e7fbce
3
+ metadata.gz: 532f05d2c123371561ae9a1fabdde9621994a72c
4
+ data.tar.gz: af6332a7d263cac5c5bc59cb6ba532f8fdb67e1c
5
5
  SHA512:
6
- metadata.gz: f49d318831c5c3ad14573450fdcb21ab52efdc0c5cc9ca7c72803d4b4f2c484b607b7a088f0cd148532cf903bfd5393d4c4f7fb7275e20e9d6b78b7330a248e9
7
- data.tar.gz: 820b5db8650c4e48ed966d1383cdf10ddc217fc48d2d81f50683906c00de269ca538abf9f19f90ba3318024410e00a2e0b294bed0a4ab1c29e52745272471246
6
+ metadata.gz: 4d410c0304dfe6fe9c195e08c72e7b9875ee091e8e194c36ffeadc025915237b32639033f5197db425ed203ff3623ce54241c8614c33f5ee267be6ad34fe3611
7
+ data.tar.gz: 4162c46ed79f90659a04fffa7c24a5754ee866ffb819d0b94213444a99de742ba08556bb35474faf928bfc3e97405e09248bae03ead968e3c78ee769dc63964d
@@ -42,7 +42,7 @@ module DynamicPaperclip
42
42
 
43
43
  url = url(style_name)
44
44
 
45
- delimiter_char = url.match(/\?.+=/) ? '&' : '?'
45
+ delimiter_char = url.match(/\?/) ? '&' : '?'
46
46
 
47
47
  "#{url}#{delimiter_char}s=#{UrlSecurity.generate_hash(style_name)}"
48
48
  end
@@ -64,4 +64,4 @@ module DynamicPaperclip
64
64
  @dynamic_styles[name.to_sym] = Paperclip::Style.new(name, StyleNaming.style_definition_from_dynamic_style_name(name), self)
65
65
  end
66
66
  end
67
- end
67
+ end
@@ -1,5 +1,7 @@
1
1
  require 'rack/request'
2
- require 'action_controller/metal/data_streaming'
2
+
3
+ require 'action_controller/metal/data_streaming' # For Rails 4
4
+ require 'action_dispatch/http/response.rb' # For Rails 5
3
5
 
4
6
  module DynamicPaperclip
5
7
  class AttachmentStyleGenerator
@@ -18,6 +20,11 @@ module DynamicPaperclip
18
20
  id = id_from_partition(match[:id])
19
21
  attachment = klass.find(id).send(name)
20
22
 
23
+ # When the filename is wrong, return a 404
24
+ if !attachment.exists? || attachment.original_filename != URI.unescape(match[:filename])
25
+ return [404, {}, []]
26
+ end
27
+
21
28
  # The definition will be escaped twice in the URL, so we need to unescape it once.
22
29
  # We should always reference dynamic style names after escaping once - that's how they reside on the FS.
23
30
  style_name = StyleNaming.dynamic_style_name_from_definition(CGI.unescape(match[:definition]), false)
@@ -30,6 +37,9 @@ module DynamicPaperclip
30
37
  # an existing style
31
38
  attachment.process_dynamic_style style_name unless attachment.exists?(style_name)
32
39
 
40
+ # The FileBody class has been moved to another module in Rails 5
41
+ file_body = defined?(ActionController::DataStreaming::FileBody) ? ActionController::DataStreaming::FileBody : ActionDispatch::Response::FileBody
42
+
33
43
  return [
34
44
  200,
35
45
  {
@@ -37,7 +47,7 @@ module DynamicPaperclip
37
47
  'Content-Transfer-Encoding' => 'binary',
38
48
  'Content-Disposition' => "inline; filename=#{File.basename(attachment.path(style_name))}"
39
49
  },
40
- ActionController::DataStreaming::FileBody.new(attachment.path(style_name))
50
+ file_body.new(attachment.path(style_name))
41
51
  ]
42
52
  else
43
53
  # Invalid hash, just 403
@@ -3,9 +3,9 @@ require 'dynamic_paperclip/attachment_style_generator'
3
3
  module DynamicPaperclip
4
4
  class Railtie < Rails::Railtie
5
5
  initializer 'dynamic_paperclip.insert_middleware' do |app|
6
- app.config.middleware.use "DynamicPaperclip::AttachmentStyleGenerator"
6
+ app.config.middleware.use DynamicPaperclip::AttachmentStyleGenerator
7
7
  end
8
8
 
9
9
  rake_tasks { load 'tasks/dynamic_paperclip.rake' }
10
10
  end
11
- end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module DynamicPaperclip
2
- VERSION = "1.0.0.alpha.4"
2
+ VERSION = "1.0.0"
3
3
  end
Binary file
@@ -5274,3 +5274,360 @@ AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dy
5274
5274
  InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
5275
5275
  -------------------------------------------------------------------------------------
5276
5276
   (0.1ms) rollback transaction
5277
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
5278
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5279
+  (2.2ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
5280
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5281
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
5282
+  (0.1ms) begin transaction
5283
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2017-07-09 20:10:23.052416"], ["updated_at", "2017-07-09 20:10:23.052416"]]
5284
+  (0.6ms) commit transaction
5285
+  (0.1ms) begin transaction
5286
+ --------------------------------
5287
+ DynamicPaperclipTest: test_truth
5288
+ --------------------------------
5289
+  (0.0ms) rollback transaction
5290
+  (0.1ms) begin transaction
5291
+ Fixture Delete (0.5ms) DELETE FROM "photos"
5292
+ Fixture Insert (0.7ms) INSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2017-07-09 20:10:23.106409', '2017-07-09 20:10:23.106409')
5293
+ Fixture Insert (0.1ms) INSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2017-07-09 20:10:23.106409', '2017-07-09 20:10:23.106409')
5294
+  (1.1ms) commit transaction
5295
+  (0.1ms) begin transaction
5296
+ -----------------------------------------------------------------------------------------------
5297
+ AttachmentTest: test_: Attachment should return true from query method when attachment is set.
5298
+ -----------------------------------------------------------------------------------------------
5299
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5300
+  (0.1ms) rollback transaction
5301
+  (0.1ms) begin transaction
5302
+ ---------------------------------------------------------------------------------------------------------------------
5303
+ AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
5304
+ ---------------------------------------------------------------------------------------------------------------------
5305
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5306
+  (0.2ms) rollback transaction
5307
+  (0.1ms) begin transaction
5308
+ -----------------------------------------------------------------------------------------
5309
+ AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
5310
+ -----------------------------------------------------------------------------------------
5311
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5312
+  (0.0ms) rollback transaction
5313
+  (0.0ms) begin transaction
5314
+ ---------------------------------------------------------------------------------------------------------------
5315
+ AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
5316
+ ---------------------------------------------------------------------------------------------------------------
5317
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5318
+  (0.1ms) rollback transaction
5319
+  (0.0ms) begin transaction
5320
+ -------------------------------------------------------------------------------------
5321
+ AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
5322
+ -------------------------------------------------------------------------------------
5323
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5324
+  (0.0ms) rollback transaction
5325
+  (0.0ms) begin transaction
5326
+ ----------------------------------------------------------------------------------------------------
5327
+ AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
5328
+ ----------------------------------------------------------------------------------------------------
5329
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
5330
+  (0.0ms) rollback transaction
5331
+  (0.0ms) begin transaction
5332
+ ---------------------------------------------------------------------------------------------------
5333
+ AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
5334
+ ---------------------------------------------------------------------------------------------------
5335
+  (0.0ms) rollback transaction
5336
+  (0.0ms) begin transaction
5337
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
5338
+ AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
5339
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
5340
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5341
+  (0.1ms) rollback transaction
5342
+  (0.0ms) begin transaction
5343
+ ---------------------------------------------------------------------------------------
5344
+ AttachmentTest: test_: Attachment should raise error if no secret has been configured.
5345
+ ---------------------------------------------------------------------------------------
5346
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5347
+  (0.0ms) rollback transaction
5348
+  (0.1ms) begin transaction
5349
+ ---------------------------------------------------------------------------------------------------------------------
5350
+ DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
5351
+ ---------------------------------------------------------------------------------------------------------------------
5352
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5353
+ Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2017-07-09 16:10:23 -0400
5354
+ Photo Load (0.0ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5355
+ Command :: file -b --mime '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720170709-15038-1vt65ol.png'
5356
+ Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720170709-15038-vjhbqg.png[0]' 2>/dev/null
5357
+ Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720170709-15038-vjhbqg.png[0]'
5358
+ Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720170709-15038-vjhbqg.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/36e34534f477f75d2a20fca014c56f9020170709-15038-nliyjj'
5359
+  (0.1ms) SAVEPOINT active_record_1
5360
+ SQL (0.3ms) UPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "updated_at" = ?, "image_file_name" = ? WHERE "photos"."id" = ? [["image_file_size", 6646], ["image_updated_at", "2017-07-09 20:10:23.278875"], ["updated_at", "2017-07-09 20:10:23.367904"], ["image_file_name", "rails.png"], ["id", 1]]
5361
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5362
+  (1.0ms) rollback transaction
5363
+  (0.0ms) begin transaction
5364
+ -------------------------------------------------------------------------------------
5365
+ InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
5366
+ -------------------------------------------------------------------------------------
5367
+  (0.1ms) rollback transaction
5368
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
5369
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5370
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5371
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
5372
+  (0.1ms) begin transaction
5373
+  (0.1ms) commit transaction
5374
+  (0.1ms) begin transaction
5375
+ --------------------------------
5376
+ DynamicPaperclipTest: test_truth
5377
+ --------------------------------
5378
+  (0.0ms) rollback transaction
5379
+  (0.1ms) begin transaction
5380
+ Fixture Delete (0.4ms) DELETE FROM "photos"
5381
+ Fixture Insert (0.2ms) INSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:01:43.254736', '2018-11-28 17:01:43.254736')
5382
+ Fixture Insert (0.1ms) INSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:01:43.254736', '2018-11-28 17:01:43.254736')
5383
+  (0.9ms) commit transaction
5384
+  (0.0ms) begin transaction
5385
+ ---------------------------------------------------------------------------------------
5386
+ AttachmentTest: test_: Attachment should raise error if no secret has been configured.
5387
+ ---------------------------------------------------------------------------------------
5388
+ Photo Load (0.2ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5389
+  (0.1ms) rollback transaction
5390
+  (0.0ms) begin transaction
5391
+ ---------------------------------------------------------------------------------------------------
5392
+ AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
5393
+ ---------------------------------------------------------------------------------------------------
5394
+  (0.1ms) rollback transaction
5395
+  (0.1ms) begin transaction
5396
+ ---------------------------------------------------------------------------------------------------------------------
5397
+ AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
5398
+ ---------------------------------------------------------------------------------------------------------------------
5399
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5400
+  (0.1ms) rollback transaction
5401
+  (0.0ms) begin transaction
5402
+ -----------------------------------------------------------------------------------------
5403
+ AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
5404
+ -----------------------------------------------------------------------------------------
5405
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5406
+  (0.1ms) rollback transaction
5407
+  (0.0ms) begin transaction
5408
+ -------------------------------------------------------------------------------------
5409
+ AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
5410
+ -------------------------------------------------------------------------------------
5411
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5412
+  (0.0ms) rollback transaction
5413
+  (0.0ms) begin transaction
5414
+ ----------------------------------------------------------------------------------------------------
5415
+ AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
5416
+ ----------------------------------------------------------------------------------------------------
5417
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
5418
+  (0.0ms) rollback transaction
5419
+  (0.1ms) begin transaction
5420
+ -----------------------------------------------------------------------------------------------
5421
+ AttachmentTest: test_: Attachment should return true from query method when attachment is set.
5422
+ -----------------------------------------------------------------------------------------------
5423
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5424
+  (0.1ms) rollback transaction
5425
+  (0.0ms) begin transaction
5426
+ ---------------------------------------------------------------------------------------------------------------
5427
+ AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
5428
+ ---------------------------------------------------------------------------------------------------------------
5429
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5430
+  (0.0ms) rollback transaction
5431
+  (0.0ms) begin transaction
5432
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
5433
+ AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
5434
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
5435
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5436
+  (0.1ms) rollback transaction
5437
+  (0.0ms) begin transaction
5438
+ ---------------------------------------------------------------------------------------------------------------------
5439
+ DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
5440
+ ---------------------------------------------------------------------------------------------------------------------
5441
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5442
+ Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:01:43 -0500
5443
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5444
+ Command :: file -b --mime '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-62536-8njla5.png'
5445
+ Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-62536-150tusr.png[0]' 2>/dev/null
5446
+ Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-62536-150tusr.png[0]'
5447
+ Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-62536-150tusr.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/cdc0ec0084039f9f2ee2afc111bd872820181128-62536-y162l6'
5448
+  (0.1ms) SAVEPOINT active_record_1
5449
+ SQL (0.3ms) UPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "updated_at" = ?, "image_file_name" = ? WHERE "photos"."id" = ? [["image_file_size", 6646], ["image_updated_at", "2018-11-28 17:01:43.462825"], ["updated_at", "2018-11-28 17:01:43.542524"], ["image_file_name", "rails.png"], ["id", 1]]
5450
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5451
+  (0.6ms) rollback transaction
5452
+  (0.0ms) begin transaction
5453
+ -------------------------------------------------------------------------------------
5454
+ InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
5455
+ -------------------------------------------------------------------------------------
5456
+  (0.1ms) rollback transaction
5457
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5458
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5459
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5460
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
5461
+  (0.2ms) begin transaction
5462
+  (0.1ms) commit transaction
5463
+  (0.2ms) begin transaction
5464
+ -------------------------------------------------------------------------------------
5465
+ InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
5466
+ -------------------------------------------------------------------------------------
5467
+  (0.1ms) rollback transaction
5468
+  (0.1ms) begin transaction
5469
+ --------------------------------
5470
+ DynamicPaperclipTest: test_truth
5471
+ --------------------------------
5472
+  (0.1ms) rollback transaction
5473
+  (0.1ms) begin transaction
5474
+ Fixture Delete (0.5ms) DELETE FROM "photos"
5475
+ Fixture Insert (0.1ms) INSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:02:06.431023', '2018-11-28 17:02:06.431023')
5476
+ Fixture Insert (0.1ms) INSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:02:06.431023', '2018-11-28 17:02:06.431023')
5477
+  (1.2ms) commit transaction
5478
+  (0.1ms) begin transaction
5479
+ ----------------------------------------------------------------------------------------------------
5480
+ AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
5481
+ ----------------------------------------------------------------------------------------------------
5482
+ Photo Load (0.2ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
5483
+  (0.1ms) rollback transaction
5484
+  (0.1ms) begin transaction
5485
+ -----------------------------------------------------------------------------------------------
5486
+ AttachmentTest: test_: Attachment should return true from query method when attachment is set.
5487
+ -----------------------------------------------------------------------------------------------
5488
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5489
+  (0.1ms) rollback transaction
5490
+  (0.1ms) begin transaction
5491
+ -----------------------------------------------------------------------------------------
5492
+ AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
5493
+ -----------------------------------------------------------------------------------------
5494
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5495
+  (0.1ms) rollback transaction
5496
+  (0.1ms) begin transaction
5497
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
5498
+ AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
5499
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
5500
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5501
+  (0.1ms) rollback transaction
5502
+  (0.1ms) begin transaction
5503
+ ---------------------------------------------------------------------------------------------------------------
5504
+ AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
5505
+ ---------------------------------------------------------------------------------------------------------------
5506
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5507
+  (0.2ms) rollback transaction
5508
+  (0.4ms) begin transaction
5509
+ ---------------------------------------------------------------------------------------
5510
+ AttachmentTest: test_: Attachment should raise error if no secret has been configured.
5511
+ ---------------------------------------------------------------------------------------
5512
+ Photo Load (0.3ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5513
+  (0.1ms) rollback transaction
5514
+  (0.1ms) begin transaction
5515
+ ---------------------------------------------------------------------------------------------------------------------
5516
+ AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
5517
+ ---------------------------------------------------------------------------------------------------------------------
5518
+ Photo Load (0.2ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5519
+  (0.1ms) rollback transaction
5520
+  (0.1ms) begin transaction
5521
+ -------------------------------------------------------------------------------------
5522
+ AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
5523
+ -------------------------------------------------------------------------------------
5524
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5525
+  (0.1ms) rollback transaction
5526
+  (0.1ms) begin transaction
5527
+ ---------------------------------------------------------------------------------------------------
5528
+ AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
5529
+ ---------------------------------------------------------------------------------------------------
5530
+  (0.1ms) rollback transaction
5531
+  (0.1ms) begin transaction
5532
+ ---------------------------------------------------------------------------------------------------------------------
5533
+ DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
5534
+ ---------------------------------------------------------------------------------------------------------------------
5535
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5536
+ Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:02:06 -0500
5537
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
5538
+ Command :: file -b --mime '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-62681-i31zfe.png'
5539
+ Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-62681-1d6ikc3.png[0]' 2>/dev/null
5540
+ Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-62681-1d6ikc3.png[0]'
5541
+ Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-62681-1d6ikc3.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/144ee7012c69b8b06c56f6f90a39a39220181128-62681-1pg8hnk'
5542
+  (0.2ms) SAVEPOINT active_record_1
5543
+ SQL (1.3ms) UPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "updated_at" = ?, "image_file_name" = ? WHERE "photos"."id" = ? [["image_file_size", 6646], ["image_updated_at", "2018-11-28 17:02:06.710591"], ["updated_at", "2018-11-28 17:02:06.827831"], ["image_file_name", "rails.png"], ["id", 1]]
5544
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5545
+  (0.6ms) rollback transaction
5546
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5547
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5548
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5549
+  (0.1ms) begin transaction
5550
+ -------------------------------------------------------------------------------------
5551
+ InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
5552
+ -------------------------------------------------------------------------------------
5553
+  (0.1ms) rollback transaction
5554
+  (0.0ms) begin transaction
5555
+ Fixture Delete (0.3ms) DELETE FROM "photos"
5556
+ Fixture Insert (0.1ms) INSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:09:21', '2018-11-28 17:09:21')
5557
+ Fixture Insert (0.0ms) INSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:09:21', '2018-11-28 17:09:21')
5558
+  (0.6ms) commit transaction
5559
+  (0.0ms) begin transaction
5560
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
5561
+ AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
5562
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
5563
+ Photo Load (0.2ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5564
+  (0.1ms) rollback transaction
5565
+  (0.1ms) begin transaction
5566
+ ---------------------------------------------------------------------------------------------------------------------
5567
+ AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
5568
+ ---------------------------------------------------------------------------------------------------------------------
5569
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5570
+  (0.1ms) rollback transaction
5571
+  (0.1ms) begin transaction
5572
+ ---------------------------------------------------------------------------------------------------------------
5573
+ AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
5574
+ ---------------------------------------------------------------------------------------------------------------
5575
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5576
+  (0.1ms) rollback transaction
5577
+  (0.1ms) begin transaction
5578
+ -------------------------------------------------------------------------------------
5579
+ AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
5580
+ -------------------------------------------------------------------------------------
5581
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5582
+  (0.1ms) rollback transaction
5583
+  (0.2ms) begin transaction
5584
+ -----------------------------------------------------------------------------------------
5585
+ AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
5586
+ -----------------------------------------------------------------------------------------
5587
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5588
+  (0.1ms) rollback transaction
5589
+  (0.1ms) begin transaction
5590
+ ---------------------------------------------------------------------------------------
5591
+ AttachmentTest: test_: Attachment should raise error if no secret has been configured.
5592
+ ---------------------------------------------------------------------------------------
5593
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5594
+  (0.1ms) rollback transaction
5595
+  (0.0ms) begin transaction
5596
+ ----------------------------------------------------------------------------------------------------
5597
+ AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
5598
+ ----------------------------------------------------------------------------------------------------
5599
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 2]]
5600
+  (0.1ms) rollback transaction
5601
+  (0.0ms) begin transaction
5602
+ -----------------------------------------------------------------------------------------------
5603
+ AttachmentTest: test_: Attachment should return true from query method when attachment is set.
5604
+ -----------------------------------------------------------------------------------------------
5605
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5606
+  (0.1ms) rollback transaction
5607
+  (0.1ms) begin transaction
5608
+ ---------------------------------------------------------------------------------------------------
5609
+ AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
5610
+ ---------------------------------------------------------------------------------------------------
5611
+  (0.0ms) rollback transaction
5612
+  (0.0ms) begin transaction
5613
+ --------------------------------
5614
+ DynamicPaperclipTest: test_truth
5615
+ --------------------------------
5616
+  (0.1ms) rollback transaction
5617
+  (0.1ms) begin transaction
5618
+ ---------------------------------------------------------------------------------------------------------------------
5619
+ DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
5620
+ ---------------------------------------------------------------------------------------------------------------------
5621
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5622
+ Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:09:21 -0500
5623
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
5624
+ [paperclip] Trying to link /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-63225-g6srmw.png to /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-63225-mztlk7.png
5625
+ Command :: file -b --mime '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-63225-mztlk7.png'
5626
+ Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-63225-g6srmw.png[0]' 2>/dev/null
5627
+ Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-63225-g6srmw.png[0]'
5628
+ Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-63225-g6srmw.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/76121d983a58042e5a46fec21a87c16e20181128-63225-15z93pu'
5629
+ [paperclip] Trying to link /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/76121d983a58042e5a46fec21a87c16e20181128-63225-15z93pu to /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4a02615c6c08340aece92d8388bbc56220181128-63225-qv3jgm
5630
+  (0.1ms) SAVEPOINT active_record_1
5631
+ SQL (1.1ms) UPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "image_file_name" = ?, "updated_at" = ? WHERE "photos"."id" = ? [["image_file_size", 6646], ["image_updated_at", "2018-11-28 17:09:21.579296"], ["image_file_name", "rails.png"], ["updated_at", "2018-11-28 17:09:21.683165"], ["id", 1]]
5632
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5633
+  (0.6ms) rollback transaction
@@ -19,7 +19,7 @@ class DynamicPaperclip::AttachmentStyleGeneratorTest < MiniTest::Unit::TestCase
19
19
  @app = stub('Application', :call => [200, {}, ''])
20
20
 
21
21
  @foo = stub('foo')
22
- @attachment = stub('image attachment', :path => File.join(FIXTURES_DIR, 'rails.png'), :content_type => 'image/jpeg')
22
+ @attachment = stub('image attachment', :path => File.join(FIXTURES_DIR, 'rails.png'), :original_filename => 'rails.png', :content_type => 'image/jpeg')
23
23
  @attachment.stubs(:exists?).returns(true)
24
24
 
25
25
  Foo.stubs(:find).with(1).returns @foo
@@ -30,66 +30,69 @@ class DynamicPaperclip::AttachmentStyleGeneratorTest < MiniTest::Unit::TestCase
30
30
  @attachment.expects(:exists?).with(:dynamic_42x42).returns(true)
31
31
  @attachment.expects(:process_dynamic_style).never
32
32
 
33
- get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
33
+ get '/system/foos/images/1/dynamic_42x42/rails.png', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
34
34
  end
35
35
 
36
36
  should 'process style if it is dynamic and does not exist' do
37
37
  @attachment.expects(:exists?).with(:dynamic_42x42).returns(false)
38
38
  @attachment.expects(:process_dynamic_style).once
39
39
 
40
- get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
40
+ get '/system/foos/images/1/dynamic_42x42/rails.png', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
41
41
  end
42
42
 
43
43
  should 'find record when an ID is used' do
44
44
  Foo.expects(:find).with(1).returns @foo
45
45
 
46
- get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
46
+ get '/system/foos/images/1/dynamic_42x42/rails.png', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
47
47
  end
48
48
 
49
49
  should 'find record when an ID partition is used' do
50
50
  @foo.stubs(:image_with_id_partition_in_url).returns @attachment
51
51
  Foo.expects(:find).with(10042).returns @foo
52
52
 
53
- get '/system/foos/image_with_id_partition_in_urls/000/010/042/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
53
+ get '/system/foos/image_with_id_partition_in_urls/000/010/042/dynamic_42x42/rails.png', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
54
54
  end
55
55
 
56
56
  should 'respond with correct content type' do
57
- get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
57
+ get '/system/foos/images/1/dynamic_42x42/rails.png', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
58
58
 
59
59
  assert_equal 'image/jpeg', last_response.header['Content-Type']
60
60
  end
61
61
 
62
62
  should 'respond with correct content-disposition' do
63
- get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
63
+ get '/system/foos/images/1/dynamic_42x42/rails.png', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
64
64
 
65
65
  assert_equal 'inline; filename=rails.png', last_response.header['Content-Disposition']
66
66
  end
67
67
 
68
68
  should 'respond with correct content-transfer-encoding' do
69
- get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
69
+ get '/system/foos/images/1/dynamic_42x42/rails.png', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
70
70
 
71
71
  assert_equal 'binary', last_response.header['Content-Transfer-Encoding']
72
72
  end
73
73
 
74
74
  should 'respond with FileBody' do
75
- file_body = ActionController::DataStreaming::FileBody.new(File.join(FIXTURES_DIR, 'rails.png'))
76
- ActionController::DataStreaming::FileBody.expects(:new).with(File.join(FIXTURES_DIR, 'rails.png')).returns(file_body)
75
+ # The FileBody class has been moved to another module in Rails 5
76
+ file_body = defined?(ActionController::DataStreaming::FileBody) ? ActionController::DataStreaming::FileBody : ActionDispatch::Response::FileBody
77
77
 
78
- response = app.call(Rack::MockRequest.env_for('/system/foos/images/1/dynamic_42x42/file?s='+DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42')))
78
+ image_file_body = file_body.new(File.join(FIXTURES_DIR, 'rails.png'))
79
+ file_body.expects(:new).with(File.join(FIXTURES_DIR, 'rails.png')).returns(image_file_body)
79
80
 
80
- assert_equal file_body, response[2]
81
+ response = app.call(Rack::MockRequest.env_for('/system/foos/images/1/dynamic_42x42/rails.png?s='+DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42')))
82
+
83
+ assert_equal image_file_body, response[2]
81
84
  end
82
85
 
83
86
  should 'respond with success' do
84
- get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
87
+ get '/system/foos/images/1/dynamic_42x42/rails.png', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
85
88
 
86
89
  assert last_response.ok?
87
90
  end
88
91
 
89
92
  should '403 with empty body if hash does not match style name' do
90
- get '/system/foos/images/1/dynamic_42x42/file', { s: 'this is an invalid hash' }
93
+ get '/system/foos/images/1/dynamic_42x42/rails.png', { s: 'this is an invalid hash' }
91
94
 
92
95
  assert_equal 403, last_response.status
93
96
  assert_equal '', last_response.body
94
97
  end
95
- end
98
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_paperclip
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Ryan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-09 00:00:00.000000000 Z
11
+ date: 2018-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 4.2.8
117
+ version: 5.0.2
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 4.2.8
124
+ version: 5.0.2
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: appraisal
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -210,9 +210,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
210
  version: '0'
211
211
  required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ">"
213
+ - - ">="
214
214
  - !ruby/object:Gem::Version
215
- version: 1.3.1
215
+ version: '0'
216
216
  requirements: []
217
217
  rubyforge_project:
218
218
  rubygems_version: 2.5.1
@@ -220,38 +220,38 @@ signing_key:
220
220
  specification_version: 4
221
221
  summary: Generate Paperclip attachment styles on the fly
222
222
  test_files:
223
- - test/dummy/app/controllers/application_controller.rb
223
+ - test/unit/has_attached_file_test.rb
224
+ - test/unit/attachment_test.rb
225
+ - test/unit/attachment_style_generator_test.rb
224
226
  - test/dummy/app/models/photo.rb
227
+ - test/dummy/app/controllers/application_controller.rb
228
+ - test/dummy/config/routes.rb
229
+ - test/dummy/config/locales/en.yml
230
+ - test/dummy/config/environments/test.rb
231
+ - test/dummy/config/environment.rb
225
232
  - test/dummy/config/application.rb
226
233
  - test/dummy/config/database.yml
227
- - test/dummy/config/environment.rb
228
- - test/dummy/config/environments/test.rb
229
234
  - test/dummy/config/initializers/dynamic_paperclip.rb
230
- - test/dummy/config/initializers/secret_token.rb
231
235
  - test/dummy/config/initializers/session_store.rb
232
236
  - test/dummy/config/initializers/wrap_parameters.rb
233
- - test/dummy/config/locales/en.yml
234
- - test/dummy/config/routes.rb
237
+ - test/dummy/config/initializers/secret_token.rb
235
238
  - test/dummy/config.ru
236
- - test/dummy/db/migrate/20131102002336_create_photos.rb
237
- - test/dummy/db/schema.rb
238
- - test/dummy/db/test.sqlite3
239
- - test/dummy/log/test.log
240
- - test/dummy/public/404.html
239
+ - test/dummy/script/rails
240
+ - test/dummy/Rakefile
241
+ - test/dummy/public/favicon.ico
241
242
  - test/dummy/public/422.html
242
243
  - test/dummy/public/500.html
243
- - test/dummy/public/favicon.ico
244
- - test/dummy/public/system/photos/images/000/000/001/dynamic_42x42/rails.png
244
+ - test/dummy/public/404.html
245
245
  - test/dummy/public/system/photos/images/000/000/001/original/rails.png
246
- - test/dummy/Rakefile
247
- - test/dummy/script/rails
246
+ - test/dummy/public/system/photos/images/000/000/001/dynamic_42x42/rails.png
247
+ - test/dummy/db/schema.rb
248
+ - test/dummy/db/test.sqlite3
249
+ - test/dummy/db/migrate/20131102002336_create_photos.rb
250
+ - test/dummy/log/test.log
251
+ - test/integration/dynamic_attachment_styles_test.rb
248
252
  - test/dynamic_paperclip_test.rb
249
253
  - test/fixtures/photos.yml
250
254
  - test/fixtures/rails.png
251
- - test/generators/install_generator_test.rb
252
- - test/integration/dynamic_attachment_styles_test.rb
253
255
  - test/test_helper.rb
256
+ - test/generators/install_generator_test.rb
254
257
  - test/tmp/config/initializers/dynamic_paperclip.rb
255
- - test/unit/attachment_style_generator_test.rb
256
- - test/unit/attachment_test.rb
257
- - test/unit/has_attached_file_test.rb