rails_uploads 0.2.8 → 0.2.9

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.
@@ -1,5 +1,5 @@
1
1
  module RailsUploads
2
- class PresetsController < ApplicationController
2
+ class PresetsController < ActionController::Base
3
3
 
4
4
  def generate
5
5
  filename = "#{params[:image]}.#{params[:format]}"
@@ -8,7 +8,7 @@ module RailsUploads
8
8
  image = RailsUploads::Types::Image.new(filename)
9
9
  if image.exists? and !image.exists?(preset)
10
10
  image.send :generate_preset, preset
11
- redirect_to image.url(params[:preset]).to_s, :cb => Random.rand(100000)
11
+ redirect_to image.url(params[:preset]).to_s, cb: Random.rand(100000)
12
12
  end
13
13
  end
14
14
  end
data/config/routes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  RailsUploads::Engine.routes.draw do
2
2
 
3
- match 'uploads/images/:preset/:image.:format' => 'presets#generate', :status => 404
3
+ get 'uploads/images/:preset/:image.:format', to: 'presets#generate', status: 404
4
4
 
5
5
  end
@@ -17,10 +17,6 @@ module RailsUploads
17
17
  @stored_attachments = []
18
18
  @deleted_attachments = []
19
19
  self.class.attachments.each do |attr, options|
20
- if @attributes[attr.to_s].present? and send("delete_#{attr}") == '1'
21
- send "#{attr}_will_change!"
22
- @attributes[attr.to_s] = nil
23
- end
24
20
  if changed_attributes.has_key? attr.to_s
25
21
  stored = attributes[attr.to_s]
26
22
  deleted = changed_attributes[attr.to_s]
@@ -62,21 +58,15 @@ module RailsUploads
62
58
  attr_reader :attachments
63
59
 
64
60
  def self.extended(base)
65
- [:image].each do |type|
61
+ [:file, :image].each do |type|
66
62
  base.send(:define_singleton_method, "attached_#{type}") do |*args|
67
63
  options = args.extract_options!
68
64
  options[:type] = type
69
- attached_file *args.append(options)
65
+ define_attachment *args.append(options)
70
66
  end
71
67
  end
72
68
  end
73
69
 
74
- def attached_file(*args)
75
- options = args.extract_options!
76
- options.reverse_merge! type: :file
77
- define_attachment *args.append(options)
78
- end
79
-
80
70
  def inherited(subclass)
81
71
  subclass.instance_variable_set(:@attachments, @attachments)
82
72
  super
@@ -93,6 +83,7 @@ module RailsUploads
93
83
  make_attachable unless is_attachable?
94
84
  args.each do |attr|
95
85
  define_attachable_attribute_methods attr.to_sym, options
86
+ define_default_validations attr.to_sym, options
96
87
  @attachments[attr.to_sym] = options
97
88
  end
98
89
  end
@@ -105,10 +96,13 @@ module RailsUploads
105
96
  @attachments = {}
106
97
  end
107
98
 
99
+ def define_default_validations(attr, options)
100
+ default_validations = Rails.application.config.uploads.default_validations[options[:type]]
101
+ validates attr, default_validations.dup if default_validations.present? and not default_validations.empty?
102
+ end
103
+
108
104
  def define_attachable_attribute_methods(attr, options)
109
- ['set', 'get'].each do |method|
110
- send "define_attachable_attribute_method_#{method}", attr, options
111
- end
105
+ ['set', 'get'].each { |method| send "define_attachable_attribute_method_#{method}", attr, options }
112
106
  end
113
107
 
114
108
  def define_attachable_attribute_method_set(attr, options)
@@ -119,7 +113,14 @@ module RailsUploads
119
113
  super(@attachments[attr].filename)
120
114
  end
121
115
  end
122
- attr_accessor "delete_#{attr}".to_sym
116
+ define_method "delete_#{attr}=" do |value|
117
+ if @attributes[attr.to_s].present? and value == '1'
118
+ send "#{attr}_will_change!"
119
+ @attachments[attr] = nil
120
+ @attributes[attr.to_s] = nil
121
+ end
122
+ instance_variable_set("@delete_#{attr}".to_sym, value)
123
+ end
123
124
  end
124
125
 
125
126
  def define_attachable_attribute_method_get(attr, options)
@@ -129,6 +130,7 @@ module RailsUploads
129
130
  return nil if super().nil? and not options.has_key? :default
130
131
  @attachments[attr] = build_attachment_instance(super(), options)
131
132
  end
133
+ attr_reader "delete_#{attr}".to_sym
132
134
  end
133
135
 
134
136
  end
@@ -48,14 +48,14 @@ module RailsUploads
48
48
 
49
49
  def resize_to_fill(max_width, max_height)
50
50
  width, height = dimensions
51
- scale = [max_width/width.to_f, max_height/height.to_f].max
51
+ scale = [max_width.to_f/width, max_height.to_f/height].max
52
52
  convert resize: "#{(scale*width).ceil}x#{(scale*height).ceil}", gravity: 'center', crop: "#{max_width}x#{max_height}+0+0"
53
53
  end
54
54
 
55
55
  def resize_to_fit(max_width, max_height)
56
56
  width, height = dimensions
57
- scale = [max_width/width.to_f, max_height/height.to_f].min
58
- convert resize: "#{(scale*width).to_i}x#{(scale*height).to_i}", gravity: 'center'
57
+ scale = [max_width.to_f/width, max_height.to_f/height].reject{|s| s==0 }.min
58
+ convert resize: "#{(scale*width).ceil}x#{(scale*height).ceil}", gravity: 'center'
59
59
  end
60
60
 
61
61
  protected
@@ -4,6 +4,7 @@ module RailsUploads
4
4
  config.uploads = ActiveSupport::OrderedOptions.new
5
5
  config.uploads.presets = {}
6
6
  config.uploads.default_presets = []
7
+ config.uploads.default_validations = {}
7
8
  config.uploads.base_url = ''
8
9
  config.uploads.storage = :local
9
10
 
@@ -1,7 +1,7 @@
1
1
  class AttachmentPresenceValidator < RailsUploads::Validators::Base
2
2
 
3
3
  def validate_each(record, attribute, value)
4
- unless value.present? and value.exists?
4
+ unless value.present? and value.exists? and not value.is_default?
5
5
  add_error record, attribute, 'errors.messages.attachment_presence'
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  module RailsUploads
2
2
 
3
- VERSION = '0.2.8'
3
+ VERSION = '0.2.9'
4
4
 
5
5
  end
@@ -1,15 +1,15 @@
1
1
 
2
2
  development:
3
- bucket: ru-development
4
- access_key_id: AKIAJFJTTRMZOGXSFQRQ
5
- secret_access_key: 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
3
+ bucket: development-bucket
4
+ access_key_id: development_access_key_id
5
+ secret_access_key: development_secret_access_key
6
6
 
7
7
  test:
8
- bucket: ru-test
9
- access_key_id: AKIAJFJTTRMZOGXSFQRQ
10
- secret_access_key: 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
8
+ bucket: test-bucket
9
+ access_key_id: test_access_key_id
10
+ secret_access_key: test_secret_access_key
11
11
 
12
12
  production:
13
- bucket: ru-production
14
- access_key_id: AKIAJFJTTRMZOGXSFQRQ
15
- secret_access_key: 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
13
+ bucket: production-bucket
14
+ access_key_id: production_access_key_id
15
+ secret_access_key: production_secret_access_key
@@ -24485,3 +24485,606 @@ Completed 302 Found in 64ms (ActiveRecord: 0.0ms)
24485
24485
   (0.0ms) rollback transaction
24486
24486
   (0.1ms) begin transaction
24487
24487
   (0.1ms) rollback transaction
24488
+ Connecting to database specified by database.yml
24489
+  (2.0ms) select sqlite_version(*)
24490
+  (0.2ms) CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
24491
+  (0.1ms) CREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24492
+  (0.1ms) CREATE TABLE "validation_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "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 NOT NULL, "updated_at" datetime NOT NULL)
24493
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
24494
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
24495
+  (0.1ms) SELECT version FROM "schema_migrations"
24496
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
24497
+  (0.1ms) begin transaction
24498
+  (0.1ms) SAVEPOINT active_record_1
24499
+ SQL (35.5ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:07 UTC +00:00], ["file", "13731225076530080.txt"], ["updated_at", Sat, 06 Jul 2013 14:55:07 UTC +00:00]]
24500
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24501
+  (0.0ms) SAVEPOINT active_record_1
24502
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24503
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24504
+  (9.7ms) rollback transaction
24505
+  (0.1ms) begin transaction
24506
+  (0.1ms) rollback transaction
24507
+  (0.0ms) begin transaction
24508
+  (0.1ms) rollback transaction
24509
+  (0.0ms) begin transaction
24510
+  (0.1ms) rollback transaction
24511
+  (0.1ms) begin transaction
24512
+ Started GET "/uploads/images/small/13731225077474142.jpg" for 127.0.0.1 at 2013-07-06 11:55:08 -0300
24513
+ Processing by RailsUploads::PresetsController#generate as JPEG
24514
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13731225077474142"}
24515
+ Redirected to http://www.example.com/uploads/images/small/13731225077474142.jpg
24516
+ Completed 302 Found in 64ms (ActiveRecord: 0.0ms)
24517
+  (0.1ms) rollback transaction
24518
+  (0.1ms) begin transaction
24519
+  (0.1ms) SAVEPOINT active_record_1
24520
+ SQL (0.7ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:08 UTC +00:00], ["image", "13731225085747500.jpg"], ["updated_at", Sat, 06 Jul 2013 14:55:08 UTC +00:00]]
24521
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24522
+  (0.0ms) SAVEPOINT active_record_1
24523
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24524
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24525
+  (0.1ms) rollback transaction
24526
+  (0.1ms) begin transaction
24527
+  (0.1ms) rollback transaction
24528
+  (0.0ms) begin transaction
24529
+  (0.1ms) rollback transaction
24530
+  (0.1ms) begin transaction
24531
+  (0.1ms) SAVEPOINT active_record_1
24532
+ SQL (0.4ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:09 UTC +00:00], ["file", "13731225090727640.jpg"], ["updated_at", Sat, 06 Jul 2013 14:55:09 UTC +00:00]]
24533
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24534
+  (0.0ms) SAVEPOINT active_record_1
24535
+  (0.1ms) UPDATE "file_uploads" SET "file" = '13731225090795140.txt', "updated_at" = '2013-07-06 14:55:09.082750' WHERE "file_uploads"."id" = 1
24536
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24537
+  (0.0ms) SAVEPOINT active_record_1
24538
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24539
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24540
+  (0.1ms) rollback transaction
24541
+  (0.0ms) begin transaction
24542
+  (0.1ms) SAVEPOINT active_record_1
24543
+ SQL (0.3ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:09 UTC +00:00], ["file", nil], ["updated_at", Sat, 06 Jul 2013 14:55:09 UTC +00:00]]
24544
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24545
+  (0.0ms) SAVEPOINT active_record_1
24546
+ SQL (0.0ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24547
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24548
+  (0.0ms) SAVEPOINT active_record_1
24549
+ SQL (0.3ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:09 UTC +00:00], ["image", nil], ["updated_at", Sat, 06 Jul 2013 14:55:09 UTC +00:00]]
24550
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24551
+  (0.1ms) SAVEPOINT active_record_1
24552
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24553
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24554
+  (0.0ms) rollback transaction
24555
+  (0.1ms) begin transaction
24556
+  (0.1ms) rollback transaction
24557
+  (0.0ms) begin transaction
24558
+  (0.1ms) rollback transaction
24559
+  (0.1ms) begin transaction
24560
+  (0.0ms) rollback transaction
24561
+  (0.0ms) begin transaction
24562
+  (0.1ms) rollback transaction
24563
+ Connecting to database specified by database.yml
24564
+  (2.0ms) select sqlite_version(*)
24565
+  (0.2ms) CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
24566
+  (0.1ms) CREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24567
+  (0.1ms) CREATE TABLE "validation_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "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 NOT NULL, "updated_at" datetime NOT NULL)
24568
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
24569
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
24570
+  (0.1ms) SELECT version FROM "schema_migrations"
24571
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
24572
+  (0.1ms) begin transaction
24573
+  (0.1ms) SAVEPOINT active_record_1
24574
+ SQL (7.6ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:44 UTC +00:00], ["file", "13731225449701660.txt"], ["updated_at", Sat, 06 Jul 2013 14:55:44 UTC +00:00]]
24575
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24576
+  (0.0ms) SAVEPOINT active_record_1
24577
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24578
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24579
+  (0.1ms) rollback transaction
24580
+  (0.0ms) begin transaction
24581
+  (0.1ms) rollback transaction
24582
+  (0.1ms) begin transaction
24583
+  (0.1ms) rollback transaction
24584
+  (0.0ms) begin transaction
24585
+  (0.0ms) rollback transaction
24586
+  (0.1ms) begin transaction
24587
+ Started GET "/uploads/images/small/13731225450397282.jpg" for 127.0.0.1 at 2013-07-06 11:55:45 -0300
24588
+ Processing by RailsUploads::PresetsController#generate as JPEG
24589
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13731225450397282"}
24590
+ Redirected to http://www.example.com/uploads/images/small/13731225450397282.jpg
24591
+ Completed 302 Found in 65ms (ActiveRecord: 0.0ms)
24592
+  (0.1ms) rollback transaction
24593
+  (0.1ms) begin transaction
24594
+  (0.1ms) SAVEPOINT active_record_1
24595
+ SQL (0.5ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:45 UTC +00:00], ["image", "13731225452149078.jpg"], ["updated_at", Sat, 06 Jul 2013 14:55:45 UTC +00:00]]
24596
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24597
+  (0.1ms) SAVEPOINT active_record_1
24598
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24599
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24600
+  (0.1ms) rollback transaction
24601
+  (0.1ms) begin transaction
24602
+  (0.1ms) rollback transaction
24603
+  (0.1ms) begin transaction
24604
+  (0.1ms) rollback transaction
24605
+  (0.1ms) begin transaction
24606
+  (0.1ms) SAVEPOINT active_record_1
24607
+ SQL (0.4ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:45 UTC +00:00], ["file", "13731225457074030.jpg"], ["updated_at", Sat, 06 Jul 2013 14:55:45 UTC +00:00]]
24608
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24609
+  (0.0ms) SAVEPOINT active_record_1
24610
+  (0.1ms) UPDATE "file_uploads" SET "file" = '13731225457140430.txt', "updated_at" = '2013-07-06 14:55:45.717116' WHERE "file_uploads"."id" = 1
24611
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24612
+  (0.0ms) SAVEPOINT active_record_1
24613
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24614
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24615
+  (0.1ms) rollback transaction
24616
+  (0.1ms) begin transaction
24617
+  (0.0ms) SAVEPOINT active_record_1
24618
+ SQL (0.3ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:45 UTC +00:00], ["file", nil], ["updated_at", Sat, 06 Jul 2013 14:55:45 UTC +00:00]]
24619
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24620
+  (0.0ms) SAVEPOINT active_record_1
24621
+ SQL (0.0ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24622
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24623
+  (0.0ms) SAVEPOINT active_record_1
24624
+ SQL (0.2ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 14:55:45 UTC +00:00], ["image", nil], ["updated_at", Sat, 06 Jul 2013 14:55:45 UTC +00:00]]
24625
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24626
+  (0.0ms) SAVEPOINT active_record_1
24627
+ SQL (0.0ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24628
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24629
+  (0.1ms) rollback transaction
24630
+  (0.1ms) begin transaction
24631
+  (0.1ms) rollback transaction
24632
+  (0.1ms) begin transaction
24633
+  (0.1ms) rollback transaction
24634
+  (0.0ms) begin transaction
24635
+  (0.0ms) rollback transaction
24636
+  (0.0ms) begin transaction
24637
+  (0.1ms) rollback transaction
24638
+ Connecting to database specified by database.yml
24639
+  (7.5ms) select sqlite_version(*)
24640
+  (0.4ms) CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
24641
+  (0.1ms) CREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24642
+  (0.1ms) CREATE TABLE "validation_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "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 NOT NULL, "updated_at" datetime NOT NULL)
24643
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
24644
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
24645
+  (0.0ms) SELECT version FROM "schema_migrations"
24646
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
24647
+  (0.1ms) begin transaction
24648
+  (0.1ms) SAVEPOINT active_record_1
24649
+ SQL (38.3ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:13:17 UTC +00:00], ["file", "13731235971492400.txt"], ["updated_at", Sat, 06 Jul 2013 15:13:17 UTC +00:00]]
24650
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24651
+  (0.0ms) SAVEPOINT active_record_1
24652
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24653
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24654
+  (0.1ms) rollback transaction
24655
+  (0.1ms) begin transaction
24656
+  (0.1ms) rollback transaction
24657
+  (0.0ms) begin transaction
24658
+  (0.1ms) rollback transaction
24659
+  (0.1ms) begin transaction
24660
+  (0.0ms) rollback transaction
24661
+  (0.1ms) begin transaction
24662
+ Started GET "/uploads/images/small/13731235972386250.jpg" for 127.0.0.1 at 2013-07-06 12:13:18 -0300
24663
+ Processing by RailsUploads::PresetsController#generate as JPEG
24664
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13731235972386250"}
24665
+ Redirected to http://www.example.com/uploads/images/small/13731235972386250.jpg
24666
+ Completed 302 Found in 65ms (ActiveRecord: 0.0ms)
24667
+  (0.1ms) rollback transaction
24668
+  (0.1ms) begin transaction
24669
+  (0.1ms) SAVEPOINT active_record_1
24670
+ SQL (0.6ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:13:18 UTC +00:00], ["image", "13731235984520920.jpg"], ["updated_at", Sat, 06 Jul 2013 15:13:18 UTC +00:00]]
24671
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24672
+  (0.0ms) SAVEPOINT active_record_1
24673
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24675
+  (0.1ms) rollback transaction
24676
+  (0.1ms) begin transaction
24677
+  (0.1ms) rollback transaction
24678
+  (0.1ms) begin transaction
24679
+  (0.1ms) rollback transaction
24680
+  (0.1ms) begin transaction
24681
+  (0.1ms) SAVEPOINT active_record_1
24682
+ SQL (0.4ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:13:18 UTC +00:00], ["file", "13731235989259068.jpg"], ["updated_at", Sat, 06 Jul 2013 15:13:18 UTC +00:00]]
24683
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24684
+  (0.0ms) SAVEPOINT active_record_1
24685
+  (0.1ms) UPDATE "file_uploads" SET "file" = '13731235989328110.txt', "updated_at" = '2013-07-06 15:13:18.936050' WHERE "file_uploads"."id" = 1
24686
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24687
+  (0.0ms) SAVEPOINT active_record_1
24688
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24689
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24690
+  (0.1ms) rollback transaction
24691
+  (0.1ms) begin transaction
24692
+  (0.1ms) SAVEPOINT active_record_1
24693
+ SQL (0.3ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:13:18 UTC +00:00], ["file", nil], ["updated_at", Sat, 06 Jul 2013 15:13:18 UTC +00:00]]
24694
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24695
+  (0.0ms) SAVEPOINT active_record_1
24696
+ SQL (0.0ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24697
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24698
+  (0.0ms) SAVEPOINT active_record_1
24699
+ SQL (0.2ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:13:18 UTC +00:00], ["image", nil], ["updated_at", Sat, 06 Jul 2013 15:13:18 UTC +00:00]]
24700
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24701
+  (0.1ms) SAVEPOINT active_record_1
24702
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24703
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24704
+  (0.1ms) rollback transaction
24705
+  (0.1ms) begin transaction
24706
+  (0.1ms) rollback transaction
24707
+  (0.0ms) begin transaction
24708
+  (0.0ms) rollback transaction
24709
+  (0.0ms) begin transaction
24710
+  (0.0ms) rollback transaction
24711
+  (0.0ms) begin transaction
24712
+  (0.1ms) rollback transaction
24713
+ Connecting to database specified by database.yml
24714
+  (2.0ms) select sqlite_version(*)
24715
+  (0.2ms) CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
24716
+  (0.1ms) CREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24717
+  (0.2ms) CREATE TABLE "validation_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "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 NOT NULL, "updated_at" datetime NOT NULL)
24718
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
24719
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
24720
+  (0.0ms) SELECT version FROM "schema_migrations"
24721
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
24722
+  (0.1ms) begin transaction
24723
+  (0.1ms) SAVEPOINT active_record_1
24724
+ SQL (7.8ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:21:02 UTC +00:00], ["file", "13731240628719978.txt"], ["updated_at", Sat, 06 Jul 2013 15:21:02 UTC +00:00]]
24725
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24726
+  (0.0ms) SAVEPOINT active_record_1
24727
+ SQL (0.2ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24728
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24729
+  (0.1ms) rollback transaction
24730
+  (0.1ms) begin transaction
24731
+  (0.1ms) rollback transaction
24732
+  (0.1ms) begin transaction
24733
+  (0.1ms) rollback transaction
24734
+  (0.0ms) begin transaction
24735
+  (0.0ms) rollback transaction
24736
+  (0.1ms) begin transaction
24737
+ Started GET "/uploads/images/small/13731240629334882.jpg" for 127.0.0.1 at 2013-07-06 12:21:03 -0300
24738
+ Processing by RailsUploads::PresetsController#generate as JPEG
24739
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13731240629334882"}
24740
+ Redirected to http://www.example.com/uploads/images/small/13731240629334882.jpg
24741
+ Completed 302 Found in 68ms (ActiveRecord: 0.0ms)
24742
+  (0.1ms) rollback transaction
24743
+  (0.1ms) begin transaction
24744
+  (0.1ms) SAVEPOINT active_record_1
24745
+ SQL (0.7ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:21:03 UTC +00:00], ["image", "13731240631099782.jpg"], ["updated_at", Sat, 06 Jul 2013 15:21:03 UTC +00:00]]
24746
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24747
+  (0.1ms) SAVEPOINT active_record_1
24748
+ SQL (0.2ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24749
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24750
+  (0.1ms) rollback transaction
24751
+  (0.1ms) begin transaction
24752
+  (0.1ms) rollback transaction
24753
+  (0.1ms) begin transaction
24754
+  (0.1ms) rollback transaction
24755
+  (0.1ms) begin transaction
24756
+  (0.0ms) SAVEPOINT active_record_1
24757
+ SQL (0.5ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:21:03 UTC +00:00], ["file", "13731240638528110.jpg"], ["updated_at", Sat, 06 Jul 2013 15:21:03 UTC +00:00]]
24758
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24759
+  (0.0ms) SAVEPOINT active_record_1
24760
+  (0.2ms) UPDATE "file_uploads" SET "file" = '13731240638602510.txt', "updated_at" = '2013-07-06 15:21:03.863781' WHERE "file_uploads"."id" = 1
24761
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24762
+  (0.0ms) SAVEPOINT active_record_1
24763
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24764
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24765
+  (0.1ms) rollback transaction
24766
+  (0.0ms) begin transaction
24767
+  (0.0ms) SAVEPOINT active_record_1
24768
+ SQL (0.4ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:21:03 UTC +00:00], ["file", nil], ["updated_at", Sat, 06 Jul 2013 15:21:03 UTC +00:00]]
24769
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24770
+  (0.1ms) SAVEPOINT active_record_1
24771
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24772
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24773
+  (0.1ms) SAVEPOINT active_record_1
24774
+ SQL (0.3ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 06 Jul 2013 15:21:03 UTC +00:00], ["image", nil], ["updated_at", Sat, 06 Jul 2013 15:21:03 UTC +00:00]]
24775
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24776
+  (0.1ms) SAVEPOINT active_record_1
24777
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24778
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24779
+  (0.1ms) rollback transaction
24780
+  (0.1ms) begin transaction
24781
+  (0.1ms) rollback transaction
24782
+  (0.0ms) begin transaction
24783
+  (0.1ms) rollback transaction
24784
+  (0.0ms) begin transaction
24785
+  (0.1ms) rollback transaction
24786
+  (0.1ms) begin transaction
24787
+  (0.1ms) rollback transaction
24788
+ Connecting to database specified by database.yml
24789
+ Connecting to database specified by database.yml
24790
+ Connecting to database specified by database.yml
24791
+  (7.7ms) select sqlite_version(*)
24792
+  (0.3ms) CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
24793
+  (0.1ms) CREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24794
+  (0.1ms) CREATE TABLE "validation_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "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 NOT NULL, "updated_at" datetime NOT NULL)
24795
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
24796
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
24797
+  (0.0ms) SELECT version FROM "schema_migrations"
24798
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
24799
+  (0.1ms) begin transaction
24800
+  (0.1ms) SAVEPOINT active_record_1
24801
+ SQL (35.2ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:02:57 UTC +00:00], ["file", "13733965774479820.txt"], ["updated_at", Tue, 09 Jul 2013 19:02:57 UTC +00:00]]
24802
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24803
+  (0.0ms) SAVEPOINT active_record_1
24804
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24805
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24806
+  (12.2ms) rollback transaction
24807
+  (0.1ms) begin transaction
24808
+  (0.1ms) rollback transaction
24809
+  (0.1ms) begin transaction
24810
+  (0.1ms) rollback transaction
24811
+  (0.0ms) begin transaction
24812
+  (0.0ms) rollback transaction
24813
+  (0.0ms) begin transaction
24814
+ Started GET "/uploads/images/small/13733965775781860.jpg" for 127.0.0.1 at 2013-07-09 16:02:58 -0300
24815
+ Processing by RailsUploads::PresetsController#generate as JPEG
24816
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13733965775781860"}
24817
+ Redirected to http://www.example.com/uploads/images/small/13733965775781860.jpg
24818
+ Completed 302 Found in 65ms (ActiveRecord: 0.0ms)
24819
+  (0.1ms) rollback transaction
24820
+  (0.1ms) begin transaction
24821
+  (0.1ms) SAVEPOINT active_record_1
24822
+ SQL (0.6ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:02:58 UTC +00:00], ["image", "13733965783842900.jpg"], ["updated_at", Tue, 09 Jul 2013 19:02:58 UTC +00:00]]
24823
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24824
+  (0.0ms) SAVEPOINT active_record_1
24825
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24826
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24827
+  (0.1ms) rollback transaction
24828
+  (0.1ms) begin transaction
24829
+  (0.1ms) rollback transaction
24830
+  (0.1ms) begin transaction
24831
+  (0.1ms) rollback transaction
24832
+  (0.1ms) begin transaction
24833
+  (0.1ms) SAVEPOINT active_record_1
24834
+ SQL (0.4ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:02:58 UTC +00:00], ["file", "13733965788613310.jpg"], ["updated_at", Tue, 09 Jul 2013 19:02:58 UTC +00:00]]
24835
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24836
+  (0.0ms) SAVEPOINT active_record_1
24837
+  (0.1ms) UPDATE "file_uploads" SET "file" = '13733965788682912.txt', "updated_at" = '2013-07-09 19:02:58.871439' WHERE "file_uploads"."id" = 1
24838
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24839
+  (0.0ms) SAVEPOINT active_record_1
24840
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24841
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24842
+  (0.1ms) rollback transaction
24843
+  (0.0ms) begin transaction
24844
+  (0.1ms) SAVEPOINT active_record_1
24845
+ SQL (0.3ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:02:58 UTC +00:00], ["file", nil], ["updated_at", Tue, 09 Jul 2013 19:02:58 UTC +00:00]]
24846
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24847
+  (0.0ms) SAVEPOINT active_record_1
24848
+ SQL (0.0ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24849
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24850
+  (0.0ms) SAVEPOINT active_record_1
24851
+ SQL (0.2ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:02:58 UTC +00:00], ["image", nil], ["updated_at", Tue, 09 Jul 2013 19:02:58 UTC +00:00]]
24852
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24853
+  (0.0ms) SAVEPOINT active_record_1
24854
+ SQL (0.0ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24855
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24856
+  (0.1ms) rollback transaction
24857
+  (0.1ms) begin transaction
24858
+  (0.1ms) rollback transaction
24859
+  (0.1ms) begin transaction
24860
+  (0.0ms) rollback transaction
24861
+  (0.0ms) begin transaction
24862
+  (0.0ms) rollback transaction
24863
+  (0.0ms) begin transaction
24864
+  (0.1ms) rollback transaction
24865
+ Connecting to database specified by database.yml
24866
+  (1.9ms) select sqlite_version(*)
24867
+  (0.2ms) CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
24868
+  (0.1ms) CREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24869
+  (0.1ms) CREATE TABLE "validation_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "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 NOT NULL, "updated_at" datetime NOT NULL)
24870
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
24871
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
24872
+  (0.1ms) SELECT version FROM "schema_migrations"
24873
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
24874
+  (0.1ms) begin transaction
24875
+  (0.1ms) SAVEPOINT active_record_1
24876
+ SQL (7.9ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:07:17 UTC +00:00], ["file", "13733968371559600.txt"], ["updated_at", Tue, 09 Jul 2013 19:07:17 UTC +00:00]]
24877
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24878
+  (0.0ms) SAVEPOINT active_record_1
24879
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24880
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24881
+  (0.1ms) rollback transaction
24882
+  (0.0ms) begin transaction
24883
+  (0.1ms) rollback transaction
24884
+  (0.1ms) begin transaction
24885
+  (0.1ms) rollback transaction
24886
+  (0.0ms) begin transaction
24887
+  (0.1ms) rollback transaction
24888
+  (0.1ms) begin transaction
24889
+ Started GET "/uploads/images/small/13733968372170370.jpg" for 127.0.0.1 at 2013-07-09 16:07:17 -0300
24890
+ Processing by RailsUploads::PresetsController#generate as JPEG
24891
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13733968372170370"}
24892
+ Redirected to http://www.example.com/uploads/images/small/13733968372170370.jpg
24893
+ Completed 302 Found in 63ms (ActiveRecord: 0.0ms)
24894
+  (0.1ms) rollback transaction
24895
+  (0.1ms) begin transaction
24896
+  (0.1ms) SAVEPOINT active_record_1
24897
+ SQL (0.6ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:07:17 UTC +00:00], ["image", "13733968376646772.jpg"], ["updated_at", Tue, 09 Jul 2013 19:07:17 UTC +00:00]]
24898
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24899
+  (0.1ms) SAVEPOINT active_record_1
24900
+ SQL (0.2ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24901
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24902
+  (0.1ms) rollback transaction
24903
+  (0.1ms) begin transaction
24904
+  (0.1ms) rollback transaction
24905
+  (0.0ms) begin transaction
24906
+  (0.2ms) rollback transaction
24907
+  (0.1ms) begin transaction
24908
+  (0.0ms) SAVEPOINT active_record_1
24909
+ SQL (0.4ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:07:18 UTC +00:00], ["file", "13733968381375880.jpg"], ["updated_at", Tue, 09 Jul 2013 19:07:18 UTC +00:00]]
24910
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24911
+  (0.0ms) SAVEPOINT active_record_1
24912
+  (0.1ms) UPDATE "file_uploads" SET "file" = '13733968381442320.txt', "updated_at" = '2013-07-09 19:07:18.147361' WHERE "file_uploads"."id" = 1
24913
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24914
+  (0.0ms) SAVEPOINT active_record_1
24915
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24916
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24917
+  (0.1ms) rollback transaction
24918
+  (0.0ms) begin transaction
24919
+  (0.0ms) SAVEPOINT active_record_1
24920
+ SQL (0.3ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:07:18 UTC +00:00], ["file", nil], ["updated_at", Tue, 09 Jul 2013 19:07:18 UTC +00:00]]
24921
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24922
+  (0.0ms) SAVEPOINT active_record_1
24923
+ SQL (0.0ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24924
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24925
+  (0.0ms) SAVEPOINT active_record_1
24926
+ SQL (0.2ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:07:18 UTC +00:00], ["image", nil], ["updated_at", Tue, 09 Jul 2013 19:07:18 UTC +00:00]]
24927
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24928
+  (0.1ms) SAVEPOINT active_record_1
24929
+ SQL (0.0ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24930
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24931
+  (0.0ms) rollback transaction
24932
+  (0.0ms) begin transaction
24933
+  (0.1ms) rollback transaction
24934
+  (0.1ms) begin transaction
24935
+  (0.0ms) rollback transaction
24936
+  (0.0ms) begin transaction
24937
+  (0.0ms) rollback transaction
24938
+  (0.0ms) begin transaction
24939
+  (0.1ms) rollback transaction
24940
+ Connecting to database specified by database.yml
24941
+  (1.9ms) select sqlite_version(*)
24942
+  (0.2ms) CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
24943
+  (0.1ms) CREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24944
+  (0.2ms) CREATE TABLE "validation_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "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 NOT NULL, "updated_at" datetime NOT NULL)
24945
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
24946
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
24947
+  (0.1ms) SELECT version FROM "schema_migrations"
24948
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
24949
+  (0.1ms) begin transaction
24950
+  (0.1ms) SAVEPOINT active_record_1
24951
+ SQL (72.0ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:08:13 UTC +00:00], ["file", "13733968939695302.txt"], ["updated_at", Tue, 09 Jul 2013 19:08:13 UTC +00:00]]
24952
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24953
+  (0.0ms) SAVEPOINT active_record_1
24954
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24955
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24956
+  (0.1ms) rollback transaction
24957
+  (0.0ms) begin transaction
24958
+  (0.1ms) rollback transaction
24959
+  (0.1ms) begin transaction
24960
+  (0.0ms) rollback transaction
24961
+  (0.1ms) begin transaction
24962
+  (0.0ms) rollback transaction
24963
+  (0.1ms) begin transaction
24964
+ Started GET "/uploads/images/small/13733968940665870.jpg" for 127.0.0.1 at 2013-07-09 16:08:14 -0300
24965
+ Processing by RailsUploads::PresetsController#generate as JPEG
24966
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13733968940665870"}
24967
+ Redirected to http://www.example.com/uploads/images/small/13733968940665870.jpg
24968
+ Completed 302 Found in 64ms (ActiveRecord: 0.0ms)
24969
+  (0.1ms) rollback transaction
24970
+  (0.1ms) begin transaction
24971
+  (0.1ms) SAVEPOINT active_record_1
24972
+ SQL (0.5ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:08:14 UTC +00:00], ["image", "13733968942356322.jpg"], ["updated_at", Tue, 09 Jul 2013 19:08:14 UTC +00:00]]
24973
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24974
+  (0.0ms) SAVEPOINT active_record_1
24975
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
24976
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24977
+  (0.1ms) rollback transaction
24978
+  (0.1ms) begin transaction
24979
+  (0.1ms) rollback transaction
24980
+  (0.1ms) begin transaction
24981
+  (0.1ms) rollback transaction
24982
+  (0.1ms) begin transaction
24983
+  (0.1ms) SAVEPOINT active_record_1
24984
+ SQL (0.5ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:08:14 UTC +00:00], ["file", "13733968947039738.jpg"], ["updated_at", Tue, 09 Jul 2013 19:08:14 UTC +00:00]]
24985
+  (0.1ms) RELEASE SAVEPOINT active_record_1
24986
+  (0.0ms) SAVEPOINT active_record_1
24987
+  (0.2ms) UPDATE "file_uploads" SET "file" = '13733968947109000.txt', "updated_at" = '2013-07-09 19:08:14.714107' WHERE "file_uploads"."id" = 1
24988
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24989
+  (0.0ms) SAVEPOINT active_record_1
24990
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24991
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24992
+  (0.1ms) rollback transaction
24993
+  (0.0ms) begin transaction
24994
+  (0.1ms) SAVEPOINT active_record_1
24995
+ SQL (0.3ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:08:14 UTC +00:00], ["file", nil], ["updated_at", Tue, 09 Jul 2013 19:08:14 UTC +00:00]]
24996
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24997
+  (0.0ms) SAVEPOINT active_record_1
24998
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
24999
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25000
+  (0.0ms) SAVEPOINT active_record_1
25001
+ SQL (0.2ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:08:14 UTC +00:00], ["image", nil], ["updated_at", Tue, 09 Jul 2013 19:08:14 UTC +00:00]]
25002
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25003
+  (0.0ms) SAVEPOINT active_record_1
25004
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
25005
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25006
+  (0.1ms) rollback transaction
25007
+  (0.1ms) begin transaction
25008
+  (0.1ms) rollback transaction
25009
+  (0.0ms) begin transaction
25010
+  (0.1ms) rollback transaction
25011
+  (0.0ms) begin transaction
25012
+  (0.1ms) rollback transaction
25013
+  (0.0ms) begin transaction
25014
+  (0.1ms) rollback transaction
25015
+ Connecting to database specified by database.yml
25016
+ Connecting to database specified by database.yml
25017
+  (2.0ms) select sqlite_version(*)
25018
+  (0.3ms) CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
25019
+  (0.1ms) CREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
25020
+  (0.2ms) CREATE TABLE "validation_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "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 NOT NULL, "updated_at" datetime NOT NULL)
25021
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
25022
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
25023
+  (0.0ms) SELECT version FROM "schema_migrations"
25024
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
25025
+  (0.1ms) begin transaction
25026
+  (0.1ms) SAVEPOINT active_record_1
25027
+ SQL (7.1ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:41:55 UTC +00:00], ["file", "13733989153450450.txt"], ["updated_at", Tue, 09 Jul 2013 19:41:55 UTC +00:00]]
25028
+  (0.1ms) RELEASE SAVEPOINT active_record_1
25029
+  (0.0ms) SAVEPOINT active_record_1
25030
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
25031
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25032
+  (0.1ms) rollback transaction
25033
+  (0.0ms) begin transaction
25034
+  (0.1ms) rollback transaction
25035
+  (0.0ms) begin transaction
25036
+  (0.1ms) rollback transaction
25037
+  (0.1ms) begin transaction
25038
+  (0.1ms) rollback transaction
25039
+  (0.1ms) begin transaction
25040
+ Started GET "/uploads/images/small/13733989154333970.jpg" for 127.0.0.1 at 2013-07-09 16:41:55 -0300
25041
+ Processing by RailsUploads::PresetsController#generate as JPEG
25042
+ Parameters: {"status"=>404, "preset"=>"small", "image"=>"13733989154333970"}
25043
+ Redirected to http://www.example.com/uploads/images/small/13733989154333970.jpg
25044
+ Completed 302 Found in 65ms (ActiveRecord: 0.0ms)
25045
+  (0.1ms) rollback transaction
25046
+  (0.1ms) begin transaction
25047
+  (0.1ms) SAVEPOINT active_record_1
25048
+ SQL (0.6ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:41:56 UTC +00:00], ["image", "13733989159987150.jpg"], ["updated_at", Tue, 09 Jul 2013 19:41:56 UTC +00:00]]
25049
+  (0.1ms) RELEASE SAVEPOINT active_record_1
25050
+  (0.1ms) SAVEPOINT active_record_1
25051
+ SQL (0.1ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
25052
+  (0.1ms) RELEASE SAVEPOINT active_record_1
25053
+  (0.1ms) rollback transaction
25054
+  (0.1ms) begin transaction
25055
+  (0.1ms) rollback transaction
25056
+  (0.1ms) begin transaction
25057
+  (0.1ms) rollback transaction
25058
+  (0.1ms) begin transaction
25059
+  (0.1ms) SAVEPOINT active_record_1
25060
+ SQL (0.4ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:41:56 UTC +00:00], ["file", "13733989165980038.jpg"], ["updated_at", Tue, 09 Jul 2013 19:41:56 UTC +00:00]]
25061
+  (0.1ms) RELEASE SAVEPOINT active_record_1
25062
+  (0.0ms) SAVEPOINT active_record_1
25063
+  (0.1ms) UPDATE "file_uploads" SET "file" = '13733989166047790.txt', "updated_at" = '2013-07-09 19:41:56.607829' WHERE "file_uploads"."id" = 1
25064
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25065
+  (0.0ms) SAVEPOINT active_record_1
25066
+ SQL (0.1ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
25067
+  (0.1ms) RELEASE SAVEPOINT active_record_1
25068
+  (0.1ms) rollback transaction
25069
+  (0.1ms) begin transaction
25070
+  (0.0ms) SAVEPOINT active_record_1
25071
+ SQL (0.3ms) INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:41:56 UTC +00:00], ["file", nil], ["updated_at", Tue, 09 Jul 2013 19:41:56 UTC +00:00]]
25072
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25073
+  (0.1ms) SAVEPOINT active_record_1
25074
+ SQL (0.0ms) DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
25075
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25076
+  (0.0ms) SAVEPOINT active_record_1
25077
+ SQL (0.2ms) INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 09 Jul 2013 19:41:56 UTC +00:00], ["image", nil], ["updated_at", Tue, 09 Jul 2013 19:41:56 UTC +00:00]]
25078
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25079
+  (0.1ms) SAVEPOINT active_record_1
25080
+ SQL (0.0ms) DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
25081
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25082
+  (0.1ms) rollback transaction
25083
+  (0.1ms) begin transaction
25084
+  (0.1ms) rollback transaction
25085
+  (0.0ms) begin transaction
25086
+  (0.0ms) rollback transaction
25087
+  (0.0ms) begin transaction
25088
+  (0.0ms) rollback transaction
25089
+  (0.1ms) begin transaction
25090
+  (0.1ms) rollback transaction
@@ -62,10 +62,10 @@ class LocalValidatorsTest < ActiveSupport::TestCase
62
62
  assert_equal [], @record.errors[:image_all]
63
63
 
64
64
  assert !@record.valid?
65
- assert_equal [], @record.errors[:file_default]
65
+ assert_equal [I18n.t('errors.messages.blank')], @record.errors[:file_default]
66
66
 
67
67
  assert !@record.valid?
68
- assert_equal [], @record.errors[:image_default]
68
+ assert_equal [I18n.t('errors.messages.blank')], @record.errors[:image_default]
69
69
  end
70
70
 
71
71
  end
@@ -62,10 +62,10 @@ class S3ValidatorsTest < ActiveSupport::TestCase
62
62
  assert_equal [], @record.errors[:image_all]
63
63
 
64
64
  assert !@record.valid?
65
- assert_equal [], @record.errors[:file_default]
65
+ assert_equal [I18n.t('errors.messages.blank')], @record.errors[:file_default]
66
66
 
67
67
  assert !@record.valid?
68
- assert_equal [], @record.errors[:image_default]
68
+ assert_equal [I18n.t('errors.messages.blank')], @record.errors[:image_default]
69
69
  end
70
70
 
71
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_uploads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-27 00:00:00.000000000 Z
12
+ date: 2013-07-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -66,7 +66,6 @@ executables: []
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
- - app/controllers/rails_uploads/application_controller.rb
70
69
  - app/controllers/rails_uploads/presets_controller.rb
71
70
  - config/locales/en.yml
72
71
  - config/locales/es.yml
@@ -1,5 +0,0 @@
1
- module RailsUploads
2
- class ApplicationController < ActionController::Base
3
-
4
- end
5
- end