fun_with_json_api 0.0.13 → 0.0.14
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 +4 -4
- data/lib/fun_with_json_api/find_collection_from_document.rb +2 -2
- data/lib/fun_with_json_api/find_resource_from_document.rb +2 -2
- data/lib/fun_with_json_api/schema_validators/check_collection_has_all_members.rb +2 -2
- data/lib/fun_with_json_api/schema_validators/check_collection_is_authorized.rb +2 -2
- data/lib/fun_with_json_api/schema_validators/check_relationship_names.rb +2 -2
- data/lib/fun_with_json_api/schema_validators/check_resource_is_authorized.rb +2 -2
- data/lib/fun_with_json_api/version.rb +1 -1
- data/spec/dummy/log/test.log +1166 -0
- data/spec/fixtures/active_record.rb +1 -1
- data/spec/fun_with_json_api/controller_methods_spec.rb +3 -3
- data/spec/fun_with_json_api/railtie_spec.rb +2 -2
- metadata +5 -5
@@ -37,7 +37,7 @@ describe FunWithJsonApi::ControllerMethods, type: :controller do
|
|
37
37
|
it 'returns a json api error status' do
|
38
38
|
get :index
|
39
39
|
expect(response.status).to eq 403
|
40
|
-
expect(response.content_type).to
|
40
|
+
expect(response.content_type).to include('application/vnd.api+json')
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'renders the exception payload as a json api errors response' do
|
@@ -77,7 +77,7 @@ describe FunWithJsonApi::ControllerMethods, type: :controller do
|
|
77
77
|
it 'returns a json api error status' do
|
78
78
|
get :index
|
79
79
|
expect(response.status).to eq 403
|
80
|
-
expect(response.content_type).to
|
80
|
+
expect(response.content_type).to include('application/vnd.api+json')
|
81
81
|
end
|
82
82
|
|
83
83
|
it 'renders all exception payload items' do
|
@@ -108,7 +108,7 @@ describe FunWithJsonApi::ControllerMethods, type: :controller do
|
|
108
108
|
it 'returns a json api error status' do
|
109
109
|
get :index
|
110
110
|
expect(response.status).to eq 422
|
111
|
-
expect(response.content_type).to
|
111
|
+
expect(response.content_type).to include('application/vnd.api+json')
|
112
112
|
end
|
113
113
|
|
114
114
|
it 'only renders the non-nil params' do
|
@@ -50,7 +50,7 @@ describe FunWithJsonApi::Railtie do
|
|
50
50
|
|
51
51
|
it 'renders out the hash as a json_api response' do
|
52
52
|
get :index
|
53
|
-
expect(response.content_type).to
|
53
|
+
expect(response.content_type).to include('application/vnd.api+json')
|
54
54
|
expect(JSON.parse(response.body)).to eq(
|
55
55
|
'data' => { 'id' => '42', 'type' => 'foobar' }
|
56
56
|
)
|
@@ -66,7 +66,7 @@ describe FunWithJsonApi::Railtie do
|
|
66
66
|
|
67
67
|
it 'renders the resource as a json api document' do
|
68
68
|
get :index
|
69
|
-
expect(response.content_type).to
|
69
|
+
expect(response.content_type).to include('application/vnd.api+json')
|
70
70
|
expect(JSON.parse(response.body)).to eq(
|
71
71
|
'data' => {
|
72
72
|
'id' => '42',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fun_with_json_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Morrall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: '1.4'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: '1.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec-rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: '0'
|
265
265
|
requirements: []
|
266
|
-
rubygems_version: 3.
|
266
|
+
rubygems_version: 3.1.6
|
267
267
|
signing_key:
|
268
268
|
specification_version: 4
|
269
269
|
summary: Provides JSON API-compliant Controller integration
|