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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MGIwMjBlNDc2YWY3YzVkZjdiYjg0NWNhYTU3ZDY2NTYwZmZhMTFiMw==
5
- data.tar.gz: !binary |-
6
- ZmQ0MGZmMWFkMmNiMjM0MGRlZWQyMDE0YThmODgwYmVlMGNhNDJhNQ==
2
+ SHA1:
3
+ metadata.gz: 0e7a1dacfe43a48d145203e71cf1553f5cbd9d6c
4
+ data.tar.gz: f4902af30805e8dcc68ac0051f0c07658bd0576e
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NGUwM2NkODE3Njk2MzlhNmY1OGNjZTY0NjkwMDVhYzg0YmI1MmIwNGRiMWMy
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
- "\nSchema {##{SecureRandom.hex(4)} .schema}\n------\n" +
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
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Api
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
Binary file
@@ -336,3 +336,71 @@ Connecting to database specified by database.yml
336
336
   (0.8ms) 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
   (0.8ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
338
338
   (0.1ms) SELECT version FROM "schema_migrations"
339
+ Connecting to database specified by database.yml
340
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
341
+  (0.3ms) select sqlite_version(*)
342
+  (1.0ms) DROP TABLE "dummy_users"
343
+  (1.1ms) 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
+  (0.9ms) DROP TABLE "oauth_access_grants"
345
+  (0.9ms) 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
+  (0.9ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
347
+  (0.9ms) DROP TABLE "oauth_access_tokens"
348
+  (0.8ms) 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)) 
349
+  (1.0ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
350
+  (0.7ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
351
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
352
+  (0.9ms) DROP TABLE "oauth_applications"
353
+  (0.8ms) 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
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
355
+  (0.1ms) SELECT version FROM "schema_migrations"
356
+ Connecting to database specified by database.yml
357
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
358
+  (0.3ms) select sqlite_version(*)
359
+  (1.1ms) DROP TABLE "dummy_users"
360
+  (1.0ms) 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
+  (0.8ms) DROP TABLE "oauth_access_grants"
362
+  (1.0ms) 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
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
364
+  (0.8ms) DROP TABLE "oauth_access_tokens"
365
+  (0.9ms) 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)) 
366
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
367
+  (0.7ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
368
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
369
+  (0.8ms) DROP TABLE "oauth_applications"
370
+  (0.8ms) 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
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
372
+  (0.1ms) SELECT version FROM "schema_migrations"
373
+ Connecting to database specified by database.yml
374
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
375
+  (0.2ms) select sqlite_version(*)
376
+  (1.8ms) DROP TABLE "dummy_users"
377
+  (1.2ms) 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
+  (1.0ms) DROP TABLE "oauth_access_grants"
379
+  (0.9ms) 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
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
381
+  (0.8ms) DROP TABLE "oauth_access_tokens"
382
+  (1.0ms) 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)) 
383
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
384
+  (0.8ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
385
+  (0.9ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
386
+  (2.0ms) DROP TABLE "oauth_applications"
387
+  (0.8ms) 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
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
389
+  (0.1ms) SELECT version FROM "schema_migrations"
390
+ Connecting to database specified by database.yml
391
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
392
+  (0.3ms) select sqlite_version(*)
393
+  (1.5ms) DROP TABLE "dummy_users"
394
+  (0.9ms) 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
+  (0.7ms) DROP TABLE "oauth_access_grants"
396
+  (0.8ms) 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
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
398
+  (0.8ms) DROP TABLE "oauth_access_tokens"
399
+  (0.8ms) 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)) 
400
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
401
+  (0.8ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
402
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
403
+  (0.8ms) DROP TABLE "oauth_applications"
404
+  (0.8ms) 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
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
406
+  (0.1ms) SELECT version FROM "schema_migrations"
@@ -393,3 +393,149 @@ Connecting to database specified by database.yml
393
393
   (0.1ms) rollback transaction
394
394
   (0.1ms) begin transaction
395
395
   (0.0ms) rollback transaction
396
+ Connecting to database specified by database.yml
397
+  (0.5ms) begin transaction
398
+  (0.1ms) rollback transaction
399
+  (0.0ms) begin transaction
400
+  (0.0ms) rollback transaction
401
+  (0.0ms) begin transaction
402
+  (0.0ms) rollback transaction
403
+  (0.0ms) begin transaction
404
+  (0.0ms) rollback transaction
405
+  (0.0ms) begin transaction
406
+  (0.0ms) rollback transaction
407
+  (0.0ms) begin transaction
408
+  (0.0ms) rollback transaction
409
+  (0.0ms) begin transaction
410
+  (0.1ms) rollback transaction
411
+  (0.1ms) begin transaction
412
+  (0.1ms) rollback transaction
413
+  (0.1ms) begin transaction
414
+  (0.1ms) rollback transaction
415
+  (0.1ms) begin transaction
416
+  (0.0ms) SAVEPOINT active_record_1
417
+ SQL (9.7ms) 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]]
418
+  (0.1ms) RELEASE SAVEPOINT active_record_1
419
+  (0.4ms) rollback transaction
420
+  (0.1ms) begin transaction
421
+  (0.0ms) rollback transaction
422
+  (0.0ms) begin transaction
423
+  (0.0ms) SAVEPOINT active_record_1
424
+ SQL (0.3ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
426
+ DummyUser Load (0.2ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
427
+  (0.4ms) rollback transaction
428
+  (0.1ms) begin transaction
429
+  (0.0ms) rollback transaction
430
+  (0.0ms) begin transaction
431
+  (0.1ms) rollback transaction
432
+ Connecting to database specified by database.yml
433
+  (0.4ms) begin transaction
434
+  (0.0ms) rollback transaction
435
+  (0.0ms) begin transaction
436
+  (0.1ms) rollback transaction
437
+  (0.0ms) begin transaction
438
+  (0.0ms) rollback transaction
439
+  (0.0ms) begin transaction
440
+  (0.0ms) SAVEPOINT active_record_1
441
+ SQL (4.6ms) 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]]
442
+  (0.0ms) RELEASE SAVEPOINT active_record_1
443
+  (0.3ms) rollback transaction
444
+  (0.0ms) begin transaction
445
+  (0.0ms) SAVEPOINT active_record_1
446
+ SQL (0.3ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
448
+ DummyUser Load (0.1ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
449
+  (0.3ms) rollback transaction
450
+  (0.0ms) begin transaction
451
+  (0.0ms) rollback transaction
452
+  (0.0ms) begin transaction
453
+  (0.0ms) rollback transaction
454
+  (0.0ms) begin transaction
455
+  (0.0ms) rollback transaction
456
+  (0.0ms) begin transaction
457
+  (0.0ms) rollback transaction
458
+  (0.0ms) begin transaction
459
+  (0.1ms) rollback transaction
460
+  (0.0ms) begin transaction
461
+  (0.0ms) rollback transaction
462
+  (0.0ms) begin transaction
463
+  (0.0ms) rollback transaction
464
+  (0.0ms) begin transaction
465
+  (0.0ms) rollback transaction
466
+  (0.0ms) begin transaction
467
+  (0.0ms) rollback transaction
468
+ Connecting to database specified by database.yml
469
+  (0.4ms) begin transaction
470
+  (0.0ms) rollback transaction
471
+  (0.0ms) begin transaction
472
+  (0.0ms) rollback transaction
473
+  (0.0ms) begin transaction
474
+  (0.0ms) SAVEPOINT active_record_1
475
+ SQL (2.4ms) INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
477
+ DummyUser Load (0.1ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
478
+  (1.0ms) rollback transaction
479
+  (0.1ms) begin transaction
480
+  (0.0ms) SAVEPOINT active_record_1
481
+ SQL (0.3ms) INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
483
+  (0.4ms) rollback transaction
484
+  (0.0ms) begin transaction
485
+  (0.0ms) rollback transaction
486
+  (0.0ms) begin transaction
487
+  (0.0ms) rollback transaction
488
+  (0.0ms) begin transaction
489
+  (0.0ms) rollback transaction
490
+  (0.0ms) begin transaction
491
+  (0.0ms) rollback transaction
492
+  (0.0ms) begin transaction
493
+  (0.0ms) rollback transaction
494
+  (0.1ms) begin transaction
495
+  (0.0ms) rollback transaction
496
+  (0.0ms) begin transaction
497
+  (0.0ms) rollback transaction
498
+  (0.0ms) begin transaction
499
+  (0.0ms) rollback transaction
500
+  (0.0ms) begin transaction
501
+  (0.0ms) rollback transaction
502
+  (0.0ms) begin transaction
503
+  (0.0ms) rollback transaction
504
+  (0.0ms) begin transaction
505
+  (0.0ms) rollback transaction
506
+ Connecting to database specified by database.yml
507
+  (0.4ms) begin transaction
508
+  (0.0ms) SAVEPOINT active_record_1
509
+ SQL (2.4ms) 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]]
510
+  (0.0ms) RELEASE SAVEPOINT active_record_1
511
+  (1.0ms) rollback transaction
512
+  (0.1ms) begin transaction
513
+  (0.0ms) SAVEPOINT active_record_1
514
+ SQL (0.2ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
516
+ DummyUser Load (0.1ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
517
+  (0.4ms) rollback transaction
518
+  (0.1ms) begin transaction
519
+  (0.1ms) rollback transaction
520
+  (0.0ms) begin transaction
521
+  (0.0ms) rollback transaction
522
+  (0.0ms) begin transaction
523
+  (0.0ms) rollback transaction
524
+  (0.0ms) begin transaction
525
+  (0.0ms) rollback transaction
526
+  (0.0ms) begin transaction
527
+  (0.0ms) rollback transaction
528
+  (0.0ms) begin transaction
529
+  (0.0ms) rollback transaction
530
+  (0.0ms) begin transaction
531
+  (0.0ms) rollback transaction
532
+  (0.0ms) begin transaction
533
+  (0.0ms) rollback transaction
534
+  (0.0ms) begin transaction
535
+  (0.0ms) rollback transaction
536
+  (0.0ms) begin transaction
537
+  (0.0ms) rollback transaction
538
+  (0.0ms) begin transaction
539
+  (0.0ms) rollback transaction
540
+  (0.0ms) begin transaction
541
+  (0.0ms) rollback transaction
@@ -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.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-15 00:00:00.000000000 Z
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