attachs 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54ae49b0a6e0cb9b5e170ac1b1559dd6e614055b
4
- data.tar.gz: 273fcb21962f1b648de5d86064775d9b9b0dfddb
3
+ metadata.gz: 94b980a966f14a77e1b2defca114a83d950c8566
4
+ data.tar.gz: 30b92c04c7f9fc4780fad0b084cb6de224c1bee6
5
5
  SHA512:
6
- metadata.gz: 2512efff14fad943789edf5867e952c558fed32fb25d31f4fde483015784d1cd2d5603075a2e33109b1b0fd8b3fce7ad8a74f0a2291265d60306f1cdadc8f6cd
7
- data.tar.gz: c089f8e848fd436b8491144bf3a0ef57c00be075145cd8f495e6834faaf9333a1774efb37d621da9639da77dac5265a7572e0a7c417a340a69e5aeb542e9ab6b
6
+ metadata.gz: f1dad78b55fae9ad9f47da0af5c2dd0c0ac4741219547969069069cbae7c219b492b87d9f83d1575d7f96032d7f3d2d11ac7a4ac2f1ff220a21e22263cb43aa3
7
+ data.tar.gz: d084e48e21159cb04de2c0b6031e096be747c737a17ef84394665e83df4b0ecaa4084e3a776d47d5456bd3f2e704a107009aca5bb46d83b707c05a75a763ebf4
@@ -75,7 +75,7 @@ module Attachs
75
75
  attr_reader :attachments
76
76
 
77
77
  def inherited(subclass)
78
- subclass.instance_variable_set(:@attachments, @attachments)
78
+ subclass.instance_variable_set :@attachments, @attachments
79
79
  super
80
80
  end
81
81
 
@@ -126,14 +126,14 @@ module Attachs
126
126
  attachments[attr] = nil
127
127
  attributes[attr.to_s] = nil
128
128
  end
129
- instance_variable_set("@delete_#{attr}".to_sym, value)
129
+ instance_variable_set :"@delete_#{attr}", value
130
130
  end
131
131
  end
132
132
 
133
133
  def define_attachable_attribute_method_get(attr, options)
134
134
  define_method attr do
135
135
  return attachments[attr] if attachments.has_key? attr
136
- return nil if super().nil? and not options.has_key? :default
136
+ return nil unless super() or options.has_key? :default
137
137
  attachments[attr] = build_attachment_instance(super(), options)
138
138
  end
139
139
  attr_reader :"delete_#{attr}"
@@ -13,6 +13,10 @@ module Attachs
13
13
  def size(path)
14
14
  ::File.size realpath(path)
15
15
  end
16
+
17
+ def realpath(path)
18
+ base_path.join path
19
+ end
16
20
 
17
21
  def url(path)
18
22
  ::File.join Rails.application.config.attachs.base_url, path
@@ -43,10 +47,6 @@ module Attachs
43
47
  @tmp == true
44
48
  end
45
49
 
46
- def realpath(path)
47
- base_path.join path
48
- end
49
-
50
50
  def base_path
51
51
  Rails.root.join tmp? ? 'tmp' : 'public'
52
52
  end
@@ -57,14 +57,24 @@ module Attachs
57
57
  @filename ||= "#{(Time.now.to_f * 10000000).to_i}#{::File.extname upload.original_filename}".downcase
58
58
  end
59
59
 
60
+ def original_filename
61
+ return nil unless upload.present?
62
+ upload.original_filename
63
+ end
64
+
60
65
  def path(*args)
61
66
  return nil if deleted?
62
- stored? ? destination_path(*args) : upload.path
67
+ (stored? ? destination_path(*args) : upload.path).to_s
68
+ end
69
+
70
+ def realpath(*args)
71
+ return nil if deleted? or Rails.application.config.attachs.storage == :s3
72
+ (stored? ? storage.realpath(path) : upload.path).to_s
63
73
  end
64
74
 
65
75
  def url(*args)
66
76
  return nil if deleted? or not stored?
67
- storage.url path(*args)
77
+ storage.url(path(*args)).to_s
68
78
  end
69
79
 
70
80
  def store
@@ -32,7 +32,7 @@ module Attachs
32
32
  protected
33
33
 
34
34
  def store_path(*args)
35
- ::File.join('images', (args[0] ? args[0].to_s.gsub('_', '-') : 'original'))
35
+ ::File.join 'images', (args[0] ? args[0].to_s.gsub('_', '-') : 'original')
36
36
  end
37
37
 
38
38
  end
@@ -1,5 +1,5 @@
1
1
  module Attachs
2
2
 
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
 
5
5
  end
@@ -19,7 +19,7 @@ module Attachs
19
19
  end
20
20
  end
21
21
 
22
- namespace :uploads do
22
+ namespace :attachs do
23
23
 
24
24
  namespace :presets do
25
25
  desc 'Refresh preset'
@@ -68,4 +68,3 @@ namespace :uploads do
68
68
  end
69
69
 
70
70
  end
71
-
Binary file
@@ -8541,5 +8541,774 @@ LocalValidatorsTest: test_should_check_the_file_content_type
8541
8541
   (0.0ms) begin transaction
8542
8542
  ----------------------------------------------------
8543
8543
  LocalValidatorsTest: test_should_check_the_file_size
8544
+ ----------------------------------------------------
8545
+  (0.1ms) rollback transaction
8546
+  (24.4ms) DROP TABLE "all_attacheds"
8547
+  (2.4ms) CREATE TABLE "all_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "file_presence" varchar(255), "file_content_type" varchar(255), "file_size" varchar(255), "file_all" varchar(255), "file_default" varchar(255), "image_presence" varchar(255), "image_content_type" varchar(255), "image_size" varchar(255), "image_all" varchar(255), "image_default" varchar(255), "created_at" datetime, "updated_at" datetime)
8548
+  (3.5ms) DROP TABLE "file_attacheds"
8549
+  (2.7ms) CREATE TABLE "file_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime, "updated_at" datetime)
8550
+  (2.8ms) DROP TABLE "image_attacheds"
8551
+  (2.5ms) CREATE TABLE "image_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime, "updated_at" datetime)
8552
+  (0.5ms) SELECT version FROM "schema_migrations"
8553
+  (0.1ms) begin transaction
8554
+ -------------------------------------------------------------------------
8555
+ LocalFileRecordTest: test_should_maintain_properties_and_delete_correctly
8556
+ -------------------------------------------------------------------------
8557
+  (0.1ms) SAVEPOINT active_record_1
8558
+ SQL (7.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 01 Oct 2013 13:46:17 UTC +00:00], ["file", "13806351776560518.txt"], ["updated_at", Tue, 01 Oct 2013 13:46:17 UTC +00:00]]
8559
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8560
+  (0.0ms) SAVEPOINT active_record_1
8561
+ SQL (0.3ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8562
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8563
+  (0.8ms) rollback transaction
8564
+  (0.1ms) begin transaction
8565
+ -------------------------------------------------------------------------
8566
+ LocalFileStringTest: test_should_maintain_properties_and_delete_correctly
8567
+ -------------------------------------------------------------------------
8568
+  (0.1ms) rollback transaction
8569
+  (0.0ms) begin transaction
8570
+ -------------------------------------------------------------------
8571
+ LocalFileUploadTest: test_file_should_exists_and_mantain_properties
8572
+ -------------------------------------------------------------------
8573
+  (0.2ms) rollback transaction
8574
+  (0.0ms) begin transaction
8575
+ ---------------------------------------------------------------------------
8576
+ LocalFileUploadTest: test_should_store/delete_file_correctly_and_accept_cdn
8577
+ ---------------------------------------------------------------------------
8578
+  (0.1ms) rollback transaction
8579
+  (0.1ms) begin transaction
8580
+ ----------------------------------------------
8581
+ LocalGenerateTest: test_should_generate_preset
8582
+ ----------------------------------------------
8583
+ Started GET "/uploads/images/small/13806351777260390.jpg" for 127.0.0.1 at 2013-10-01 10:46:17 -0300
8584
+ Processing by Attachs::PresetsController#generate as JPEG
8585
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13806351777260390"}
8586
+ Redirected to http://www.example.com/uploads/images/small/13806351777260390.jpg
8587
+ Completed 302 Found in 54ms (ActiveRecord: 0.0ms)
8588
+  (0.1ms) rollback transaction
8589
+  (0.1ms) begin transaction
8590
+ ---------------------------------------------------------------------
8591
+ LocalImagePresetsTest: test_should_save/destory_main_image_and_thumbs
8592
+ ---------------------------------------------------------------------
8593
+  (0.1ms) SAVEPOINT active_record_1
8594
+ SQL (0.7ms) INSERT INTO "image_attacheds" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 01 Oct 2013 13:46:18 UTC +00:00], ["image", "13806351780701480.jpg"], ["updated_at", Tue, 01 Oct 2013 13:46:18 UTC +00:00]]
8595
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8596
+  (0.0ms) SAVEPOINT active_record_1
8597
+ SQL (0.3ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
8598
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8599
+  (0.9ms) rollback transaction
8600
+  (0.1ms) begin transaction
8601
+ ---------------------------------------------------------------
8602
+ LocalImageStringTest: test_should_destory_main_image_and_thumbs
8603
+ ---------------------------------------------------------------
8604
+  (0.1ms) rollback transaction
8605
+  (0.0ms) begin transaction
8606
+ --------------------------------------------------------------------
8607
+ LocalImageUploadTest: test_should_save/destory_main_image_and_thumbs
8608
+ --------------------------------------------------------------------
8609
+  (0.2ms) rollback transaction
8610
+  (0.1ms) begin transaction
8611
+ ---------------------------------------------------------------------------------------------
8612
+ LocalRecordsTest: test_should_save/update/destroy_from_the_database_and_save/destroy_the_file
8613
+ ---------------------------------------------------------------------------------------------
8614
+  (0.1ms) SAVEPOINT active_record_1
8615
+ SQL (0.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 01 Oct 2013 13:46:18 UTC +00:00], ["file", "13806351785246860.jpg"], ["updated_at", Tue, 01 Oct 2013 13:46:18 UTC +00:00]]
8616
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8617
+  (0.0ms) SAVEPOINT active_record_1
8618
+ SQL (0.4ms) UPDATE "file_attacheds" SET "file" = ?, "updated_at" = ? WHERE "file_attacheds"."id" = 1 [["file", "13806351785287270.txt"], ["updated_at", Tue, 01 Oct 2013 13:46:18 UTC +00:00]]
8619
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8620
+  (0.0ms) SAVEPOINT active_record_1
8621
+ SQL (0.1ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8622
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8623
+  (0.9ms) rollback transaction
8624
+  (0.1ms) begin transaction
8625
+ -----------------------------------------------------------------------------------
8626
+ LocalRecordsTest: test_should_take_default_file/image_and_shouldn't_store/delete_it
8627
+ -----------------------------------------------------------------------------------
8628
+  (0.0ms) SAVEPOINT active_record_1
8629
+ SQL (0.4ms) INSERT INTO "file_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Tue, 01 Oct 2013 13:46:18 UTC +00:00], ["updated_at", Tue, 01 Oct 2013 13:46:18 UTC +00:00]]
8630
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8631
+  (0.9ms) rollback transaction
8632
+  (0.1ms) begin transaction
8633
+ -------------------------------------------------------------------
8634
+ LocalValidatorsTest: test_should_check_all_the_validations_together
8635
+ -------------------------------------------------------------------
8636
+  (0.1ms) rollback transaction
8637
+  (0.1ms) begin transaction
8638
+ ---------------------------------------------------------
8639
+ LocalValidatorsTest: test_should_check_if_file_is_present
8640
+ ---------------------------------------------------------
8641
+  (0.1ms) rollback transaction
8642
+  (0.1ms) begin transaction
8643
+ ------------------------------------------------------------
8644
+ LocalValidatorsTest: test_should_check_the_file_content_type
8645
+ ------------------------------------------------------------
8646
+  (0.1ms) rollback transaction
8647
+  (0.1ms) begin transaction
8648
+ ----------------------------------------------------
8649
+ LocalValidatorsTest: test_should_check_the_file_size
8650
+ ----------------------------------------------------
8651
+  (0.1ms) rollback transaction
8652
+  (3.9ms) DROP TABLE "all_attacheds"
8653
+  (2.6ms) CREATE TABLE "all_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "file_presence" varchar(255), "file_content_type" varchar(255), "file_size" varchar(255), "file_all" varchar(255), "file_default" varchar(255), "image_presence" varchar(255), "image_content_type" varchar(255), "image_size" varchar(255), "image_all" varchar(255), "image_default" varchar(255), "created_at" datetime, "updated_at" datetime)
8654
+  (4.3ms) DROP TABLE "file_attacheds"
8655
+  (3.0ms) CREATE TABLE "file_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime, "updated_at" datetime)
8656
+  (3.3ms) DROP TABLE "image_attacheds"
8657
+  (3.0ms) CREATE TABLE "image_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime, "updated_at" datetime)
8658
+  (0.1ms) SELECT version FROM "schema_migrations"
8659
+  (0.1ms) begin transaction
8660
+ -------------------------------------------------------------------------
8661
+ LocalFileRecordTest: test_should_maintain_properties_and_delete_correctly
8662
+ -------------------------------------------------------------------------
8663
+  (0.0ms) SAVEPOINT active_record_1
8664
+ SQL (40.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:34:28 UTC +00:00], ["file", "13817000685041558.txt"], ["updated_at", Sun, 13 Oct 2013 21:34:28 UTC +00:00]]
8665
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8666
+  (0.0ms) SAVEPOINT active_record_1
8667
+ SQL (0.2ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8668
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8669
+  (1.0ms) rollback transaction
8670
+  (0.1ms) begin transaction
8671
+ -------------------------------------------------------------------------
8672
+ LocalFileStringTest: test_should_maintain_properties_and_delete_correctly
8673
+ -------------------------------------------------------------------------
8674
+  (0.1ms) rollback transaction
8675
+  (0.0ms) begin transaction
8676
+ -------------------------------------------------------------------
8677
+ LocalFileUploadTest: test_file_should_exists_and_mantain_properties
8678
+ -------------------------------------------------------------------
8679
+  (0.1ms) rollback transaction
8680
+  (0.0ms) begin transaction
8681
+ ---------------------------------------------------------------------------
8682
+ LocalFileUploadTest: test_should_store/delete_file_correctly_and_accept_cdn
8683
+ ---------------------------------------------------------------------------
8684
+  (0.1ms) rollback transaction
8685
+  (0.0ms) begin transaction
8686
+ ----------------------------------------------
8687
+ LocalGenerateTest: test_should_generate_preset
8688
+ ----------------------------------------------
8689
+ Started GET "/uploads/images/small/13817000686047580.jpg" for 127.0.0.1 at 2013-10-13 19:34:29 -0200
8690
+ Processing by Attachs::PresetsController#generate as JPEG
8691
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13817000686047580"}
8692
+ Redirected to http://www.example.com/uploads/images/small/13817000686047580.jpg
8693
+ Completed 302 Found in 60ms (ActiveRecord: 0.0ms)
8694
+  (0.1ms) rollback transaction
8695
+  (0.0ms) begin transaction
8696
+ ---------------------------------------------------------------------
8697
+ LocalImagePresetsTest: test_should_save/destory_main_image_and_thumbs
8698
+ ---------------------------------------------------------------------
8699
+  (0.0ms) SAVEPOINT active_record_1
8700
+ SQL (0.7ms) INSERT INTO "image_attacheds" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:34:29 UTC +00:00], ["image", "13817000695453848.jpg"], ["updated_at", Sun, 13 Oct 2013 21:34:29 UTC +00:00]]
8701
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8702
+  (0.0ms) SAVEPOINT active_record_1
8703
+ SQL (0.3ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
8704
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8705
+  (1.0ms) rollback transaction
8706
+  (0.1ms) begin transaction
8707
+ ---------------------------------------------------------------
8708
+ LocalImageStringTest: test_should_destory_main_image_and_thumbs
8709
+ ---------------------------------------------------------------
8710
+  (0.1ms) rollback transaction
8711
+  (0.0ms) begin transaction
8712
+ --------------------------------------------------------------------
8713
+ LocalImageUploadTest: test_should_save/destory_main_image_and_thumbs
8714
+ --------------------------------------------------------------------
8715
+  (0.2ms) rollback transaction
8716
+  (0.1ms) begin transaction
8717
+ ---------------------------------------------------------------------------------------------
8718
+ LocalRecordsTest: test_should_save/update/destroy_from_the_database_and_save/destroy_the_file
8719
+ ---------------------------------------------------------------------------------------------
8720
+  (0.1ms) SAVEPOINT active_record_1
8721
+ SQL (0.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:34:29 UTC +00:00], ["file", "13817000699933400.jpg"], ["updated_at", Sun, 13 Oct 2013 21:34:29 UTC +00:00]]
8722
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8723
+  (0.0ms) SAVEPOINT active_record_1
8724
+ SQL (0.4ms) UPDATE "file_attacheds" SET "file" = ?, "updated_at" = ? WHERE "file_attacheds"."id" = 1 [["file", "13817000699973860.txt"], ["updated_at", Sun, 13 Oct 2013 21:34:29 UTC +00:00]]
8725
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8726
+  (0.0ms) SAVEPOINT active_record_1
8727
+ SQL (0.1ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8728
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8729
+  (0.7ms) rollback transaction
8730
+  (0.1ms) begin transaction
8731
+ -----------------------------------------------------------------------------------
8732
+ LocalRecordsTest: test_should_take_default_file/image_and_shouldn't_store/delete_it
8733
+ -----------------------------------------------------------------------------------
8734
+  (0.0ms) SAVEPOINT active_record_1
8735
+ SQL (0.4ms) INSERT INTO "file_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:34:30 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:34:30 UTC +00:00]]
8736
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8737
+  (0.8ms) rollback transaction
8738
+  (0.0ms) begin transaction
8739
+ -------------------------------------------------------------------
8740
+ LocalValidatorsTest: test_should_check_all_the_validations_together
8741
+ -------------------------------------------------------------------
8742
+  (0.1ms) rollback transaction
8743
+  (0.0ms) begin transaction
8744
+ ---------------------------------------------------------
8745
+ LocalValidatorsTest: test_should_check_if_file_is_present
8746
+ ---------------------------------------------------------
8747
+  (0.1ms) rollback transaction
8748
+  (0.0ms) begin transaction
8749
+ ------------------------------------------------------------
8750
+ LocalValidatorsTest: test_should_check_the_file_content_type
8751
+ ------------------------------------------------------------
8752
+  (0.1ms) rollback transaction
8753
+  (0.0ms) begin transaction
8754
+ ----------------------------------------------------
8755
+ LocalValidatorsTest: test_should_check_the_file_size
8756
+ ----------------------------------------------------
8757
+  (0.1ms) rollback transaction
8758
+  (3.0ms) DROP TABLE "all_attacheds"
8759
+  (2.2ms) CREATE TABLE "all_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "file_presence" varchar(255), "file_content_type" varchar(255), "file_size" varchar(255), "file_all" varchar(255), "file_default" varchar(255), "image_presence" varchar(255), "image_content_type" varchar(255), "image_size" varchar(255), "image_all" varchar(255), "image_default" varchar(255), "created_at" datetime, "updated_at" datetime)
8760
+  (2.7ms) DROP TABLE "file_attacheds"
8761
+  (2.9ms) CREATE TABLE "file_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime, "updated_at" datetime)
8762
+  (2.8ms) DROP TABLE "image_attacheds"
8763
+  (2.7ms) CREATE TABLE "image_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime, "updated_at" datetime)
8764
+  (0.2ms) SELECT version FROM "schema_migrations"
8765
+  (0.1ms) begin transaction
8766
+ -------------------------------------------------------------------------
8767
+ LocalFileRecordTest: test_should_maintain_properties_and_delete_correctly
8768
+ -------------------------------------------------------------------------
8769
+  (0.1ms) SAVEPOINT active_record_1
8770
+ SQL (2.3ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:37:19 UTC +00:00], ["file", "13817002394493870.txt"], ["updated_at", Sun, 13 Oct 2013 21:37:19 UTC +00:00]]
8771
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8772
+  (0.0ms) SAVEPOINT active_record_1
8773
+ SQL (0.3ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8774
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8775
+  (0.8ms) rollback transaction
8776
+  (0.1ms) begin transaction
8777
+ -------------------------------------------------------------------------
8778
+ LocalFileStringTest: test_should_maintain_properties_and_delete_correctly
8779
+ -------------------------------------------------------------------------
8780
+  (0.1ms) rollback transaction
8781
+  (0.0ms) begin transaction
8782
+ -------------------------------------------------------------------
8783
+ LocalFileUploadTest: test_file_should_exists_and_mantain_properties
8784
+ -------------------------------------------------------------------
8785
+  (0.1ms) rollback transaction
8786
+  (0.0ms) begin transaction
8787
+ ---------------------------------------------------------------------------
8788
+ LocalFileUploadTest: test_should_store/delete_file_correctly_and_accept_cdn
8789
+ ---------------------------------------------------------------------------
8790
+  (0.1ms) rollback transaction
8791
+  (0.0ms) begin transaction
8792
+ ----------------------------------------------
8793
+ LocalGenerateTest: test_should_generate_preset
8794
+ ----------------------------------------------
8795
+ Started GET "/uploads/images/small/13817002394776750.jpg" for 127.0.0.1 at 2013-10-13 19:37:19 -0200
8796
+ Processing by Attachs::PresetsController#generate as JPEG
8797
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13817002394776750"}
8798
+ Redirected to http://www.example.com/uploads/images/small/13817002394776750.jpg
8799
+ Completed 302 Found in 59ms (ActiveRecord: 0.0ms)
8800
+  (0.2ms) rollback transaction
8801
+  (0.1ms) begin transaction
8802
+ ---------------------------------------------------------------------
8803
+ LocalImagePresetsTest: test_should_save/destory_main_image_and_thumbs
8804
+ ---------------------------------------------------------------------
8805
+  (0.1ms) SAVEPOINT active_record_1
8806
+ SQL (0.7ms) INSERT INTO "image_attacheds" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:37:19 UTC +00:00], ["image", "13817002396840960.jpg"], ["updated_at", Sun, 13 Oct 2013 21:37:19 UTC +00:00]]
8807
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8808
+  (0.0ms) SAVEPOINT active_record_1
8809
+ SQL (0.4ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
8810
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8811
+  (1.4ms) rollback transaction
8812
+  (0.1ms) begin transaction
8813
+ ---------------------------------------------------------------
8814
+ LocalImageStringTest: test_should_destory_main_image_and_thumbs
8815
+ ---------------------------------------------------------------
8816
+  (0.1ms) rollback transaction
8817
+  (0.0ms) begin transaction
8818
+ --------------------------------------------------------------------
8819
+ LocalImageUploadTest: test_should_save/destory_main_image_and_thumbs
8820
+ --------------------------------------------------------------------
8821
+  (0.2ms) rollback transaction
8822
+  (0.1ms) begin transaction
8823
+ ---------------------------------------------------------------------------------------------
8824
+ LocalRecordsTest: test_should_save/update/destroy_from_the_database_and_save/destroy_the_file
8825
+ ---------------------------------------------------------------------------------------------
8826
+  (0.1ms) SAVEPOINT active_record_1
8827
+ SQL (0.6ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:37:20 UTC +00:00], ["file", "13817002401523080.jpg"], ["updated_at", Sun, 13 Oct 2013 21:37:20 UTC +00:00]]
8828
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8829
+  (0.0ms) SAVEPOINT active_record_1
8830
+ SQL (0.5ms) UPDATE "file_attacheds" SET "file" = ?, "updated_at" = ? WHERE "file_attacheds"."id" = 1 [["file", "13817002401568260.txt"], ["updated_at", Sun, 13 Oct 2013 21:37:20 UTC +00:00]]
8831
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8832
+  (0.0ms) SAVEPOINT active_record_1
8833
+ SQL (0.1ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8834
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8835
+  (1.5ms) rollback transaction
8836
+  (0.1ms) begin transaction
8837
+ -----------------------------------------------------------------------------------
8838
+ LocalRecordsTest: test_should_take_default_file/image_and_shouldn't_store/delete_it
8839
+ -----------------------------------------------------------------------------------
8840
+  (0.1ms) SAVEPOINT active_record_1
8841
+ SQL (0.5ms) INSERT INTO "file_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:37:20 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:37:20 UTC +00:00]]
8842
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8843
+  (0.8ms) rollback transaction
8844
+  (0.1ms) begin transaction
8845
+ -------------------------------------------------------------------
8846
+ LocalValidatorsTest: test_should_check_all_the_validations_together
8847
+ -------------------------------------------------------------------
8848
+  (0.1ms) rollback transaction
8849
+  (0.0ms) begin transaction
8850
+ ---------------------------------------------------------
8851
+ LocalValidatorsTest: test_should_check_if_file_is_present
8852
+ ---------------------------------------------------------
8853
+  (0.0ms) rollback transaction
8854
+  (0.0ms) begin transaction
8855
+ ------------------------------------------------------------
8856
+ LocalValidatorsTest: test_should_check_the_file_content_type
8857
+ ------------------------------------------------------------
8858
+  (0.1ms) rollback transaction
8859
+  (0.1ms) begin transaction
8860
+ ----------------------------------------------------
8861
+ LocalValidatorsTest: test_should_check_the_file_size
8862
+ ----------------------------------------------------
8863
+  (0.1ms) rollback transaction
8864
+  (52.9ms) DROP TABLE "all_attacheds"
8865
+  (2.1ms) CREATE TABLE "all_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "file_presence" varchar(255), "file_content_type" varchar(255), "file_size" varchar(255), "file_all" varchar(255), "file_default" varchar(255), "image_presence" varchar(255), "image_content_type" varchar(255), "image_size" varchar(255), "image_all" varchar(255), "image_default" varchar(255), "created_at" datetime, "updated_at" datetime)
8866
+  (3.1ms) DROP TABLE "file_attacheds"
8867
+  (3.2ms) CREATE TABLE "file_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime, "updated_at" datetime)
8868
+  (3.8ms) DROP TABLE "image_attacheds"
8869
+  (4.2ms) CREATE TABLE "image_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime, "updated_at" datetime)
8870
+  (0.2ms) SELECT version FROM "schema_migrations"
8871
+  (0.1ms) begin transaction
8872
+ -------------------------------------------------------------------------
8873
+ LocalFileRecordTest: test_should_maintain_properties_and_delete_correctly
8874
+ -------------------------------------------------------------------------
8875
+  (0.1ms) SAVEPOINT active_record_1
8876
+ SQL (2.2ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00], ["file", "13817002500534890.txt"], ["updated_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00]]
8877
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8878
+  (0.0ms) SAVEPOINT active_record_1
8879
+ SQL (0.3ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8880
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8881
+  (1.0ms) rollback transaction
8882
+  (0.1ms) begin transaction
8883
+ -------------------------------------------------------------------------
8884
+ LocalFileStringTest: test_should_maintain_properties_and_delete_correctly
8885
+ -------------------------------------------------------------------------
8886
+  (0.1ms) rollback transaction
8887
+  (0.0ms) begin transaction
8888
+ -------------------------------------------------------------------
8889
+ LocalFileUploadTest: test_file_should_exists_and_mantain_properties
8890
+ -------------------------------------------------------------------
8891
+  (0.1ms) rollback transaction
8892
+  (0.0ms) begin transaction
8893
+ ---------------------------------------------------------------------------
8894
+ LocalFileUploadTest: test_should_store/delete_file_correctly_and_accept_cdn
8895
+ ---------------------------------------------------------------------------
8896
+  (0.1ms) rollback transaction
8897
+  (0.0ms) begin transaction
8898
+ ----------------------------------------------
8899
+ LocalGenerateTest: test_should_generate_preset
8900
+ ----------------------------------------------
8901
+ Started GET "/uploads/images/small/13817002500806510.jpg" for 127.0.0.1 at 2013-10-13 19:37:30 -0200
8902
+ Processing by Attachs::PresetsController#generate as JPEG
8903
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13817002500806510"}
8904
+ Redirected to http://www.example.com/uploads/images/small/13817002500806510.jpg
8905
+ Completed 302 Found in 53ms (ActiveRecord: 0.0ms)
8906
+  (0.2ms) rollback transaction
8907
+  (0.1ms) begin transaction
8908
+ ---------------------------------------------------------------------
8909
+ LocalImagePresetsTest: test_should_save/destory_main_image_and_thumbs
8910
+ ---------------------------------------------------------------------
8911
+  (0.1ms) SAVEPOINT active_record_1
8912
+ SQL (1.1ms) INSERT INTO "image_attacheds" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00], ["image", "13817002502760242.jpg"], ["updated_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00]]
8913
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8914
+  (0.1ms) SAVEPOINT active_record_1
8915
+ SQL (0.3ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
8916
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8917
+  (1.1ms) rollback transaction
8918
+  (0.1ms) begin transaction
8919
+ ---------------------------------------------------------------
8920
+ LocalImageStringTest: test_should_destory_main_image_and_thumbs
8921
+ ---------------------------------------------------------------
8922
+  (0.1ms) rollback transaction
8923
+  (0.0ms) begin transaction
8924
+ --------------------------------------------------------------------
8925
+ LocalImageUploadTest: test_should_save/destory_main_image_and_thumbs
8926
+ --------------------------------------------------------------------
8927
+  (0.2ms) rollback transaction
8928
+  (0.1ms) begin transaction
8929
+ ---------------------------------------------------------------------------------------------
8930
+ LocalRecordsTest: test_should_save/update/destroy_from_the_database_and_save/destroy_the_file
8931
+ ---------------------------------------------------------------------------------------------
8932
+  (0.1ms) SAVEPOINT active_record_1
8933
+ SQL (0.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00], ["file", "13817002507377212.jpg"], ["updated_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00]]
8934
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8935
+  (0.0ms) SAVEPOINT active_record_1
8936
+ SQL (0.3ms) UPDATE "file_attacheds" SET "file" = ?, "updated_at" = ? WHERE "file_attacheds"."id" = 1 [["file", "13817002507415722.txt"], ["updated_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00]]
8937
+  (0.2ms) RELEASE SAVEPOINT active_record_1
8938
+  (0.0ms) SAVEPOINT active_record_1
8939
+ SQL (0.1ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8940
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8941
+  (1.0ms) rollback transaction
8942
+  (0.2ms) begin transaction
8943
+ -----------------------------------------------------------------------------------
8944
+ LocalRecordsTest: test_should_take_default_file/image_and_shouldn't_store/delete_it
8945
+ -----------------------------------------------------------------------------------
8946
+  (0.1ms) SAVEPOINT active_record_1
8947
+ SQL (0.7ms) INSERT INTO "file_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:37:30 UTC +00:00]]
8948
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8949
+  (0.9ms) rollback transaction
8950
+  (0.1ms) begin transaction
8951
+ -------------------------------------------------------------------
8952
+ LocalValidatorsTest: test_should_check_all_the_validations_together
8953
+ -------------------------------------------------------------------
8954
+  (0.1ms) rollback transaction
8955
+  (0.1ms) begin transaction
8956
+ ---------------------------------------------------------
8957
+ LocalValidatorsTest: test_should_check_if_file_is_present
8958
+ ---------------------------------------------------------
8959
+  (0.1ms) rollback transaction
8960
+  (0.0ms) begin transaction
8961
+ ------------------------------------------------------------
8962
+ LocalValidatorsTest: test_should_check_the_file_content_type
8963
+ ------------------------------------------------------------
8964
+  (0.0ms) rollback transaction
8965
+  (0.0ms) begin transaction
8966
+ ----------------------------------------------------
8967
+ LocalValidatorsTest: test_should_check_the_file_size
8968
+ ----------------------------------------------------
8969
+  (0.1ms) rollback transaction
8970
+  (2.8ms) DROP TABLE "all_attacheds"
8971
+  (2.7ms) CREATE TABLE "all_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "file_presence" varchar(255), "file_content_type" varchar(255), "file_size" varchar(255), "file_all" varchar(255), "file_default" varchar(255), "image_presence" varchar(255), "image_content_type" varchar(255), "image_size" varchar(255), "image_all" varchar(255), "image_default" varchar(255), "created_at" datetime, "updated_at" datetime)
8972
+  (2.7ms) DROP TABLE "file_attacheds"
8973
+  (2.7ms) CREATE TABLE "file_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime, "updated_at" datetime)
8974
+  (3.7ms) DROP TABLE "image_attacheds"
8975
+  (3.0ms) CREATE TABLE "image_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime, "updated_at" datetime)
8976
+  (0.1ms) SELECT version FROM "schema_migrations"
8977
+  (0.1ms) begin transaction
8978
+ -------------------------------------------------------------------------
8979
+ LocalFileRecordTest: test_should_maintain_properties_and_delete_correctly
8980
+ -------------------------------------------------------------------------
8981
+  (0.0ms) SAVEPOINT active_record_1
8982
+ SQL (2.3ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:44:59 UTC +00:00], ["file", "13817006999691770.txt"], ["updated_at", Sun, 13 Oct 2013 21:44:59 UTC +00:00]]
8983
+  (0.1ms) RELEASE SAVEPOINT active_record_1
8984
+  (0.0ms) SAVEPOINT active_record_1
8985
+ SQL (0.2ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
8986
+  (0.0ms) RELEASE SAVEPOINT active_record_1
8987
+  (1.0ms) rollback transaction
8988
+  (0.1ms) begin transaction
8989
+ -------------------------------------------------------------------------
8990
+ LocalFileStringTest: test_should_maintain_properties_and_delete_correctly
8991
+ -------------------------------------------------------------------------
8992
+  (0.1ms) rollback transaction
8993
+  (0.0ms) begin transaction
8994
+ -------------------------------------------------------------------
8995
+ LocalFileUploadTest: test_file_should_exists_and_mantain_properties
8996
+ -------------------------------------------------------------------
8997
+  (0.1ms) rollback transaction
8998
+  (0.0ms) begin transaction
8999
+ ---------------------------------------------------------------------------
9000
+ LocalFileUploadTest: test_should_store/delete_file_correctly_and_accept_cdn
9001
+ ---------------------------------------------------------------------------
9002
+  (0.0ms) rollback transaction
9003
+  (0.0ms) begin transaction
9004
+ ----------------------------------------------
9005
+ LocalGenerateTest: test_should_generate_preset
9006
+ ----------------------------------------------
9007
+ Started GET "/uploads/images/small/13817006999966650.jpg" for 127.0.0.1 at 2013-10-13 19:45:00 -0200
9008
+ Processing by Attachs::PresetsController#generate as JPEG
9009
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13817006999966650"}
9010
+ Redirected to http://www.example.com/uploads/images/small/13817006999966650.jpg
9011
+ Completed 302 Found in 58ms (ActiveRecord: 0.0ms)
9012
+  (0.1ms) rollback transaction
9013
+  (0.1ms) begin transaction
9014
+ ---------------------------------------------------------------------
9015
+ LocalImagePresetsTest: test_should_save/destory_main_image_and_thumbs
9016
+ ---------------------------------------------------------------------
9017
+  (0.0ms) SAVEPOINT active_record_1
9018
+ SQL (0.6ms) INSERT INTO "image_attacheds" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00], ["image", "13817007002054852.jpg"], ["updated_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00]]
9019
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9020
+  (0.0ms) SAVEPOINT active_record_1
9021
+ SQL (0.3ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
9022
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9023
+  (0.9ms) rollback transaction
9024
+  (0.1ms) begin transaction
9025
+ ---------------------------------------------------------------
9026
+ LocalImageStringTest: test_should_destory_main_image_and_thumbs
9027
+ ---------------------------------------------------------------
9028
+  (0.1ms) rollback transaction
9029
+  (0.0ms) begin transaction
9030
+ --------------------------------------------------------------------
9031
+ LocalImageUploadTest: test_should_save/destory_main_image_and_thumbs
9032
+ --------------------------------------------------------------------
9033
+  (0.2ms) rollback transaction
9034
+  (0.1ms) begin transaction
9035
+ ---------------------------------------------------------------------------------------------
9036
+ LocalRecordsTest: test_should_save/update/destroy_from_the_database_and_save/destroy_the_file
9037
+ ---------------------------------------------------------------------------------------------
9038
+  (0.1ms) SAVEPOINT active_record_1
9039
+ SQL (0.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00], ["file", "13817007006514968.jpg"], ["updated_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00]]
9040
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9041
+  (0.0ms) SAVEPOINT active_record_1
9042
+ SQL (0.3ms) UPDATE "file_attacheds" SET "file" = ?, "updated_at" = ? WHERE "file_attacheds"."id" = 1 [["file", "13817007006561270.txt"], ["updated_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00]]
9043
+  (0.2ms) RELEASE SAVEPOINT active_record_1
9044
+  (0.0ms) SAVEPOINT active_record_1
9045
+ SQL (0.1ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
9046
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9047
+  (0.7ms) rollback transaction
9048
+  (0.1ms) begin transaction
9049
+ -----------------------------------------------------------------------------------
9050
+ LocalRecordsTest: test_should_take_default_file/image_and_shouldn't_store/delete_it
9051
+ -----------------------------------------------------------------------------------
9052
+  (0.1ms) SAVEPOINT active_record_1
9053
+ SQL (0.4ms) INSERT INTO "file_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00]]
9054
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9055
+  (0.1ms) SAVEPOINT active_record_1
9056
+ SQL (0.2ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
9057
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9058
+  (0.1ms) SAVEPOINT active_record_1
9059
+ SQL (0.3ms) INSERT INTO "image_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:45:00 UTC +00:00]]
9060
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9061
+  (0.1ms) SAVEPOINT active_record_1
9062
+ SQL (0.1ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
9063
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9064
+  (0.9ms) rollback transaction
9065
+  (0.1ms) begin transaction
9066
+ -------------------------------------------------------------------
9067
+ LocalValidatorsTest: test_should_check_all_the_validations_together
9068
+ -------------------------------------------------------------------
9069
+  (0.1ms) rollback transaction
9070
+  (0.0ms) begin transaction
9071
+ ---------------------------------------------------------
9072
+ LocalValidatorsTest: test_should_check_if_file_is_present
9073
+ ---------------------------------------------------------
9074
+  (0.1ms) rollback transaction
9075
+  (0.0ms) begin transaction
9076
+ ------------------------------------------------------------
9077
+ LocalValidatorsTest: test_should_check_the_file_content_type
9078
+ ------------------------------------------------------------
9079
+  (0.0ms) rollback transaction
9080
+  (0.0ms) begin transaction
9081
+ ----------------------------------------------------
9082
+ LocalValidatorsTest: test_should_check_the_file_size
9083
+ ----------------------------------------------------
9084
+  (0.1ms) rollback transaction
9085
+  (55.0ms) DROP TABLE "all_attacheds"
9086
+  (2.2ms) CREATE TABLE "all_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "file_presence" varchar(255), "file_content_type" varchar(255), "file_size" varchar(255), "file_all" varchar(255), "file_default" varchar(255), "image_presence" varchar(255), "image_content_type" varchar(255), "image_size" varchar(255), "image_all" varchar(255), "image_default" varchar(255), "created_at" datetime, "updated_at" datetime)
9087
+  (2.9ms) DROP TABLE "file_attacheds"
9088
+  (2.7ms) CREATE TABLE "file_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime, "updated_at" datetime)
9089
+  (2.7ms) DROP TABLE "image_attacheds"
9090
+  (3.0ms) CREATE TABLE "image_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime, "updated_at" datetime)
9091
+  (0.1ms) SELECT version FROM "schema_migrations"
9092
+  (0.1ms) begin transaction
9093
+ -------------------------------------------------------------------------
9094
+ LocalFileRecordTest: test_should_maintain_properties_and_delete_correctly
9095
+ -------------------------------------------------------------------------
9096
+  (0.1ms) SAVEPOINT active_record_1
9097
+ SQL (2.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:49:09 UTC +00:00], ["file", "13817009498498750.txt"], ["updated_at", Sun, 13 Oct 2013 21:49:09 UTC +00:00]]
9098
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9099
+  (0.0ms) SAVEPOINT active_record_1
9100
+ SQL (0.3ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
9101
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9102
+  (0.8ms) rollback transaction
9103
+  (0.1ms) begin transaction
9104
+ -------------------------------------------------------------------------
9105
+ LocalFileStringTest: test_should_maintain_properties_and_delete_correctly
9106
+ -------------------------------------------------------------------------
9107
+  (0.1ms) rollback transaction
9108
+  (0.0ms) begin transaction
9109
+ -------------------------------------------------------------------
9110
+ LocalFileUploadTest: test_file_should_exists_and_mantain_properties
9111
+ -------------------------------------------------------------------
9112
+  (0.1ms) rollback transaction
9113
+  (0.0ms) begin transaction
9114
+ ---------------------------------------------------------------------------
9115
+ LocalFileUploadTest: test_should_store/delete_file_correctly_and_accept_cdn
9116
+ ---------------------------------------------------------------------------
9117
+  (0.0ms) rollback transaction
9118
+  (0.0ms) begin transaction
9119
+ ----------------------------------------------
9120
+ LocalGenerateTest: test_should_generate_preset
9121
+ ----------------------------------------------
9122
+ Started GET "/uploads/images/small/13817009498768088.jpg" for 127.0.0.1 at 2013-10-13 19:49:09 -0200
9123
+ Processing by Attachs::PresetsController#generate as JPEG
9124
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13817009498768088"}
9125
+ Redirected to http://www.example.com/uploads/images/small/13817009498768088.jpg
9126
+ Completed 302 Found in 53ms (ActiveRecord: 0.0ms)
9127
+  (0.1ms) rollback transaction
9128
+  (0.1ms) begin transaction
9129
+ ---------------------------------------------------------------------
9130
+ LocalImagePresetsTest: test_should_save/destory_main_image_and_thumbs
9131
+ ---------------------------------------------------------------------
9132
+  (0.0ms) SAVEPOINT active_record_1
9133
+ SQL (0.6ms) INSERT INTO "image_attacheds" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00], ["image", "13817009500685608.jpg"], ["updated_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00]]
9134
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9135
+  (0.0ms) SAVEPOINT active_record_1
9136
+ SQL (0.2ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
9137
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9138
+  (0.7ms) rollback transaction
9139
+  (0.1ms) begin transaction
9140
+ ---------------------------------------------------------------
9141
+ LocalImageStringTest: test_should_destory_main_image_and_thumbs
9142
+ ---------------------------------------------------------------
9143
+  (0.1ms) rollback transaction
9144
+  (0.1ms) begin transaction
9145
+ --------------------------------------------------------------------
9146
+ LocalImageUploadTest: test_should_save/destory_main_image_and_thumbs
9147
+ --------------------------------------------------------------------
9148
+  (0.2ms) rollback transaction
9149
+  (0.1ms) begin transaction
9150
+ ---------------------------------------------------------------------------------------------
9151
+ LocalRecordsTest: test_should_save/update/destroy_from_the_database_and_save/destroy_the_file
9152
+ ---------------------------------------------------------------------------------------------
9153
+  (0.1ms) SAVEPOINT active_record_1
9154
+ SQL (0.6ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00], ["file", "13817009505169862.jpg"], ["updated_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00]]
9155
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9156
+  (0.0ms) SAVEPOINT active_record_1
9157
+ SQL (0.3ms) UPDATE "file_attacheds" SET "file" = ?, "updated_at" = ? WHERE "file_attacheds"."id" = 1 [["file", "13817009505208920.txt"], ["updated_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00]]
9158
+  (0.2ms) RELEASE SAVEPOINT active_record_1
9159
+  (0.0ms) SAVEPOINT active_record_1
9160
+ SQL (0.1ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
9161
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9162
+  (0.9ms) rollback transaction
9163
+  (0.1ms) begin transaction
9164
+ -----------------------------------------------------------------------------------
9165
+ LocalRecordsTest: test_should_take_default_file/image_and_shouldn't_store/delete_it
9166
+ -----------------------------------------------------------------------------------
9167
+  (0.0ms) SAVEPOINT active_record_1
9168
+ SQL (0.4ms) INSERT INTO "file_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00]]
9169
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9170
+  (0.0ms) SAVEPOINT active_record_1
9171
+ SQL (0.2ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
9172
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9173
+  (0.0ms) SAVEPOINT active_record_1
9174
+ SQL (0.2ms) INSERT INTO "image_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:49:10 UTC +00:00]]
9175
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9176
+  (0.0ms) SAVEPOINT active_record_1
9177
+ SQL (0.1ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
9178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9179
+  (0.9ms) rollback transaction
9180
+  (0.1ms) begin transaction
9181
+ -------------------------------------------------------------------
9182
+ LocalValidatorsTest: test_should_check_all_the_validations_together
9183
+ -------------------------------------------------------------------
9184
+  (0.1ms) rollback transaction
9185
+  (0.1ms) begin transaction
9186
+ ---------------------------------------------------------
9187
+ LocalValidatorsTest: test_should_check_if_file_is_present
9188
+ ---------------------------------------------------------
9189
+  (0.1ms) rollback transaction
9190
+  (0.0ms) begin transaction
9191
+ ------------------------------------------------------------
9192
+ LocalValidatorsTest: test_should_check_the_file_content_type
9193
+ ------------------------------------------------------------
9194
+  (0.0ms) rollback transaction
9195
+  (0.0ms) begin transaction
9196
+ ----------------------------------------------------
9197
+ LocalValidatorsTest: test_should_check_the_file_size
9198
+ ----------------------------------------------------
9199
+  (0.1ms) rollback transaction
9200
+  (49.0ms) DROP TABLE "all_attacheds"
9201
+  (2.9ms) CREATE TABLE "all_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "file_presence" varchar(255), "file_content_type" varchar(255), "file_size" varchar(255), "file_all" varchar(255), "file_default" varchar(255), "image_presence" varchar(255), "image_content_type" varchar(255), "image_size" varchar(255), "image_all" varchar(255), "image_default" varchar(255), "created_at" datetime, "updated_at" datetime)
9202
+  (2.7ms) DROP TABLE "file_attacheds"
9203
+  (3.2ms) CREATE TABLE "file_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime, "updated_at" datetime)
9204
+  (2.5ms) DROP TABLE "image_attacheds"
9205
+  (4.1ms) CREATE TABLE "image_attacheds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime, "updated_at" datetime)
9206
+  (0.1ms) SELECT version FROM "schema_migrations"
9207
+  (0.1ms) begin transaction
9208
+ -------------------------------------------------------------------------
9209
+ LocalFileRecordTest: test_should_maintain_properties_and_delete_correctly
9210
+ -------------------------------------------------------------------------
9211
+  (0.0ms) SAVEPOINT active_record_1
9212
+ SQL (2.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00], ["file", "13817011291105258.txt"], ["updated_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00]]
9213
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9214
+  (0.0ms) SAVEPOINT active_record_1
9215
+ SQL (0.3ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
9216
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9217
+  (0.8ms) rollback transaction
9218
+  (0.1ms) begin transaction
9219
+ -------------------------------------------------------------------------
9220
+ LocalFileStringTest: test_should_maintain_properties_and_delete_correctly
9221
+ -------------------------------------------------------------------------
9222
+  (0.1ms) rollback transaction
9223
+  (0.0ms) begin transaction
9224
+ -------------------------------------------------------------------
9225
+ LocalFileUploadTest: test_file_should_exists_and_mantain_properties
9226
+ -------------------------------------------------------------------
9227
+  (0.1ms) rollback transaction
9228
+  (0.0ms) begin transaction
9229
+ ---------------------------------------------------------------------------
9230
+ LocalFileUploadTest: test_should_store/delete_file_correctly_and_accept_cdn
9231
+ ---------------------------------------------------------------------------
9232
+  (0.0ms) rollback transaction
9233
+  (0.0ms) begin transaction
9234
+ ----------------------------------------------
9235
+ LocalGenerateTest: test_should_generate_preset
9236
+ ----------------------------------------------
9237
+ Started GET "/uploads/images/small/13817011291379762.jpg" for 127.0.0.1 at 2013-10-13 19:52:09 -0200
9238
+ Processing by Attachs::PresetsController#generate as JPEG
9239
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13817011291379762"}
9240
+ Redirected to http://www.example.com/uploads/images/small/13817011291379762.jpg
9241
+ Completed 302 Found in 53ms (ActiveRecord: 0.0ms)
9242
+  (0.1ms) rollback transaction
9243
+  (0.1ms) begin transaction
9244
+ ---------------------------------------------------------------------
9245
+ LocalImagePresetsTest: test_should_save/destory_main_image_and_thumbs
9246
+ ---------------------------------------------------------------------
9247
+  (0.0ms) SAVEPOINT active_record_1
9248
+ SQL (0.7ms) INSERT INTO "image_attacheds" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00], ["image", "13817011293349912.jpg"], ["updated_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00]]
9249
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9250
+  (0.0ms) SAVEPOINT active_record_1
9251
+ SQL (0.2ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
9252
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9253
+  (1.0ms) rollback transaction
9254
+  (0.1ms) begin transaction
9255
+ ---------------------------------------------------------------
9256
+ LocalImageStringTest: test_should_destory_main_image_and_thumbs
9257
+ ---------------------------------------------------------------
9258
+  (0.1ms) rollback transaction
9259
+  (0.1ms) begin transaction
9260
+ --------------------------------------------------------------------
9261
+ LocalImageUploadTest: test_should_save/destory_main_image_and_thumbs
9262
+ --------------------------------------------------------------------
9263
+  (0.2ms) rollback transaction
9264
+  (0.1ms) begin transaction
9265
+ ---------------------------------------------------------------------------------------------
9266
+ LocalRecordsTest: test_should_save/update/destroy_from_the_database_and_save/destroy_the_file
9267
+ ---------------------------------------------------------------------------------------------
9268
+  (0.1ms) SAVEPOINT active_record_1
9269
+ SQL (0.5ms) INSERT INTO "file_attacheds" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00], ["file", "13817011297851470.jpg"], ["updated_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00]]
9270
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9271
+  (0.0ms) SAVEPOINT active_record_1
9272
+ SQL (0.4ms) UPDATE "file_attacheds" SET "file" = ?, "updated_at" = ? WHERE "file_attacheds"."id" = 1 [["file", "13817011297891378.txt"], ["updated_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00]]
9273
+  (0.2ms) RELEASE SAVEPOINT active_record_1
9274
+  (0.0ms) SAVEPOINT active_record_1
9275
+ SQL (0.1ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
9276
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9277
+  (0.9ms) rollback transaction
9278
+  (0.1ms) begin transaction
9279
+ -----------------------------------------------------------------------------------
9280
+ LocalRecordsTest: test_should_take_default_file/image_and_shouldn't_store/delete_it
9281
+ -----------------------------------------------------------------------------------
9282
+  (0.0ms) SAVEPOINT active_record_1
9283
+ SQL (0.4ms) INSERT INTO "file_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00]]
9284
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9285
+  (0.0ms) SAVEPOINT active_record_1
9286
+ SQL (0.2ms) DELETE FROM "file_attacheds" WHERE "file_attacheds"."id" = ? [["id", 1]]
9287
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9288
+  (0.0ms) SAVEPOINT active_record_1
9289
+ SQL (0.2ms) INSERT INTO "image_attacheds" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00], ["updated_at", Sun, 13 Oct 2013 21:52:09 UTC +00:00]]
9290
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9291
+  (0.0ms) SAVEPOINT active_record_1
9292
+ SQL (0.1ms) DELETE FROM "image_attacheds" WHERE "image_attacheds"."id" = ? [["id", 1]]
9293
+  (0.0ms) RELEASE SAVEPOINT active_record_1
9294
+  (0.9ms) rollback transaction
9295
+  (0.1ms) begin transaction
9296
+ -------------------------------------------------------------------
9297
+ LocalValidatorsTest: test_should_check_all_the_validations_together
9298
+ -------------------------------------------------------------------
9299
+  (0.1ms) rollback transaction
9300
+  (0.0ms) begin transaction
9301
+ ---------------------------------------------------------
9302
+ LocalValidatorsTest: test_should_check_if_file_is_present
9303
+ ---------------------------------------------------------
9304
+  (0.1ms) rollback transaction
9305
+  (0.0ms) begin transaction
9306
+ ------------------------------------------------------------
9307
+ LocalValidatorsTest: test_should_check_the_file_content_type
9308
+ ------------------------------------------------------------
9309
+  (0.1ms) rollback transaction
9310
+  (0.0ms) begin transaction
9311
+ ----------------------------------------------------
9312
+ LocalValidatorsTest: test_should_check_the_file_size
8544
9313
  ----------------------------------------------------
8545
9314
   (0.1ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attachs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattways
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-21 00:00:00.000000000 Z
11
+ date: 2013-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails