dynamic_paperclip 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -32,13 +32,14 @@ module DynamicPaperclip
|
|
32
32
|
def dynamic_url(definition)
|
33
33
|
raise DynamicPaperclip::Errors::SecretNotSet, "No secret has been configured. Please run the dynamic_paperclip:install generator." unless DynamicPaperclip.config.secret.present?
|
34
34
|
|
35
|
-
|
35
|
+
escaped_style_name = StyleNaming.dynamic_style_name_from_definition(definition)
|
36
|
+
unescaped_style_name = StyleNaming.dynamic_style_name_from_definition(definition, false)
|
36
37
|
|
37
|
-
url = url(
|
38
|
+
url = url(unescaped_style_name)
|
38
39
|
|
39
40
|
delimiter_char = url.match(/\?.+=/) ? '&' : '?'
|
40
41
|
|
41
|
-
"#{url}#{delimiter_char}s=#{UrlSecurity.generate_hash(
|
42
|
+
"#{url}#{delimiter_char}s=#{UrlSecurity.generate_hash(escaped_style_name)}"
|
42
43
|
end
|
43
44
|
|
44
45
|
private
|
@@ -2,9 +2,9 @@ module DynamicPaperclip
|
|
2
2
|
module StyleNaming
|
3
3
|
# Generate style name from style definition,
|
4
4
|
# only supports strings at the moment
|
5
|
-
def self.dynamic_style_name_from_definition(options)
|
5
|
+
def self.dynamic_style_name_from_definition(options, uri_escape=true)
|
6
6
|
if options.is_a?(String)
|
7
|
-
"dynamic_#{URI.escape(options)}".to_sym
|
7
|
+
"dynamic_#{uri_escape ? URI.escape(options) : options}".to_sym
|
8
8
|
else
|
9
9
|
raise 'Only String options are supported with dynamic attachments'
|
10
10
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -17557,3 +17557,195 @@ Completed 200 OK in 0.4ms (ActiveRecord: 0.0ms)
|
|
17557
17557
|
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17558
17558
|
[1m[35m (0.0ms)[0m begin transaction
|
17559
17559
|
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17560
|
+
Connecting to database specified by database.yml
|
17561
|
+
[1m[36m (20.7ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
17562
|
+
Migrating to CreatePhotos (20131102002336)
|
17563
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17564
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "photos"[0m
|
17565
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2013-11-04 20:12:05', '2013-11-04 20:12:05')
|
17566
|
+
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
17567
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17568
|
+
[1m[36mPhoto Load (0.2ms)[0m [1mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1[0m [["id", 1]]
|
17569
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
17570
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17571
|
+
[1m[35mPhoto Load (0.1ms)[0m SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
|
17572
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17573
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17574
|
+
[1m[36mPhoto Load (0.1ms)[0m [1mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1[0m [["id", 1]]
|
17575
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
17576
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17577
|
+
[1m[35mPhoto Load (0.1ms)[0m SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
|
17578
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17579
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17580
|
+
[1m[36mPhoto Load (0.1ms)[0m [1mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1[0m [["id", 1]]
|
17581
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
17582
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17583
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
17584
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17585
|
+
[1m[35mPhoto Load (0.1ms)[0m SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
|
17586
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2013-11-04 15:12:06 -0500
|
17587
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_photo as PNG
|
17588
|
+
Parameters: {"s"=>"d2dcb69d514d1030ce01404ebc422423eccf1b02", "attachment"=>"images", "id_partition"=>"000/000/001", "definition"=>"100x100", "filename"=>"rails"}
|
17589
|
+
[1m[36mPhoto Load (0.1ms)[0m [1mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1[0m [["id", 1]]
|
17590
|
+
Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21282-5a7lc0.png[0]'
|
17591
|
+
Command :: identify -format %m '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21282-5a7lc0.png[0]'
|
17592
|
+
Command :: identify -format %m '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21282-5a7lc0.png[0]'
|
17593
|
+
Command :: identify -format %m '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21282-5a7lc0.png[0]'
|
17594
|
+
Command :: convert '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21282-5a7lc0.png[0]' -auto-orient -resize "100x100" '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21282-5a7lc020131104-21282-3pqm6l'
|
17595
|
+
Command :: file -b --mime '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21282-5a7lc020131104-21282-3pqm6l'
|
17596
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
17597
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "photos" SET "image_file_size" = 6646, "image_updated_at" = '2013-11-04 20:12:06.144999', "image_file_name" = 'rails.png', "updated_at" = '2013-11-04 20:12:06.261596' WHERE "photos"."id" = 1[0m
|
17598
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
17599
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/dummy/public/system/photos/images/000/000/001/dynamic_100x100/rails.png (0.1ms)
|
17600
|
+
Completed 200 OK in 127.7ms (ActiveRecord: 0.5ms)
|
17601
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
17602
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17603
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17604
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17605
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17606
|
+
Completed 200 OK in 1.3ms (ActiveRecord: 0.0ms)
|
17607
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17608
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17609
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17610
|
+
Parameters: {"attachment"=>"image_with_id_partition_in_urls", "id_partition"=>"000/010/042", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17611
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17612
|
+
Completed 200 OK in 0.6ms (ActiveRecord: 0.0ms)
|
17613
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17614
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17615
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17616
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17617
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17618
|
+
Completed 200 OK in 0.6ms (ActiveRecord: 0.0ms)
|
17619
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17620
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17621
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17622
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17623
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17624
|
+
Completed 200 OK in 0.6ms (ActiveRecord: 0.0ms)
|
17625
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17626
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17627
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17628
|
+
Parameters: {"attachment"=>"bars", "id"=>"1", "style"=>"style", "filename"=>"file"}
|
17629
|
+
Completed 500 Internal Server Error in 0.4ms
|
17630
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17631
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17632
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17633
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"this is an invalid hash"}
|
17634
|
+
Completed 500 Internal Server Error in 0.5ms
|
17635
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17636
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17637
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17638
|
+
Parameters: {"attachment"=>"images", "style"=>"style", "filename"=>"file"}
|
17639
|
+
Completed 500 Internal Server Error in 0.4ms
|
17640
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17641
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17642
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17643
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17644
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17645
|
+
Completed 200 OK in 0.5ms (ActiveRecord: 0.0ms)
|
17646
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17647
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17648
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17649
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17650
|
+
Completed 200 OK in 0.4ms (ActiveRecord: 0.0ms)
|
17651
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17652
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17653
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17654
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17655
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17656
|
+
Connecting to database specified by database.yml
|
17657
|
+
[1m[36m (15.9ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
17658
|
+
Migrating to CreatePhotos (20131102002336)
|
17659
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17660
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "photos"[0m
|
17661
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "photos" ("id", "image_file_name", "image_content_type", "created_at", "updated_at") VALUES (1, 'rails.png', 'image/png', '2013-11-04 20:12:18', '2013-11-04 20:12:18')
|
17662
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
17663
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17664
|
+
[1m[36mPhoto Load (0.2ms)[0m [1mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1[0m [["id", 1]]
|
17665
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
17666
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17667
|
+
[1m[35mPhoto Load (0.1ms)[0m SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
|
17668
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17669
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17670
|
+
[1m[36mPhoto Load (0.1ms)[0m [1mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1[0m [["id", 1]]
|
17671
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
17672
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17673
|
+
[1m[35mPhoto Load (0.1ms)[0m SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
|
17674
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17675
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17676
|
+
[1m[36mPhoto Load (0.1ms)[0m [1mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1[0m [["id", 1]]
|
17677
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
17678
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17679
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
17680
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17681
|
+
[1m[35mPhoto Load (0.1ms)[0m SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
|
17682
|
+
Started GET "/system/photos/images/000/000/001/dynamic_100x100/rails.png?s=d2dcb69d514d1030ce01404ebc422423eccf1b02" for 127.0.0.1 at 2013-11-04 15:12:19 -0500
|
17683
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_photo as PNG
|
17684
|
+
Parameters: {"s"=>"d2dcb69d514d1030ce01404ebc422423eccf1b02", "attachment"=>"images", "id_partition"=>"000/000/001", "definition"=>"100x100", "filename"=>"rails"}
|
17685
|
+
[1m[36mPhoto Load (0.1ms)[0m [1mSELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1[0m [["id", 1]]
|
17686
|
+
Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21351-1vyc03p.png[0]'
|
17687
|
+
Command :: identify -format %m '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21351-1vyc03p.png[0]'
|
17688
|
+
Command :: identify -format %m '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21351-1vyc03p.png[0]'
|
17689
|
+
Command :: identify -format %m '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21351-1vyc03p.png[0]'
|
17690
|
+
Command :: convert '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21351-1vyc03p.png[0]' -auto-orient -resize "100x100" '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21351-1vyc03p20131104-21351-1jbznws'
|
17691
|
+
Command :: file -b --mime '/var/folders/sd/669fr45168q7jsmsp132kqfr0000gn/T/rails20131104-21351-1vyc03p20131104-21351-1jbznws'
|
17692
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
17693
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "photos" SET "image_file_size" = 6646, "image_updated_at" = '2013-11-04 20:12:19.111059', "image_file_name" = 'rails.png', "updated_at" = '2013-11-04 20:12:19.216641' WHERE "photos"."id" = 1[0m
|
17694
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
17695
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/dummy/public/system/photos/images/000/000/001/dynamic_100x100/rails.png (0.1ms)
|
17696
|
+
Completed 200 OK in 115.6ms (ActiveRecord: 0.5ms)
|
17697
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
17698
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17699
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17700
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17701
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17702
|
+
Completed 200 OK in 1.1ms (ActiveRecord: 0.0ms)
|
17703
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17704
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17705
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17706
|
+
Parameters: {"attachment"=>"image_with_id_partition_in_urls", "id_partition"=>"000/010/042", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17707
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17708
|
+
Completed 200 OK in 0.6ms (ActiveRecord: 0.0ms)
|
17709
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17710
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17711
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17712
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17713
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17714
|
+
Completed 200 OK in 0.6ms (ActiveRecord: 0.0ms)
|
17715
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17716
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17717
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17718
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17719
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17720
|
+
Completed 200 OK in 0.7ms (ActiveRecord: 0.0ms)
|
17721
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17722
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17723
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17724
|
+
Parameters: {"attachment"=>"bars", "id"=>"1", "style"=>"style", "filename"=>"file"}
|
17725
|
+
Completed 500 Internal Server Error in 0.4ms
|
17726
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17727
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17728
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17729
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"this is an invalid hash"}
|
17730
|
+
Completed 500 Internal Server Error in 0.5ms
|
17731
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17732
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17733
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17734
|
+
Parameters: {"attachment"=>"images", "style"=>"style", "filename"=>"file"}
|
17735
|
+
Completed 500 Internal Server Error in 0.4ms
|
17736
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17737
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17738
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17739
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17740
|
+
Sent file /Users/jimbo/OSS/dynamic_paperclip/test/fixtures/rails.png (0.1ms)
|
17741
|
+
Completed 200 OK in 0.6ms (ActiveRecord: 0.0ms)
|
17742
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17743
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17744
|
+
Processing by DynamicPaperclip::AttachmentStylesController#generate_foo as HTML
|
17745
|
+
Parameters: {"attachment"=>"images", "id"=>"1", "definition"=>"42x42", "filename"=>"file", "s"=>"a9009b02490c94166d05d0df83e572e8e0bacc92"}
|
17746
|
+
Completed 200 OK in 0.4ms (ActiveRecord: 0.0ms)
|
17747
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17748
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17749
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17750
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17751
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
@@ -10,7 +10,7 @@ class AttachmentTest < ActiveSupport::TestCase
|
|
10
10
|
should 'generate correct secure attachment URL when given a style definition' do
|
11
11
|
DynamicPaperclip::Config.any_instance.stubs(:secret).returns('abc123')
|
12
12
|
|
13
|
-
assert_equal "/system/photos/images/000/000/001/dynamic_50x50%
|
13
|
+
assert_equal "/system/photos/images/000/000/001/dynamic_50x50%23/rails.png?s=#{Digest::SHA1.hexdigest("abc123dynamic_50x50%23")}", photos(:rails).image.dynamic_url('50x50#')
|
14
14
|
end
|
15
15
|
|
16
16
|
should 'raise error if no secret has been configured' do
|