dynamic_paperclip 1.0.0 → 1.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6527eee9a29b87e3c0bfa0ae5beacd1df2fc3c92
|
4
|
+
data.tar.gz: 64e6c73271c87eb8c75d4dacc7aa84a7620e0161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f057538afffbfe3435655f14d9492c069a5a8b3e8094ce465f6f73d69fb352cf4ea0788511b186ae7011b9fe43ae57e1fa4692b80277a6ad38c98bfcc2f5cb88
|
7
|
+
data.tar.gz: 0f3db47e3b816ea7fcecd977769b447c66513689286138b2ad52656896b066876d81c0c7639b5a6dad90c878d19ef4a33b12fdf26250dd2f7fb0102973a3d485
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Getting started
|
|
14
14
|
|
15
15
|
### Requirements
|
16
16
|
|
17
|
-
Dynamic Paperclip requires Paperclip
|
17
|
+
Dynamic Paperclip requires Paperclip 4 or above and only currently supports Paperclip's File Storage.
|
18
18
|
|
19
19
|
### Application
|
20
20
|
|
@@ -20,11 +20,6 @@ module DynamicPaperclip
|
|
20
20
|
id = id_from_partition(match[:id])
|
21
21
|
attachment = klass.find(id).send(name)
|
22
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
|
-
|
28
23
|
# The definition will be escaped twice in the URL, so we need to unescape it once.
|
29
24
|
# We should always reference dynamic style names after escaping once - that's how they reside on the FS.
|
30
25
|
style_name = StyleNaming.dynamic_style_name_from_definition(CGI.unescape(match[:definition]), false)
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -5631,3 +5631,554 @@ Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f
|
|
5631
5631
|
[1m[36mSQL (1.1ms)[0m [1mUPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "image_file_name" = ?, "updated_at" = ? WHERE "photos"."id" = ?[0m [["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
5632
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5633
5633
|
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
5634
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5635
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5636
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5637
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
5638
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5639
|
+
[1m[35m (0.1ms)[0m [1m[36mcommit transaction[0m
|
5640
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5641
|
+
[1m[36mFixture Delete (0.7ms)[0m [1m[31mDELETE FROM "photos"[0m
|
5642
|
+
[1m[36mFixture Insert (0.3ms)[0m [1m[32mINSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:47:45.682840', '2018-11-28 17:47:45.682840')[0m
|
5643
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:47:45.682840', '2018-11-28 17:47:45.682840')[0m
|
5644
|
+
[1m[35m (1.0ms)[0m [1m[36mcommit transaction[0m
|
5645
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5646
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
5647
|
+
AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
|
5648
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
5649
|
+
[1m[36mPhoto Load (0.2ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5650
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5651
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5652
|
+
-----------------------------------------------------------------------------------------
|
5653
|
+
AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
|
5654
|
+
-----------------------------------------------------------------------------------------
|
5655
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5656
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5657
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5658
|
+
-------------------------------------------------------------------------------------
|
5659
|
+
AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
|
5660
|
+
-------------------------------------------------------------------------------------
|
5661
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5662
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
5663
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5664
|
+
---------------------------------------------------------------------------------------------------
|
5665
|
+
AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
|
5666
|
+
---------------------------------------------------------------------------------------------------
|
5667
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
5668
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5669
|
+
---------------------------------------------------------------------------------------------------------------------
|
5670
|
+
AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
|
5671
|
+
---------------------------------------------------------------------------------------------------------------------
|
5672
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5673
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5674
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5675
|
+
---------------------------------------------------------------------------------------
|
5676
|
+
AttachmentTest: test_: Attachment should raise error if no secret has been configured.
|
5677
|
+
---------------------------------------------------------------------------------------
|
5678
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5679
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5680
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5681
|
+
-----------------------------------------------------------------------------------------------
|
5682
|
+
AttachmentTest: test_: Attachment should return true from query method when attachment is set.
|
5683
|
+
-----------------------------------------------------------------------------------------------
|
5684
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5685
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5686
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5687
|
+
----------------------------------------------------------------------------------------------------
|
5688
|
+
AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
|
5689
|
+
----------------------------------------------------------------------------------------------------
|
5690
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
|
5691
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
5692
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5693
|
+
---------------------------------------------------------------------------------------------------------------
|
5694
|
+
AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
|
5695
|
+
---------------------------------------------------------------------------------------------------------------
|
5696
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5697
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5698
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5699
|
+
-------------------------------------------------------------------------------------
|
5700
|
+
InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
|
5701
|
+
-------------------------------------------------------------------------------------
|
5702
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5703
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5704
|
+
---------------------------------------------------------------------------------------------------------------------
|
5705
|
+
DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
|
5706
|
+
---------------------------------------------------------------------------------------------------------------------
|
5707
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5708
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:47:45 -0500
|
5709
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5710
|
+
[paperclip] Trying to link /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-68550-1ac12pi.png to /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-68550-1oljqg3.png
|
5711
|
+
Command :: file -b --mime '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-68550-1oljqg3.png'
|
5712
|
+
Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-68550-1ac12pi.png[0]' 2>/dev/null
|
5713
|
+
Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-68550-1ac12pi.png[0]'
|
5714
|
+
Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-68550-1ac12pi.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/7cfde77299ff1415a9c3e943212308f120181128-68550-1jxn2ae'
|
5715
|
+
[paperclip] Trying to link /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/7cfde77299ff1415a9c3e943212308f120181128-68550-1jxn2ae to /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/67b5dd703188dc85d4b6d85b681ef76320181128-68550-o2yhlj
|
5716
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5717
|
+
[1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "updated_at" = ?, "image_file_name" = ? WHERE "photos"."id" = ?[0m [["image_file_size", 6646], ["image_updated_at", "2018-11-28 17:47:45.967206"], ["updated_at", "2018-11-28 17:47:46.222995"], ["image_file_name", "rails.png"], ["id", 1]]
|
5718
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5719
|
+
[1m[35m (0.4ms)[0m [1m[31mrollback transaction[0m
|
5720
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5721
|
+
--------------------------------
|
5722
|
+
DynamicPaperclipTest: test_truth
|
5723
|
+
--------------------------------
|
5724
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
5725
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5726
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5727
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5728
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
5729
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5730
|
+
[1m[35m (0.0ms)[0m [1m[36mcommit transaction[0m
|
5731
|
+
[1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
|
5732
|
+
--------------------------------
|
5733
|
+
DynamicPaperclipTest: test_truth
|
5734
|
+
--------------------------------
|
5735
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5736
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5737
|
+
[1m[36mFixture Delete (0.6ms)[0m [1m[31mDELETE FROM "photos"[0m
|
5738
|
+
[1m[36mFixture Insert (0.5ms)[0m [1m[32mINSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:52:19.991793', '2018-11-28 17:52:19.991793')[0m
|
5739
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:52:19.991793', '2018-11-28 17:52:19.991793')[0m
|
5740
|
+
[1m[35m (0.7ms)[0m [1m[36mcommit transaction[0m
|
5741
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5742
|
+
-----------------------------------------------------------------------------------------------
|
5743
|
+
AttachmentTest: test_: Attachment should return true from query method when attachment is set.
|
5744
|
+
-----------------------------------------------------------------------------------------------
|
5745
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5746
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5747
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5748
|
+
-----------------------------------------------------------------------------------------
|
5749
|
+
AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
|
5750
|
+
-----------------------------------------------------------------------------------------
|
5751
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5752
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5753
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5754
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
5755
|
+
AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
|
5756
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
5757
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5758
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5759
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5760
|
+
---------------------------------------------------------------------------------------------------------------
|
5761
|
+
AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
|
5762
|
+
---------------------------------------------------------------------------------------------------------------
|
5763
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5764
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5765
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5766
|
+
----------------------------------------------------------------------------------------------------
|
5767
|
+
AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
|
5768
|
+
----------------------------------------------------------------------------------------------------
|
5769
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
|
5770
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
5771
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5772
|
+
---------------------------------------------------------------------------------------------------------------------
|
5773
|
+
AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
|
5774
|
+
---------------------------------------------------------------------------------------------------------------------
|
5775
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5776
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5777
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5778
|
+
---------------------------------------------------------------------------------------------------
|
5779
|
+
AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
|
5780
|
+
---------------------------------------------------------------------------------------------------
|
5781
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
5782
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5783
|
+
---------------------------------------------------------------------------------------
|
5784
|
+
AttachmentTest: test_: Attachment should raise error if no secret has been configured.
|
5785
|
+
---------------------------------------------------------------------------------------
|
5786
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5787
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5788
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5789
|
+
-------------------------------------------------------------------------------------
|
5790
|
+
AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
|
5791
|
+
-------------------------------------------------------------------------------------
|
5792
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5793
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5794
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5795
|
+
-------------------------------------------------------------------------------------
|
5796
|
+
InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
|
5797
|
+
-------------------------------------------------------------------------------------
|
5798
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5799
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5800
|
+
---------------------------------------------------------------------------------------------------------------------
|
5801
|
+
DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
|
5802
|
+
---------------------------------------------------------------------------------------------------------------------
|
5803
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5804
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:52:20 -0500
|
5805
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5806
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5807
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5808
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5809
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5810
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
5811
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5812
|
+
[1m[35m (0.1ms)[0m [1m[36mcommit transaction[0m
|
5813
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5814
|
+
[1m[36mFixture Delete (0.4ms)[0m [1m[31mDELETE FROM "photos"[0m
|
5815
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:52:50.013626', '2018-11-28 17:52:50.013626')[0m
|
5816
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:52:50.013626', '2018-11-28 17:52:50.013626')[0m
|
5817
|
+
[1m[35m (3.2ms)[0m [1m[36mcommit transaction[0m
|
5818
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5819
|
+
---------------------------------------------------------------------------------------
|
5820
|
+
AttachmentTest: test_: Attachment should raise error if no secret has been configured.
|
5821
|
+
---------------------------------------------------------------------------------------
|
5822
|
+
[1m[36mPhoto Load (0.2ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5823
|
+
[1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
|
5824
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5825
|
+
---------------------------------------------------------------------------------------------------------------------
|
5826
|
+
AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
|
5827
|
+
---------------------------------------------------------------------------------------------------------------------
|
5828
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5829
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5830
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5831
|
+
---------------------------------------------------------------------------------------------------
|
5832
|
+
AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
|
5833
|
+
---------------------------------------------------------------------------------------------------
|
5834
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5835
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5836
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
5837
|
+
AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
|
5838
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
5839
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5840
|
+
[1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
|
5841
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5842
|
+
-----------------------------------------------------------------------------------------
|
5843
|
+
AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
|
5844
|
+
-----------------------------------------------------------------------------------------
|
5845
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5846
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5847
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5848
|
+
-------------------------------------------------------------------------------------
|
5849
|
+
AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
|
5850
|
+
-------------------------------------------------------------------------------------
|
5851
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5852
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5853
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5854
|
+
----------------------------------------------------------------------------------------------------
|
5855
|
+
AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
|
5856
|
+
----------------------------------------------------------------------------------------------------
|
5857
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
|
5858
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5859
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5860
|
+
---------------------------------------------------------------------------------------------------------------
|
5861
|
+
AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
|
5862
|
+
---------------------------------------------------------------------------------------------------------------
|
5863
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5864
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5865
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5866
|
+
-----------------------------------------------------------------------------------------------
|
5867
|
+
AttachmentTest: test_: Attachment should return true from query method when attachment is set.
|
5868
|
+
-----------------------------------------------------------------------------------------------
|
5869
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5870
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5871
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5872
|
+
--------------------------------
|
5873
|
+
DynamicPaperclipTest: test_truth
|
5874
|
+
--------------------------------
|
5875
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5876
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5877
|
+
-------------------------------------------------------------------------------------
|
5878
|
+
InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
|
5879
|
+
-------------------------------------------------------------------------------------
|
5880
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5881
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5882
|
+
---------------------------------------------------------------------------------------------------------------------
|
5883
|
+
DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
|
5884
|
+
---------------------------------------------------------------------------------------------------------------------
|
5885
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5886
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:52:50 -0500
|
5887
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5888
|
+
Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69811-1okxz7l.png[0]' 2>/dev/null
|
5889
|
+
Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69811-1okxz7l.png[0]'
|
5890
|
+
Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69811-1okxz7l.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/cd6db9fed4102b0035b86d3e538c178520181128-69811-uh4vh5'
|
5891
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5892
|
+
[1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "updated_at" = ?, "image_file_name" = ? WHERE "photos"."id" = ?[0m [["image_file_size", 6646], ["image_updated_at", "2018-11-28 17:52:50.286107"], ["updated_at", "2018-11-28 17:52:50.389149"], ["image_file_name", "rails.png"], ["id", 1]]
|
5893
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5894
|
+
[1m[35m (0.4ms)[0m [1m[31mrollback transaction[0m
|
5895
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5896
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5897
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5898
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
5899
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5900
|
+
[1m[35m (0.0ms)[0m [1m[36mcommit transaction[0m
|
5901
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5902
|
+
--------------------------------
|
5903
|
+
DynamicPaperclipTest: test_truth
|
5904
|
+
--------------------------------
|
5905
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
5906
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5907
|
+
-------------------------------------------------------------------------------------
|
5908
|
+
InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
|
5909
|
+
-------------------------------------------------------------------------------------
|
5910
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5911
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5912
|
+
[1m[36mFixture Delete (0.5ms)[0m [1m[31mDELETE FROM "photos"[0m
|
5913
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:53:00.207558', '2018-11-28 17:53:00.207558')[0m
|
5914
|
+
[1m[36mFixture Insert (0.0ms)[0m [1m[32mINSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:53:00.207558', '2018-11-28 17:53:00.207558')[0m
|
5915
|
+
[1m[35m (0.6ms)[0m [1m[36mcommit transaction[0m
|
5916
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5917
|
+
---------------------------------------------------------------------------------------------------------------------
|
5918
|
+
DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
|
5919
|
+
---------------------------------------------------------------------------------------------------------------------
|
5920
|
+
[1m[36mPhoto Load (0.2ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5921
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:53:00 -0500
|
5922
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5923
|
+
Command :: file -b --mime '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69826-1naycz4.png'
|
5924
|
+
Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69826-1i34kg1.png[0]' 2>/dev/null
|
5925
|
+
Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69826-1i34kg1.png[0]'
|
5926
|
+
Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69826-1i34kg1.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/f5db26b79109e7db519c7512dd99565220181128-69826-1n6w6kf'
|
5927
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5928
|
+
[1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "updated_at" = ?, "image_file_name" = ? WHERE "photos"."id" = ?[0m [["image_file_size", 6646], ["image_updated_at", "2018-11-28 17:53:00.379783"], ["updated_at", "2018-11-28 17:53:00.462360"], ["image_file_name", "rails.png"], ["id", 1]]
|
5929
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5930
|
+
[1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
|
5931
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5932
|
+
---------------------------------------------------------------------------------------------------------------
|
5933
|
+
AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
|
5934
|
+
---------------------------------------------------------------------------------------------------------------
|
5935
|
+
[1m[36mPhoto Load (0.3ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5936
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5937
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5938
|
+
---------------------------------------------------------------------------------------------------------------------
|
5939
|
+
AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
|
5940
|
+
---------------------------------------------------------------------------------------------------------------------
|
5941
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5942
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5943
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5944
|
+
-------------------------------------------------------------------------------------
|
5945
|
+
AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
|
5946
|
+
-------------------------------------------------------------------------------------
|
5947
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5948
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5949
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5950
|
+
---------------------------------------------------------------------------------------
|
5951
|
+
AttachmentTest: test_: Attachment should raise error if no secret has been configured.
|
5952
|
+
---------------------------------------------------------------------------------------
|
5953
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5954
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5955
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5956
|
+
----------------------------------------------------------------------------------------------------
|
5957
|
+
AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
|
5958
|
+
----------------------------------------------------------------------------------------------------
|
5959
|
+
[1m[36mPhoto Load (0.4ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
|
5960
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5961
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5962
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
5963
|
+
AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
|
5964
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
5965
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5966
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5967
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5968
|
+
---------------------------------------------------------------------------------------------------
|
5969
|
+
AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
|
5970
|
+
---------------------------------------------------------------------------------------------------
|
5971
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
5972
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
5973
|
+
-----------------------------------------------------------------------------------------------
|
5974
|
+
AttachmentTest: test_: Attachment should return true from query method when attachment is set.
|
5975
|
+
-----------------------------------------------------------------------------------------------
|
5976
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5977
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5978
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5979
|
+
-----------------------------------------------------------------------------------------
|
5980
|
+
AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
|
5981
|
+
-----------------------------------------------------------------------------------------
|
5982
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
5983
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5984
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5985
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5986
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5987
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
5988
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5989
|
+
[1m[35m (0.2ms)[0m [1m[36mcommit transaction[0m
|
5990
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5991
|
+
--------------------------------
|
5992
|
+
DynamicPaperclipTest: test_truth
|
5993
|
+
--------------------------------
|
5994
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
5995
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
5996
|
+
[1m[36mFixture Delete (0.7ms)[0m [1m[31mDELETE FROM "photos"[0m
|
5997
|
+
[1m[36mFixture Insert (0.2ms)[0m [1m[32mINSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:53:33.282701', '2018-11-28 17:53:33.282701')[0m
|
5998
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:53:33.282701', '2018-11-28 17:53:33.282701')[0m
|
5999
|
+
[1m[35m (1.3ms)[0m [1m[36mcommit transaction[0m
|
6000
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6001
|
+
-----------------------------------------------------------------------------------------------
|
6002
|
+
AttachmentTest: test_: Attachment should return true from query method when attachment is set.
|
6003
|
+
-----------------------------------------------------------------------------------------------
|
6004
|
+
[1m[36mPhoto Load (0.2ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6005
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6006
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6007
|
+
-----------------------------------------------------------------------------------------
|
6008
|
+
AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
|
6009
|
+
-----------------------------------------------------------------------------------------
|
6010
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6011
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6012
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6013
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
6014
|
+
AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
|
6015
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
6016
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6017
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6018
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6019
|
+
---------------------------------------------------------------------------------------------------------------
|
6020
|
+
AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
|
6021
|
+
---------------------------------------------------------------------------------------------------------------
|
6022
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6023
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6024
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6025
|
+
----------------------------------------------------------------------------------------------------
|
6026
|
+
AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
|
6027
|
+
----------------------------------------------------------------------------------------------------
|
6028
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
|
6029
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6030
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6031
|
+
---------------------------------------------------------------------------------------------------------------------
|
6032
|
+
AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
|
6033
|
+
---------------------------------------------------------------------------------------------------------------------
|
6034
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6035
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6036
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6037
|
+
-------------------------------------------------------------------------------------
|
6038
|
+
AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
|
6039
|
+
-------------------------------------------------------------------------------------
|
6040
|
+
[1m[36mPhoto Load (0.3ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6041
|
+
[1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
|
6042
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6043
|
+
---------------------------------------------------------------------------------------
|
6044
|
+
AttachmentTest: test_: Attachment should raise error if no secret has been configured.
|
6045
|
+
---------------------------------------------------------------------------------------
|
6046
|
+
[1m[36mPhoto Load (0.2ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6047
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6048
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6049
|
+
---------------------------------------------------------------------------------------------------
|
6050
|
+
AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
|
6051
|
+
---------------------------------------------------------------------------------------------------
|
6052
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6053
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6054
|
+
---------------------------------------------------------------------------------------------------------------------
|
6055
|
+
DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
|
6056
|
+
---------------------------------------------------------------------------------------------------------------------
|
6057
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6058
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:53:33 -0500
|
6059
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6060
|
+
[paperclip] Trying to link /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69934-1unz6ls.png to /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69934-1ohw31p.png
|
6061
|
+
Command :: file -b --mime '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69934-1ohw31p.png'
|
6062
|
+
Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69934-1unz6ls.png[0]' 2>/dev/null
|
6063
|
+
Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69934-1unz6ls.png[0]'
|
6064
|
+
Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-69934-1unz6ls.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/1309f46c1d8e51448c7ae402e7ee5c6c20181128-69934-16vmesz'
|
6065
|
+
[paperclip] Trying to link /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/1309f46c1d8e51448c7ae402e7ee5c6c20181128-69934-16vmesz to /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/35595ed2657ec7f9874f2c877379642120181128-69934-1tcrkd0
|
6066
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6067
|
+
[1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "updated_at" = ?, "image_file_name" = ? WHERE "photos"."id" = ?[0m [["image_file_size", 6646], ["image_updated_at", "2018-11-28 17:53:33.618647"], ["updated_at", "2018-11-28 17:53:33.757813"], ["image_file_name", "rails.png"], ["id", 1]]
|
6068
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6069
|
+
[1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
|
6070
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6071
|
+
-------------------------------------------------------------------------------------
|
6072
|
+
InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
|
6073
|
+
-------------------------------------------------------------------------------------
|
6074
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6075
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6076
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6077
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6078
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
6079
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
6080
|
+
[1m[35m (0.1ms)[0m [1m[36mcommit transaction[0m
|
6081
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6082
|
+
--------------------------------
|
6083
|
+
DynamicPaperclipTest: test_truth
|
6084
|
+
--------------------------------
|
6085
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
6086
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6087
|
+
[1m[36mFixture Delete (0.9ms)[0m [1m[31mDELETE FROM "photos"[0m
|
6088
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 17:54:03.569951', '2018-11-28 17:54:03.569951')[0m
|
6089
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 17:54:03.569951', '2018-11-28 17:54:03.569951')[0m
|
6090
|
+
[1m[35m (0.8ms)[0m [1m[36mcommit transaction[0m
|
6091
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6092
|
+
---------------------------------------------------------------------------------------------------------------------
|
6093
|
+
DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
|
6094
|
+
---------------------------------------------------------------------------------------------------------------------
|
6095
|
+
[1m[36mPhoto Load (0.2ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6096
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 12:54:03 -0500
|
6097
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6098
|
+
[paperclip] Trying to link /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-70027-ht1xzt.png to /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-70027-k2wp8h.png
|
6099
|
+
Command :: file -b --mime '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-70027-k2wp8h.png'
|
6100
|
+
Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-70027-ht1xzt.png[0]' 2>/dev/null
|
6101
|
+
Command :: identify -format %m '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-70027-ht1xzt.png[0]'
|
6102
|
+
Command :: convert '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4d003d1435f0827cfe18ac2d2a3979e720181128-70027-ht1xzt.png[0]' -auto-orient -resize "100x100" '/var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/a131e85baa81afd9d7c9ff011b8e910920181128-70027-vd3555'
|
6103
|
+
[paperclip] Trying to link /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/a131e85baa81afd9d7c9ff011b8e910920181128-70027-vd3555 to /var/folders/fk/ltpzbpl167jfwr6wyty1tc200000gn/T/4ec60a82fd1a8f1814cf9c61676fe77d20181128-70027-10ycmjm
|
6104
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6105
|
+
[1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "photos" SET "image_file_size" = ?, "image_updated_at" = ?, "updated_at" = ?, "image_file_name" = ? WHERE "photos"."id" = ?[0m [["image_file_size", 6646], ["image_updated_at", "2018-11-28 17:54:03.734449"], ["updated_at", "2018-11-28 17:54:03.802656"], ["image_file_name", "rails.png"], ["id", 1]]
|
6106
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6107
|
+
[1m[35m (0.3ms)[0m [1m[31mrollback transaction[0m
|
6108
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
6109
|
+
-------------------------------------------------------------------------------------
|
6110
|
+
InstallGeneratorTest: test_generates_secret_and_configures_DynamicPaperclip_to_use_it
|
6111
|
+
-------------------------------------------------------------------------------------
|
6112
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6113
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6114
|
+
---------------------------------------------------------------------------------------------------
|
6115
|
+
AttachmentTest: test_: Attachment should use DynamicPaperclip::Attachment for dynamic attachments.
|
6116
|
+
---------------------------------------------------------------------------------------------------
|
6117
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
6118
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6119
|
+
---------------------------------------------------------------------------------------------------------------------
|
6120
|
+
AttachmentTest: test_: Attachment should delete styles passed to #delete_styles and maintain existing delete queued.
|
6121
|
+
---------------------------------------------------------------------------------------------------------------------
|
6122
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6123
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6124
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
6125
|
+
---------------------------------------------------------------------------------------------------------------
|
6126
|
+
AttachmentTest: test_: Attachment should generate correct secure attachment URL when given a style definition.
|
6127
|
+
---------------------------------------------------------------------------------------------------------------
|
6128
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6129
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6130
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6131
|
+
-----------------------------------------------------------------------------------------
|
6132
|
+
AttachmentTest: test_: Attachment should only include dynamic styles in #dynamic_styles.
|
6133
|
+
-----------------------------------------------------------------------------------------
|
6134
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6135
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6136
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
6137
|
+
---------------------------------------------------------------------------------------
|
6138
|
+
AttachmentTest: test_: Attachment should raise error if no secret has been configured.
|
6139
|
+
---------------------------------------------------------------------------------------
|
6140
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6141
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6142
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6143
|
+
-----------------------------------------------------------------------------------------------
|
6144
|
+
AttachmentTest: test_: Attachment should return true from query method when attachment is set.
|
6145
|
+
-----------------------------------------------------------------------------------------------
|
6146
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6147
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6148
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6149
|
+
----------------------------------------------------------------------------------------------------
|
6150
|
+
AttachmentTest: test_: Attachment should return false from query method when attachment is not set.
|
6151
|
+
----------------------------------------------------------------------------------------------------
|
6152
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
|
6153
|
+
[1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
|
6154
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6155
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
6156
|
+
AttachmentTest: test_: Attachment should add dynamic style to #styles and reprocess it when a dynamic style name is passed to #process_dynamic_style.
|
6157
|
+
------------------------------------------------------------------------------------------------------------------------------------------------------
|
6158
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6159
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
6160
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
6161
|
+
-------------------------------------------------------------------------------------
|
6162
|
+
AttachmentTest: test_: Attachment should include existing dynamic styles in #styles.
|
6163
|
+
-------------------------------------------------------------------------------------
|
6164
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6165
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
6166
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6167
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6168
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6169
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
6170
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6171
|
+
[1m[35m (0.0ms)[0m [1m[36mcommit transaction[0m
|
6172
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6173
|
+
[1m[36mFixture Delete (0.6ms)[0m [1m[31mDELETE FROM "photos"[0m
|
6174
|
+
[1m[36mFixture Insert (0.3ms)[0m [1m[32mINSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2018-11-28 18:03:29.062818', '2018-11-28 18:03:29.062818')[0m
|
6175
|
+
[1m[36mFixture Insert (0.0ms)[0m [1m[32mINSERT INTO "photos" ("id", "created_at", "updated_at") VALUES (2, '2018-11-28 18:03:29.062818', '2018-11-28 18:03:29.062818')[0m
|
6176
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
6177
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
6178
|
+
---------------------------------------------------------------------------------------------------------------------
|
6179
|
+
DynamicAttachmentStylesTest: test_: DynamicAttachmentStyles should generate dynamic style and send it to the client.
|
6180
|
+
---------------------------------------------------------------------------------------------------------------------
|
6181
|
+
[1m[36mPhoto Load (0.3ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6182
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2018-11-28 13:03:29 -0500
|
6183
|
+
[1m[36mPhoto Load (0.1ms)[0m [1m[34mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
6184
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
@@ -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'), :
|
22
|
+
@attachment = stub('image attachment', :path => File.join(FIXTURES_DIR, '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,43 +30,43 @@ 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/
|
33
|
+
get '/system/foos/images/1/dynamic_42x42/file', { 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/
|
40
|
+
get '/system/foos/images/1/dynamic_42x42/file', { 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/
|
46
|
+
get '/system/foos/images/1/dynamic_42x42/file', { 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/
|
53
|
+
get '/system/foos/image_with_id_partition_in_urls/000/010/042/dynamic_42x42/file', { 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/
|
57
|
+
get '/system/foos/images/1/dynamic_42x42/file', { 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/
|
63
|
+
get '/system/foos/images/1/dynamic_42x42/file', { 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/
|
69
|
+
get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
|
70
70
|
|
71
71
|
assert_equal 'binary', last_response.header['Content-Transfer-Encoding']
|
72
72
|
end
|
@@ -78,19 +78,19 @@ class DynamicPaperclip::AttachmentStyleGeneratorTest < MiniTest::Unit::TestCase
|
|
78
78
|
image_file_body = file_body.new(File.join(FIXTURES_DIR, 'rails.png'))
|
79
79
|
file_body.expects(:new).with(File.join(FIXTURES_DIR, 'rails.png')).returns(image_file_body)
|
80
80
|
|
81
|
-
response = app.call(Rack::MockRequest.env_for('/system/foos/images/1/dynamic_42x42/
|
81
|
+
response = app.call(Rack::MockRequest.env_for('/system/foos/images/1/dynamic_42x42/file?s='+DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42')))
|
82
82
|
|
83
83
|
assert_equal image_file_body, response[2]
|
84
84
|
end
|
85
85
|
|
86
86
|
should 'respond with success' do
|
87
|
-
get '/system/foos/images/1/dynamic_42x42/
|
87
|
+
get '/system/foos/images/1/dynamic_42x42/file', { s: DynamicPaperclip::UrlSecurity.generate_hash('dynamic_42x42') }
|
88
88
|
|
89
89
|
assert last_response.ok?
|
90
90
|
end
|
91
91
|
|
92
92
|
should '403 with empty body if hash does not match style name' do
|
93
|
-
get '/system/foos/images/1/dynamic_42x42/
|
93
|
+
get '/system/foos/images/1/dynamic_42x42/file', { s: 'this is an invalid hash' }
|
94
94
|
|
95
95
|
assert_equal 403, last_response.status
|
96
96
|
assert_equal '', last_response.body
|