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.
@@ -17,7 +17,7 @@ ActiveRecord::Schema.define do
17
17
  t.text :contents
18
18
  t.references :author
19
19
  t.references :post
20
- t.timestamp null: false
20
+ t.timestamps null: false
21
21
  end
22
22
  end
23
23
 
@@ -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 eq 'application/vnd.api+json'
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 eq 'application/vnd.api+json'
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 eq 'application/vnd.api+json'
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 eq 'application/vnd.api+json'
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 eq 'application/vnd.api+json'
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.13
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: 2021-04-28 00:00:00.000000000 Z
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.3.6
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.3.6
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.0.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