jsonapi_parameters 1.1.0 → 2.0.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 +4 -4
- data/README.md +1 -0
- data/lib/jsonapi_parameters/translator.rb +3 -1
- data/lib/jsonapi_parameters/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9aca65b830eaec807d91221b0b82d12cce8df503915512b17e26d37a3f9945cb
|
|
4
|
+
data.tar.gz: b18eb03accd6f595ee301e7486e445d21ec7c866625e545ccb61e9566847b7e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3b405a23fabb82bc42eaaa41e5f4c4d5795887edd50816d5277353f811548bf46cf2e87fc484c1c7e219bbc382f8fb840f903c98f862c63eb2b03f07bba79f9
|
|
7
|
+
data.tar.gz: d799eed1c456e6d7fea72e6dad315745e4d21509dba432d7428c886af2e1d6083ee883000ee5852b28ff5e4951b39e8274b8adcc4dc37575c9b32bee0e48d69b
|
data/README.md
CHANGED
|
@@ -4,6 +4,7 @@ Simple [JSON:API](https://jsonapi.org/) compliant parameters translator.
|
|
|
4
4
|
[](https://badge.fury.io/rb/jsonapi_parameters)
|
|
5
5
|
[](https://codeclimate.com/github/visualitypl/jsonapi_parameters/maintainability)
|
|
6
6
|
[](https://codeclimate.com/github/visualitypl/jsonapi_parameters/test_coverage)
|
|
7
|
+
[](https://circleci.com/gh/visualitypl/jsonapi_parameters)
|
|
7
8
|
|
|
8
9
|
[Documentation](https://github.com/visualitypl/jsonapi_parameters/wiki)
|
|
9
10
|
|
|
@@ -15,7 +15,9 @@ module JsonApi::Parameters
|
|
|
15
15
|
return params if params.nil? || params.empty?
|
|
16
16
|
|
|
17
17
|
@jsonapi_unsafe_hash = if naming_convention != :snake || JsonApi::Parameters.ensure_underscore_translation
|
|
18
|
-
params.deep_transform_keys { |key| key.to_s.underscore.to_sym }
|
|
18
|
+
params = params.deep_transform_keys { |key| key.to_s.underscore.to_sym }
|
|
19
|
+
params[:data][:type] = params[:data][:type].underscore if params.dig(:data, :type)
|
|
20
|
+
params
|
|
19
21
|
else
|
|
20
22
|
params.deep_symbolize_keys
|
|
21
23
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jsonapi_parameters
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Visuality
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2020-02-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|
|
@@ -348,7 +348,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
348
348
|
- !ruby/object:Gem::Version
|
|
349
349
|
version: '0'
|
|
350
350
|
requirements: []
|
|
351
|
-
rubygems_version: 3.
|
|
351
|
+
rubygems_version: 3.1.2
|
|
352
352
|
signing_key:
|
|
353
353
|
specification_version: 4
|
|
354
354
|
summary: Translator for JSON:API compliant parameters
|