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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c09a8508f0d27f47f70238fbd1dad1c5627c6082f575d703c509a831c67385f
|
4
|
+
data.tar.gz: 297458d5b314777ce81af4d077e97fdcddc7985bf947ff0e33d7d07635a68718
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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
|
-
|
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
|
data/lib/ree_lib/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ree
|