domain_neutral 1.0.0
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 +37 -0
- data/app/models/domain_neutral/descriptor.rb +55 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20160531124022_create_domain_neutral_descriptors.rb +20 -0
- data/lib/domain_neutral/association.rb +21 -0
- data/lib/domain_neutral/engine.rb +5 -0
- data/lib/domain_neutral/railtie.rb +24 -0
- data/lib/domain_neutral/seed.rb +8 -0
- data/lib/domain_neutral/seeder/descriptors.rb +195 -0
- data/lib/domain_neutral/symbolized_class.rb +170 -0
- data/lib/domain_neutral/version.rb +3 -0
- data/lib/domain_neutral.rb +18 -0
- data/lib/tasks/domain_neutral_tasks.rake +10 -0
- data/test/domain_neutral/symbolized_class_test.rb +162 -0
- data/test/domain_neutral_test.rb +7 -0
- data/test/dummy/README.rdoc +28 -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/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/role.rb +2 -0
- data/test/dummy/app/models/user.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +13 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config/application.rb +33 -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 +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +44 -0
- data/test/dummy/config/initializers/assets.rb +11 -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/domain_neutral.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -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 +13 -0
- data/test/dummy/config/locales/nb.yml +9 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20160601072742_create_domain_neutral_descriptors.domain_neutral.rb +21 -0
- data/test/dummy/db/migrate/20160607100350_create_users.rb +10 -0
- data/test/dummy/db/schema.rb +42 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +350 -0
- data/test/dummy/log/test.log +5133 -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/tmp/cache/36E/B10/Role%2Fmap +1 -0
- data/test/dummy/tmp/cache/657/A10/Role%2Fuser_admin +1 -0
- data/test/fixtures/domain_neutral/descriptors.yml +14 -0
- data/test/fixtures/users.yml +9 -0
- data/test/integration/navigation_test.rb +8 -0
- data/test/models/domain_neutral/descriptor_test.rb +111 -0
- data/test/test_helper.rb +22 -0
- data/test/test_helpers/caching.rb +57 -0
- metadata +198 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
+
# See how all your routes lay out with "rake routes".
|
4
|
+
|
5
|
+
# You can have the root of your site routed with "root"
|
6
|
+
# root 'welcome#index'
|
7
|
+
|
8
|
+
# Example of regular route:
|
9
|
+
# get 'products/:id' => 'catalog#view'
|
10
|
+
|
11
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
12
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
13
|
+
|
14
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
15
|
+
# resources :products
|
16
|
+
|
17
|
+
# Example resource route with options:
|
18
|
+
# resources :products do
|
19
|
+
# member do
|
20
|
+
# get 'short'
|
21
|
+
# post 'toggle'
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# collection do
|
25
|
+
# get 'sold'
|
26
|
+
# end
|
27
|
+
# end
|
28
|
+
|
29
|
+
# Example resource route with sub-resources:
|
30
|
+
# resources :products do
|
31
|
+
# resources :comments, :sales
|
32
|
+
# resource :seller
|
33
|
+
# end
|
34
|
+
|
35
|
+
# Example resource route with more complex sub-resources:
|
36
|
+
# resources :products do
|
37
|
+
# resources :comments
|
38
|
+
# resources :sales do
|
39
|
+
# get 'recent', on: :collection
|
40
|
+
# end
|
41
|
+
# end
|
42
|
+
|
43
|
+
# Example resource route with concerns:
|
44
|
+
# concern :toggleable do
|
45
|
+
# post 'toggle'
|
46
|
+
# end
|
47
|
+
# resources :posts, concerns: :toggleable
|
48
|
+
# resources :photos, concerns: :toggleable
|
49
|
+
|
50
|
+
# Example resource route within a namespace:
|
51
|
+
# namespace :admin do
|
52
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
53
|
+
# # (app/controllers/admin/products_controller.rb)
|
54
|
+
# resources :products
|
55
|
+
# end
|
56
|
+
end
|
@@ -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: 3b22d5a8ae612cea441a3d308760e7638874bd94fd633c96f23fcdb9dad9ec82db9c01f1b6915ca03bb27b80e68220de4d8fedc6622365f68559e26639cb5b5a
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 778e43fd428f19a25cf9f63ab59412f1b72cf7874877034422a2b1f2f6dba46546a20205c798ec23675cdfef29722b33987c25baa9e66b2941d85dd95b04ec3e
|
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,21 @@
|
|
1
|
+
# This migration comes from domain_neutral (originally 20160531124022)
|
2
|
+
class CreateDomainNeutralDescriptors < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
table_name = DomainNeutral::Descriptor.table_name
|
5
|
+
create_table table_name, :force => true do |t|
|
6
|
+
t.string "type"
|
7
|
+
t.string "parent_type"
|
8
|
+
t.integer "parent_id"
|
9
|
+
t.string "symbol"
|
10
|
+
t.string "name"
|
11
|
+
t.text "description"
|
12
|
+
t.integer "index"
|
13
|
+
t.integer "value"
|
14
|
+
t.timestamps null: false
|
15
|
+
end
|
16
|
+
|
17
|
+
add_index table_name, ["type", "symbol"], name: "index_#{table_name}_on_type_and_symbol"
|
18
|
+
add_index table_name, ["type", "index"], name: "index_#{table_name}_on_type_and_index"
|
19
|
+
add_index table_name, ["parent_type", "parent_id"], name: "index_#{table_name}_on_parent_type_and_parent_id"
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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: 20160607100350) do
|
15
|
+
|
16
|
+
create_table "descriptors", force: :cascade do |t|
|
17
|
+
t.string "type"
|
18
|
+
t.string "parent_type"
|
19
|
+
t.integer "parent_id"
|
20
|
+
t.string "symbol"
|
21
|
+
t.string "name"
|
22
|
+
t.text "description"
|
23
|
+
t.integer "index"
|
24
|
+
t.integer "value"
|
25
|
+
t.datetime "created_at", null: false
|
26
|
+
t.datetime "updated_at", null: false
|
27
|
+
end
|
28
|
+
|
29
|
+
add_index "descriptors", ["parent_type", "parent_id"], name: "index_descriptors_on_parent_type_and_parent_id"
|
30
|
+
add_index "descriptors", ["type", "index"], name: "index_descriptors_on_type_and_index"
|
31
|
+
add_index "descriptors", ["type", "symbol"], name: "index_descriptors_on_type_and_symbol"
|
32
|
+
|
33
|
+
create_table "users", force: :cascade do |t|
|
34
|
+
t.string "name"
|
35
|
+
t.integer "role_id"
|
36
|
+
t.datetime "created_at", null: false
|
37
|
+
t.datetime "updated_at", null: false
|
38
|
+
end
|
39
|
+
|
40
|
+
add_index "users", ["role_id"], name: "index_users_on_role_id"
|
41
|
+
|
42
|
+
end
|
Binary file
|
@@ -0,0 +1,350 @@
|
|
1
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (0.8ms)[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
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6
|
+
Migrating to CreateDomainNeutralDescriptors (20160531132104)
|
7
|
+
[1m[35m (0.0ms)[0m begin transaction
|
8
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "domain_neutral_descriptors" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar, "parent_id" integer, "parent_type" varchar, "symbol" varchar, "name" varchar, "description" text, "index" integer, "value" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
9
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
10
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_domain_neutral_descriptors_on_type_and_symbol" ON "domain_neutral_descriptors" ("type", "symbol")[0m
|
11
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
12
|
+
FROM sqlite_master
|
13
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
14
|
+
UNION ALL
|
15
|
+
SELECT sql
|
16
|
+
FROM sqlite_temp_master
|
17
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
18
|
+
|
19
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_domain_neutral_descriptors_on_type_and_index" ON "domain_neutral_descriptors" ("type", "index")[0m
|
20
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
21
|
+
FROM sqlite_master
|
22
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_index' AND type='index'
|
23
|
+
UNION ALL
|
24
|
+
SELECT sql
|
25
|
+
FROM sqlite_temp_master
|
26
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_index' AND type='index'
|
27
|
+
|
28
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
29
|
+
FROM sqlite_master
|
30
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
31
|
+
UNION ALL
|
32
|
+
SELECT sql
|
33
|
+
FROM sqlite_temp_master
|
34
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
35
|
+
[0m
|
36
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_domain_neutral_descriptors_on_parent_type_and_parent_id" ON "domain_neutral_descriptors" ("parent_type", "parent_id")
|
37
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160531132104"]]
|
38
|
+
[1m[35m (0.9ms)[0m commit transaction
|
39
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
40
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
41
|
+
FROM sqlite_master
|
42
|
+
WHERE name='index_domain_neutral_descriptors_on_parent_type_and_parent_id' AND type='index'
|
43
|
+
UNION ALL
|
44
|
+
SELECT sql
|
45
|
+
FROM sqlite_temp_master
|
46
|
+
WHERE name='index_domain_neutral_descriptors_on_parent_type_and_parent_id' AND type='index'
|
47
|
+
|
48
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
49
|
+
FROM sqlite_master
|
50
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_index' AND type='index'
|
51
|
+
UNION ALL
|
52
|
+
SELECT sql
|
53
|
+
FROM sqlite_temp_master
|
54
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_index' AND type='index'
|
55
|
+
[0m
|
56
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
57
|
+
FROM sqlite_master
|
58
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
59
|
+
UNION ALL
|
60
|
+
SELECT sql
|
61
|
+
FROM sqlite_temp_master
|
62
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
63
|
+
|
64
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
65
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
66
|
+
Migrating to CreateDomainNeutralDescriptors (20160531132104)
|
67
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
68
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
69
|
+
FROM sqlite_master
|
70
|
+
WHERE name='index_domain_neutral_descriptors_on_parent_type_and_parent_id' AND type='index'
|
71
|
+
UNION ALL
|
72
|
+
SELECT sql
|
73
|
+
FROM sqlite_temp_master
|
74
|
+
WHERE name='index_domain_neutral_descriptors_on_parent_type_and_parent_id' AND type='index'
|
75
|
+
|
76
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
77
|
+
FROM sqlite_master
|
78
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_index' AND type='index'
|
79
|
+
UNION ALL
|
80
|
+
SELECT sql
|
81
|
+
FROM sqlite_temp_master
|
82
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_index' AND type='index'
|
83
|
+
[0m
|
84
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
85
|
+
FROM sqlite_master
|
86
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
87
|
+
UNION ALL
|
88
|
+
SELECT sql
|
89
|
+
FROM sqlite_temp_master
|
90
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
91
|
+
|
92
|
+
[1m[36m (0.3ms)[0m [1mDROP INDEX "index_domain_neutral_descriptors_on_parent_type_and_parent_id"[0m
|
93
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
94
|
+
FROM sqlite_master
|
95
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_index' AND type='index'
|
96
|
+
UNION ALL
|
97
|
+
SELECT sql
|
98
|
+
FROM sqlite_temp_master
|
99
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_index' AND type='index'
|
100
|
+
|
101
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
102
|
+
FROM sqlite_master
|
103
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
104
|
+
UNION ALL
|
105
|
+
SELECT sql
|
106
|
+
FROM sqlite_temp_master
|
107
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
108
|
+
[0m
|
109
|
+
[1m[35m (0.3ms)[0m DROP INDEX "index_domain_neutral_descriptors_on_type_and_index"
|
110
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
111
|
+
FROM sqlite_master
|
112
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
113
|
+
UNION ALL
|
114
|
+
SELECT sql
|
115
|
+
FROM sqlite_temp_master
|
116
|
+
WHERE name='index_domain_neutral_descriptors_on_type_and_symbol' AND type='index'
|
117
|
+
[0m
|
118
|
+
[1m[35m (0.1ms)[0m DROP INDEX "index_domain_neutral_descriptors_on_type_and_symbol"
|
119
|
+
[1m[36m (0.1ms)[0m [1mDROP TABLE "domain_neutral_descriptors"[0m
|
120
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20160531132104"]]
|
121
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
122
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
123
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
124
|
+
Migrating to CreateDomainNeutralDescriptors (20160531132104)
|
125
|
+
[1m[35m (0.1ms)[0m begin transaction
|
126
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
127
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
128
|
+
Migrating to CreateDomainNeutralDescriptors (20160531144625)
|
129
|
+
[1m[35m (0.1ms)[0m begin transaction
|
130
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
131
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
132
|
+
Migrating to CreateDomainNeutralDescriptors (20160531144625)
|
133
|
+
[1m[35m (0.0ms)[0m begin transaction
|
134
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
135
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
136
|
+
Migrating to CreateDomainNeutralDescriptors (20160531144625)
|
137
|
+
[1m[35m (0.0ms)[0m begin transaction
|
138
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "descriptors" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar, "parent_id" integer, "parent_type" varchar, "symbol" varchar, "name" varchar, "description" text, "index" integer, "value" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
139
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
140
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_descriptors_on_type_and_symbol" ON "descriptors" ("type", "symbol")[0m
|
141
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
142
|
+
FROM sqlite_master
|
143
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
144
|
+
UNION ALL
|
145
|
+
SELECT sql
|
146
|
+
FROM sqlite_temp_master
|
147
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
148
|
+
|
149
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_descriptors_on_type_and_index" ON "descriptors" ("type", "index")[0m
|
150
|
+
[1m[35m (0.0ms)[0m SELECT sql
|
151
|
+
FROM sqlite_master
|
152
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
153
|
+
UNION ALL
|
154
|
+
SELECT sql
|
155
|
+
FROM sqlite_temp_master
|
156
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
157
|
+
|
158
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
159
|
+
FROM sqlite_master
|
160
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
161
|
+
UNION ALL
|
162
|
+
SELECT sql
|
163
|
+
FROM sqlite_temp_master
|
164
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
165
|
+
[0m
|
166
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_descriptors_on_parent_type_and_parent_id" ON "descriptors" ("parent_type", "parent_id")
|
167
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160531144625"]]
|
168
|
+
[1m[35m (2.1ms)[0m commit transaction
|
169
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
170
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
171
|
+
FROM sqlite_master
|
172
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
173
|
+
UNION ALL
|
174
|
+
SELECT sql
|
175
|
+
FROM sqlite_temp_master
|
176
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
177
|
+
|
178
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
179
|
+
FROM sqlite_master
|
180
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
181
|
+
UNION ALL
|
182
|
+
SELECT sql
|
183
|
+
FROM sqlite_temp_master
|
184
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
185
|
+
[0m
|
186
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
187
|
+
FROM sqlite_master
|
188
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
189
|
+
UNION ALL
|
190
|
+
SELECT sql
|
191
|
+
FROM sqlite_temp_master
|
192
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
193
|
+
|
194
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
195
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
196
|
+
[1m[36m (0.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
197
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
198
|
+
Migrating to CreateDomainNeutralDescriptors (20160601072742)
|
199
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
200
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "descriptors" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar, "parent_type" varchar, "parent_id" integer, "symbol" varchar, "name" varchar, "description" text, "index" integer, "value" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
201
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_descriptors_on_type_and_symbol" ON "descriptors" ("type", "symbol")[0m
|
202
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
203
|
+
FROM sqlite_master
|
204
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
205
|
+
UNION ALL
|
206
|
+
SELECT sql
|
207
|
+
FROM sqlite_temp_master
|
208
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
209
|
+
|
210
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_descriptors_on_type_and_index" ON "descriptors" ("type", "index")[0m
|
211
|
+
[1m[35m (0.0ms)[0m SELECT sql
|
212
|
+
FROM sqlite_master
|
213
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
214
|
+
UNION ALL
|
215
|
+
SELECT sql
|
216
|
+
FROM sqlite_temp_master
|
217
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
218
|
+
|
219
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
220
|
+
FROM sqlite_master
|
221
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
222
|
+
UNION ALL
|
223
|
+
SELECT sql
|
224
|
+
FROM sqlite_temp_master
|
225
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
226
|
+
[0m
|
227
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_descriptors_on_parent_type_and_parent_id" ON "descriptors" ("parent_type", "parent_id")
|
228
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160601072742"]]
|
229
|
+
[1m[35m (0.7ms)[0m commit transaction
|
230
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
231
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
232
|
+
FROM sqlite_master
|
233
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
234
|
+
UNION ALL
|
235
|
+
SELECT sql
|
236
|
+
FROM sqlite_temp_master
|
237
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
238
|
+
|
239
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
240
|
+
FROM sqlite_master
|
241
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
242
|
+
UNION ALL
|
243
|
+
SELECT sql
|
244
|
+
FROM sqlite_temp_master
|
245
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
246
|
+
[0m
|
247
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
248
|
+
FROM sqlite_master
|
249
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
250
|
+
UNION ALL
|
251
|
+
SELECT sql
|
252
|
+
FROM sqlite_temp_master
|
253
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
254
|
+
|
255
|
+
[1m[36mRole Load (0.5ms)[0m [1mSELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1[0m [["symbol", "site_admin"]]
|
256
|
+
[1m[35m (0.1ms)[0m begin transaction
|
257
|
+
[1m[36mDomainNeutral::Descriptor Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "descriptors" WHERE ("descriptors"."symbol" = 'site_admin' AND "descriptors"."type" = 'Role') LIMIT 1[0m
|
258
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "descriptors" ("type", "name", "description", "index", "value", "symbol", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["type", "Role"], ["name", "Site admin"], ["description", "Site administrator"], ["index", 1], ["value", 100], ["symbol", "site_admin"], ["created_at", "2016-06-01 09:00:17.684181"], ["updated_at", "2016-06-01 09:00:17.684181"]]
|
259
|
+
[1m[36m (2.1ms)[0m [1mcommit transaction[0m
|
260
|
+
[1m[35mRole Load (0.1ms)[0m SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1 [["symbol", "user_admin"]]
|
261
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
262
|
+
[1m[35mDomainNeutral::Descriptor Exists (0.1ms)[0m SELECT 1 AS one FROM "descriptors" WHERE ("descriptors"."symbol" = 'user_admin' AND "descriptors"."type" = 'Role') LIMIT 1
|
263
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "descriptors" ("type", "name", "description", "index", "value", "symbol", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["type", "Role"], ["name", "User Administrator"], ["description", "Administers users and legal entities"], ["index", 2], ["value", 200], ["symbol", "user_admin"], ["created_at", "2016-06-01 09:00:17.690789"], ["updated_at", "2016-06-01 09:00:17.690789"]]
|
264
|
+
[1m[35m (0.8ms)[0m commit transaction
|
265
|
+
[1m[36mRole Load (0.2ms)[0m [1mSELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1[0m [["symbol", "site_admin"]]
|
266
|
+
[1m[35m (0.1ms)[0m begin transaction
|
267
|
+
[1m[36mDomainNeutral::Descriptor Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "descriptors" WHERE ("descriptors"."symbol" = 'site_admin' AND "descriptors"."id" != 1 AND "descriptors"."type" = 'Role') LIMIT 1[0m
|
268
|
+
[1m[35m (0.0ms)[0m commit transaction
|
269
|
+
[1m[36mRole Load (0.1ms)[0m [1mSELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1[0m [["symbol", "user_admin"]]
|
270
|
+
[1m[35m (0.0ms)[0m begin transaction
|
271
|
+
[1m[36mDomainNeutral::Descriptor Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "descriptors" WHERE ("descriptors"."symbol" = 'user_admin' AND "descriptors"."id" != 2 AND "descriptors"."type" = 'Role') LIMIT 1[0m
|
272
|
+
[1m[35m (0.0ms)[0m commit transaction
|
273
|
+
[1m[36mRole Load (0.1ms)[0m [1mSELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role')[0m
|
274
|
+
[1m[35mRole Load (0.3ms)[0m SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1 [["symbol", "map"]]
|
275
|
+
[1m[36mRole Load (0.3ms)[0m [1mSELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role')[0m
|
276
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "descriptors" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar, "parent_type" varchar, "parent_id" integer, "symbol" varchar, "name" varchar, "description" text, "index" integer, "value" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
277
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
278
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_descriptors_on_parent_type_and_parent_id" ON "descriptors" ("parent_type", "parent_id")[0m
|
279
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
280
|
+
FROM sqlite_master
|
281
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
282
|
+
UNION ALL
|
283
|
+
SELECT sql
|
284
|
+
FROM sqlite_temp_master
|
285
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
286
|
+
|
287
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_descriptors_on_type_and_index" ON "descriptors" ("type", "index")[0m
|
288
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
289
|
+
FROM sqlite_master
|
290
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
291
|
+
UNION ALL
|
292
|
+
SELECT sql
|
293
|
+
FROM sqlite_temp_master
|
294
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
295
|
+
|
296
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
297
|
+
FROM sqlite_master
|
298
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
299
|
+
UNION ALL
|
300
|
+
SELECT sql
|
301
|
+
FROM sqlite_temp_master
|
302
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
303
|
+
[0m
|
304
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_descriptors_on_type_and_symbol" ON "descriptors" ("type", "symbol")
|
305
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
306
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
307
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
308
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160601072742')
|
309
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
310
|
+
Migrating to CreateUsers (20160607100350)
|
311
|
+
[1m[35m (0.1ms)[0m begin transaction
|
312
|
+
[1m[36m (0.5ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "role_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
313
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
314
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_users_on_role_id" ON "users" ("role_id")[0m
|
315
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160607100350"]]
|
316
|
+
[1m[36m (2.3ms)[0m [1mcommit transaction[0m
|
317
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
318
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
319
|
+
FROM sqlite_master
|
320
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
321
|
+
UNION ALL
|
322
|
+
SELECT sql
|
323
|
+
FROM sqlite_temp_master
|
324
|
+
WHERE name='index_descriptors_on_parent_type_and_parent_id' AND type='index'
|
325
|
+
[0m
|
326
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
327
|
+
FROM sqlite_master
|
328
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
329
|
+
UNION ALL
|
330
|
+
SELECT sql
|
331
|
+
FROM sqlite_temp_master
|
332
|
+
WHERE name='index_descriptors_on_type_and_index' AND type='index'
|
333
|
+
|
334
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
335
|
+
FROM sqlite_master
|
336
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
337
|
+
UNION ALL
|
338
|
+
SELECT sql
|
339
|
+
FROM sqlite_temp_master
|
340
|
+
WHERE name='index_descriptors_on_type_and_symbol' AND type='index'
|
341
|
+
[0m
|
342
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
343
|
+
FROM sqlite_master
|
344
|
+
WHERE name='index_users_on_role_id' AND type='index'
|
345
|
+
UNION ALL
|
346
|
+
SELECT sql
|
347
|
+
FROM sqlite_temp_master
|
348
|
+
WHERE name='index_users_on_role_id' AND type='index'
|
349
|
+
|
350
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|