zencodable 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/zencodable.rb CHANGED
@@ -120,10 +120,10 @@ module Zencodable
120
120
 
121
121
  attr_accessor :id
122
122
 
123
- attr_accessor :mock_all_requests
124
-
125
123
  class << self
126
124
 
125
+ attr_accessor :mock_all_requests
126
+
127
127
  def create(origin, encoder_definitions)
128
128
  response = super(:input => origin,
129
129
  :outputs => build_encoder_output_options(origin, encoder_definitions))
@@ -1,3 +1,3 @@
1
1
  module Zencodable
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/test/debug.log CHANGED
@@ -3392,3 +3392,191 @@ Unfinished job found. Updating details.
3392
3392
   (0.0ms) SAVEPOINT active_record_1
3393
3393
   (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-02 18:00:00.146796' WHERE "videos"."id" = 1
3394
3394
   (0.1ms) RELEASE SAVEPOINT active_record_1
3395
+  (0.1ms) SAVEPOINT active_record_1
3396
+ SQL (21.0ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
3397
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3398
+  (0.1ms) SAVEPOINT active_record_1
3399
+ Origin URL changed. Creating new ZenCoder job.
3400
+ ZenCoder job created, ID = 123
3401
+  (0.3ms) UPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-07 21:38:49.026006', "updated_at" = '2011-12-07 21:38:49.026302' WHERE "videos"."id" = 1
3402
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3403
+  (0.1ms) SAVEPOINT active_record_1
3404
+ SQL (0.8ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
3405
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3406
+  (0.0ms) SAVEPOINT active_record_1
3407
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
3408
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3409
+  (0.1ms) SAVEPOINT active_record_1
3410
+ SQL (0.8ms) INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
3411
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3412
+ VideoFile Load (0.3ms) SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
3413
+  (0.1ms) SAVEPOINT active_record_1
3414
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
3415
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3416
+ Unfinished job found. Updating details.
3417
+  (0.1ms) SAVEPOINT active_record_1
3418
+  (0.3ms) UPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-07 21:38:49.241688' WHERE "videos"."id" = 1
3419
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3420
+  (0.1ms) SAVEPOINT active_record_1
3421
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
3422
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3423
+ Unfinished job found. Updating details.
3424
+ VideoFile Load (0.2ms) SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
3425
+  (0.1ms) SAVEPOINT active_record_1
3426
+ SQL (1.3ms) INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
3427
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3428
+  (0.0ms) SAVEPOINT active_record_1
3429
+  (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-07 21:38:49.253909' WHERE "videos"."id" = 1
3430
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3431
+  (0.1ms) SAVEPOINT active_record_1
3432
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
3433
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3434
+ Unfinished job found. Updating details.
3435
+ VideoFileThumbnail Load (0.2ms) SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
3436
+  (0.1ms) SAVEPOINT active_record_1
3437
+ SQL (0.9ms) INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Wed, 07 Dec 2011 21:38:49 UTC +00:00], ["video_id", 1]]
3438
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3439
+  (0.0ms) SAVEPOINT active_record_1
3440
+  (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-07 21:38:49.278664' WHERE "videos"."id" = 1
3441
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3442
+  (0.1ms) SAVEPOINT active_record_1
3443
+ SQL (21.0ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
3444
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3445
+  (0.1ms) SAVEPOINT active_record_1
3446
+ Origin URL changed. Creating new ZenCoder job.
3447
+ ZenCoder job created, ID = 123
3448
+  (0.3ms) UPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-07 21:39:37.559577', "updated_at" = '2011-12-07 21:39:37.559883' WHERE "videos"."id" = 1
3449
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3450
+  (0.1ms) SAVEPOINT active_record_1
3451
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
3452
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3453
+  (0.0ms) SAVEPOINT active_record_1
3454
+ SQL (1.0ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
3455
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3456
+  (0.1ms) SAVEPOINT active_record_1
3457
+ SQL (0.8ms) INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
3458
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3459
+ VideoFile Load (0.3ms) SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
3460
+  (0.1ms) SAVEPOINT active_record_1
3461
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
3462
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3463
+ Unfinished job found. Updating details.
3464
+  (0.1ms) SAVEPOINT active_record_1
3465
+  (0.3ms) UPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-07 21:39:37.776036' WHERE "videos"."id" = 1
3466
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3467
+  (0.1ms) SAVEPOINT active_record_1
3468
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
3469
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3470
+ Unfinished job found. Updating details.
3471
+ VideoFile Load (0.2ms) SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
3472
+  (0.1ms) SAVEPOINT active_record_1
3473
+ SQL (1.3ms) INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
3474
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3475
+  (0.0ms) SAVEPOINT active_record_1
3476
+  (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-07 21:39:37.788306' WHERE "videos"."id" = 1
3477
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3478
+  (0.1ms) SAVEPOINT active_record_1
3479
+ SQL (0.8ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
3480
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3481
+ Unfinished job found. Updating details.
3482
+ VideoFileThumbnail Load (0.2ms) SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
3483
+  (0.1ms) SAVEPOINT active_record_1
3484
+ SQL (0.9ms) INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Wed, 07 Dec 2011 21:39:37 UTC +00:00], ["video_id", 1]]
3485
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3486
+  (0.0ms) SAVEPOINT active_record_1
3487
+  (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-07 21:39:37.813141' WHERE "videos"."id" = 1
3488
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3489
+  (0.1ms) SAVEPOINT active_record_1
3490
+ SQL (21.1ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
3491
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3492
+  (0.1ms) SAVEPOINT active_record_1
3493
+ Origin URL changed. Creating new ZenCoder job.
3494
+ ZenCoder job created, ID = 123
3495
+  (0.3ms) UPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-07 21:39:52.207936', "updated_at" = '2011-12-07 21:39:52.208237' WHERE "videos"."id" = 1
3496
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3497
+  (0.1ms) SAVEPOINT active_record_1
3498
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
3499
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3500
+  (0.0ms) SAVEPOINT active_record_1
3501
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
3502
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3503
+  (0.1ms) SAVEPOINT active_record_1
3504
+ SQL (0.8ms) INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
3505
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3506
+ VideoFile Load (0.3ms) SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
3507
+  (0.1ms) SAVEPOINT active_record_1
3508
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
3509
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3510
+ Unfinished job found. Updating details.
3511
+  (0.1ms) SAVEPOINT active_record_1
3512
+  (0.3ms) UPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-07 21:39:52.423989' WHERE "videos"."id" = 1
3513
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3514
+  (0.1ms) SAVEPOINT active_record_1
3515
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
3516
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3517
+ Unfinished job found. Updating details.
3518
+ VideoFile Load (0.2ms) SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
3519
+  (0.1ms) SAVEPOINT active_record_1
3520
+ SQL (1.3ms) INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
3521
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3522
+  (0.0ms) SAVEPOINT active_record_1
3523
+  (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-07 21:39:52.436314' WHERE "videos"."id" = 1
3524
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3525
+  (0.1ms) SAVEPOINT active_record_1
3526
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
3527
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3528
+ Unfinished job found. Updating details.
3529
+ VideoFileThumbnail Load (0.2ms) SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
3530
+  (0.1ms) SAVEPOINT active_record_1
3531
+ SQL (0.9ms) INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Wed, 07 Dec 2011 21:39:52 UTC +00:00], ["video_id", 1]]
3532
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3533
+  (0.0ms) SAVEPOINT active_record_1
3534
+  (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-07 21:39:52.460965' WHERE "videos"."id" = 1
3535
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3536
+  (0.1ms) SAVEPOINT active_record_1
3537
+ SQL (20.8ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
3538
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3539
+  (0.1ms) SAVEPOINT active_record_1
3540
+ Origin URL changed. Creating new ZenCoder job.
3541
+ ZenCoder job created, ID = 123
3542
+  (0.3ms) UPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-07 21:40:12.191865', "updated_at" = '2011-12-07 21:40:12.192159' WHERE "videos"."id" = 1
3543
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3544
+  (0.1ms) SAVEPOINT active_record_1
3545
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
3546
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3547
+  (0.0ms) SAVEPOINT active_record_1
3548
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
3549
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3550
+  (0.1ms) SAVEPOINT active_record_1
3551
+ SQL (0.8ms) INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
3552
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3553
+ VideoFile Load (0.3ms) SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
3554
+  (0.1ms) SAVEPOINT active_record_1
3555
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
3556
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3557
+ Unfinished job found. Updating details.
3558
+  (0.1ms) SAVEPOINT active_record_1
3559
+  (0.3ms) UPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-07 21:40:12.406584' WHERE "videos"."id" = 1
3560
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3561
+  (0.1ms) SAVEPOINT active_record_1
3562
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
3563
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3564
+ Unfinished job found. Updating details.
3565
+ VideoFile Load (0.2ms) SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
3566
+  (0.1ms) SAVEPOINT active_record_1
3567
+ SQL (1.3ms) INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
3568
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3569
+  (0.0ms) SAVEPOINT active_record_1
3570
+  (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-07 21:40:12.418829' WHERE "videos"."id" = 1
3571
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3572
+  (0.1ms) SAVEPOINT active_record_1
3573
+ SQL (0.9ms) INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
3574
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3575
+ Unfinished job found. Updating details.
3576
+ VideoFileThumbnail Load (0.2ms) SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
3577
+  (0.1ms) SAVEPOINT active_record_1
3578
+ SQL (0.9ms) INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Wed, 07 Dec 2011 21:40:12 UTC +00:00], ["video_id", 1]]
3579
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3580
+  (0.0ms) SAVEPOINT active_record_1
3581
+  (0.2ms) UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-07 21:40:12.443698' WHERE "videos"."id" = 1
3582
+  (0.1ms) RELEASE SAVEPOINT active_record_1
@@ -68,6 +68,7 @@ class ZencodableTest < ActiveSupport::TestCase
68
68
  :public => true,
69
69
  :format => "mp4",
70
70
  :label => "mp4",
71
+ :mock => true,
71
72
  :base_url => "s3://zenbucket.s3.amazonaws.com/videos/encoded/"
72
73
  }]
73
74
 
metadata CHANGED
@@ -1,132 +1,104 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: zencodable
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 5
10
- version: 0.1.5
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Sam Beam
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-12-07 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2011-12-07 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rails
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &19078580 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 3
31
- - 1
32
- - 0
20
+ - !ruby/object:Gem::Version
33
21
  version: 3.1.0
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: aws-s3
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *19078580
25
+ - !ruby/object:Gem::Dependency
26
+ name: aws-s3
27
+ requirement: &19077880 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
48
33
  type: :runtime
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: zencoder
52
34
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *19077880
36
+ - !ruby/object:Gem::Dependency
37
+ name: zencoder
38
+ requirement: &19077140 !ruby/object:Gem::Requirement
54
39
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
62
44
  type: :runtime
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: typhoeus
66
45
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *19077140
47
+ - !ruby/object:Gem::Dependency
48
+ name: typhoeus
49
+ requirement: &19076380 !ruby/object:Gem::Requirement
68
50
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
76
55
  type: :runtime
77
- version_requirements: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: sqlite3
80
56
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *19076380
58
+ - !ruby/object:Gem::Dependency
59
+ name: sqlite3
60
+ requirement: &19075920 !ruby/object:Gem::Requirement
82
61
  none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
90
66
  type: :development
91
- version_requirements: *id005
92
- - !ruby/object:Gem::Dependency
93
- name: mocha
94
67
  prerelease: false
95
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *19075920
69
+ - !ruby/object:Gem::Dependency
70
+ name: mocha
71
+ requirement: &19075340 !ruby/object:Gem::Requirement
96
72
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
104
77
  type: :development
105
- version_requirements: *id006
106
- - !ruby/object:Gem::Dependency
107
- name: factory_girl
108
78
  prerelease: false
109
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *19075340
80
+ - !ruby/object:Gem::Dependency
81
+ name: factory_girl
82
+ requirement: &19074800 !ruby/object:Gem::Requirement
110
83
  none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
118
88
  type: :development
119
- version_requirements: *id007
120
- description: provides a `has_video_encodings` class method to your models that allows you to configure and set up any Zencoder settings you will need to create multiple output video container formats (mp4, ogg, wmv, etc) from a single uploaded source file. Uses the Zencoder API (zencoder.com) and (as of now) expects you to have an S3 bucket where we can ask zencoder to place the generated files.
121
- email:
89
+ prerelease: false
90
+ version_requirements: *19074800
91
+ description: provides a `has_video_encodings` class method to your models that allows
92
+ you to configure and set up any Zencoder settings you will need to create multiple
93
+ output video container formats (mp4, ogg, wmv, etc) from a single uploaded source
94
+ file. Uses the Zencoder API (zencoder.com) and (as of now) expects you to have
95
+ an S3 bucket where we can ask zencoder to place the generated files.
96
+ email:
122
97
  - sbeam@onsetcorps.net
123
98
  executables: []
124
-
125
99
  extensions: []
126
-
127
100
  extra_rdoc_files: []
128
-
129
- files:
101
+ files:
130
102
  - lib/zencodable/version.rb
131
103
  - lib/zencodable.rb
132
104
  - lib/generators/zencodable/templates/zencodable_add_tracking_columns_and_tables.rb
@@ -183,38 +155,29 @@ files:
183
155
  - test/zencodable_test.rb
184
156
  homepage: https://github.com/sbeam/zencodable
185
157
  licenses: []
186
-
187
158
  post_install_message:
188
159
  rdoc_options: []
189
-
190
- require_paths:
160
+ require_paths:
191
161
  - lib
192
- required_ruby_version: !ruby/object:Gem::Requirement
162
+ required_ruby_version: !ruby/object:Gem::Requirement
193
163
  none: false
194
- requirements:
195
- - - ">="
196
- - !ruby/object:Gem::Version
197
- hash: 3
198
- segments:
199
- - 0
200
- version: "0"
201
- required_rubygems_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ required_rubygems_version: !ruby/object:Gem::Requirement
202
169
  none: false
203
- requirements:
204
- - - ">="
205
- - !ruby/object:Gem::Version
206
- hash: 3
207
- segments:
208
- - 0
209
- version: "0"
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
210
174
  requirements: []
211
-
212
175
  rubyforge_project:
213
- rubygems_version: 1.7.2
176
+ rubygems_version: 1.8.10
214
177
  signing_key:
215
178
  specification_version: 3
216
179
  summary: mindful multiformat video encoding for AR models with Zencoder API
217
- test_files:
180
+ test_files:
218
181
  - test/zencodable_generators_test.rb
219
182
  - test/factories.rb
220
183
  - test/debug.log