fogged 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +34 -0
- data/app/controllers/fogged/resources_controller.rb +259 -0
- data/app/jobs/fogged/resources/zencoder_poll_job.rb +39 -0
- data/app/models/fogged/resource.rb +153 -0
- data/app/models/fogged/resources/aws_encoder.rb +64 -0
- data/app/models/fogged/resources/encoder.rb +13 -0
- data/app/serializers/fogged/resource_serializer.rb +35 -0
- data/config/locales/en.yml +6 -0
- data/config/locales/fr.yml +6 -0
- data/config/routes.rb +4 -0
- data/db/migrate/20141103143408_create_fogged_resources.rb +20 -0
- data/lib/fogged.rb +46 -0
- data/lib/fogged/acts_as_having_many_resources.rb +30 -0
- data/lib/fogged/acts_as_having_one_resource.rb +34 -0
- data/lib/fogged/engine.rb +50 -0
- data/lib/fogged/version.rb +3 -0
- data/lib/tasks/fogged_tasks.rake +4 -0
- data/test/controllers/fogged/resources_controller/confirm_test.rb +56 -0
- data/test/controllers/fogged/resources_controller/create_test.rb +56 -0
- data/test/controllers/fogged/resources_controller/destroy_test.rb +29 -0
- data/test/controllers/fogged/resources_controller/show_test.rb +35 -0
- data/test/controllers/fogged/resources_controller/update_test.rb +31 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/images_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/image.rb +3 -0
- data/test/dummy/app/models/movie.rb +4 -0
- data/test/dummy/app/models/movie_fogged_resource.rb +4 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/delayed_job +5 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/fog.rb +1 -0
- data/test/dummy/config/initializers/fogged.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20141104135257_create_images.rb +10 -0
- data/test/dummy/db/migrate/20141104152227_create_movies.rb +9 -0
- data/test/dummy/db/migrate/20141104152345_create_movie_fogged_resources.rb +10 -0
- data/test/dummy/db/migrate/20141105073909_create_delayed_jobs.rb +22 -0
- data/test/dummy/db/schema.rb +72 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +234 -0
- data/test/dummy/log/test.log +20250 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/test/controllers/resources_controller/index_test.rb +56 -0
- data/test/dummy/test/models/image_test.rb +24 -0
- data/test/dummy/test/models/movie_test.rb +26 -0
- data/test/fixtures/fogged/resources.yml +31 -0
- data/test/fixtures/images.yml +5 -0
- data/test/fixtures/movie_fogged_resources.yml +19 -0
- data/test/fixtures/movies.yml +8 -0
- data/test/fogged_test.rb +7 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/jobs/fogged/resources/zencoder_poll_job_test.rb +92 -0
- data/test/models/fogged/resource_test.rb +97 -0
- data/test/models/fogged/resources/aws_encoder_test.rb +54 -0
- data/test/models/fogged/resources/encoder_test.rb +18 -0
- data/test/support/concerns/json_test_helper.rb +43 -0
- data/test/support/concerns/resource_test_helper.rb +28 -0
- data/test/test_helper.rb +59 -0
- metadata +354 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
|
5
|
+
|
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Fog.mock! if Rails.env.test?
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
|
4
|
+
# are locale specific, and you may define rules for as many different
|
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
|
9
|
+
# inflect.irregular 'person', 'people'
|
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
|
11
|
+
# end
|
|
12
|
+
|
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
|
15
|
+
# inflect.acronym 'RESTful'
|
|
16
|
+
# end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
|
4
|
+
# is enabled by default.
|
|
5
|
+
|
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
|
13
|
+
# self.include_root_in_json = true
|
|
14
|
+
# end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
|
3
|
+
# than English, add the necessary files in this directory.
|
|
4
|
+
#
|
|
5
|
+
# To use the locales, use `I18n.t`:
|
|
6
|
+
#
|
|
7
|
+
# I18n.t 'hello'
|
|
8
|
+
#
|
|
9
|
+
# In views, this is aliased to just `t`:
|
|
10
|
+
#
|
|
11
|
+
# <%= t('hello') %>
|
|
12
|
+
#
|
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
|
14
|
+
#
|
|
15
|
+
# I18n.locale = :es
|
|
16
|
+
#
|
|
17
|
+
# This would use the information in config/locales/es.yml.
|
|
18
|
+
#
|
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
|
21
|
+
|
|
22
|
+
en:
|
|
23
|
+
hello: "Hello world"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
|
5
|
+
|
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
|
9
|
+
|
|
10
|
+
# Make sure the secrets in this file are kept private
|
|
11
|
+
# if you're sharing your code publicly.
|
|
12
|
+
|
|
13
|
+
development:
|
|
14
|
+
secret_key_base: 6016094e04da7cef5e41d124c499f48d99b82c7527067e36e753905341436f2cfc8664432c8ea6b46112f0aed0f7d05d6a015c9e3b7b044668fd6fdcb09e0afc
|
|
15
|
+
|
|
16
|
+
test:
|
|
17
|
+
secret_key_base: 9c06d17bed17e2462d3c32b043f474975475c36c31529783430bbf1849c42747e00b8e8ef7464f941b60176014bd26d3860b929089108989e8155814b2547158
|
|
18
|
+
|
|
19
|
+
# Do not keep production secrets in the repository,
|
|
20
|
+
# instead read values from the environment.
|
|
21
|
+
production:
|
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
class CreateDelayedJobs < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
create_table :delayed_jobs, :force => true do |table|
|
|
4
|
+
table.integer :priority, :default => 0, :null => false # Allows some jobs to jump to the front of the queue
|
|
5
|
+
table.integer :attempts, :default => 0, :null => false # Provides for retries, but still fail eventually.
|
|
6
|
+
table.text :handler, :null => false # YAML-encoded string of the object that will do work
|
|
7
|
+
table.text :last_error # reason for last failure (See Note below)
|
|
8
|
+
table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
|
|
9
|
+
table.datetime :locked_at # Set when a client is working on this object
|
|
10
|
+
table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
|
|
11
|
+
table.string :locked_by # Who is working on this object (if locked)
|
|
12
|
+
table.string :queue # The name of the queue this job is in
|
|
13
|
+
table.timestamps
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def self.down
|
|
20
|
+
drop_table :delayed_jobs
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
5
|
+
#
|
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
|
7
|
+
# database schema. If you need to create the application database on another
|
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
|
+
#
|
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
13
|
+
|
|
14
|
+
ActiveRecord::Schema.define(version: 20141105073909) do
|
|
15
|
+
|
|
16
|
+
create_table "delayed_jobs", force: true do |t|
|
|
17
|
+
t.integer "priority", default: 0, null: false
|
|
18
|
+
t.integer "attempts", default: 0, null: false
|
|
19
|
+
t.text "handler", null: false
|
|
20
|
+
t.text "last_error"
|
|
21
|
+
t.datetime "run_at"
|
|
22
|
+
t.datetime "locked_at"
|
|
23
|
+
t.datetime "failed_at"
|
|
24
|
+
t.string "locked_by"
|
|
25
|
+
t.string "queue"
|
|
26
|
+
t.datetime "created_at"
|
|
27
|
+
t.datetime "updated_at"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority"
|
|
31
|
+
|
|
32
|
+
create_table "fogged_resources", force: true do |t|
|
|
33
|
+
t.string "name", null: false
|
|
34
|
+
t.string "token", null: false
|
|
35
|
+
t.integer "width"
|
|
36
|
+
t.integer "height"
|
|
37
|
+
t.string "extension", null: false
|
|
38
|
+
t.boolean "uploading"
|
|
39
|
+
t.string "content_type", null: false
|
|
40
|
+
t.integer "encoding_progress"
|
|
41
|
+
t.string "encoding_job_id"
|
|
42
|
+
t.integer "duration"
|
|
43
|
+
t.datetime "created_at"
|
|
44
|
+
t.datetime "updated_at"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
add_index "fogged_resources", ["token"], name: "index_fogged_resources_on_token"
|
|
48
|
+
|
|
49
|
+
create_table "images", force: true do |t|
|
|
50
|
+
t.string "name"
|
|
51
|
+
t.integer "resource_id"
|
|
52
|
+
t.datetime "created_at"
|
|
53
|
+
t.datetime "updated_at"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
create_table "movie_fogged_resources", force: true do |t|
|
|
57
|
+
t.integer "movie_id"
|
|
58
|
+
t.integer "resource_id"
|
|
59
|
+
t.datetime "created_at"
|
|
60
|
+
t.datetime "updated_at"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
add_index "movie_fogged_resources", ["movie_id"], name: "index_movie_fogged_resources_on_movie_id"
|
|
64
|
+
add_index "movie_fogged_resources", ["resource_id"], name: "index_movie_fogged_resources_on_resource_id"
|
|
65
|
+
|
|
66
|
+
create_table "movies", force: true do |t|
|
|
67
|
+
t.string "name"
|
|
68
|
+
t.datetime "created_at"
|
|
69
|
+
t.datetime "updated_at"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
|
3
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
5
|
+
Migrating to CreateFoggedResources (20141103143408)
|
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
7
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)
|
|
8
|
+
[1m[36m (0.3ms)[0m [1mCREATE INDEX "index_resources_on_token" ON "resources" ("token")[0m
|
|
9
|
+
SQLite3::SQLException: no such table: main.resources: CREATE INDEX "index_resources_on_token" ON "resources" ("token")
|
|
10
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
|
11
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
12
|
+
Migrating to CreateFoggedResources (20141103143408)
|
|
13
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
14
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime) [0m
|
|
15
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
|
16
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_resources_on_token" ON "resources" ("token")[0m
|
|
17
|
+
SQLite3::SQLException: no such table: main.resources: CREATE INDEX "index_resources_on_token" ON "resources" ("token")
|
|
18
|
+
[1m[35m (4.6ms)[0m rollback transaction
|
|
19
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
20
|
+
Migrating to CreateFoggedResources (20141103143408)
|
|
21
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
22
|
+
[1m[36m (0.5ms)[0m [1mCREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime) [0m
|
|
23
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
|
24
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")[0m
|
|
25
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141103143408"]]
|
|
26
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
|
27
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
28
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
|
29
|
+
FROM sqlite_master
|
|
30
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
31
|
+
UNION ALL
|
|
32
|
+
SELECT sql
|
|
33
|
+
FROM sqlite_temp_master
|
|
34
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
35
|
+
[0m
|
|
36
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
37
|
+
Migrating to CreateDelayedJobs (20141104083706)
|
|
38
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
39
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
|
40
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
|
41
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")[0m
|
|
42
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104083706"]]
|
|
43
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
|
44
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
45
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
46
|
+
FROM sqlite_master
|
|
47
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
48
|
+
UNION ALL
|
|
49
|
+
SELECT sql
|
|
50
|
+
FROM sqlite_temp_master
|
|
51
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
52
|
+
[0m
|
|
53
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
54
|
+
FROM sqlite_master
|
|
55
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
56
|
+
UNION ALL
|
|
57
|
+
SELECT sql
|
|
58
|
+
FROM sqlite_temp_master
|
|
59
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
60
|
+
|
|
61
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
62
|
+
Migrating to CreateImages (20141104135257)
|
|
63
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
64
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
|
65
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]
|
|
66
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
|
67
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
68
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
69
|
+
FROM sqlite_master
|
|
70
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
71
|
+
UNION ALL
|
|
72
|
+
SELECT sql
|
|
73
|
+
FROM sqlite_temp_master
|
|
74
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
75
|
+
[0m
|
|
76
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
77
|
+
FROM sqlite_master
|
|
78
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
79
|
+
UNION ALL
|
|
80
|
+
SELECT sql
|
|
81
|
+
FROM sqlite_temp_master
|
|
82
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
83
|
+
|
|
84
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
85
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
86
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
87
|
+
FROM sqlite_master
|
|
88
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
89
|
+
UNION ALL
|
|
90
|
+
SELECT sql
|
|
91
|
+
FROM sqlite_temp_master
|
|
92
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
93
|
+
[0m
|
|
94
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
95
|
+
FROM sqlite_master
|
|
96
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
97
|
+
UNION ALL
|
|
98
|
+
SELECT sql
|
|
99
|
+
FROM sqlite_temp_master
|
|
100
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
101
|
+
|
|
102
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
103
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
104
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
105
|
+
FROM sqlite_master
|
|
106
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
107
|
+
UNION ALL
|
|
108
|
+
SELECT sql
|
|
109
|
+
FROM sqlite_temp_master
|
|
110
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
111
|
+
[0m
|
|
112
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
113
|
+
FROM sqlite_master
|
|
114
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
115
|
+
UNION ALL
|
|
116
|
+
SELECT sql
|
|
117
|
+
FROM sqlite_temp_master
|
|
118
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
119
|
+
|
|
120
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
121
|
+
Migrating to CreateFoggedResources (20141104144134)
|
|
122
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
123
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime) [0m
|
|
124
|
+
SQLite3::SQLException: table "fogged_resources" already exists: CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)
|
|
125
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
126
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
127
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
128
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
|
129
|
+
FROM sqlite_master
|
|
130
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
131
|
+
UNION ALL
|
|
132
|
+
SELECT sql
|
|
133
|
+
FROM sqlite_temp_master
|
|
134
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
135
|
+
[0m
|
|
136
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
137
|
+
FROM sqlite_master
|
|
138
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
139
|
+
UNION ALL
|
|
140
|
+
SELECT sql
|
|
141
|
+
FROM sqlite_temp_master
|
|
142
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
143
|
+
|
|
144
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
145
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
146
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
147
|
+
FROM sqlite_master
|
|
148
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
149
|
+
UNION ALL
|
|
150
|
+
SELECT sql
|
|
151
|
+
FROM sqlite_temp_master
|
|
152
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
153
|
+
[0m
|
|
154
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
155
|
+
FROM sqlite_master
|
|
156
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
157
|
+
UNION ALL
|
|
158
|
+
SELECT sql
|
|
159
|
+
FROM sqlite_temp_master
|
|
160
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
161
|
+
|
|
162
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
163
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
164
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
|
165
|
+
FROM sqlite_master
|
|
166
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
167
|
+
UNION ALL
|
|
168
|
+
SELECT sql
|
|
169
|
+
FROM sqlite_temp_master
|
|
170
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
171
|
+
[0m
|
|
172
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
173
|
+
FROM sqlite_master
|
|
174
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
175
|
+
UNION ALL
|
|
176
|
+
SELECT sql
|
|
177
|
+
FROM sqlite_temp_master
|
|
178
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
179
|
+
|
|
180
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
181
|
+
Migrating to CreateMovies (20141104152227)
|
|
182
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
183
|
+
[1m[36m (0.5ms)[0m [1mCREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
|
184
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]
|
|
185
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
|
186
|
+
Migrating to CreateMovieResources (20141104152345)
|
|
187
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
188
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "movie_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "fogged_resource_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
|
189
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
|
190
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_movie_resources_on_movie_id" ON "movie_resources" ("movie_id")[0m
|
|
191
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
192
|
+
FROM sqlite_master
|
|
193
|
+
WHERE name='index_movie_resources_on_movie_id' AND type='index'
|
|
194
|
+
UNION ALL
|
|
195
|
+
SELECT sql
|
|
196
|
+
FROM sqlite_temp_master
|
|
197
|
+
WHERE name='index_movie_resources_on_movie_id' AND type='index'
|
|
198
|
+
|
|
199
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_movie_resources_on_fogged_resource_id" ON "movie_resources" ("fogged_resource_id")[0m
|
|
200
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]
|
|
201
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
|
202
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
203
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
|
204
|
+
FROM sqlite_master
|
|
205
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
206
|
+
UNION ALL
|
|
207
|
+
SELECT sql
|
|
208
|
+
FROM sqlite_temp_master
|
|
209
|
+
WHERE name='delayed_jobs_priority' AND type='index'
|
|
210
|
+
[0m
|
|
211
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
212
|
+
FROM sqlite_master
|
|
213
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
214
|
+
UNION ALL
|
|
215
|
+
SELECT sql
|
|
216
|
+
FROM sqlite_temp_master
|
|
217
|
+
WHERE name='index_fogged_resources_on_token' AND type='index'
|
|
218
|
+
|
|
219
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
220
|
+
FROM sqlite_master
|
|
221
|
+
WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index'
|
|
222
|
+
UNION ALL
|
|
223
|
+
SELECT sql
|
|
224
|
+
FROM sqlite_temp_master
|
|
225
|
+
WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index'
|
|
226
|
+
[0m
|
|
227
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
228
|
+
FROM sqlite_master
|
|
229
|
+
WHERE name='index_movie_resources_on_movie_id' AND type='index'
|
|
230
|
+
UNION ALL
|
|
231
|
+
SELECT sql
|
|
232
|
+
FROM sqlite_temp_master
|
|
233
|
+
WHERE name='index_movie_resources_on_movie_id' AND type='index'
|
|
234
|
+
|