openstax_api 8.2.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/openstax/api/engine.rb +1 -1
- data/lib/openstax/api/roar.rb +3 -2
- data/lib/openstax/api/version.rb +1 -1
- data/spec/controllers/openstax/api/v1/api_controller_spec.rb +2 -2
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +10955 -1965
- data/spec/factories/user.rb +1 -1
- data/spec/models/openstax/api/api_user_spec.rb +1 -1
- data/spec/rails_helper.rb +1 -1
- data/spec/representers/openstax/api/v1/abstract_search_representer_spec.rb +4 -4
- metadata +44 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0cf2c153cb674f3b1d932b5f9857f83ac91e89864305317fb67f3ff613c0d9d0
|
4
|
+
data.tar.gz: 110217b57b4eeb9c98ad6fa710eb02f978c3f48c54751fbe567ec0dc46cc0835
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e21ea298b52b5b2290066c80cbb1b78df35cb1d15cf8615b7b17127a85653a337f395ac3b49678adc44fa765c8e0baf37318448e9cc383de41062e5ee5273811
|
7
|
+
data.tar.gz: e2abcc359acaa35c0e63fc8c638a7c49e2186f8cae495768c6044e9b1dccf7143aac0fc18a29129b745a98fea128c5f2d3c2060d1e965fa43293976156f2f15c
|
data/lib/openstax/api/engine.rb
CHANGED
data/lib/openstax/api/roar.rb
CHANGED
@@ -24,6 +24,7 @@ module OpenStax
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def standard_search(klass, routine, represent_with, options={})
|
27
|
+
search_options = { location: nil }
|
27
28
|
user = current_api_user
|
28
29
|
OSU::AccessPolicy.require_action_allowed!(:search, user, klass)
|
29
30
|
|
@@ -33,11 +34,11 @@ module OpenStax
|
|
33
34
|
return render_api_errors(result.errors) if result.errors.any?
|
34
35
|
|
35
36
|
outputs = result.outputs
|
36
|
-
outputs
|
37
|
+
outputs.items.each do |item|
|
37
38
|
OSU::AccessPolicy.require_action_allowed!(:read, user, item)
|
38
39
|
end
|
39
40
|
|
40
|
-
respond_with outputs, represent_with_options
|
41
|
+
respond_with outputs, search_options.merge(represent_with_options)
|
41
42
|
end
|
42
43
|
|
43
44
|
def standard_create(model, represent_with=nil, options={})
|
data/lib/openstax/api/version.rb
CHANGED
@@ -5,8 +5,8 @@ module OpenStax
|
|
5
5
|
module V1
|
6
6
|
describe ApiController do
|
7
7
|
|
8
|
-
let!(:user) {
|
9
|
-
let!(:user_2) {
|
8
|
+
let!(:user) { FactoryBot.create :user }
|
9
|
+
let!(:user_2) { FactoryBot.create :user }
|
10
10
|
let!(:application) { double('Doorkeeper::Application') }
|
11
11
|
let!(:doorkeeper_token) { double('Doorkeeper::AccessToken') }
|
12
12
|
let!(:non_doorkeeper_user_proc) { lambda { user } }
|
File without changes
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
File without changes
|