openstax_api 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/openstax/api/representable_schema_printer.rb +6 -3
- data/lib/openstax/api/rspec_helpers.rb +89 -0
- data/lib/openstax/api/version.rb +1 -1
- data/lib/openstax_api.rb +1 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +51 -0
- data/spec/dummy/log/test.log +111 -0
- metadata +23 -22
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NzBiYWJjOGUyMmY1M2U4YTMzODlkNmI1OWVmNDY2ZDc3ODg2OTJjYg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MTUwZDUyZTY1MGJkYjZmZmNjOGM0M2EyOTNiOTQzY2NiNmQ4OGFiMg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZGY0NDg1OGVkZWNmYzQ5Y2E5NmNmYmY1ZTgzZDFmOWI4NDYxMDIwMTVmM2Fk
|
10
|
+
ZGU2NjA3MDg0OGUzM2Y5ZjVlOGVhOTJmOWU4NjlkYjczZGRiYzRlNzk0Y2Fj
|
11
|
+
OTQzMjY3OTQ3NzViNjAxOGQ1OGE3NmFmOWZmNmIyMjY2NDhmMGE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OGNiMjNiN2FjY2Q4ODhjOGY2NmVmMTI3MGE1N2QxMWY1ZWI4NjdhMDcyMjEz
|
14
|
+
YWYwZTRhZGJiZjVjYTZlNmIzNWRiM2YyZjk5NmQ2Mzk1MDFhYjM1NzJlYzMx
|
15
|
+
ZTdlOTNkYTM5ZjgyNjQyYTI4N2ZlZmI2NjExODE2YjU4MjU1Y2I=
|
@@ -16,7 +16,7 @@ module OpenStax
|
|
16
16
|
protected
|
17
17
|
|
18
18
|
def self.representer_name(representer)
|
19
|
-
representer.name.chomp('Representer').
|
19
|
+
representer.name.chomp('Representer').demodulize.camelize(:lower)
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.definition_name(name)
|
@@ -38,7 +38,10 @@ module OpenStax
|
|
38
38
|
attr.send(inc.to_s + "?")} || schema_info[:required]
|
39
39
|
|
40
40
|
# Guess a default type based on the attribute name
|
41
|
-
|
41
|
+
type = attr[:type].to_s.downcase
|
42
|
+
type = type.blank? ? \
|
43
|
+
(name.end_with?('id') ? :integer : :string) : type
|
44
|
+
attr_info ||= { type: type }
|
42
45
|
|
43
46
|
schema_info.each do |key, value|
|
44
47
|
next if key == :required
|
@@ -47,7 +50,7 @@ module OpenStax
|
|
47
50
|
end
|
48
51
|
|
49
52
|
# Overwrite type for collections
|
50
|
-
attr_info[:type] =
|
53
|
+
attr_info[:type] = 'array' if attr[:collection]
|
51
54
|
|
52
55
|
if attr[:use_decorator]
|
53
56
|
# Implicit representer - nest attributes
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# Provides API-specific HTTP request methods
|
2
|
+
#
|
3
|
+
# The args at the end of each request is interpreted a hash that can contain
|
4
|
+
# keys for:
|
5
|
+
# :raw_post_data -- a JSON string (if a Hash provided, to_json will be called on it)
|
6
|
+
# :parameters -- a hash of parameters
|
7
|
+
# :session -- whatever built-in request methods expect
|
8
|
+
# :flash -- whatever built-in request methods expect
|
9
|
+
#
|
10
|
+
# Helpful documentation:
|
11
|
+
# https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_controller/test_case.rb
|
12
|
+
#
|
13
|
+
module OpenStax
|
14
|
+
module Api
|
15
|
+
module RSpecHelpers
|
16
|
+
|
17
|
+
def api_get(action, doorkeeper_token, args={})
|
18
|
+
api_request(:get, action, doorkeeper_token, args)
|
19
|
+
end
|
20
|
+
|
21
|
+
def api_put(action, doorkeeper_token, args={})
|
22
|
+
api_request(:put, action, doorkeeper_token, args)
|
23
|
+
end
|
24
|
+
|
25
|
+
def api_post(action, doorkeeper_token, args={})
|
26
|
+
api_request(:post, action, doorkeeper_token, args)
|
27
|
+
end
|
28
|
+
|
29
|
+
def api_delete(action, doorkeeper_token, args={})
|
30
|
+
api_request(:delete, action, doorkeeper_token, args)
|
31
|
+
end
|
32
|
+
|
33
|
+
def api_patch(action, doorkeeper_token, args={})
|
34
|
+
api_request(:patch, action, doorkeeper_token, args)
|
35
|
+
end
|
36
|
+
|
37
|
+
def api_head(action, doorkeeper_token, args={})
|
38
|
+
api_request(:head, action, doorkeeper_token, args)
|
39
|
+
end
|
40
|
+
|
41
|
+
def api_request(type, action, doorkeeper_token, args={})
|
42
|
+
raise IllegalArgument if ![:get, :post, :put, :delete, :patch, :head].include?(type)
|
43
|
+
|
44
|
+
# Add the doorkeeper token info
|
45
|
+
|
46
|
+
request.env['HTTP_AUTHORIZATION'] = "Bearer #{doorkeeper_token.token}" \
|
47
|
+
if doorkeeper_token
|
48
|
+
|
49
|
+
# Select the version of the API based on the spec metadata
|
50
|
+
|
51
|
+
version_string = self.class.metadata[:version].try(:to_s)
|
52
|
+
raise ArgumentError, "Top-level 'describe' metadata must include a value for ':version'" if version_string.nil?
|
53
|
+
request.env['HTTP_ACCEPT'] = "application/vnd.accounts.openstax.#{version_string}"
|
54
|
+
|
55
|
+
# Set the raw post data in the request, converting to JSON if needed
|
56
|
+
|
57
|
+
if args[:raw_post_data]
|
58
|
+
request.env['RAW_POST_DATA'] = args[:raw_post_data].is_a?(Hash) ?
|
59
|
+
args[:raw_post_data].to_json :
|
60
|
+
args[:raw_post_data]
|
61
|
+
end
|
62
|
+
|
63
|
+
# Set the data format
|
64
|
+
|
65
|
+
args[:parameters] ||= {}
|
66
|
+
args[:parameters][:format] = 'json'
|
67
|
+
|
68
|
+
# If these helpers are used from a request spec, action can
|
69
|
+
# be a URL fragment string -- in such a case, prepend "/api"
|
70
|
+
# to the front of the URL as a convenience to callers
|
71
|
+
|
72
|
+
if action.is_a? String
|
73
|
+
action = "/#{action}" if !action.starts_with?("/")
|
74
|
+
action = "/api#{action}" if !action.starts_with?("/api/")
|
75
|
+
end
|
76
|
+
|
77
|
+
# Delegate the work to the normal HTTP request helpers
|
78
|
+
self.send(type, action, args[:parameters], args[:session], args[:flash])
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
if defined?(RSpec)
|
86
|
+
RSpec.configure do |c|
|
87
|
+
c.include OpenStax::Api::RSpecHelpers
|
88
|
+
end
|
89
|
+
end
|
data/lib/openstax/api/version.rb
CHANGED
data/lib/openstax_api.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1318,3 +1318,54 @@ Connecting to database specified by database.yml
|
|
1318
1318
|
[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)
|
1319
1319
|
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
1320
1320
|
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1321
|
+
Connecting to database specified by database.yml
|
1322
|
+
[1m[36m (1.6ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1323
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
1324
|
+
[1m[36m (0.9ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1325
|
+
[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)
|
1326
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
1327
|
+
[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))
|
1328
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
1329
|
+
[1m[35m (0.8ms)[0m DROP TABLE "oauth_access_tokens"
|
1330
|
+
[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
|
1331
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
1332
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
1333
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
1334
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
1335
|
+
[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)
|
1336
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
1337
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1338
|
+
Connecting to database specified by database.yml
|
1339
|
+
[1m[36m (1.5ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1340
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
1341
|
+
[1m[36m (1.7ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1342
|
+
[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)
|
1343
|
+
[1m[36m (0.9ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
1344
|
+
[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))
|
1345
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
1346
|
+
[1m[35m (0.8ms)[0m DROP TABLE "oauth_access_tokens"
|
1347
|
+
[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
|
1348
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
1349
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
1350
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
1351
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
1352
|
+
[1m[35m (0.9ms)[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)
|
1353
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
1354
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1355
|
+
Connecting to database specified by database.yml
|
1356
|
+
[1m[36m (1.7ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1357
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
1358
|
+
[1m[36m (1.7ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1359
|
+
[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)
|
1360
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_access_grants"[0m
|
1361
|
+
[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))
|
1362
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_access_grants_on_token" ON "oauth_access_grants" ("token")[0m
|
1363
|
+
[1m[35m (0.8ms)[0m DROP TABLE "oauth_access_tokens"
|
1364
|
+
[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
|
1365
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_refresh_token" ON "oauth_access_tokens" ("refresh_token")
|
1366
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_oauth_access_tokens_on_resource_owner_id" ON "oauth_access_tokens" ("resource_owner_id")[0m
|
1367
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_oauth_access_tokens_on_token" ON "oauth_access_tokens" ("token")
|
1368
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "oauth_applications"[0m
|
1369
|
+
[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)
|
1370
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_oauth_applications_on_uid" ON "oauth_applications" ("uid")[0m
|
1371
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
data/spec/dummy/log/test.log
CHANGED
@@ -1979,3 +1979,114 @@ Connecting to database specified by database.yml
|
|
1979
1979
|
[1m[35m (0.0ms)[0m begin transaction
|
1980
1980
|
[1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" IS NULL LIMIT 1[0m
|
1981
1981
|
[1m[35m (0.0ms)[0m rollback transaction
|
1982
|
+
Connecting to database specified by database.yml
|
1983
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
1984
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1985
|
+
[1m[36mSQL (6.7ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 11 Jun 2014 19:46:01 UTC +00:00], ["password_hash", nil], ["updated_at", Wed, 11 Jun 2014 19:46:01 UTC +00:00], ["username", nil]]
|
1986
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1987
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
1988
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1989
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1990
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["created_at", Wed, 11 Jun 2014 19:46:01 UTC +00:00], ["password_hash", nil], ["updated_at", Wed, 11 Jun 2014 19:46:01 UTC +00:00], ["username", nil]]
|
1991
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1992
|
+
[1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = 1 LIMIT 1
|
1993
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
1994
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1995
|
+
[1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" IS NULL LIMIT 1[0m
|
1996
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1997
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1998
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1999
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2000
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2001
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2002
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2003
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2004
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2005
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2006
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2007
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2008
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2009
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2010
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2011
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2012
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2013
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2014
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2015
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2016
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2017
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2018
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2019
|
+
Connecting to database specified by database.yml
|
2020
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
2021
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2022
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2023
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2024
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2025
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2026
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2027
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2028
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2029
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2030
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2031
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2032
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2033
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2034
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2035
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2036
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2037
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2038
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2039
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2040
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2041
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2042
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2043
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2044
|
+
[1m[36mSQL (7.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 11 Jun 2014 19:50:46 UTC +00:00], ["password_hash", nil], ["updated_at", Wed, 11 Jun 2014 19:50:46 UTC +00:00], ["username", nil]]
|
2045
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2046
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
2047
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2048
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
2049
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["created_at", Wed, 11 Jun 2014 19:50:46 UTC +00:00], ["password_hash", nil], ["updated_at", Wed, 11 Jun 2014 19:50:46 UTC +00:00], ["username", nil]]
|
2050
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2051
|
+
[1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = 1 LIMIT 1
|
2052
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
2053
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2054
|
+
[1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" IS NULL LIMIT 1[0m
|
2055
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2056
|
+
Connecting to database specified by database.yml
|
2057
|
+
[1m[36m (0.6ms)[0m [1mbegin transaction[0m
|
2058
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2059
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2060
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2061
|
+
[1m[36mSQL (6.8ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 11 Jun 2014 20:01:39 UTC +00:00], ["password_hash", nil], ["updated_at", Wed, 11 Jun 2014 20:01:39 UTC +00:00], ["username", nil]]
|
2062
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2063
|
+
[1m[36m (1.1ms)[0m [1mrollback transaction[0m
|
2064
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2065
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
2066
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "dummy_users" ("created_at", "password_hash", "updated_at", "username") VALUES (?, ?, ?, ?) [["created_at", Wed, 11 Jun 2014 20:01:39 UTC +00:00], ["password_hash", nil], ["updated_at", Wed, 11 Jun 2014 20:01:39 UTC +00:00], ["username", nil]]
|
2067
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2068
|
+
[1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = 1 LIMIT 1
|
2069
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
2070
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2071
|
+
[1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" IS NULL LIMIT 1[0m
|
2072
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2073
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2074
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2075
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2076
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2077
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2078
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2079
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2080
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2081
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2082
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2083
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2084
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2085
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2086
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2087
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2088
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2089
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2090
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2091
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2092
|
+
[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: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dante Soares
|
@@ -9,132 +9,132 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-06-11 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: representable
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ! '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.8'
|
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: '1.8'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: roar
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ! '>='
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 0.12.1
|
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.12.1
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: roar-rails
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ! '>='
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 0.1.2
|
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.1.2
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: doorkeeper
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ! '>='
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0.5'
|
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: '0.5'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: openstax_utilities
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ! '>='
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: 1.0.1
|
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: 1.0.1
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: exception_notification
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ! '>='
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '4.0'
|
105
105
|
type: :runtime
|
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: '4.0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: sqlite3
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ~>
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '1.3'
|
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: '1.3'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: rspec-rails
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - ~>
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '2.14'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ~>
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '2.14'
|
140
140
|
description: Provides models, controllers and libraries that help OpenStax products
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- lib/openstax/api/representable_schema_printer.rb
|
159
159
|
- lib/openstax/api/roar.rb
|
160
160
|
- lib/openstax/api/routing_mapper_includes.rb
|
161
|
+
- lib/openstax/api/rspec_helpers.rb
|
161
162
|
- lib/openstax/api/version.rb
|
162
163
|
- lib/openstax_api.rb
|
163
164
|
- spec/controllers/openstax/api/v1/api_controller_spec.rb
|
@@ -217,12 +218,12 @@ require_paths:
|
|
217
218
|
- lib
|
218
219
|
required_ruby_version: !ruby/object:Gem::Requirement
|
219
220
|
requirements:
|
220
|
-
- -
|
221
|
+
- - ! '>='
|
221
222
|
- !ruby/object:Gem::Version
|
222
223
|
version: '0'
|
223
224
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
225
|
requirements:
|
225
|
-
- -
|
226
|
+
- - ! '>='
|
226
227
|
- !ruby/object:Gem::Version
|
227
228
|
version: '0'
|
228
229
|
requirements: []
|