openstax_api 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/lib/openstax/api/representable_schema_printer.rb +2 -2
- data/lib/openstax/api/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +68 -0
- data/spec/dummy/log/test.log +146 -0
- data/spec/lib/openstax/api/representable_schema_printer_spec.rb +17 -0
- metadata +22 -22
- data/spec/representers/openstax/api/v1/representable_schema_printer_spec.rb +0 -19
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZmQ0MGZmMWFkMmNiMjM0MGRlZWQyMDE0YThmODgwYmVlMGNhNDJhNQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0e7a1dacfe43a48d145203e71cf1553f5cbd9d6c
|
4
|
+
data.tar.gz: f4902af30805e8dcc68ac0051f0c07658bd0576e
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZDVhNDY1ODIwY2I0OGMyYzNiNzBlODRkMmU4ZjQ2ODMzMWQ1NGZiYWE3ZTUx
|
11
|
-
NWY5YjM2ZjQwM2Q0ZWFmYzQzMzhjMmJlNzQyZDIxMTNiZjI2Yzc=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MzM5MjJmMjgxNTA2ODIwMjEwNmFjMjhlMTA0OTcwMzZlNjIzNDJiYzYwOWUw
|
14
|
-
YzlhNGZkMzQ1ZjY4MzhhMTJmOWU0MGIyYjQ1NmUxNmU0MzJkMjg4OGIwMmYy
|
15
|
-
YjY2YWQ5OGJjNzczNWYwOGVjMjg2ZWE2YTYxYTEwZjI2NTI0NmE=
|
6
|
+
metadata.gz: 15c9b06de5f9a8709778fd7296f370b63bd453e8c28b0a0b0459b09f384dc61e080859402c7ec2abf69edfec6e84797f6516137890158f32a4299bda5042374c
|
7
|
+
data.tar.gz: 41e17df6aeab2c68744ea46d0f85668ba526cc39403d223c38081f56f5ae4a49c1b822d60f85d6c68df13a560b289305740870275c70dd0e648e2a2b872d07b7
|
@@ -13,8 +13,8 @@ module OpenStax
|
|
13
13
|
|
14
14
|
json_string = JSON.pretty_generate(schema, {indent: options[:indent]})
|
15
15
|
|
16
|
-
"\
|
17
|
-
"<pre class='code'>\n#{json_string}\n</pre>\n"
|
16
|
+
"\n## Schema {##{SecureRandom.hex(4)} .schema}\n" +
|
17
|
+
"\n<pre class='code'>\n#{json_string}\n</pre>\n"
|
18
18
|
end
|
19
19
|
|
20
20
|
protected
|
data/lib/openstax/api/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -336,3 +336,71 @@ Connecting to database specified by database.yml
|
|
336
336
|
[1m[35m (0.8ms)[0m 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 NOT NULL, "updated_at" datetime NOT NULL)
|
337
337
|
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
338
338
|
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
339
|
+
Connecting to database specified by database.yml
|
340
|
+
[1m[36m (2.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
341
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
342
|
+
[1m[36m (1.0ms)[0m [1mDROP TABLE "dummy_users"[0m
|
343
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255), "password_hash" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
344
|
+
[1m[36m (0.9ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
345
|
+
[1m[35m (0.9ms)[0m 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))
|
346
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
347
|
+
[1m[35m (0.9ms)[0m DROP TABLE "oauth_access_tokens"
|
348
|
+
[1m[36m (0.8ms)[0m [1mCREATE 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)) [0m
|
349
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
350
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
351
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
352
|
+
[1m[36m (0.9ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
353
|
+
[1m[35m (0.8ms)[0m 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 NOT NULL, "updated_at" datetime NOT NULL)
|
354
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
355
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
356
|
+
Connecting to database specified by database.yml
|
357
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
358
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
359
|
+
[1m[36m (1.1ms)[0m [1mDROP TABLE "dummy_users"[0m
|
360
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255), "password_hash" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
361
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
362
|
+
[1m[35m (1.0ms)[0m 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))
|
363
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
364
|
+
[1m[35m (0.8ms)[0m DROP TABLE "oauth_access_tokens"
|
365
|
+
[1m[36m (0.9ms)[0m [1mCREATE 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)) [0m
|
366
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
367
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
368
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
369
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
370
|
+
[1m[35m (0.8ms)[0m 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 NOT NULL, "updated_at" datetime NOT NULL)
|
371
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
372
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
373
|
+
Connecting to database specified by database.yml
|
374
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
375
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
376
|
+
[1m[36m (1.8ms)[0m [1mDROP TABLE "dummy_users"[0m
|
377
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255), "password_hash" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
378
|
+
[1m[36m (1.0ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
379
|
+
[1m[35m (0.9ms)[0m 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))
|
380
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
381
|
+
[1m[35m (0.8ms)[0m DROP TABLE "oauth_access_tokens"
|
382
|
+
[1m[36m (1.0ms)[0m [1mCREATE 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)) [0m
|
383
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
384
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
385
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
386
|
+
[1m[36m (2.0ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
387
|
+
[1m[35m (0.8ms)[0m 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 NOT NULL, "updated_at" datetime NOT NULL)
|
388
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
389
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
390
|
+
Connecting to database specified by database.yml
|
391
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
392
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
393
|
+
[1m[36m (1.5ms)[0m [1mDROP TABLE "dummy_users"[0m
|
394
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255), "password_hash" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
395
|
+
[1m[36m (0.7ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
396
|
+
[1m[35m (0.8ms)[0m 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))
|
397
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
398
|
+
[1m[35m (0.8ms)[0m DROP TABLE "oauth_access_tokens"
|
399
|
+
[1m[36m (0.8ms)[0m [1mCREATE 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)) [0m
|
400
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
401
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
402
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
403
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
404
|
+
[1m[35m (0.8ms)[0m 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 NOT NULL, "updated_at" datetime NOT NULL)
|
405
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
406
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
data/spec/dummy/log/test.log
CHANGED
@@ -393,3 +393,149 @@ Connecting to database specified by database.yml
|
|
393
393
|
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
394
394
|
[1m[35m (0.1ms)[0m begin transaction
|
395
395
|
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
396
|
+
Connecting to database specified by database.yml
|
397
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
398
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
399
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
400
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
401
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
402
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
403
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
404
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
405
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
406
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
407
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
408
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
409
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
410
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
411
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
412
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
413
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
414
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
415
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
416
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
417
|
+
[1m[36mSQL (9.7ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 16 Apr 2014 16:53:28 UTC +00:00], ["password_hash", nil], ["updated_at", Wed, 16 Apr 2014 16:53:28 UTC +00:00], ["username", nil]]
|
418
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
419
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
420
|
+
[1m[35m (0.1ms)[0m begin transaction
|
421
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
422
|
+
[1m[35m (0.0ms)[0m begin transaction
|
423
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
424
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["created_at", Wed, 16 Apr 2014 16:53:28 UTC +00:00], ["password_hash", nil], ["updated_at", Wed, 16 Apr 2014 16:53:28 UTC +00:00], ["username", nil]]
|
425
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
426
|
+
[1m[35mDummyUser Load (0.2ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
|
427
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
428
|
+
[1m[35m (0.1ms)[0m begin transaction
|
429
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
430
|
+
[1m[35m (0.0ms)[0m begin transaction
|
431
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
432
|
+
Connecting to database specified by database.yml
|
433
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
434
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
435
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
436
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
437
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
438
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
439
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
440
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
441
|
+
[1m[36mSQL (4.6ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Tue, 22 Apr 2014 19:04:35 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 19:04:35 UTC +00:00], ["username", nil]]
|
442
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
443
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
444
|
+
[1m[35m (0.0ms)[0m begin transaction
|
445
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
446
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["created_at", Tue, 22 Apr 2014 19:04:35 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 19:04:35 UTC +00:00], ["username", nil]]
|
447
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
448
|
+
[1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
|
449
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
450
|
+
[1m[35m (0.0ms)[0m begin transaction
|
451
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
452
|
+
[1m[35m (0.0ms)[0m begin transaction
|
453
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
454
|
+
[1m[35m (0.0ms)[0m begin transaction
|
455
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
456
|
+
[1m[35m (0.0ms)[0m begin transaction
|
457
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
458
|
+
[1m[35m (0.0ms)[0m begin transaction
|
459
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
460
|
+
[1m[35m (0.0ms)[0m begin transaction
|
461
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
462
|
+
[1m[35m (0.0ms)[0m begin transaction
|
463
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
464
|
+
[1m[35m (0.0ms)[0m begin transaction
|
465
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
466
|
+
[1m[35m (0.0ms)[0m begin transaction
|
467
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
468
|
+
Connecting to database specified by database.yml
|
469
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
470
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
471
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
472
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
473
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
474
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
475
|
+
[1m[36mSQL (2.4ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Tue, 22 Apr 2014 19:07:39 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 19:07:39 UTC +00:00], ["username", nil]]
|
476
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
477
|
+
[1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]]
|
478
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
479
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
480
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
481
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Tue, 22 Apr 2014 19:07:39 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 19:07:39 UTC +00:00], ["username", nil]]
|
482
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
483
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
484
|
+
[1m[35m (0.0ms)[0m begin transaction
|
485
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
486
|
+
[1m[35m (0.0ms)[0m begin transaction
|
487
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
488
|
+
[1m[35m (0.0ms)[0m begin transaction
|
489
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
490
|
+
[1m[35m (0.0ms)[0m begin transaction
|
491
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
492
|
+
[1m[35m (0.0ms)[0m begin transaction
|
493
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
494
|
+
[1m[35m (0.1ms)[0m begin transaction
|
495
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
496
|
+
[1m[35m (0.0ms)[0m begin transaction
|
497
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
498
|
+
[1m[35m (0.0ms)[0m begin transaction
|
499
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
500
|
+
[1m[35m (0.0ms)[0m begin transaction
|
501
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
502
|
+
[1m[35m (0.0ms)[0m begin transaction
|
503
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
504
|
+
[1m[35m (0.0ms)[0m begin transaction
|
505
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
506
|
+
Connecting to database specified by database.yml
|
507
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
508
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
509
|
+
[1m[36mSQL (2.4ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Tue, 22 Apr 2014 19:08:01 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 19:08:01 UTC +00:00], ["username", nil]]
|
510
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
511
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
512
|
+
[1m[35m (0.1ms)[0m begin transaction
|
513
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
514
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["created_at", Tue, 22 Apr 2014 19:08:01 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 19:08:01 UTC +00:00], ["username", nil]]
|
515
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
516
|
+
[1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
|
517
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
518
|
+
[1m[35m (0.1ms)[0m begin transaction
|
519
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
520
|
+
[1m[35m (0.0ms)[0m begin transaction
|
521
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
522
|
+
[1m[35m (0.0ms)[0m begin transaction
|
523
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
524
|
+
[1m[35m (0.0ms)[0m begin transaction
|
525
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
526
|
+
[1m[35m (0.0ms)[0m begin transaction
|
527
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
528
|
+
[1m[35m (0.0ms)[0m begin transaction
|
529
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
530
|
+
[1m[35m (0.0ms)[0m begin transaction
|
531
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
532
|
+
[1m[35m (0.0ms)[0m begin transaction
|
533
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
534
|
+
[1m[35m (0.0ms)[0m begin transaction
|
535
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
536
|
+
[1m[35m (0.0ms)[0m begin transaction
|
537
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
538
|
+
[1m[35m (0.0ms)[0m begin transaction
|
539
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
540
|
+
[1m[35m (0.0ms)[0m begin transaction
|
541
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module OpenStax
|
4
|
+
module Api
|
5
|
+
describe RepresentableSchemaPrinter do
|
6
|
+
it 'must print model schemas' do
|
7
|
+
schema = RepresentableSchemaPrinter.json(DummyUserRepresenter)
|
8
|
+
expect(schema).to include('## Schema')
|
9
|
+
expect(schema).to include('{#')
|
10
|
+
expect(schema).to include(' .schema}')
|
11
|
+
expect(schema).to include("<pre class='code'>")
|
12
|
+
expect(schema).to include("{\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n },\n \"password_hash\": {\n }\n },\n \"required\": [\n\n ],\n \"definitions\": {\n }\n}")
|
13
|
+
expect(schema).to include('</pre>')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dante Soares
|
@@ -9,118 +9,118 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '3.1'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '3.1'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: roar
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 0.12.1
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 0.12.1
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: roar-rails
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 0.1.2
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 0.1.2
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: doorkeeper
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0.5'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0.5'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: openstax_utilities
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: 1.0.1
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: 1.0.1
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: exception_notification
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '4.0'
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '4.0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: sqlite3
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - ~>
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '1.3'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - ~>
|
109
|
+
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '1.3'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: rspec-rails
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - ~>
|
116
|
+
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '2.14'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - ~>
|
123
|
+
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '2.14'
|
126
126
|
description: Provides models, controllers and libraries that help OpenStax products
|
@@ -188,10 +188,10 @@ files:
|
|
188
188
|
- spec/lib/openstax/api/apipie.rb
|
189
189
|
- spec/lib/openstax/api/constraints_spec.rb
|
190
190
|
- spec/lib/openstax/api/doorkeeper_extensions_spec.rb
|
191
|
+
- spec/lib/openstax/api/representable_schema_printer_spec.rb
|
191
192
|
- spec/lib/openstax/api/roar.rb
|
192
193
|
- spec/lib/openstax/api/route_extensions_spec.rb
|
193
194
|
- spec/models/openstax/api/api_user_spec.rb
|
194
|
-
- spec/representers/openstax/api/v1/representable_schema_printer_spec.rb
|
195
195
|
- spec/spec_helper.rb
|
196
196
|
homepage: https://github.com/openstax/openstax_api
|
197
197
|
licenses:
|
@@ -203,12 +203,12 @@ require_paths:
|
|
203
203
|
- lib
|
204
204
|
required_ruby_version: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- -
|
206
|
+
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
|
-
- -
|
211
|
+
- - ">="
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
@@ -260,8 +260,8 @@ test_files:
|
|
260
260
|
- spec/lib/openstax/api/apipie.rb
|
261
261
|
- spec/lib/openstax/api/constraints_spec.rb
|
262
262
|
- spec/lib/openstax/api/doorkeeper_extensions_spec.rb
|
263
|
+
- spec/lib/openstax/api/representable_schema_printer_spec.rb
|
263
264
|
- spec/lib/openstax/api/roar.rb
|
264
265
|
- spec/lib/openstax/api/route_extensions_spec.rb
|
265
266
|
- spec/models/openstax/api/api_user_spec.rb
|
266
|
-
- spec/representers/openstax/api/v1/representable_schema_printer_spec.rb
|
267
267
|
- spec/spec_helper.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
module OpenStax
|
4
|
-
module Api
|
5
|
-
module V1
|
6
|
-
describe RepresentableSchemaPrinter do
|
7
|
-
it 'must print model schemas' do
|
8
|
-
schema = RepresentableSchemaPrinter.json(DummyUserRepresenter)
|
9
|
-
expect(schema).to include('Schema')
|
10
|
-
expect(schema).to include('.schema')
|
11
|
-
expect(schema).to include('------')
|
12
|
-
expect(schema).to include("<pre class='code'>")
|
13
|
-
expect(schema).to include("{\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n },\n \"password_hash\": {\n }\n },\n \"required\": [\n\n ],\n \"definitions\": {\n }\n}")
|
14
|
-
expect(schema).to include('</pre>')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|