openstax_api 4.0.1 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a04be0fa091031552f0e4797e093a1751661e7d
4
- data.tar.gz: 8e79ca4932124dcdf2948320db9d461ff94cd498
3
+ metadata.gz: 9d9c792e4accd548c06d185bdabcede936735a34
4
+ data.tar.gz: bce475d5ff7bc2141e429aabc5cc795487b3d2ce
5
5
  SHA512:
6
- metadata.gz: d975020dd0e7bf4e5ba8eefb43fede87f83bf95de73a0f48ab915ddaa43f5131a965dcaf8e92a66671c664593d83eeeb45a9b5cb411298a14f8f0d65cd1e8c12
7
- data.tar.gz: 86dc7e42cd01e76e895a48f19d5320ba1bcd48142de2471c3b3ac082d1ffccf656c6315f12c24ee88e83416cccd1b0179c075473d57367e23c9300a4c7b1cf5c
6
+ metadata.gz: accf53587f8f6b87781d7cbb739422f9bb169f27fb76807b5232b84b41e47ef5ecabf0f2a5fdb15f9be1447f2db485ff4bdb6d3ccb9650eba3281803ddfef1aa
7
+ data.tar.gz: 353351d444e3a645695f2c95b97c48774a28ec52a2f9610fe1647601ff3d0939ebd03d18e4a1b96d4a7bed723b010af289d2de5a959ec3e1f4482e890b4cca7e
@@ -5,6 +5,7 @@ require 'exception_notification'
5
5
  require 'openstax_utilities'
6
6
  require 'openstax/api/roar'
7
7
  require 'openstax/api/apipie'
8
+ require 'openstax/api/responder_with_put_content'
8
9
 
9
10
  module OpenStax
10
11
  module Api
@@ -0,0 +1,11 @@
1
+ # http://stackoverflow.com/a/27413178
2
+
3
+ class ResponderWithPutContent < Roar::Rails::Responder
4
+ def api_behavior(*args, &block)
5
+ if put?
6
+ display resource, :status => :ok
7
+ else
8
+ super
9
+ end
10
+ end
11
+ end
@@ -25,10 +25,13 @@ module OpenStax
25
25
  model.class.transaction do
26
26
  consume!(model, represent_with: represent_with)
27
27
  yield model if block_given?
28
- OSU::AccessPolicy.require_action_allowed!(:create, current_api_user, model)
28
+ OSU::AccessPolicy.require_action_allowed!(:create,
29
+ current_api_user,
30
+ model)
29
31
 
30
32
  if model.save
31
- respond_with model, represent_with: represent_with, status: :created
33
+ respond_with model, represent_with: represent_with,
34
+ status: :created
32
35
  else
33
36
  render_api_errors(model.errors)
34
37
  end
@@ -36,21 +39,29 @@ module OpenStax
36
39
  end
37
40
 
38
41
  def standard_read(model, represent_with=nil)
39
- OSU::AccessPolicy.require_action_allowed!(:read, current_api_user, model)
42
+ OSU::AccessPolicy.require_action_allowed!(:read,
43
+ current_api_user,
44
+ model)
40
45
  respond_with model, represent_with: represent_with
41
46
  end
42
47
 
43
48
  def standard_update(model, represent_with=nil)
44
49
  # Must be able to update the record before and after the update itself
45
- OSU::AccessPolicy.require_action_allowed!(:update, current_api_user, model)
50
+ OSU::AccessPolicy.require_action_allowed!(:update,
51
+ current_api_user,
52
+ model)
46
53
 
47
54
  model.class.transaction do
48
55
  consume!(model, represent_with: represent_with)
49
56
  yield model if block_given?
50
- OSU::AccessPolicy.require_action_allowed!(:update, current_api_user, model)
57
+ OSU::AccessPolicy.require_action_allowed!(:update,
58
+ current_api_user,
59
+ model)
51
60
 
52
61
  if model.save
53
- head :no_content
62
+ # http://stackoverflow.com/a/27413178
63
+ respond_with model, represent_with: represent_with,
64
+ responder: ResponderWithPutContent
54
65
  else
55
66
  render_api_errors(model.errors)
56
67
  end
@@ -58,7 +69,9 @@ module OpenStax
58
69
  end
59
70
 
60
71
  def standard_destroy(model)
61
- OSU::AccessPolicy.require_action_allowed!(:destroy, current_api_user, model)
72
+ OSU::AccessPolicy.require_action_allowed!(:destroy,
73
+ current_api_user,
74
+ model)
62
75
 
63
76
  if model.destroy
64
77
  head :no_content
@@ -69,10 +82,14 @@ module OpenStax
69
82
 
70
83
  def standard_index(relation, represent_with)
71
84
  model_klass = relation.base_class
72
- OSU::AccessPolicy.require_action_allowed!(:index, current_api_user, model_klass)
85
+ OSU::AccessPolicy.require_action_allowed!(:index,
86
+ current_api_user,
87
+ model_klass)
73
88
  relation.each do |item|
74
89
  # Must be able to read each record
75
- OSU::AccessPolicy.require_action_allowed!(:read, current_api_user, item)
90
+ OSU::AccessPolicy.require_action_allowed!(:read,
91
+ current_api_user,
92
+ item)
76
93
  end
77
94
  respond_with(Lev::Outputs.new(items: relation),
78
95
  represent_with: represent_with)
@@ -85,7 +102,9 @@ module OpenStax
85
102
  def standard_nested_create(model, container_association,
86
103
  container, represent_with=nil)
87
104
  # Must be able to update the container
88
- OSU::AccessPolicy.require_action_allowed!(:update, current_api_user, container)
105
+ OSU::AccessPolicy.require_action_allowed!(:update,
106
+ current_api_user,
107
+ container)
89
108
  model.send("#{container_association.to_s}=", container)
90
109
 
91
110
  standard_create(model, represent_with)
@@ -97,9 +116,12 @@ module OpenStax
97
116
  when ActiveModel::Errors, Lev::BetterActiveModelErrors
98
117
  hash[:errors] = []
99
118
  errors.each do |attribute, message|
100
- hash[:errors] << {code: "#{attribute.to_s}_#{
101
- message.to_s.gsub(/[\s-]/, '_').gsub(/[^\w]/, '')
102
- }", message: errors.full_message(attribute, message)}
119
+ hash[:errors] << {
120
+ code: "#{attribute.to_s}_#{
121
+ message.to_s.gsub(/[\s-]/, '_').gsub(/[^\w]/, '')
122
+ }",
123
+ message: errors.full_message(attribute, message)
124
+ }
103
125
  end
104
126
  when Lev::Errors
105
127
  hash[:errors] = errors.collect do |error|
@@ -116,4 +138,4 @@ module OpenStax
116
138
  end
117
139
 
118
140
  end
119
- end
141
+ end
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Api
3
- VERSION = "4.0.1"
3
+ VERSION = "5.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-20 00:00:00.000000000 Z
12
+ date: 2015-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -239,6 +239,7 @@ files:
239
239
  - lib/openstax/api/doorkeeper_application_includes.rb
240
240
  - lib/openstax/api/engine.rb
241
241
  - lib/openstax/api/representable_schema_printer.rb
242
+ - lib/openstax/api/responder_with_put_content.rb
242
243
  - lib/openstax/api/roar.rb
243
244
  - lib/openstax/api/routing_mapper_includes.rb
244
245
  - lib/openstax/api/rspec_helpers.rb
@@ -279,14 +280,10 @@ files:
279
280
  - spec/dummy/config/locales/en.yml
280
281
  - spec/dummy/config/routes.rb
281
282
  - spec/dummy/config/secrets.yml
282
- - spec/dummy/db/development.sqlite3
283
283
  - spec/dummy/db/migrate/0_create_doorkeeper_tables.rb
284
284
  - spec/dummy/db/migrate/1_create_users.rb
285
285
  - spec/dummy/db/schema.rb
286
- - spec/dummy/db/test.sqlite3
287
286
  - spec/dummy/lib/controller_includes.rb
288
- - spec/dummy/log/development.log
289
- - spec/dummy/log/test.log
290
287
  - spec/dummy/public/404.html
291
288
  - spec/dummy/public/422.html
292
289
  - spec/dummy/public/500.html
@@ -361,14 +358,10 @@ test_files:
361
358
  - spec/dummy/config/routes.rb
362
359
  - spec/dummy/config/secrets.yml
363
360
  - spec/dummy/config.ru
364
- - spec/dummy/db/development.sqlite3
365
361
  - spec/dummy/db/migrate/0_create_doorkeeper_tables.rb
366
362
  - spec/dummy/db/migrate/1_create_users.rb
367
363
  - spec/dummy/db/schema.rb
368
- - spec/dummy/db/test.sqlite3
369
364
  - spec/dummy/lib/controller_includes.rb
370
- - spec/dummy/log/development.log
371
- - spec/dummy/log/test.log
372
365
  - spec/dummy/public/404.html
373
366
  - spec/dummy/public/422.html
374
367
  - spec/dummy/public/500.html
Binary file
Binary file
@@ -1,497 +0,0 @@
1
-  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
-  (0.1ms) select sqlite_version(*)
3
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- Migrating to CreateDoorkeeperTables (0)
6
-  (0.1ms) begin transaction
7
-  (0.3ms) CREATE TABLE "oauth_applications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "secret" varchar(255) NOT NULL, "redirect_uri" text NOT NULL, "created_at" datetime, "updated_at" datetime)
8
-  (0.3ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
9
-  (0.2ms) CREATE TABLE "oauth_access_grants" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "resource_owner_id" integer NOT NULL, "application_id" integer NOT NULL, "token" varchar(255) NOT NULL, "expires_in" integer NOT NULL, "redirect_uri" text NOT NULL, "created_at" datetime NOT NULL, "revoked_at" datetime, "scopes" varchar(255))
10
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
11
-  (0.2ms) CREATE TABLE "oauth_access_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "resource_owner_id" integer, "application_id" integer, "token" varchar(255) NOT NULL, "refresh_token" varchar(255), "expires_in" integer, "revoked_at" datetime, "created_at" datetime NOT NULL, "scopes" varchar(255))
12
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
13
-  (0.1ms) SELECT sql
14
- FROM sqlite_master
15
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
16
- UNION ALL
17
- SELECT sql
18
- FROM sqlite_temp_master
19
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
20
-
21
-  (0.1ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
22
-  (0.1ms) SELECT sql
23
- FROM sqlite_master
24
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
25
- UNION ALL
26
- SELECT sql
27
- FROM sqlite_temp_master
28
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
29
-
30
-  (0.1ms)  SELECT sql
31
- FROM sqlite_master
32
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
33
- UNION ALL
34
- SELECT sql
35
- FROM sqlite_temp_master
36
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
37
- 
38
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
39
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "0"]]
40
-  (0.8ms) commit transaction
41
- Migrating to CreateDummyUsers (1)
42
-  (0.1ms) begin transaction
43
-  (0.4ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255), "password_hash" varchar(255), "created_at" datetime, "updated_at" datetime)
44
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
45
-  (0.6ms) commit transaction
46
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
47
-  (0.1ms) SELECT sql
48
- FROM sqlite_master
49
- WHERE name='index_oauth_access_grants_on_token' AND type='index'
50
- UNION ALL
51
- SELECT sql
52
- FROM sqlite_temp_master
53
- WHERE name='index_oauth_access_grants_on_token' AND type='index'
54
-
55
-  (0.1ms)  SELECT sql
56
- FROM sqlite_master
57
- WHERE name='index_oauth_access_tokens_on_refresh_token' AND type='index'
58
- UNION ALL
59
- SELECT sql
60
- FROM sqlite_temp_master
61
- WHERE name='index_oauth_access_tokens_on_refresh_token' AND type='index'
62
- 
63
-  (0.1ms) SELECT sql
64
- FROM sqlite_master
65
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
66
- UNION ALL
67
- SELECT sql
68
- FROM sqlite_temp_master
69
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
70
-
71
-  (0.1ms)  SELECT sql
72
- FROM sqlite_master
73
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
74
- UNION ALL
75
- SELECT sql
76
- FROM sqlite_temp_master
77
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
78
- 
79
-  (0.1ms) SELECT sql
80
- FROM sqlite_master
81
- WHERE name='index_oauth_applications_on_uid' AND type='index'
82
- UNION ALL
83
- SELECT sql
84
- FROM sqlite_temp_master
85
- WHERE name='index_oauth_applications_on_uid' AND type='index'
86
-
87
-  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
88
-  (0.1ms) select sqlite_version(*)
89
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
90
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
91
- Migrating to CreateDoorkeeperTables (0)
92
-  (0.1ms) begin transaction
93
-  (0.3ms) CREATE TABLE "oauth_applications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "secret" varchar(255) NOT NULL, "redirect_uri" text NOT NULL, "created_at" datetime, "updated_at" datetime)
94
-  (0.2ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
95
-  (0.1ms) CREATE TABLE "oauth_access_grants" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "resource_owner_id" integer NOT NULL, "application_id" integer NOT NULL, "token" varchar(255) NOT NULL, "expires_in" integer NOT NULL, "redirect_uri" text NOT NULL, "created_at" datetime NOT NULL, "revoked_at" datetime, "scopes" varchar(255))
96
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
97
-  (0.1ms) CREATE TABLE "oauth_access_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "resource_owner_id" integer, "application_id" integer, "token" varchar(255) NOT NULL, "refresh_token" varchar(255), "expires_in" integer, "revoked_at" datetime, "created_at" datetime NOT NULL, "scopes" varchar(255))
98
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
99
-  (0.1ms) SELECT sql
100
- FROM sqlite_master
101
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
102
- UNION ALL
103
- SELECT sql
104
- FROM sqlite_temp_master
105
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
106
-
107
-  (0.1ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
108
-  (0.0ms) SELECT sql
109
- FROM sqlite_master
110
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
111
- UNION ALL
112
- SELECT sql
113
- FROM sqlite_temp_master
114
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
115
-
116
-  (0.0ms)  SELECT sql
117
- FROM sqlite_master
118
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
119
- UNION ALL
120
- SELECT sql
121
- FROM sqlite_temp_master
122
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
123
- 
124
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
125
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "0"]]
126
-  (7.0ms) commit transaction
127
- Migrating to CreateDummyUsers (1)
128
-  (0.0ms) begin transaction
129
-  (0.2ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255) NOT NULL, "password_hash" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime)
130
-  (0.1ms) CREATE INDEX "index_dummy_users_on_username" ON "dummy_users" ("username")
131
-  (0.1ms) SELECT sql
132
- FROM sqlite_master
133
- WHERE name='index_dummy_users_on_username' AND type='index'
134
- UNION ALL
135
- SELECT sql
136
- FROM sqlite_temp_master
137
- WHERE name='index_dummy_users_on_username' AND type='index'
138
-
139
-  (0.1ms) CREATE INDEX "index_dummy_users_on_name" ON "dummy_users" ("name")
140
-  (0.1ms) SELECT sql
141
- FROM sqlite_master
142
- WHERE name='index_dummy_users_on_name' AND type='index'
143
- UNION ALL
144
- SELECT sql
145
- FROM sqlite_temp_master
146
- WHERE name='index_dummy_users_on_name' AND type='index'
147
-
148
-  (0.1ms)  SELECT sql
149
- FROM sqlite_master
150
- WHERE name='index_dummy_users_on_username' AND type='index'
151
- UNION ALL
152
- SELECT sql
153
- FROM sqlite_temp_master
154
- WHERE name='index_dummy_users_on_username' AND type='index'
155
- 
156
-  (0.1ms) CREATE INDEX "index_dummy_users_on_email" ON "dummy_users" ("email")
157
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
158
-  (0.7ms) commit transaction
159
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
160
-  (0.1ms) SELECT sql
161
- FROM sqlite_master
162
- WHERE name='index_dummy_users_on_email' AND type='index'
163
- UNION ALL
164
- SELECT sql
165
- FROM sqlite_temp_master
166
- WHERE name='index_dummy_users_on_email' AND type='index'
167
-
168
-  (0.1ms)  SELECT sql
169
- FROM sqlite_master
170
- WHERE name='index_dummy_users_on_name' AND type='index'
171
- UNION ALL
172
- SELECT sql
173
- FROM sqlite_temp_master
174
- WHERE name='index_dummy_users_on_name' AND type='index'
175
- 
176
-  (0.1ms) SELECT sql
177
- FROM sqlite_master
178
- WHERE name='index_dummy_users_on_username' AND type='index'
179
- UNION ALL
180
- SELECT sql
181
- FROM sqlite_temp_master
182
- WHERE name='index_dummy_users_on_username' AND type='index'
183
-
184
-  (0.1ms)  SELECT sql
185
- FROM sqlite_master
186
- WHERE name='index_oauth_access_grants_on_token' AND type='index'
187
- UNION ALL
188
- SELECT sql
189
- FROM sqlite_temp_master
190
- WHERE name='index_oauth_access_grants_on_token' AND type='index'
191
- 
192
-  (0.1ms) SELECT sql
193
- FROM sqlite_master
194
- WHERE name='index_oauth_access_tokens_on_refresh_token' AND type='index'
195
- UNION ALL
196
- SELECT sql
197
- FROM sqlite_temp_master
198
- WHERE name='index_oauth_access_tokens_on_refresh_token' AND type='index'
199
-
200
-  (0.1ms)  SELECT sql
201
- FROM sqlite_master
202
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
203
- UNION ALL
204
- SELECT sql
205
- FROM sqlite_temp_master
206
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
207
- 
208
-  (0.1ms) SELECT sql
209
- FROM sqlite_master
210
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
211
- UNION ALL
212
- SELECT sql
213
- FROM sqlite_temp_master
214
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
215
-
216
-  (0.1ms)  SELECT sql
217
- FROM sqlite_master
218
- WHERE name='index_oauth_applications_on_uid' AND type='index'
219
- UNION ALL
220
- SELECT sql
221
- FROM sqlite_temp_master
222
- WHERE name='index_oauth_applications_on_uid' AND type='index'
223
- 
224
-  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
225
-  (0.5ms) select sqlite_version(*)
226
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
227
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
228
- Migrating to CreateDoorkeeperTables (0)
229
-  (0.1ms) begin transaction
230
-  (0.3ms) CREATE TABLE "oauth_applications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "secret" varchar(255) NOT NULL, "redirect_uri" text NOT NULL, "created_at" datetime, "updated_at" datetime)
231
-  (0.6ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
232
-  (0.1ms) CREATE TABLE "oauth_access_grants" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "resource_owner_id" integer NOT NULL, "application_id" integer NOT NULL, "token" varchar(255) NOT NULL, "expires_in" integer NOT NULL, "redirect_uri" text NOT NULL, "created_at" datetime NOT NULL, "revoked_at" datetime, "scopes" varchar(255))
233
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
234
-  (0.1ms) CREATE TABLE "oauth_access_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "resource_owner_id" integer, "application_id" integer, "token" varchar(255) NOT NULL, "refresh_token" varchar(255), "expires_in" integer, "revoked_at" datetime, "created_at" datetime NOT NULL, "scopes" varchar(255))
235
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
236
-  (0.1ms) SELECT sql
237
- FROM sqlite_master
238
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
239
- UNION ALL
240
- SELECT sql
241
- FROM sqlite_temp_master
242
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
243
-
244
-  (0.1ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
245
-  (0.0ms) SELECT sql
246
- FROM sqlite_master
247
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
248
- UNION ALL
249
- SELECT sql
250
- FROM sqlite_temp_master
251
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
252
-
253
-  (0.0ms)  SELECT sql
254
- FROM sqlite_master
255
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
256
- UNION ALL
257
- SELECT sql
258
- FROM sqlite_temp_master
259
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
260
- 
261
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
262
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "0"]]
263
-  (0.6ms) commit transaction
264
- Migrating to CreateUsers (1)
265
-  (0.0ms) begin transaction
266
-  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255) NOT NULL, "password_hash" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime)
267
-  (0.1ms) CREATE INDEX "index_users_on_username" ON "users" ("username")
268
-  (0.1ms) SELECT sql
269
- FROM sqlite_master
270
- WHERE name='index_users_on_username' AND type='index'
271
- UNION ALL
272
- SELECT sql
273
- FROM sqlite_temp_master
274
- WHERE name='index_users_on_username' AND type='index'
275
-
276
-  (0.1ms) CREATE INDEX "index_users_on_name" ON "users" ("name")
277
-  (0.1ms) SELECT sql
278
- FROM sqlite_master
279
- WHERE name='index_users_on_name' AND type='index'
280
- UNION ALL
281
- SELECT sql
282
- FROM sqlite_temp_master
283
- WHERE name='index_users_on_name' AND type='index'
284
-
285
-  (0.1ms)  SELECT sql
286
- FROM sqlite_master
287
- WHERE name='index_users_on_username' AND type='index'
288
- UNION ALL
289
- SELECT sql
290
- FROM sqlite_temp_master
291
- WHERE name='index_users_on_username' AND type='index'
292
- 
293
-  (0.1ms) CREATE INDEX "index_users_on_email" ON "users" ("email")
294
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
295
-  (0.6ms) commit transaction
296
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
297
-  (0.1ms) SELECT sql
298
- FROM sqlite_master
299
- WHERE name='index_oauth_access_grants_on_token' AND type='index'
300
- UNION ALL
301
- SELECT sql
302
- FROM sqlite_temp_master
303
- WHERE name='index_oauth_access_grants_on_token' AND type='index'
304
-
305
-  (0.1ms)  SELECT sql
306
- FROM sqlite_master
307
- WHERE name='index_oauth_access_tokens_on_refresh_token' AND type='index'
308
- UNION ALL
309
- SELECT sql
310
- FROM sqlite_temp_master
311
- WHERE name='index_oauth_access_tokens_on_refresh_token' AND type='index'
312
- 
313
-  (0.1ms) SELECT sql
314
- FROM sqlite_master
315
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
316
- UNION ALL
317
- SELECT sql
318
- FROM sqlite_temp_master
319
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
320
-
321
-  (0.1ms)  SELECT sql
322
- FROM sqlite_master
323
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
324
- UNION ALL
325
- SELECT sql
326
- FROM sqlite_temp_master
327
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
328
- 
329
-  (0.1ms) SELECT sql
330
- FROM sqlite_master
331
- WHERE name='index_oauth_applications_on_uid' AND type='index'
332
- UNION ALL
333
- SELECT sql
334
- FROM sqlite_temp_master
335
- WHERE name='index_oauth_applications_on_uid' AND type='index'
336
-
337
-  (0.1ms)  SELECT sql
338
- FROM sqlite_master
339
- WHERE name='index_users_on_email' AND type='index'
340
- UNION ALL
341
- SELECT sql
342
- FROM sqlite_temp_master
343
- WHERE name='index_users_on_email' AND type='index'
344
- 
345
-  (0.1ms) SELECT sql
346
- FROM sqlite_master
347
- WHERE name='index_users_on_name' AND type='index'
348
- UNION ALL
349
- SELECT sql
350
- FROM sqlite_temp_master
351
- WHERE name='index_users_on_name' AND type='index'
352
-
353
-  (0.1ms)  SELECT sql
354
- FROM sqlite_master
355
- WHERE name='index_users_on_username' AND type='index'
356
- UNION ALL
357
- SELECT sql
358
- FROM sqlite_temp_master
359
- WHERE name='index_users_on_username' AND type='index'
360
- 
361
-  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
362
-  (0.5ms) select sqlite_version(*)
363
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
364
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
365
- Migrating to CreateDoorkeeperTables (0)
366
-  (0.1ms) begin transaction
367
-  (0.3ms) CREATE TABLE "oauth_applications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "secret" varchar(255) NOT NULL, "redirect_uri" text NOT NULL, "created_at" datetime, "updated_at" datetime)
368
-  (0.2ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
369
-  (0.2ms) CREATE TABLE "oauth_access_grants" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "resource_owner_id" integer NOT NULL, "application_id" integer NOT NULL, "token" varchar(255) NOT NULL, "expires_in" integer NOT NULL, "redirect_uri" text NOT NULL, "created_at" datetime NOT NULL, "revoked_at" datetime, "scopes" varchar(255))
370
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
371
-  (0.1ms) CREATE TABLE "oauth_access_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "resource_owner_id" integer, "application_id" integer, "token" varchar(255) NOT NULL, "refresh_token" varchar(255), "expires_in" integer, "revoked_at" datetime, "created_at" datetime NOT NULL, "scopes" varchar(255))
372
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
373
-  (0.1ms) SELECT sql
374
- FROM sqlite_master
375
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
376
- UNION ALL
377
- SELECT sql
378
- FROM sqlite_temp_master
379
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
380
-
381
-  (0.1ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
382
-  (0.1ms) SELECT sql
383
- FROM sqlite_master
384
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
385
- UNION ALL
386
- SELECT sql
387
- FROM sqlite_temp_master
388
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
389
-
390
-  (0.1ms)  SELECT sql
391
- FROM sqlite_master
392
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
393
- UNION ALL
394
- SELECT sql
395
- FROM sqlite_temp_master
396
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
397
- 
398
-  (0.1ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
399
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "0"]]
400
-  (0.7ms) commit transaction
401
- Migrating to CreateUsers (1)
402
-  (0.0ms) begin transaction
403
-  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255) NOT NULL, "password_hash" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime)
404
-  (0.1ms) CREATE INDEX "index_users_on_username" ON "users" ("username")
405
-  (0.1ms) SELECT sql
406
- FROM sqlite_master
407
- WHERE name='index_users_on_username' AND type='index'
408
- UNION ALL
409
- SELECT sql
410
- FROM sqlite_temp_master
411
- WHERE name='index_users_on_username' AND type='index'
412
-
413
-  (0.1ms) CREATE INDEX "index_users_on_name" ON "users" ("name")
414
-  (0.0ms) SELECT sql
415
- FROM sqlite_master
416
- WHERE name='index_users_on_name' AND type='index'
417
- UNION ALL
418
- SELECT sql
419
- FROM sqlite_temp_master
420
- WHERE name='index_users_on_name' AND type='index'
421
-
422
-  (0.1ms)  SELECT sql
423
- FROM sqlite_master
424
- WHERE name='index_users_on_username' AND type='index'
425
- UNION ALL
426
- SELECT sql
427
- FROM sqlite_temp_master
428
- WHERE name='index_users_on_username' AND type='index'
429
- 
430
-  (0.1ms) CREATE INDEX "index_users_on_email" ON "users" ("email")
431
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
432
-  (0.6ms) commit transaction
433
- ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
434
-  (0.1ms) SELECT sql
435
- FROM sqlite_master
436
- WHERE name='index_oauth_access_grants_on_token' AND type='index'
437
- UNION ALL
438
- SELECT sql
439
- FROM sqlite_temp_master
440
- WHERE name='index_oauth_access_grants_on_token' AND type='index'
441
-
442
-  (0.1ms)  SELECT sql
443
- FROM sqlite_master
444
- WHERE name='index_oauth_access_tokens_on_refresh_token' AND type='index'
445
- UNION ALL
446
- SELECT sql
447
- FROM sqlite_temp_master
448
- WHERE name='index_oauth_access_tokens_on_refresh_token' AND type='index'
449
- 
450
-  (0.1ms) SELECT sql
451
- FROM sqlite_master
452
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
453
- UNION ALL
454
- SELECT sql
455
- FROM sqlite_temp_master
456
- WHERE name='index_oauth_access_tokens_on_resource_owner_id' AND type='index'
457
-
458
-  (0.1ms)  SELECT sql
459
- FROM sqlite_master
460
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
461
- UNION ALL
462
- SELECT sql
463
- FROM sqlite_temp_master
464
- WHERE name='index_oauth_access_tokens_on_token' AND type='index'
465
- 
466
-  (0.1ms) SELECT sql
467
- FROM sqlite_master
468
- WHERE name='index_oauth_applications_on_uid' AND type='index'
469
- UNION ALL
470
- SELECT sql
471
- FROM sqlite_temp_master
472
- WHERE name='index_oauth_applications_on_uid' AND type='index'
473
-
474
-  (0.1ms)  SELECT sql
475
- FROM sqlite_master
476
- WHERE name='index_users_on_email' AND type='index'
477
- UNION ALL
478
- SELECT sql
479
- FROM sqlite_temp_master
480
- WHERE name='index_users_on_email' AND type='index'
481
- 
482
-  (0.1ms) SELECT sql
483
- FROM sqlite_master
484
- WHERE name='index_users_on_name' AND type='index'
485
- UNION ALL
486
- SELECT sql
487
- FROM sqlite_temp_master
488
- WHERE name='index_users_on_name' AND type='index'
489
-
490
-  (0.1ms)  SELECT sql
491
- FROM sqlite_master
492
- WHERE name='index_users_on_username' AND type='index'
493
- UNION ALL
494
- SELECT sql
495
- FROM sqlite_temp_master
496
- WHERE name='index_users_on_username' AND type='index'
497
-