ializer 0.13.0 → 0.14.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: 8576d59eb12dbcbb21750ff9d90e0d3de7f3e1e9df46b70c74924692ecfc22fc
4
- data.tar.gz: 78cfd59cc6b962793c4f1a5413dc2667a00bd15372243e34e035831f88d898b7
3
+ metadata.gz: 47951e84e1f35863d32623f8759930325fbb59a515b78b177b35ab1a71dee354
4
+ data.tar.gz: 1fbd19294162024a7b47c230940f9f121f465c949f1196377467880bf5acc7ba
5
5
  SHA512:
6
- metadata.gz: 556be5da20a96c4a6d5221e51661321d9c1a79336b5917bf61323262ddd65f56b4f21e134c20ccd36d321ea71fb70399ae1a7f94c913d81401c0bc6e3e5758f7
7
- data.tar.gz: 7144f7808f6c8a92caa1c3241466f97a8dbb557725e5fc0a0f8d43d4b88e5b0edff648838bfe2c363b9d7f3b2fd2614970a3ba75f596d018f84eea367a857d02
6
+ metadata.gz: 0f767ce0b7c931ef8ac62ea4f1e8c3f0df6f51ca3969bfef9d0b65d93ffc1dc8c655f83fcba46a5ad860005fe56d1a6a3b6085189521c2d3f4fa6ca2bebf8eb0
7
+ data.tar.gz: c95aec89841decd0907742c95e1318be0c2a2ec2715b2f9fdd416b5c56d549627826a8bd806072d5949912ed344497d8b02cebc55261cdce8b63176ab5b12562
@@ -8,29 +8,21 @@ jobs:
8
8
 
9
9
  strategy:
10
10
  matrix:
11
- ruby: [ '2.5.x', '2.6.x' ]
11
+ ruby: [ '2.7', '3.0', '3.1' ]
12
12
 
13
13
  name: Ruby ${{ matrix.ruby }}
14
14
  steps:
15
15
  - uses: actions/checkout@v1
16
16
  - name: Set up Ruby ${{ matrix.ruby }}
17
- uses: actions/setup-ruby@v1
17
+ uses: ruby/setup-ruby@v1
18
18
  with:
19
19
  ruby-version: ${{ matrix.ruby }}
20
+ bundler-cache: true
20
21
 
21
22
  - name: Install bundler
22
23
  run: |
23
24
  gem install bundler
24
25
 
25
- - name: Cache bundled gems
26
- uses: actions/cache@v1
27
- with:
28
- path: vendor/bundle
29
- key: ${{ runner.os }}-${{ matrix.ruby }}-gem-${{ hashFiles('**/ializer.gemspec') }}
30
- restore-keys: |
31
- ${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles('**/ializer.gemspec') }}
32
- ${{ runner.os }}-${{ matrix.ruby }}-
33
-
34
26
  - name: Bundle
35
27
  run: |
36
28
  bundle config path vendor/bundle
data/README.md CHANGED
@@ -316,21 +316,22 @@ end
316
316
 
317
317
  The following types are included with `ializer`
318
318
 
319
- | Type | method alias | mappings |
320
- |------------|--------------|----------------------------|
321
- | BigDecimal | `decimal()` | :BigDecimal, :decimal |
322
- | Boolean | `boolean()` | :Boolean, :boolean |
323
- | Date | `date()` | Date, :date |
324
- | Integer | `integer()` | Integer, :integer |
325
- | Float | `float()` | Float, :float |
326
- | Time | `millis()` | :Millis, :millis |
327
- | String | `string()` | String, :millis |
328
- | Symbol | `symbol()` | Symbol, :symbol, :sym |
329
- | Time | `timestamp()`| Time, DateTime, :timestamp |
330
- | JSON | `json()` | :json |
331
- | Default | `default()` | :default |
332
-
333
- **Note: JSON/Default just uses the current value of the field and will only properly deserialize if it is a standard json value type(number, string, boolean).**
319
+ | Type | method alias | mappings |
320
+ |------------|---------------|----------------------------|
321
+ | BigDecimal | `decimal()` | :BigDecimal, :decimal |
322
+ | Boolean | `boolean()` | :Boolean, :boolean |
323
+ | Date | `date()` | Date, :date |
324
+ | Integer | `integer()` | Integer, :integer |
325
+ | Float | `float()` | Float, :float |
326
+ | Time | `millis()` | :Millis, :millis |
327
+ | String | `string()` | String, :millis |
328
+ | Symbol | `symbol()` | Symbol, :symbol, :sym |
329
+ | Time | `timestamp()` | Time, DateTime, :timestamp |
330
+ | Array | `array()` | :array |
331
+ | JSON | `json()` | :json |
332
+ | Default | `default()` | :default |
333
+
334
+ **Note: Array/JSON/Default just uses the current value of the field and will only properly deserialize if it is a standard json value type(number, string, boolean).**
334
335
 
335
336
  #### Default Attribute Configuration Options
336
337
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'bigdecimal'
4
+ require 'bigdecimal/util'
4
5
 
5
6
  module Ializer
6
7
  class BigDecimalDeSer
@@ -13,4 +13,5 @@ module Ializer
13
13
  end
14
14
 
15
15
  Ser::Ializer.register_default(Ializer::DefaultDeSer)
16
+ Ser::Ializer.register('array', Ializer::DefaultDeSer, :array)
16
17
  Ser::Ializer.register('json', Ializer::DefaultDeSer, :json)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ializer
4
- VERSION = '0.13.0'
4
+ VERSION = '0.14.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Steinberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-05 00:00:00.000000000 Z
11
+ date: 2023-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.2.15
196
+ rubygems_version: 3.3.7
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: Simple (de)serializers for Ruby objects