rails-uploader 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,10 @@ module Uploader
3
3
  def self.included(base)
4
4
  base.send(:extend, Uploader::Asset::ClassMethods)
5
5
  base.send(:include, Uploader::Asset::AssetProcessor)
6
+
7
+ base.instance_eval do
8
+ before_create :generate_public_token
9
+ end
6
10
  end
7
11
 
8
12
  module Mongoid
@@ -13,6 +17,8 @@ module Uploader
13
17
  base.instance_eval do
14
18
  field :guid, type: String
15
19
  field :public_token, type: String
20
+
21
+ before_create :generate_public_token
16
22
  end
17
23
  end
18
24
 
@@ -1,3 +1,3 @@
1
1
  module Uploader
2
- VERSION = "0.2.1".freeze
2
+ VERSION = "0.2.2".freeze
3
3
  end
@@ -24,6 +24,4 @@ class Asset < ActiveRecord::Base
24
24
  include Uploader::Asset
25
25
 
26
26
  belongs_to :assetable, :polymorphic => true
27
-
28
- before_create :generate_public_token
29
27
  end
@@ -2327,3 +2327,165 @@ Started POST "/uploader/attachments" for 127.0.0.1 at 2013-09-07 09:36:55 +0300
2327
2327
   (0.1ms) begin transaction
2328
2328
   (0.1ms) rollback transaction
2329
2329
  MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.4559ms)
2330
+ Connecting to database specified by database.yml
2331
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
2332
+ Migrating to CreateAssets (20120508093416)
2333
+ Migrating to CreateArticles (20120508093830)
2334
+  (0.1ms) begin transaction
2335
+  (0.1ms) SAVEPOINT active_record_1
2336
+ SQL (3.9ms) INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "MyText"], ["created_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["title", "MyString"], ["updated_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00]]
2337
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2338
+  (0.1ms) SAVEPOINT active_record_1
2339
+ Picture Exists (0.2ms) SELECT 1 AS one FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'Knu8hDqR5Xaw8FxyyH6x' LIMIT 1
2340
+ SQL (0.6ms) INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "public_token", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["data_content_type", "image/png"], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", nil], ["public_token", "Knu8hDqR5Xaw8FxyyH6x"], ["type", "Picture"], ["updated_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["user_id", nil]]
2341
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2342
+ Picture Load (0.3ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."guid" IS NULL AND "assets"."assetable_type" = 'Article' LIMIT 1
2343
+ SQL (0.2ms) UPDATE "assets" SET "assetable_id" = 1000, "guid" = NULL WHERE "assets"."type" IN ('Picture') AND "assets"."guid" IS NULL AND "assets"."assetable_type" = 'Article'
2344
+ Picture Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? LIMIT 1 [["id", 1]]
2345
+ Picture Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."guid" = 'qzGffLllVIuqvEzl9aI6' AND "assets"."assetable_type" = 'Article' LIMIT 1
2346
+  (0.1ms) SAVEPOINT active_record_1
2347
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2348
+  (2.0ms) rollback transaction
2349
+ MOPED: 127.0.0.1:27017 COMMAND database=admin command={:ismaster=>1} (1.1053ms)
2350
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.7091ms)
2351
+  (0.1ms) begin transaction
2352
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={"public_token"=>"Yywmj0UBirWTsQeRNhcc"} flags=[:slave_ok] limit=1 skip=0 fields={:_id=>1} (1.1671ms)
2353
+ MOPED: 127.0.0.1:27017 INSERT database=rails_uploader_test collection=mongoid_pictures documents=[{"_id"=>"522acfe6dc26e7e510000001", "guid"=>"guid", "assetable_type"=>"MongoidArticle", "public_token"=>"Yywmj0UBirWTsQeRNhcc"}] flags=[] (0.1330ms)
2354
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={"$query"=>{"guid"=>"guid", "assetable_type"=>"MongoidArticle"}, "$orderby"=>{:_id=>1}} flags=[:slave_ok] limit=-1 skip=0 fields=nil (3.0901ms)
2355
+ MOPED: 127.0.0.1:27017 COMMAND database=rails_uploader_test command={:count=>"mongoid_pictures", :query=>{}} (0.3383ms)
2356
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.3281ms)
2357
+ MOPED: 127.0.0.1:27017 DELETE database=rails_uploader_test collection=mongoid_pictures selector={"_id"=>"522acfe6dc26e7e510000001"} flags=[:remove_first] (0.1419ms)
2358
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={"public_token"=>"L4zXx6B2VBmykVC6UyRo"} flags=[:slave_ok] limit=1 skip=0 fields={:_id=>1} (0.4721ms)
2359
+ MOPED: 127.0.0.1:27017 INSERT database=rails_uploader_test collection=mongoid_pictures documents=[{"_id"=>"522acfe6dc26e7e510000002", "guid"=>"guid", "assetable_type"=>"MongoidArticle", "public_token"=>"L4zXx6B2VBmykVC6UyRo"}] flags=[] (0.1040ms)
2360
+ MOPED: 127.0.0.1:27017 UPDATE database=rails_uploader_test collection=mongoid_pictures selector={"guid"=>"guid", "assetable_type"=>"MongoidArticle"} update={"$set"=>{:assetable_id=>1000, :guid=>nil}} flags=[:multi] (0.1230ms)
2361
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={:_id=>"522acfe6dc26e7e510000002"} flags=[:slave_ok] limit=-1 skip=0 fields=nil (0.3037ms)
2362
+ MOPED: 127.0.0.1:27017 COMMAND database=rails_uploader_test command={:count=>"mongoid_pictures", :query=>{}} (0.2880ms)
2363
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.1962ms)
2364
+ MOPED: 127.0.0.1:27017 DELETE database=rails_uploader_test collection=mongoid_pictures selector={"_id"=>"522acfe6dc26e7e510000002"} flags=[:remove_first] (0.0849ms)
2365
+  (0.1ms) rollback transaction
2366
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.3910ms)
2367
+ MOPED: 127.0.0.1:27017 COMMAND database=rails_uploader_test command={:drop=>"mongoid_pictures"} (1.4899ms)
2368
+  (0.1ms) begin transaction
2369
+
2370
+
2371
+ Started POST "/uploader/attachments" for 127.0.0.1 at 2013-09-07 10:04:06 +0300
2372
+  (0.1ms) SAVEPOINT active_record_1
2373
+ Picture Exists (0.2ms) SELECT 1 AS one FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'C8Rq2EySL6P3SehTRxQK' LIMIT 1
2374
+ SQL (0.6ms) INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "public_token", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["data_content_type", nil], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", "SOMESTRING"], ["public_token", "C8Rq2EySL6P3SehTRxQK"], ["type", "Picture"], ["updated_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["user_id", nil]]
2375
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2376
+  (0.1ms) SAVEPOINT active_record_1
2377
+ SQL (0.6ms) INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "MyText"], ["created_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["title", "MyString"], ["updated_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00]]
2378
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2379
+  (0.0ms) SAVEPOINT active_record_1
2380
+ Picture Exists (0.1ms) SELECT 1 AS one FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'tqxRTWEpn4BqsxDlPfuj' LIMIT 1
2381
+ SQL (0.3ms) INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "public_token", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["data_content_type", "image/png"], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", nil], ["public_token", "tqxRTWEpn4BqsxDlPfuj"], ["type", "Picture"], ["updated_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["user_id", nil]]
2382
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2383
+  (0.2ms) SELECT COUNT(*) FROM "assets" WHERE "assets"."type" IN ('Picture')
2384
+
2385
+
2386
+ Started DELETE "/uploader/attachments/tqxRTWEpn4BqsxDlPfuj" for 127.0.0.1 at 2013-09-07 10:04:06 +0300
2387
+ Picture Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'tqxRTWEpn4BqsxDlPfuj' LIMIT 1
2388
+  (0.1ms) SAVEPOINT active_record_1
2389
+ SQL (0.2ms) DELETE FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? [["id", 2]]
2390
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2391
+  (0.2ms) SELECT COUNT(*) FROM "assets" WHERE "assets"."type" IN ('Picture')
2392
+  (0.1ms) SAVEPOINT active_record_1
2393
+ SQL (0.4ms) INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "MyText"], ["created_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["title", "MyString"], ["updated_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00]]
2394
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2395
+  (0.0ms) SAVEPOINT active_record_1
2396
+ Picture Exists (0.1ms) SELECT 1 AS one FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'Xb7PKB2LXSVBDec1O0IC' LIMIT 1
2397
+ SQL (0.2ms) INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "public_token", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 2], ["assetable_type", "Article"], ["created_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["data_content_type", "image/png"], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", nil], ["public_token", "Xb7PKB2LXSVBDec1O0IC"], ["type", "Picture"], ["updated_at", Sat, 07 Sep 2013 07:04:06 UTC +00:00], ["user_id", nil]]
2398
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2399
+
2400
+
2401
+ Started DELETE "/uploader/attachments/wrong" for 127.0.0.1 at 2013-09-07 10:04:06 +0300
2402
+ Picture Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'wrong' LIMIT 1
2403
+
2404
+
2405
+ Started POST "/uploader/attachments" for 127.0.0.1 at 2013-09-07 10:04:06 +0300
2406
+  (1.8ms) rollback transaction
2407
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.5581ms)
2408
+  (0.1ms) begin transaction
2409
+  (0.1ms) rollback transaction
2410
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.4041ms)
2411
+ Connecting to database specified by database.yml
2412
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
2413
+ Migrating to CreateAssets (20120508093416)
2414
+ Migrating to CreateArticles (20120508093830)
2415
+  (0.1ms) begin transaction
2416
+  (0.1ms) SAVEPOINT active_record_1
2417
+ SQL (2.8ms) INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "MyText"], ["created_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["title", "MyString"], ["updated_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00]]
2418
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2419
+  (0.1ms) SAVEPOINT active_record_1
2420
+ Picture Exists (0.2ms) SELECT 1 AS one FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = '5gWTuo6sPQw3jVnDHJoO' LIMIT 1
2421
+ SQL (0.6ms) INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "public_token", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["data_content_type", "image/png"], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", nil], ["public_token", "5gWTuo6sPQw3jVnDHJoO"], ["type", "Picture"], ["updated_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["user_id", nil]]
2422
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2423
+ Picture Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."guid" IS NULL AND "assets"."assetable_type" = 'Article' LIMIT 1
2424
+ SQL (0.2ms) UPDATE "assets" SET "assetable_id" = 1000, "guid" = NULL WHERE "assets"."type" IN ('Picture') AND "assets"."guid" IS NULL AND "assets"."assetable_type" = 'Article'
2425
+ Picture Load (0.1ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? LIMIT 1 [["id", 1]]
2426
+ Picture Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."guid" = 'u2IPtxEHxorm0YLjgmI9' AND "assets"."assetable_type" = 'Article' LIMIT 1
2427
+  (0.1ms) SAVEPOINT active_record_1
2428
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2429
+  (1.8ms) rollback transaction
2430
+ MOPED: 127.0.0.1:27017 COMMAND database=admin command={:ismaster=>1} (27.6401ms)
2431
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.4771ms)
2432
+  (0.1ms) begin transaction
2433
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={"public_token"=>"j0DvBMyDYUrK2HsbTAVY"} flags=[:slave_ok] limit=1 skip=0 fields={:_id=>1} (0.7830ms)
2434
+ MOPED: 127.0.0.1:27017 INSERT database=rails_uploader_test collection=mongoid_pictures documents=[{"_id"=>"522ad012dc26e74611000001", "guid"=>"guid", "assetable_type"=>"MongoidArticle", "public_token"=>"j0DvBMyDYUrK2HsbTAVY"}] flags=[] (0.1552ms)
2435
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={"$query"=>{"guid"=>"guid", "assetable_type"=>"MongoidArticle"}, "$orderby"=>{:_id=>1}} flags=[:slave_ok] limit=-1 skip=0 fields=nil (1.0440ms)
2436
+ MOPED: 127.0.0.1:27017 COMMAND database=rails_uploader_test command={:count=>"mongoid_pictures", :query=>{}} (0.2849ms)
2437
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.1972ms)
2438
+ MOPED: 127.0.0.1:27017 DELETE database=rails_uploader_test collection=mongoid_pictures selector={"_id"=>"522ad012dc26e74611000001"} flags=[:remove_first] (0.1140ms)
2439
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={"public_token"=>"IWWLVLVjHWTF8hEyeX03"} flags=[:slave_ok] limit=1 skip=0 fields={:_id=>1} (0.3612ms)
2440
+ MOPED: 127.0.0.1:27017 INSERT database=rails_uploader_test collection=mongoid_pictures documents=[{"_id"=>"522ad012dc26e74611000002", "guid"=>"guid", "assetable_type"=>"MongoidArticle", "public_token"=>"IWWLVLVjHWTF8hEyeX03"}] flags=[] (0.0908ms)
2441
+ MOPED: 127.0.0.1:27017 UPDATE database=rails_uploader_test collection=mongoid_pictures selector={"guid"=>"guid", "assetable_type"=>"MongoidArticle"} update={"$set"=>{:assetable_id=>1000, :guid=>nil}} flags=[:multi] (0.1318ms)
2442
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={:_id=>"522ad012dc26e74611000002"} flags=[:slave_ok] limit=-1 skip=0 fields=nil (0.2830ms)
2443
+ MOPED: 127.0.0.1:27017 COMMAND database=rails_uploader_test command={:count=>"mongoid_pictures", :query=>{}} (0.3629ms)
2444
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=mongoid_pictures selector={} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.2522ms)
2445
+ MOPED: 127.0.0.1:27017 DELETE database=rails_uploader_test collection=mongoid_pictures selector={"_id"=>"522ad012dc26e74611000002"} flags=[:remove_first] (0.1061ms)
2446
+  (0.1ms) rollback transaction
2447
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.5782ms)
2448
+ MOPED: 127.0.0.1:27017 COMMAND database=rails_uploader_test command={:drop=>"mongoid_pictures"} (1.0571ms)
2449
+  (0.1ms) begin transaction
2450
+
2451
+
2452
+ Started POST "/uploader/attachments" for 127.0.0.1 at 2013-09-07 10:04:50 +0300
2453
+  (0.1ms) SAVEPOINT active_record_1
2454
+ Picture Exists (0.2ms) SELECT 1 AS one FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'bPoLoZa2Ep7DKResUDxs' LIMIT 1
2455
+ SQL (0.5ms) INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "public_token", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["data_content_type", nil], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", "SOMESTRING"], ["public_token", "bPoLoZa2Ep7DKResUDxs"], ["type", "Picture"], ["updated_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["user_id", nil]]
2456
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2457
+  (0.1ms) SAVEPOINT active_record_1
2458
+ SQL (0.6ms) INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "MyText"], ["created_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["title", "MyString"], ["updated_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00]]
2459
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2460
+  (0.0ms) SAVEPOINT active_record_1
2461
+ Picture Exists (0.1ms) SELECT 1 AS one FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'Fpscree6yUIhzLooEerX' LIMIT 1
2462
+ SQL (0.3ms) INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "public_token", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["data_content_type", "image/png"], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", nil], ["public_token", "Fpscree6yUIhzLooEerX"], ["type", "Picture"], ["updated_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["user_id", nil]]
2463
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2464
+  (0.3ms) SELECT COUNT(*) FROM "assets" WHERE "assets"."type" IN ('Picture')
2465
+
2466
+
2467
+ Started DELETE "/uploader/attachments/Fpscree6yUIhzLooEerX" for 127.0.0.1 at 2013-09-07 10:04:50 +0300
2468
+ Picture Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'Fpscree6yUIhzLooEerX' LIMIT 1
2469
+  (0.0ms) SAVEPOINT active_record_1
2470
+ SQL (0.2ms) DELETE FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? [["id", 2]]
2471
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2472
+  (0.1ms) SELECT COUNT(*) FROM "assets" WHERE "assets"."type" IN ('Picture')
2473
+  (0.1ms) SAVEPOINT active_record_1
2474
+ SQL (0.4ms) INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "MyText"], ["created_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["title", "MyString"], ["updated_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00]]
2475
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2476
+  (0.0ms) SAVEPOINT active_record_1
2477
+ Picture Exists (0.1ms) SELECT 1 AS one FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 't8yacSJYFoJoU4xedqHd' LIMIT 1
2478
+ SQL (0.2ms) INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "public_token", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 2], ["assetable_type", "Article"], ["created_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["data_content_type", "image/png"], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", nil], ["public_token", "t8yacSJYFoJoU4xedqHd"], ["type", "Picture"], ["updated_at", Sat, 07 Sep 2013 07:04:50 UTC +00:00], ["user_id", nil]]
2479
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2480
+
2481
+
2482
+ Started DELETE "/uploader/attachments/wrong" for 127.0.0.1 at 2013-09-07 10:04:50 +0300
2483
+ Picture Load (0.1ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."public_token" = 'wrong' LIMIT 1
2484
+
2485
+
2486
+ Started POST "/uploader/attachments" for 127.0.0.1 at 2013-09-07 10:04:50 +0300
2487
+  (1.8ms) rollback transaction
2488
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.5462ms)
2489
+  (0.1ms) begin transaction
2490
+  (0.1ms) rollback transaction
2491
+ MOPED: 127.0.0.1:27017 QUERY database=rails_uploader_test collection=system.namespaces selector={:name=>{"$not"=>/system|\$/}} flags=[:slave_ok] limit=0 skip=0 fields=nil (0.3948ms)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-uploader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: