openstax_api 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/app/models/openstax/api/api_user.rb +23 -39
- data/lib/openstax/api/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +78 -0
- data/spec/dummy/log/test.log +146 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c3f95b0e932b5831bbc419f9e6758ed79323b9b
|
4
|
+
data.tar.gz: a895d8183a3b9c6b8afc990d9024bc982d653114
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67c89d1173f8d5dc574fb80ae6641dd1d9aca4b3146bdce40999063596b66512b1f53d36dc290f96b4acb37390115baa71c4147630c8dc83ed46c9442ad01531
|
7
|
+
data.tar.gz: 59c872e1461ba0e9d5e7f6d021431182bbc37af6d8a828ed8bee8b80189c8c703f22440414d6449ee5310a98492d391857bf1e2883a7b0ec5ca3ea7fa984c1c3
|
data/README.md
CHANGED
@@ -17,37 +17,29 @@ module OpenStax
|
|
17
17
|
module Api
|
18
18
|
class ApiUser
|
19
19
|
|
20
|
-
|
21
|
-
# If we have a doorkeeper_token, derive the Application and User
|
22
|
-
# from it. If not, we're in case #1 above and the User should be
|
23
|
-
# retrieved from the alternative proc provided in arguments and
|
24
|
-
# there is no application.
|
25
|
-
#
|
26
|
-
# In both cases, don't actually retrieve any data -- just save off
|
27
|
-
# procs that can get it for us. This could save us some queries.
|
20
|
+
USER_CLASS = OpenStax::Api.configuration.user_class_name.constantize
|
28
21
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
@user_proc = lambda {
|
33
|
-
doorkeeper_token.resource_owner_id ?
|
34
|
-
user_class.find(doorkeeper_token.resource_owner_id) :
|
35
|
-
nil
|
36
|
-
}
|
37
|
-
else
|
38
|
-
@user_proc = non_doorkeeper_user_proc
|
39
|
-
@application_proc = lambda { nil }
|
40
|
-
end
|
22
|
+
def initialize(doorkeeper_token, non_doorkeeper_user_proc)
|
23
|
+
@doorkeeper_token = doorkeeper_token
|
24
|
+
@non_doorkeeper_user_proc = non_doorkeeper_user_proc
|
41
25
|
end
|
42
26
|
|
43
27
|
# Returns a Doorkeeper::Application or nil
|
44
28
|
def application
|
45
|
-
|
29
|
+
# If we have a doorkeeper_token, derive the Application from it.
|
30
|
+
# If not, we're in case #1 above and the Application should be nil.
|
31
|
+
@application ||= @doorkeeper_token.try(:application)
|
46
32
|
end
|
47
33
|
|
48
|
-
#
|
34
|
+
# Returns an instance of User, AnonymousUser, or nil
|
49
35
|
def human_user
|
50
|
-
|
36
|
+
# If we have a doorkeeper_token, derive the User from it.
|
37
|
+
# If not, we're in case #1 above and the User should be
|
38
|
+
# retrieved from the non_doorkeeper_user_proc.
|
39
|
+
@user ||= @doorkeeper_token ? \
|
40
|
+
USER_CLASS.where(
|
41
|
+
:id => @doorkeeper_token.try(:resource_owner_id)
|
42
|
+
).first : @non_doorkeeper_user_proc.call
|
51
43
|
end
|
52
44
|
|
53
45
|
##########################
|
@@ -58,24 +50,16 @@ module OpenStax
|
|
58
50
|
OSU::AccessPolicy.action_allowed?(action, self, resource)
|
59
51
|
end
|
60
52
|
|
61
|
-
def
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
end
|
68
|
-
|
69
|
-
def can_update?(resource)
|
70
|
-
can_do?(:update, resource)
|
71
|
-
end
|
72
|
-
|
73
|
-
def can_destroy?(resource)
|
74
|
-
can_do?(:destroy, resource)
|
53
|
+
def method_missing(method_name, *arguments, &block)
|
54
|
+
if method_name.to_s =~ /can_(.*)\?/
|
55
|
+
can_do?($1.to_sym, arguments.first)
|
56
|
+
else
|
57
|
+
super
|
58
|
+
end
|
75
59
|
end
|
76
60
|
|
77
|
-
def
|
78
|
-
|
61
|
+
def respond_to_missing?(method_name, include_private = false)
|
62
|
+
method_name.to_s =~ /can_(.*)\?/ || super
|
79
63
|
end
|
80
64
|
|
81
65
|
end
|
data/lib/openstax/api/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -404,3 +404,81 @@ Connecting to database specified by database.yml
|
|
404
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
405
|
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
406
406
|
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
407
|
+
Connecting to database specified by database.yml
|
408
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
409
|
+
[1m[35m (1.2ms)[0m select sqlite_version(*)
|
410
|
+
[1m[36m (1.2ms)[0m [1mDROP TABLE "dummy_users"[0m
|
411
|
+
[1m[35m (0.8ms)[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)
|
412
|
+
[1m[36m (0.7ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
413
|
+
[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))
|
414
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
415
|
+
[1m[35m (1.2ms)[0m DROP TABLE "oauth_access_tokens"
|
416
|
+
[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
|
417
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
418
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
419
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
420
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
421
|
+
[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)
|
422
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
423
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
424
|
+
Connecting to database specified by database.yml
|
425
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
426
|
+
Migrating to CreateDoorkeeperTables (0)
|
427
|
+
Migrating to CreateDummyUsers (1)
|
428
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
429
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
430
|
+
Connecting to database specified by database.yml
|
431
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
432
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
433
|
+
[1m[36m (2.1ms)[0m [1mDROP TABLE "dummy_users"[0m
|
434
|
+
[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)
|
435
|
+
[1m[36m (0.9ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
436
|
+
[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))
|
437
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
438
|
+
[1m[35m (0.8ms)[0m DROP TABLE "oauth_access_tokens"
|
439
|
+
[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
|
440
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
441
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
442
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
443
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
444
|
+
[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)
|
445
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
446
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
447
|
+
Connecting to database specified by database.yml
|
448
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
449
|
+
[1m[35m (1.0ms)[0m select sqlite_version(*)
|
450
|
+
[1m[36m (1.0ms)[0m [1mDROP TABLE "dummy_users"[0m
|
451
|
+
[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)
|
452
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
453
|
+
[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))
|
454
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
455
|
+
[1m[35m (1.2ms)[0m DROP TABLE "oauth_access_tokens"
|
456
|
+
[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
|
457
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
458
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
459
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
460
|
+
[1m[36m (0.7ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
461
|
+
[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)
|
462
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
463
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
464
|
+
Connecting to database specified by database.yml
|
465
|
+
Connecting to database specified by database.yml
|
466
|
+
Connecting to database specified by database.yml
|
467
|
+
Connecting to database specified by database.yml
|
468
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
469
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
470
|
+
[1m[36m (1.3ms)[0m [1mDROP TABLE "dummy_users"[0m
|
471
|
+
[1m[35m (0.8ms)[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)
|
472
|
+
[1m[36m (0.7ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
473
|
+
[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))
|
474
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
475
|
+
[1m[35m (0.7ms)[0m DROP TABLE "oauth_access_tokens"
|
476
|
+
[1m[36m (0.7ms)[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
|
477
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
478
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
479
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
480
|
+
[1m[36m (0.7ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
481
|
+
[1m[35m (0.7ms)[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)
|
482
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
483
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
484
|
+
Connecting to database specified by database.yml
|
data/spec/dummy/log/test.log
CHANGED
@@ -539,3 +539,149 @@ Connecting to database specified by database.yml
|
|
539
539
|
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
540
540
|
[1m[35m (0.0ms)[0m begin transaction
|
541
541
|
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
542
|
+
Connecting to database specified by database.yml
|
543
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
544
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
545
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
546
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
547
|
+
[1m[36mSQL (4.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Tue, 22 Apr 2014 23:05:51 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 23:05:51 UTC +00:00], ["username", nil]]
|
548
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
549
|
+
[1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]]
|
550
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
551
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
552
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
553
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Tue, 22 Apr 2014 23:05:51 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 23:05:51 UTC +00:00], ["username", nil]]
|
554
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
555
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
556
|
+
[1m[35m (0.0ms)[0m begin transaction
|
557
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
558
|
+
[1m[35m (0.0ms)[0m begin transaction
|
559
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
560
|
+
[1m[35m (0.0ms)[0m begin transaction
|
561
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
562
|
+
[1m[35m (0.0ms)[0m begin transaction
|
563
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
564
|
+
[1m[35m (0.0ms)[0m begin transaction
|
565
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
566
|
+
[1m[35m (0.0ms)[0m begin transaction
|
567
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
568
|
+
[1m[35m (0.0ms)[0m begin transaction
|
569
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
570
|
+
[1m[35m (0.0ms)[0m begin transaction
|
571
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
572
|
+
[1m[35m (0.0ms)[0m begin transaction
|
573
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
574
|
+
[1m[35m (0.0ms)[0m begin transaction
|
575
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
576
|
+
[1m[35m (0.0ms)[0m begin transaction
|
577
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
578
|
+
Connecting to database specified by database.yml
|
579
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
580
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
581
|
+
[1m[36mSQL (2.5ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Tue, 22 Apr 2014 23:06:01 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 23:06:01 UTC +00:00], ["username", nil]]
|
582
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
583
|
+
[1m[36m (1.1ms)[0m [1mrollback transaction[0m
|
584
|
+
[1m[35m (0.1ms)[0m begin transaction
|
585
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
586
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["created_at", Tue, 22 Apr 2014 23:06:01 UTC +00:00], ["password_hash", nil], ["updated_at", Tue, 22 Apr 2014 23:06:01 UTC +00:00], ["username", nil]]
|
587
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
588
|
+
[1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
|
589
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
590
|
+
[1m[35m (0.0ms)[0m begin transaction
|
591
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
592
|
+
[1m[35m (0.0ms)[0m begin transaction
|
593
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
594
|
+
[1m[35m (0.0ms)[0m begin transaction
|
595
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
596
|
+
[1m[35m (0.0ms)[0m begin transaction
|
597
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
598
|
+
[1m[35m (0.0ms)[0m begin transaction
|
599
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
600
|
+
[1m[35m (0.0ms)[0m begin transaction
|
601
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
602
|
+
[1m[35m (0.0ms)[0m begin transaction
|
603
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
604
|
+
[1m[35m (0.0ms)[0m begin transaction
|
605
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
606
|
+
[1m[35m (0.0ms)[0m begin transaction
|
607
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
608
|
+
[1m[35m (0.0ms)[0m begin transaction
|
609
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
610
|
+
[1m[35m (0.0ms)[0m begin transaction
|
611
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
612
|
+
[1m[35m (0.0ms)[0m begin transaction
|
613
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
614
|
+
Connecting to database specified by database.yml
|
615
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
616
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
617
|
+
[1m[36mSQL (4.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 01 May 2014 19:35:19 UTC +00:00], ["password_hash", nil], ["updated_at", Thu, 01 May 2014 19:35:19 UTC +00:00], ["username", nil]]
|
618
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
619
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
620
|
+
[1m[35m (0.0ms)[0m begin transaction
|
621
|
+
[1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" IS NULL LIMIT 1[0m
|
622
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
623
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
624
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
625
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 01 May 2014 19:35:19 UTC +00:00], ["password_hash", nil], ["updated_at", Thu, 01 May 2014 19:35:19 UTC +00:00], ["username", nil]]
|
626
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
627
|
+
[1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = 1 LIMIT 1[0m
|
628
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
629
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
630
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
631
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
632
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
633
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
634
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
635
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
636
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
637
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
638
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
639
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
640
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
641
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
642
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
643
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
644
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
645
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
646
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
647
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
648
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
649
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
650
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
651
|
+
Connecting to database specified by database.yml
|
652
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
653
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
654
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
655
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
656
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
657
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
658
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
659
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
660
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
661
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
662
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
663
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
664
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
665
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
666
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
667
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
668
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
669
|
+
[1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" IS NULL LIMIT 1
|
670
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
671
|
+
[1m[35m (0.0ms)[0m begin transaction
|
672
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
673
|
+
[1m[35mSQL (2.4ms)[0m INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["created_at", Thu, 01 May 2014 19:50:30 UTC +00:00], ["password_hash", nil], ["updated_at", Thu, 01 May 2014 19:50:30 UTC +00:00], ["username", nil]]
|
674
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
675
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
676
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
677
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
678
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 01 May 2014 19:50:30 UTC +00:00], ["password_hash", nil], ["updated_at", Thu, 01 May 2014 19:50:30 UTC +00:00], ["username", nil]]
|
679
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
680
|
+
[1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = 1 LIMIT 1[0m
|
681
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
682
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
683
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
684
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
685
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
686
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
687
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
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.2
|
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: 2014-
|
12
|
+
date: 2014-05-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|