infinum_json_api_setup 0.0.4 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/Gemfile.lock +9 -9
- data/README.md +1 -1
- data/infinum_json_api_setup.gemspec +7 -7
- data/lib/infinum_json_api_setup/json_api/error_handling.rb +1 -1
- data/lib/infinum_json_api_setup/json_api/serializer_options.rb +1 -1
- data/lib/infinum_json_api_setup/version.rb +1 -1
- data/lib/infinum_json_api_setup.rb +7 -2
- metadata +19 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29be6fb7cd837fda6ba353b4f22fcadbf8139328b8a74c73f373954310abb4f
|
4
|
+
data.tar.gz: 4a3272b935f333a35c2b671287d02395ce5140e300a60ff9d7cf51cc7109ef7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50ab89b7384a97fd64a450cc10921b1ed2b6b9535603568af7c5e09110dcdb048be752b351e4343db9e30c2fc85fe938caa53d3769904d771570d1c8bd244517
|
7
|
+
data.tar.gz: 99ada6a80d54574f9cce79e702ba166a98bf07a6363529d3138afcd6d87a0332fc4118d155de6d4e72ae07996c951fc1e73e35f31f21a442215ea375133ba003
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
## 0.0.8 (Oct 25th, 2021)
|
2
|
+
- update and upgrade pagy
|
3
|
+
|
4
|
+
[Compare v0.0.7...v0.0.8](https://github.com/infinum/infinum-json-api-setup/compare/v0.0.7...v0.0.8)
|
5
|
+
|
6
|
+
## 0.0.7 (Oct 25th, 2021)
|
7
|
+
- fix runtime depenency loading
|
8
|
+
|
9
|
+
[Compare v0.0.6...v0.0.7](https://github.com/infinum/infinum-json-api-setup/compare/v0.0.6...v0.0.7)
|
10
|
+
|
11
|
+
## 0.0.6 (Oct 25th, 2021)
|
12
|
+
- update installation instructions in README
|
13
|
+
- promote jsonapi-query-builder and jsonapi-serializer to runtime dependencies
|
14
|
+
- start CHANGELOG
|
15
|
+
|
16
|
+
[Compare v0.0.5...v0.0.6](https://github.com/infinum/infinum-json-api-setup/compare/v0.0.5...v0.0.6)
|
17
|
+
|
18
|
+
## 0.0.5 (Oct 6th, 2021)
|
19
|
+
- bump jsonapi-query_builder dependency
|
20
|
+
- bump Nokogiri dependency (due to CVE)
|
21
|
+
|
22
|
+
[Compare v0.0.4...v0.0.4](https://github.com/infinum/infinum-json-api-setup/compare/v0.0.4...v0.0.5)
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
infinum_json_api_setup (0.0.
|
4
|
+
infinum_json_api_setup (0.0.8)
|
5
5
|
json_schemer (~> 0.2)
|
6
|
+
jsonapi-query_builder
|
7
|
+
jsonapi-serializer
|
6
8
|
jsonapi_parameters
|
7
9
|
pagy
|
8
10
|
rails
|
@@ -99,9 +101,9 @@ GEM
|
|
99
101
|
hana (~> 1.3)
|
100
102
|
regexp_parser (~> 2.0)
|
101
103
|
uri_template (~> 0.7)
|
102
|
-
jsonapi-query_builder (0.1
|
104
|
+
jsonapi-query_builder (0.2.1)
|
103
105
|
activerecord (>= 5)
|
104
|
-
pagy (
|
106
|
+
pagy (>= 3.5)
|
105
107
|
jsonapi-serializer (2.2.0)
|
106
108
|
activesupport (>= 4.2)
|
107
109
|
jsonapi_parameters (2.3.0)
|
@@ -112,20 +114,20 @@ GEM
|
|
112
114
|
nokogiri (>= 1.5.9)
|
113
115
|
mail (2.7.1)
|
114
116
|
mini_mime (>= 0.1.1)
|
115
|
-
marcel (1.0.
|
117
|
+
marcel (1.0.2)
|
116
118
|
method_source (1.0.0)
|
117
|
-
mini_mime (1.1.
|
119
|
+
mini_mime (1.1.2)
|
118
120
|
mini_portile2 (2.6.1)
|
119
121
|
minitest (5.14.4)
|
120
122
|
nio4r (2.5.8)
|
121
|
-
nokogiri (1.12.
|
123
|
+
nokogiri (1.12.5)
|
122
124
|
mini_portile2 (~> 2.6.1)
|
123
125
|
racc (~> 1.4)
|
124
126
|
overcommit (0.58.0)
|
125
127
|
childprocess (>= 0.6.3, < 5)
|
126
128
|
iniparse (~> 1.4)
|
127
129
|
rexml (~> 3.2)
|
128
|
-
pagy (
|
130
|
+
pagy (5.1.1)
|
129
131
|
parallel (1.20.1)
|
130
132
|
parser (3.0.2.0)
|
131
133
|
ast (~> 2.4.1)
|
@@ -251,8 +253,6 @@ DEPENDENCIES
|
|
251
253
|
factory_bot (~> 6.2)
|
252
254
|
faker (~> 2.18)
|
253
255
|
infinum_json_api_setup!
|
254
|
-
jsonapi-query_builder
|
255
|
-
jsonapi-serializer
|
256
256
|
overcommit (~> 0.58)
|
257
257
|
pg
|
258
258
|
pry-rails
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Preconfigured set of libraries for building JSON:API compliant endpoints, with m
|
|
8
8
|
## Installation
|
9
9
|
1. Add Infinum JSON:API setup to your Gemfile
|
10
10
|
```ruby
|
11
|
-
gem 'infinum_json_api_setup'
|
11
|
+
gem 'infinum_json_api_setup'
|
12
12
|
```
|
13
13
|
|
14
14
|
2. Next, run the generator
|
@@ -10,16 +10,16 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.files = `git ls-files`.split("\n")
|
11
11
|
s.homepage = 'https://github.com/infinum/infinum-json-api-setup'
|
12
12
|
s.license = 'MIT'
|
13
|
-
s.required_ruby_version = '> 2.7'
|
13
|
+
s.required_ruby_version = '> 2.7'
|
14
14
|
|
15
|
-
s.add_runtime_dependency 'jsonapi_parameters'
|
15
|
+
s.add_runtime_dependency 'jsonapi_parameters'
|
16
|
+
s.add_runtime_dependency 'jsonapi-query_builder'
|
17
|
+
s.add_runtime_dependency 'jsonapi-serializer'
|
16
18
|
s.add_runtime_dependency 'json_schemer', '~> 0.2'
|
17
|
-
s.add_runtime_dependency 'pagy'
|
18
|
-
s.add_runtime_dependency 'rails'
|
19
|
-
s.add_runtime_dependency 'responders'
|
19
|
+
s.add_runtime_dependency 'pagy'
|
20
|
+
s.add_runtime_dependency 'rails'
|
21
|
+
s.add_runtime_dependency 'responders'
|
20
22
|
|
21
|
-
s.add_development_dependency 'jsonapi-query_builder'
|
22
|
-
s.add_development_dependency 'jsonapi-serializer'
|
23
23
|
s.add_development_dependency 'overcommit', '~> 0.58'
|
24
24
|
s.add_development_dependency 'pg'
|
25
25
|
s.add_development_dependency 'pry-rails'
|
@@ -20,7 +20,7 @@ module InfinumJsonApiSetup
|
|
20
20
|
end
|
21
21
|
|
22
22
|
if defined?(Jsonapi::QueryBuilder)
|
23
|
-
rescue_from Jsonapi::QueryBuilder::
|
23
|
+
rescue_from Jsonapi::QueryBuilder::Errors::UnpermittedSortParameters do |e|
|
24
24
|
Bugsnag.notify(e)
|
25
25
|
render_error(InfinumJsonApiSetup::Error::BadRequest.new(message: e.to_s))
|
26
26
|
end
|
@@ -33,7 +33,7 @@ module InfinumJsonApiSetup
|
|
33
33
|
total_count: pagination_details.count,
|
34
34
|
padding: pagination_details.vars.fetch(:outset).to_i,
|
35
35
|
page_size: pagination_details.vars.fetch(:items).to_i,
|
36
|
-
max_page_size: Pagy::
|
36
|
+
max_page_size: Pagy::DEFAULT[:max_items]
|
37
37
|
}
|
38
38
|
end
|
39
39
|
|
@@ -1,8 +1,13 @@
|
|
1
|
-
require 'jsonapi_parameters'
|
2
1
|
require 'rails'
|
2
|
+
|
3
|
+
require 'json'
|
4
|
+
require 'jsonapi_parameters'
|
5
|
+
require 'jsonapi/serializer'
|
6
|
+
require 'json_schemer'
|
3
7
|
require 'responders'
|
8
|
+
|
4
9
|
require 'pagy'
|
5
|
-
require '
|
10
|
+
require 'jsonapi/query_builder'
|
6
11
|
|
7
12
|
require 'infinum_json_api_setup/error'
|
8
13
|
require 'infinum_json_api_setup/json_api/error_handling'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infinum_json_api_setup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Team Backend @ Infinum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jsonapi_parameters
|
@@ -25,21 +25,21 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: jsonapi-query_builder
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: jsonapi-serializer
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,21 +53,21 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: json_schemer
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '0.2'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '0.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: pagy
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,13 +81,13 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rails
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
|
-
type: :
|
90
|
+
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
@@ -95,13 +95,13 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: responders
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
|
-
type: :
|
104
|
+
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
@@ -218,6 +218,7 @@ files:
|
|
218
218
|
- ".rubocop.yml"
|
219
219
|
- ".ruby-version"
|
220
220
|
- ".simplecov"
|
221
|
+
- CHANGELOG.md
|
221
222
|
- Gemfile
|
222
223
|
- Gemfile.lock
|
223
224
|
- README.md
|