ree_lib 1.0.48 → 1.0.49

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: 384e6a3160a97c4246e496a4b89dc3e9a7ab9f145f08c089ef317108681a2f8b
4
- data.tar.gz: 446044926129ddf07b7e4fad340a358937669e64655fe01be630aaaaabc24a62
3
+ metadata.gz: 4c09a8508f0d27f47f70238fbd1dad1c5627c6082f575d703c509a831c67385f
4
+ data.tar.gz: 297458d5b314777ce81af4d077e97fdcddc7985bf947ff0e33d7d07635a68718
5
5
  SHA512:
6
- metadata.gz: e9ee7723045997261aec463595c3b5e0c8f27cc0c9990fd4a0feb0e674df2407f6d1f2db7a4e36bbdedba6e939e33d6e4ba62e9fbe1197049f539f3f0171abc5
7
- data.tar.gz: f1ca42566bf57f1e20eb22a55b94273d566d17db2730f8c4443acdec65ae0825a4e7e649e76de9853bd9381e553ee0a1dd2c254527b863f3d85f0c4d9562bac9
6
+ metadata.gz: 7804922d52fc7d3d6b203d58cfbfa63b0d87df69655537edc85b70b01d1e4bba88ed73459bad71e0c1f10ebd6d5ffcbb6d5c86c231b0c817038ed5cb6eba48a3
7
+ data.tar.gz: ecd43b3975300c865644f617d7235f7d7868b945c9ca5a8f61e8bd2e939faa0214283d66aa883ad85bcba9ce365cfacd723a020eda31027991c74a4919e992b5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ree_lib (1.0.48)
4
+ ree_lib (1.0.49)
5
5
  binding_of_caller (~> 1.0.0)
6
6
  i18n (~> 1.12.0)
7
7
  loofah (~> 2.18.0)
@@ -36,7 +36,9 @@ GEM
36
36
  crass (~> 1.0.2)
37
37
  nokogiri (>= 1.5.9)
38
38
  msgpack (1.6.0)
39
- nokogiri (1.14.3-x86_64-linux)
39
+ nokogiri (1.15.2-x86_64-darwin)
40
+ racc (~> 1.4)
41
+ nokogiri (1.15.2-x86_64-linux)
40
42
  racc (~> 1.4)
41
43
  oj (3.13.23)
42
44
  pg (1.4.6)
@@ -33,11 +33,12 @@ class ReeMapper::MapperFactoryProxy
33
33
  return self unless blk
34
34
 
35
35
  mapper = ReeMapper::Mapper.build(strategies)
36
+
37
+ mapper_factory.register_mapper(register_as, mapper) if register_as
38
+
36
39
  mapper_factory.new(mapper).instance_exec(&blk)
37
40
  mapper.prepare_dto
38
41
 
39
- mapper_factory.register_mapper(register_as, mapper) if register_as
40
-
41
42
  after_build&.call(mapper)
42
43
 
43
44
  mapper
@@ -18,6 +18,7 @@ RSpec.describe ReeMapper::DSL do
18
18
  build_mapper(register_as: :user).use(:cast) do
19
19
  integer :id
20
20
  string :name
21
+ user :created_by, null: true
21
22
  end
22
23
  end
23
24
 
@@ -42,11 +43,29 @@ RSpec.describe ReeMapper::DSL do
42
43
  title: 'Product',
43
44
  creator: {
44
45
  id: 1,
45
- name: 'John'
46
+ name: 'John',
47
+ created_by: {
48
+ id: 2,
49
+ name: 'Jane',
50
+ created_by: nil
51
+ }
46
52
  }
47
53
  }
48
54
  )
49
55
  )
50
- expect(result).to eq({id: 1, title: 'Product', creator: { id: 1, name: 'John' }})
56
+
57
+ expect(result).to eq({
58
+ id: 1,
59
+ title: 'Product',
60
+ creator: {
61
+ id: 1,
62
+ name: 'John',
63
+ created_by: {
64
+ id: 2,
65
+ name: 'Jane',
66
+ created_by: nil
67
+ }
68
+ }
69
+ })
51
70
  }
52
71
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReeLib
4
- VERSION = "1.0.48"
4
+ VERSION = "1.0.49"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ree_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.48
4
+ version: 1.0.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-17 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ree