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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e7a1dacfe43a48d145203e71cf1553f5cbd9d6c
4
- data.tar.gz: f4902af30805e8dcc68ac0051f0c07658bd0576e
3
+ metadata.gz: 1c3f95b0e932b5831bbc419f9e6758ed79323b9b
4
+ data.tar.gz: a895d8183a3b9c6b8afc990d9024bc982d653114
5
5
  SHA512:
6
- metadata.gz: 15c9b06de5f9a8709778fd7296f370b63bd453e8c28b0a0b0459b09f384dc61e080859402c7ec2abf69edfec6e84797f6516137890158f32a4299bda5042374c
7
- data.tar.gz: 41e17df6aeab2c68744ea46d0f85668ba526cc39403d223c38081f56f5ae4a49c1b822d60f85d6c68df13a560b289305740870275c70dd0e648e2a2b872d07b7
6
+ metadata.gz: 67c89d1173f8d5dc574fb80ae6641dd1d9aca4b3146bdce40999063596b66512b1f53d36dc290f96b4acb37390115baa71c4147630c8dc83ed46c9442ad01531
7
+ data.tar.gz: 59c872e1461ba0e9d5e7f6d021431182bbc37af6d8a828ed8bee8b80189c8c703f22440414d6449ee5310a98492d391857bf1e2883a7b0ec5ca3ea7fa984c1c3
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # openstax_api
2
2
 
3
+ [![Build Status](https://travis-ci.org/openstax/openstax_api.svg?branch=master)](https://travis-ci.org/openstax/openstax_api)
4
+
3
5
  API utilities for OpenStax products and tools.
4
6
 
5
7
  ## Installation
@@ -17,37 +17,29 @@ module OpenStax
17
17
  module Api
18
18
  class ApiUser
19
19
 
20
- def initialize(doorkeeper_token, non_doorkeeper_user_proc)
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
- if doorkeeper_token
30
- user_class = OpenStax::Api.configuration.user_class_name.constantize
31
- @application_proc = lambda { doorkeeper_token.application }
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
- @application ||= @application_proc.call
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
- # Can return an instance of User, AnonymousUser, or nil
34
+ # Returns an instance of User, AnonymousUser, or nil
49
35
  def human_user
50
- @user ||= @user_proc.call
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 can_read?(resource)
62
- can_do?(:read, resource)
63
- end
64
-
65
- def can_create?(resource)
66
- can_do?(:create, resource)
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 can_sort?(resource)
78
- can_do?(:sort, resource)
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
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Api
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
Binary file
@@ -404,3 +404,81 @@ Connecting to database specified by database.yml
404
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
405
   (0.8ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
406
406
   (0.1ms) SELECT version FROM "schema_migrations"
407
+ Connecting to database specified by database.yml
408
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
409
+  (1.2ms) select sqlite_version(*)
410
+  (1.2ms) DROP TABLE "dummy_users"
411
+  (0.8ms) 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
+  (0.7ms) DROP TABLE "oauth_access_grants"
413
+  (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))
414
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
415
+  (1.2ms) DROP TABLE "oauth_access_tokens"
416
+  (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)) 
417
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
418
+  (0.7ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
419
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
420
+  (0.8ms) DROP TABLE "oauth_applications"
421
+  (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)
422
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
423
+  (0.1ms) SELECT version FROM "schema_migrations"
424
+ Connecting to database specified by database.yml
425
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
426
+ Migrating to CreateDoorkeeperTables (0)
427
+ Migrating to CreateDummyUsers (1)
428
+  (0.1ms) select sqlite_version(*)
429
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
430
+ Connecting to database specified by database.yml
431
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
432
+  (0.2ms) select sqlite_version(*)
433
+  (2.1ms) DROP TABLE "dummy_users"
434
+  (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)
435
+  (0.9ms) DROP TABLE "oauth_access_grants"
436
+  (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))
437
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
438
+  (0.8ms) DROP TABLE "oauth_access_tokens"
439
+  (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)) 
440
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
441
+  (0.8ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
442
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
443
+  (0.8ms) DROP TABLE "oauth_applications"
444
+  (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)
445
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
446
+  (0.1ms) SELECT version FROM "schema_migrations"
447
+ Connecting to database specified by database.yml
448
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
449
+  (1.0ms) select sqlite_version(*)
450
+  (1.0ms) DROP TABLE "dummy_users"
451
+  (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)
452
+  (0.8ms) DROP TABLE "oauth_access_grants"
453
+  (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))
454
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
455
+  (1.2ms) DROP TABLE "oauth_access_tokens"
456
+  (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)) 
457
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
458
+  (0.8ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
459
+  (0.8ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
460
+  (0.7ms) DROP TABLE "oauth_applications"
461
+  (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)
462
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
463
+  (0.1ms) 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
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
469
+  (0.2ms) select sqlite_version(*)
470
+  (1.3ms) DROP TABLE "dummy_users"
471
+  (0.8ms) 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
+  (0.7ms) DROP TABLE "oauth_access_grants"
473
+  (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))
474
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")
475
+  (0.7ms) DROP TABLE "oauth_access_tokens"
476
+  (0.7ms) 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)) 
477
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
478
+  (0.7ms) CREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")
479
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
480
+  (0.7ms) DROP TABLE "oauth_applications"
481
+  (0.7ms) 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
+  (0.7ms) CREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")
483
+  (0.1ms) SELECT version FROM "schema_migrations"
484
+ Connecting to database specified by database.yml
@@ -539,3 +539,149 @@ Connecting to database specified by database.yml
539
539
   (0.0ms) rollback transaction
540
540
   (0.0ms) begin transaction
541
541
   (0.0ms) rollback transaction
542
+ Connecting to database specified by database.yml
543
+  (0.4ms) begin transaction
544
+  (0.0ms) rollback transaction
545
+  (0.0ms) begin transaction
546
+  (0.0ms) SAVEPOINT active_record_1
547
+ SQL (4.1ms) INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
549
+ DummyUser Load (0.1ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
550
+  (0.4ms) rollback transaction
551
+  (0.0ms) begin transaction
552
+  (0.0ms) SAVEPOINT active_record_1
553
+ SQL (0.4ms) INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
555
+  (0.3ms) rollback transaction
556
+  (0.0ms) begin transaction
557
+  (0.0ms) rollback transaction
558
+  (0.0ms) begin transaction
559
+  (0.0ms) rollback transaction
560
+  (0.0ms) begin transaction
561
+  (0.0ms) rollback transaction
562
+  (0.0ms) begin transaction
563
+  (0.0ms) rollback transaction
564
+  (0.0ms) begin transaction
565
+  (0.0ms) rollback transaction
566
+  (0.0ms) begin transaction
567
+  (0.0ms) rollback transaction
568
+  (0.0ms) begin transaction
569
+  (0.0ms) rollback transaction
570
+  (0.0ms) begin transaction
571
+  (0.0ms) rollback transaction
572
+  (0.0ms) begin transaction
573
+  (0.0ms) rollback transaction
574
+  (0.0ms) begin transaction
575
+  (0.0ms) rollback transaction
576
+  (0.0ms) begin transaction
577
+  (0.0ms) rollback transaction
578
+ Connecting to database specified by database.yml
579
+  (0.4ms) begin transaction
580
+  (0.0ms) SAVEPOINT active_record_1
581
+ SQL (2.5ms) 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]]
582
+  (0.0ms) RELEASE SAVEPOINT active_record_1
583
+  (1.1ms) rollback transaction
584
+  (0.1ms) begin transaction
585
+  (0.0ms) SAVEPOINT active_record_1
586
+ SQL (0.4ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
588
+ DummyUser Load (0.1ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]]
589
+  (0.3ms) rollback transaction
590
+  (0.0ms) begin transaction
591
+  (0.0ms) rollback transaction
592
+  (0.0ms) begin transaction
593
+  (0.0ms) rollback transaction
594
+  (0.0ms) begin transaction
595
+  (0.0ms) rollback transaction
596
+  (0.0ms) begin transaction
597
+  (0.0ms) rollback transaction
598
+  (0.0ms) begin transaction
599
+  (0.0ms) rollback transaction
600
+  (0.0ms) begin transaction
601
+  (0.0ms) rollback transaction
602
+  (0.0ms) begin transaction
603
+  (0.0ms) rollback transaction
604
+  (0.0ms) begin transaction
605
+  (0.0ms) rollback transaction
606
+  (0.0ms) begin transaction
607
+  (0.0ms) rollback transaction
608
+  (0.0ms) begin transaction
609
+  (0.0ms) rollback transaction
610
+  (0.0ms) begin transaction
611
+  (0.0ms) rollback transaction
612
+  (0.0ms) begin transaction
613
+  (0.0ms) rollback transaction
614
+ Connecting to database specified by database.yml
615
+  (0.4ms) begin transaction
616
+  (0.0ms) SAVEPOINT active_record_1
617
+ SQL (4.3ms) INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
619
+  (0.3ms) rollback transaction
620
+  (0.0ms) begin transaction
621
+ DummyUser Load (0.1ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" IS NULL LIMIT 1
622
+  (0.0ms) rollback transaction
623
+  (0.0ms) begin transaction
624
+  (0.0ms) SAVEPOINT active_record_1
625
+ SQL (0.3ms) INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
627
+ DummyUser Load (0.0ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = 1 LIMIT 1
628
+  (0.3ms) rollback transaction
629
+  (0.0ms) begin transaction
630
+  (0.1ms) rollback transaction
631
+  (0.0ms) begin transaction
632
+  (0.0ms) rollback transaction
633
+  (0.1ms) begin transaction
634
+  (0.0ms) rollback transaction
635
+  (0.0ms) begin transaction
636
+  (0.0ms) rollback transaction
637
+  (0.0ms) begin transaction
638
+  (0.0ms) rollback transaction
639
+  (0.0ms) begin transaction
640
+  (0.0ms) rollback transaction
641
+  (0.0ms) begin transaction
642
+  (0.0ms) rollback transaction
643
+  (0.0ms) begin transaction
644
+  (0.0ms) rollback transaction
645
+  (0.0ms) begin transaction
646
+  (0.0ms) rollback transaction
647
+  (0.0ms) begin transaction
648
+  (0.0ms) rollback transaction
649
+  (0.0ms) begin transaction
650
+  (0.0ms) rollback transaction
651
+ Connecting to database specified by database.yml
652
+  (0.4ms) begin transaction
653
+  (0.0ms) rollback transaction
654
+  (0.0ms) begin transaction
655
+  (0.0ms) rollback transaction
656
+  (0.0ms) begin transaction
657
+  (0.0ms) rollback transaction
658
+  (0.0ms) begin transaction
659
+  (0.0ms) rollback transaction
660
+  (0.0ms) begin transaction
661
+  (0.0ms) rollback transaction
662
+  (0.0ms) begin transaction
663
+  (0.0ms) rollback transaction
664
+  (0.0ms) begin transaction
665
+  (0.0ms) rollback transaction
666
+  (0.0ms) begin transaction
667
+  (0.0ms) rollback transaction
668
+  (0.0ms) begin transaction
669
+ DummyUser Load (0.0ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" IS NULL LIMIT 1
670
+  (0.0ms) rollback transaction
671
+  (0.0ms) begin transaction
672
+  (0.0ms) SAVEPOINT active_record_1
673
+ SQL (2.4ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
675
+  (1.1ms) rollback transaction
676
+  (0.1ms) begin transaction
677
+  (0.0ms) SAVEPOINT active_record_1
678
+ SQL (0.4ms) 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]]
679
+  (0.0ms) RELEASE SAVEPOINT active_record_1
680
+ DummyUser Load (0.1ms) SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = 1 LIMIT 1
681
+  (0.3ms) rollback transaction
682
+  (0.0ms) begin transaction
683
+  (0.0ms) rollback transaction
684
+  (0.0ms) begin transaction
685
+  (0.0ms) rollback transaction
686
+  (0.0ms) begin transaction
687
+  (0.0ms) 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.1
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-04-22 00:00:00.000000000 Z
12
+ date: 2014-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails