rails_uploads 0.2.3 → 0.2.4
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.
@@ -38,6 +38,7 @@ module RailsUploads
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def store_attachments
|
41
|
+
debugger
|
41
42
|
iterate_attachments { |a| a.store }
|
42
43
|
end
|
43
44
|
|
@@ -64,7 +65,7 @@ module RailsUploads
|
|
64
65
|
options[:type] = type
|
65
66
|
attached_file *args.append(options)
|
66
67
|
end
|
67
|
-
end
|
68
|
+
end
|
68
69
|
end
|
69
70
|
|
70
71
|
def attached_file(*args)
|
@@ -73,6 +74,11 @@ module RailsUploads
|
|
73
74
|
define_attachment *args.append(options)
|
74
75
|
end
|
75
76
|
|
77
|
+
def inherited(subclass)
|
78
|
+
subclass.instance_variable_set(:@attachments, @attachments)
|
79
|
+
super
|
80
|
+
end
|
81
|
+
|
76
82
|
def is_attachable?
|
77
83
|
attachments.present?
|
78
84
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -23165,3 +23165,96 @@ Completed 302 Found in 72ms (ActiveRecord: 0.0ms)
|
|
23165
23165
|
[1m[35m (0.1ms)[0m rollback transaction
|
23166
23166
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23167
23167
|
[1m[35m (0.1ms)[0m rollback transaction
|
23168
|
+
Connecting to database specified by database.yml
|
23169
|
+
[1m[36m (1.9ms)[0m [1mselect sqlite_version(*)[0m
|
23170
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "file_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "file" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
23171
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "image_uploads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
23172
|
+
[1m[35m (0.1ms)[0m 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)
|
23173
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
23174
|
+
[1m[35m (0.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
23175
|
+
[1m[36m (0.0ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
23176
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20130124013431')
|
23177
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23178
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
23179
|
+
|
23180
|
+
***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
|
23181
|
+
|
23182
|
+
[1m[36mSQL (7.4ms)[0m [1mINSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00], ["file", "13701291040410760.txt"], ["updated_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00]]
|
23183
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
23184
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
23185
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "file_uploads" WHERE "file_uploads"."id" = ? [["id", 1]]
|
23186
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
23187
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
23188
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23189
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
23190
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
23191
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
23192
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23193
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
23194
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23195
|
+
Started GET "/uploads/images/small/13701291040733030.jpg" for 127.0.0.1 at 2013-06-01 20:25:04 -0300
|
23196
|
+
Processing by RailsUploads::PresetsController#generate as JPEG
|
23197
|
+
Parameters: {"status"=>404, "preset"=>"small", "image"=>"13701291040733030"}
|
23198
|
+
Redirected to http://www.example.com/uploads/images/small/13701291040733030.jpg
|
23199
|
+
Completed 302 Found in 62ms (ActiveRecord: 0.0ms)
|
23200
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
23201
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23202
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
23203
|
+
|
23204
|
+
***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
|
23205
|
+
|
23206
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00], ["image", "13701291042942800.jpg"], ["updated_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00]]
|
23207
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
23208
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
23209
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "image_uploads" WHERE "image_uploads"."id" = ? [["id", 1]]
|
23210
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
23211
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
23212
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
23213
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
23214
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23215
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
23216
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23217
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
23218
|
+
|
23219
|
+
***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
|
23220
|
+
|
23221
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00], ["file", "13701291047473640.jpg"], ["updated_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00]]
|
23222
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
23223
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
23224
|
+
|
23225
|
+
***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
|
23226
|
+
|
23227
|
+
[1m[35m (0.2ms)[0m UPDATE "file_uploads" SET "file" = '13701291047542130.txt', "updated_at" = '2013-06-01 23:25:04.757832' WHERE "file_uploads"."id" = 1
|
23228
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
23229
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
23230
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "file_uploads" WHERE "file_uploads"."id" = ?[0m [["id", 1]]
|
23231
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
23232
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
23233
|
+
[1m[35m (0.1ms)[0m begin transaction
|
23234
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
23235
|
+
|
23236
|
+
***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
|
23237
|
+
|
23238
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "file_uploads" ("created_at", "file", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00], ["file", nil], ["updated_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00]]
|
23239
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
23240
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
23241
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "file_uploads" WHERE "file_uploads"."id" = ?[0m [["id", 1]]
|
23242
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
23243
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
23244
|
+
|
23245
|
+
***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
|
23246
|
+
|
23247
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "image_uploads" ("created_at", "image", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00], ["image", nil], ["updated_at", Sat, 01 Jun 2013 23:25:04 UTC +00:00]]
|
23248
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
23249
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
23250
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "image_uploads" WHERE "image_uploads"."id" = ?[0m [["id", 1]]
|
23251
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
23252
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
23253
|
+
[1m[35m (0.1ms)[0m begin transaction
|
23254
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
23255
|
+
[1m[35m (0.1ms)[0m begin transaction
|
23256
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
23257
|
+
[1m[35m (0.0ms)[0m begin transaction
|
23258
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
23259
|
+
[1m[35m (0.1ms)[0m begin transaction
|
23260
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
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.
|
4
|
+
version: 0.2.4
|
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-
|
12
|
+
date: 2013-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|