media_types-serialization 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -4
- data/lib/media_types/serialization.rb +15 -1
- data/lib/media_types/serialization/version.rb +1 -1
- data/media_types-serialization.gemspec +2 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 129d55b60f1d39859d01d1bdf4981f6463feb3a63ddb258e073ec472d566d2b2
|
4
|
+
data.tar.gz: 4b04a87f78d765f68073ecb89d9a1bb64b2b111beb3743dddf26184ea25c65d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33a37e3f6343069fca0c3fb82953b008ed427ff86c5c411969a3ab79f87dd8c31c2881d405baac4fac1ffca55ec0169ac741fafd79839156629bb3737b9ce3da
|
7
|
+
data.tar.gz: dd4324afe7d9715d29d5d21bdc329c1a21f9b0435048bef4e39cbdbd80bbeb1a6570674cba562759240368b3f7f534d712a8991e3047bfe2f538501dce6e4254
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/media_types-serialization.svg)](https://badge.fury.io/rb/media_types-serialization)
|
5
5
|
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
|
6
6
|
|
7
|
-
`respond_to` on steroids. Add versioned serialization and deserialization to your
|
7
|
+
`respond_to` on steroids. Add versioned serialization and deserialization to your Rails projects.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -531,9 +531,7 @@ Custom attributes can be added using the `p.attribute(name, value)` function.
|
|
531
531
|
|
532
532
|
### Related
|
533
533
|
|
534
|
-
- [`MediaTypes`](https://github.com/SleeplessByte/media-types-ruby): :gem: Library to create media type
|
535
|
-
- [`MediaTypes::Deserialization`](https://github.com/XPBytes/media_types-deserialization): :cyclone: Add media types supported deserialization using your favourite parser, and media type validation.
|
536
|
-
- [`MediaTypes::Validation`](https://github.com/XPBytes/media_types-validation): :heavy_exclamation_mark: Response validations according to a media-type
|
534
|
+
- [`MediaTypes`](https://github.com/SleeplessByte/media-types-ruby): :gem: Library to create media type validators.
|
537
535
|
|
538
536
|
## API
|
539
537
|
|
@@ -67,7 +67,21 @@ module MediaTypes
|
|
67
67
|
quirks_mode: false
|
68
68
|
)
|
69
69
|
}
|
70
|
-
self.json_decoder =
|
70
|
+
self.json_decoder = ->(obj) {
|
71
|
+
Oj.load(obj,
|
72
|
+
mode: :compat,
|
73
|
+
ascii_only: false,
|
74
|
+
allow_nan: false,
|
75
|
+
symbol_keys: true,
|
76
|
+
allow_nil: false,
|
77
|
+
allow_invalid_unicode: false,
|
78
|
+
array_class: ::Array,
|
79
|
+
create_additions: false,
|
80
|
+
hash_class: ::Hash,
|
81
|
+
nilnil: false,
|
82
|
+
quirks_mode: false
|
83
|
+
)
|
84
|
+
}
|
71
85
|
else
|
72
86
|
require 'json'
|
73
87
|
self.json_encoder = JSON.method(:pretty_generate)
|
@@ -6,8 +6,8 @@ require 'media_types/serialization/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'media_types-serialization'
|
8
8
|
spec.version = MediaTypes::Serialization::VERSION
|
9
|
-
spec.authors = ['Derk-Jan Karrenbeld']
|
10
|
-
spec.email = ['derk-jan@xpbytes.com']
|
9
|
+
spec.authors = ['Derk-Jan Karrenbeld', 'Max Maton']
|
10
|
+
spec.email = ['derk-jan@xpbytes.com', 'max@delftsolutions.nl']
|
11
11
|
|
12
12
|
spec.summary = 'Add media types supported serialization using your favourite serializer'
|
13
13
|
spec.homepage = 'https://github.com/XPBytes/media_types-serialization'
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: media_types-serialization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derk-Jan Karrenbeld
|
8
|
+
- Max Maton
|
8
9
|
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
12
|
+
date: 2020-04-17 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: actionpack
|
@@ -179,6 +180,7 @@ dependencies:
|
|
179
180
|
description:
|
180
181
|
email:
|
181
182
|
- derk-jan@xpbytes.com
|
183
|
+
- max@delftsolutions.nl
|
182
184
|
executables: []
|
183
185
|
extensions: []
|
184
186
|
extra_rdoc_files: []
|