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.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +37 -0
  4. data/app/models/domain_neutral/descriptor.rb +55 -0
  5. data/config/routes.rb +2 -0
  6. data/db/migrate/20160531124022_create_domain_neutral_descriptors.rb +20 -0
  7. data/lib/domain_neutral/association.rb +21 -0
  8. data/lib/domain_neutral/engine.rb +5 -0
  9. data/lib/domain_neutral/railtie.rb +24 -0
  10. data/lib/domain_neutral/seed.rb +8 -0
  11. data/lib/domain_neutral/seeder/descriptors.rb +195 -0
  12. data/lib/domain_neutral/symbolized_class.rb +170 -0
  13. data/lib/domain_neutral/version.rb +3 -0
  14. data/lib/domain_neutral.rb +18 -0
  15. data/lib/tasks/domain_neutral_tasks.rake +10 -0
  16. data/test/domain_neutral/symbolized_class_test.rb +162 -0
  17. data/test/domain_neutral_test.rb +7 -0
  18. data/test/dummy/README.rdoc +28 -0
  19. data/test/dummy/Rakefile +6 -0
  20. data/test/dummy/app/assets/javascripts/application.js +13 -0
  21. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  22. data/test/dummy/app/controllers/application_controller.rb +5 -0
  23. data/test/dummy/app/helpers/application_helper.rb +2 -0
  24. data/test/dummy/app/models/role.rb +2 -0
  25. data/test/dummy/app/models/user.rb +3 -0
  26. data/test/dummy/app/views/layouts/application.html.erb +13 -0
  27. data/test/dummy/bin/bundle +3 -0
  28. data/test/dummy/bin/rails +4 -0
  29. data/test/dummy/bin/rake +4 -0
  30. data/test/dummy/bin/setup +29 -0
  31. data/test/dummy/config/application.rb +33 -0
  32. data/test/dummy/config/boot.rb +5 -0
  33. data/test/dummy/config/database.yml +25 -0
  34. data/test/dummy/config/environment.rb +5 -0
  35. data/test/dummy/config/environments/development.rb +41 -0
  36. data/test/dummy/config/environments/production.rb +79 -0
  37. data/test/dummy/config/environments/test.rb +44 -0
  38. data/test/dummy/config/initializers/assets.rb +11 -0
  39. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  40. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  41. data/test/dummy/config/initializers/domain_neutral.rb +5 -0
  42. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  43. data/test/dummy/config/initializers/inflections.rb +16 -0
  44. data/test/dummy/config/initializers/mime_types.rb +4 -0
  45. data/test/dummy/config/initializers/session_store.rb +3 -0
  46. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  47. data/test/dummy/config/locales/en.yml +13 -0
  48. data/test/dummy/config/locales/nb.yml +9 -0
  49. data/test/dummy/config/routes.rb +56 -0
  50. data/test/dummy/config/secrets.yml +22 -0
  51. data/test/dummy/config.ru +4 -0
  52. data/test/dummy/db/development.sqlite3 +0 -0
  53. data/test/dummy/db/migrate/20160601072742_create_domain_neutral_descriptors.domain_neutral.rb +21 -0
  54. data/test/dummy/db/migrate/20160607100350_create_users.rb +10 -0
  55. data/test/dummy/db/schema.rb +42 -0
  56. data/test/dummy/db/test.sqlite3 +0 -0
  57. data/test/dummy/log/development.log +350 -0
  58. data/test/dummy/log/test.log +5133 -0
  59. data/test/dummy/public/404.html +67 -0
  60. data/test/dummy/public/422.html +67 -0
  61. data/test/dummy/public/500.html +66 -0
  62. data/test/dummy/public/favicon.ico +0 -0
  63. data/test/dummy/tmp/cache/36E/B10/Role%2Fmap +1 -0
  64. data/test/dummy/tmp/cache/657/A10/Role%2Fuser_admin +1 -0
  65. data/test/fixtures/domain_neutral/descriptors.yml +14 -0
  66. data/test/fixtures/users.yml +9 -0
  67. data/test/integration/navigation_test.rb +8 -0
  68. data/test/models/domain_neutral/descriptor_test.rb +111 -0
  69. data/test/test_helper.rb +22 -0
  70. data/test/test_helpers/caching.rb +57 -0
  71. metadata +198 -0
@@ -0,0 +1,9 @@
1
+ nb:
2
+ descriptors:
3
+ role:
4
+ site_admin:
5
+ name: Nettstedadmin
6
+ description: Administrator nettsted
7
+ user_admin:
8
+ name: Bruker-administrator
9
+ description: Kan administrere brukere....
@@ -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"] %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
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,10 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+ t.references :role, index: true, foreign_key: true
6
+
7
+ t.timestamps null: false
8
+ end
9
+ end
10
+ 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
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
+  (0.0ms) select sqlite_version(*)
3
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
6
+ Migrating to CreateDomainNeutralDescriptors (20160531132104)
7
+  (0.0ms) begin transaction
8
+  (0.4ms) CREATE 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) 
9
+  (0.0ms) select sqlite_version(*)
10
+  (0.1ms) CREATE INDEX "index_domain_neutral_descriptors_on_type_and_symbol" ON "domain_neutral_descriptors" ("type", "symbol")
11
+  (0.1ms) 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
+  (0.1ms) CREATE INDEX "index_domain_neutral_descriptors_on_type_and_index" ON "domain_neutral_descriptors" ("type", "index")
20
+  (0.1ms) 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
+  (0.1ms)  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
+ 
36
+  (0.1ms) CREATE INDEX "index_domain_neutral_descriptors_on_parent_type_and_parent_id" ON "domain_neutral_descriptors" ("parent_type", "parent_id")
37
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160531132104"]]
38
+  (0.9ms) commit transaction
39
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
40
+  (0.1ms) 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
+  (0.1ms)  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
+ 
56
+  (0.1ms) 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
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
65
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
66
+ Migrating to CreateDomainNeutralDescriptors (20160531132104)
67
+  (0.0ms) begin transaction
68
+  (0.1ms) 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
+  (0.1ms)  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
+ 
84
+  (0.1ms) 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
+  (0.3ms) DROP INDEX "index_domain_neutral_descriptors_on_parent_type_and_parent_id"
93
+  (0.1ms) 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
+  (0.1ms)  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
+ 
109
+  (0.3ms) DROP INDEX "index_domain_neutral_descriptors_on_type_and_index"
110
+  (0.1ms)  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
+ 
118
+  (0.1ms) DROP INDEX "index_domain_neutral_descriptors_on_type_and_symbol"
119
+  (0.1ms) DROP TABLE "domain_neutral_descriptors"
120
+ SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20160531132104"]]
121
+  (1.1ms) commit transaction
122
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
123
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
124
+ Migrating to CreateDomainNeutralDescriptors (20160531132104)
125
+  (0.1ms) begin transaction
126
+  (0.0ms) rollback transaction
127
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
128
+ Migrating to CreateDomainNeutralDescriptors (20160531144625)
129
+  (0.1ms) begin transaction
130
+  (0.0ms) rollback transaction
131
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
132
+ Migrating to CreateDomainNeutralDescriptors (20160531144625)
133
+  (0.0ms) begin transaction
134
+  (0.0ms) rollback transaction
135
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
136
+ Migrating to CreateDomainNeutralDescriptors (20160531144625)
137
+  (0.0ms) begin transaction
138
+  (0.4ms) CREATE 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) 
139
+  (0.0ms) select sqlite_version(*)
140
+  (0.1ms) CREATE INDEX "index_descriptors_on_type_and_symbol" ON "descriptors" ("type", "symbol")
141
+  (0.1ms) 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
+  (0.1ms) CREATE INDEX "index_descriptors_on_type_and_index" ON "descriptors" ("type", "index")
150
+  (0.0ms) 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
+  (0.0ms)  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
+ 
166
+  (0.1ms) CREATE INDEX "index_descriptors_on_parent_type_and_parent_id" ON "descriptors" ("parent_type", "parent_id")
167
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160531144625"]]
168
+  (2.1ms) commit transaction
169
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
170
+  (0.1ms) 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
+  (0.1ms)  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
+ 
186
+  (0.1ms) 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
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
195
+  (0.1ms) select sqlite_version(*)
196
+  (0.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
197
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
198
+ Migrating to CreateDomainNeutralDescriptors (20160601072742)
199
+  (0.0ms) begin transaction
200
+  (0.3ms) 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
+  (0.1ms) CREATE INDEX "index_descriptors_on_type_and_symbol" ON "descriptors" ("type", "symbol")
202
+  (0.1ms) 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
+  (0.1ms) CREATE INDEX "index_descriptors_on_type_and_index" ON "descriptors" ("type", "index")
211
+  (0.0ms) 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
+  (0.0ms)  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
+ 
227
+  (0.1ms) CREATE INDEX "index_descriptors_on_parent_type_and_parent_id" ON "descriptors" ("parent_type", "parent_id")
228
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160601072742"]]
229
+  (0.7ms) commit transaction
230
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
231
+  (0.1ms) 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
+  (0.1ms)  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
+ 
247
+  (0.1ms) 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
+ Role Load (0.5ms) SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1 [["symbol", "site_admin"]]
256
+  (0.1ms) begin transaction
257
+ DomainNeutral::Descriptor Exists (0.1ms) SELECT 1 AS one FROM "descriptors" WHERE ("descriptors"."symbol" = 'site_admin' AND "descriptors"."type" = 'Role') LIMIT 1
258
+ SQL (1.6ms) 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
+  (2.1ms) commit transaction
260
+ Role Load (0.1ms) SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1 [["symbol", "user_admin"]]
261
+  (0.0ms) begin transaction
262
+ DomainNeutral::Descriptor Exists (0.1ms) SELECT 1 AS one FROM "descriptors" WHERE ("descriptors"."symbol" = 'user_admin' AND "descriptors"."type" = 'Role') LIMIT 1
263
+ SQL (0.2ms) INSERT INTO "descriptors" ("type", "name", "description", "index", "value", "symbol", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["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
+  (0.8ms) commit transaction
265
+ Role Load (0.2ms) SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1 [["symbol", "site_admin"]]
266
+  (0.1ms) begin transaction
267
+ DomainNeutral::Descriptor Exists (0.1ms) SELECT 1 AS one FROM "descriptors" WHERE ("descriptors"."symbol" = 'site_admin' AND "descriptors"."id" != 1 AND "descriptors"."type" = 'Role') LIMIT 1
268
+  (0.0ms) commit transaction
269
+ Role Load (0.1ms) SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1 [["symbol", "user_admin"]]
270
+  (0.0ms) begin transaction
271
+ DomainNeutral::Descriptor Exists (0.1ms) SELECT 1 AS one FROM "descriptors" WHERE ("descriptors"."symbol" = 'user_admin' AND "descriptors"."id" != 2 AND "descriptors"."type" = 'Role') LIMIT 1
272
+  (0.0ms) commit transaction
273
+ Role Load (0.1ms) SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role')
274
+ Role Load (0.3ms) SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role') AND "descriptors"."symbol" = ? ORDER BY "descriptors"."id" ASC LIMIT 1 [["symbol", "map"]]
275
+ Role Load (0.3ms) SELECT "descriptors".* FROM "descriptors" WHERE "descriptors"."type" IN ('Role')
276
+  (1.0ms) 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) 
277
+  (0.1ms) select sqlite_version(*)
278
+  (0.7ms) CREATE INDEX "index_descriptors_on_parent_type_and_parent_id" ON "descriptors" ("parent_type", "parent_id")
279
+  (0.1ms) 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
+  (0.7ms) CREATE INDEX "index_descriptors_on_type_and_index" ON "descriptors" ("type", "index")
288
+  (0.1ms) 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
+  (0.1ms)  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
+ 
304
+  (0.8ms) CREATE INDEX "index_descriptors_on_type_and_symbol" ON "descriptors" ("type", "symbol")
305
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
306
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
307
+  (0.1ms) SELECT version FROM "schema_migrations"
308
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160601072742')
309
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
310
+ Migrating to CreateUsers (20160607100350)
311
+  (0.1ms) begin transaction
312
+  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "role_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
313
+  (0.0ms) select sqlite_version(*)
314
+  (0.1ms) CREATE INDEX "index_users_on_role_id" ON "users" ("role_id")
315
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160607100350"]]
316
+  (2.3ms) commit transaction
317
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
318
+  (0.1ms)  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
+ 
326
+  (0.1ms) 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
+  (0.1ms)  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
+ 
342
+  (0.1ms) 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
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"