openstax_api 8.2.0 → 8.3.0

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
- SHA1:
3
- metadata.gz: a3da970c8b505007a77d4c22af9f93f02598a7ac
4
- data.tar.gz: 5550c22216fd6b3792b04b182995f4b97a23edfd
2
+ SHA256:
3
+ metadata.gz: 0cf2c153cb674f3b1d932b5f9857f83ac91e89864305317fb67f3ff613c0d9d0
4
+ data.tar.gz: 110217b57b4eeb9c98ad6fa710eb02f978c3f48c54751fbe567ec0dc46cc0835
5
5
  SHA512:
6
- metadata.gz: 3beef5dc60cc89ca7eef3af6056973ca999a24c998ac017595d4d2c6141bce3a5e7c88fa78ec368caf994dbec04a63245b915e7ab5f6942208ff59c1139221df
7
- data.tar.gz: a9887c1adbdbc5bc1b66ebb244c8b1069864613bf7ed34d1e7f024fe23383fc85f43deceda938eefa1885c77abc3f31c7cdee66b7fa22cc5fa1454153aab4845
6
+ metadata.gz: e21ea298b52b5b2290066c80cbb1b78df35cb1d15cf8615b7b17127a85653a337f395ac3b49678adc44fa765c8e0baf37318448e9cc383de41062e5ee5273811
7
+ data.tar.gz: e2abcc359acaa35c0e63fc8c638a7c49e2186f8cae495768c6044e9b1dccf7143aac0fc18a29129b745a98fea128c5f2d3c2060d1e965fa43293976156f2f15c
@@ -15,7 +15,7 @@ module OpenStax
15
15
 
16
16
  config.generators do |g|
17
17
  g.test_framework :rspec, fixture: false
18
- g.fixture_replacement :factory_girl, dir: 'spec/factories'
18
+ g.fixture_replacement :factory_bot, dir: 'spec/factories'
19
19
  g.assets false
20
20
  g.helper false
21
21
  end
@@ -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[:items].each do |item|
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={})
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Api
3
- VERSION = "8.2.0"
3
+ VERSION = "8.3.0"
4
4
  end
5
5
  end
@@ -5,8 +5,8 @@ module OpenStax
5
5
  module V1
6
6
  describe ApiController do
7
7
 
8
- let!(:user) { FactoryGirl.create :user }
9
- let!(:user_2) { FactoryGirl.create :user }
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
Binary file
File without changes