jsonapi_parameters 1.1.0 → 2.0.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
2
  SHA256:
3
- metadata.gz: 6ad28494a05c8bc7f45b3b4408989aa44c311741fbefea777bd9fedb91bba464
4
- data.tar.gz: 57180a59200f87667ebfdc57c1063e1855ce16777c80e4d8562780bfbbd96bfa
3
+ metadata.gz: 9aca65b830eaec807d91221b0b82d12cce8df503915512b17e26d37a3f9945cb
4
+ data.tar.gz: b18eb03accd6f595ee301e7486e445d21ec7c866625e545ccb61e9566847b7e5
5
5
  SHA512:
6
- metadata.gz: 166f3aed4fe6f74806fdad8f17bb924812d4678f8fc2ca55d16cfdff7c2497a43d4c9331280b128b74ac1051ccb6022e16880daae409fb93a402134196c34937
7
- data.tar.gz: 8556b0aaed3936f78999f7fe7a0438ce1c66af2c7f2d78e499a7ba53c00ff6d60c9c83b949a4096b88a79ddf248bfa0cba89559923fa4f73ce720caf1f49ffec
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
  [![Gem Version](https://badge.fury.io/rb/jsonapi_parameters.svg)](https://badge.fury.io/rb/jsonapi_parameters)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/84fd5b548eea8d7e18af/maintainability)](https://codeclimate.com/github/visualitypl/jsonapi_parameters/maintainability)
6
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/84fd5b548eea8d7e18af/test_coverage)](https://codeclimate.com/github/visualitypl/jsonapi_parameters/test_coverage)
7
+ [![CircleCI](https://circleci.com/gh/visualitypl/jsonapi_parameters.svg?style=svg)](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
@@ -1,5 +1,5 @@
1
1
  module JsonApi
2
2
  module Parameters
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '2.0.0'.freeze
4
4
  end
5
5
  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: 1.1.0
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: 2019-12-06 00:00:00.000000000 Z
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.0.4
351
+ rubygems_version: 3.1.2
352
352
  signing_key:
353
353
  specification_version: 4
354
354
  summary: Translator for JSON:API compliant parameters