ree_lib 1.0.117 → 1.0.119
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ree_lib/packages/ree_dao/package/ree_dao/functions/one_to_many.rb +1 -1
- data/lib/ree_lib/packages/ree_dao/package/ree_dao/functions/one_to_one.rb +1 -1
- data/lib/ree_lib/packages/ree_dto/package/ree_dto/dto/dto_instance_methods.rb +7 -0
- data/lib/ree_lib/packages/ree_dto/spec/ree_dto/dsl_spec.rb +7 -0
- data/lib/ree_lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f74fddaac7132110d9917614ea455fff6eb718eaf8ed969fc897995346d915b3
|
4
|
+
data.tar.gz: 52d6b3e4461d320f8fd3affdb37b46cfe1ebb56d9fbc4879020021bbb3515746
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c66a59c59055abdd1bfa11358f0e9b0d645b45e2fa2d7b0d3bbdbed8e545763bb650de824baf7e7a484999cff28106e0be102a0f7c2543579c6b6f404eb9766
|
7
|
+
data.tar.gz: 43bb3573292d9c2392aa8964d4a0640c0eee93be1aac867fcfa029e594b9096df78d77736c0b9b43900e3828f99b353b58051e2e942165f572429c54f6263468
|
data/Gemfile.lock
CHANGED
@@ -8,7 +8,7 @@ class ReeDao::OneToMany
|
|
8
8
|
end
|
9
9
|
|
10
10
|
contract(
|
11
|
-
ArrayOf[ -> (v) { v.class.ancestors.include?(ReeDto::EntityDSL) } ],
|
11
|
+
ArrayOf[ -> (v) { v.class.ancestors.include?(ReeDto::EntityDSL) || v.class.ancestors.include?(ReeDto::DSL) } ],
|
12
12
|
Sequel::Dataset,
|
13
13
|
Ksplat[
|
14
14
|
foreign_key?: Symbol,
|
@@ -8,7 +8,7 @@ class ReeDao::OneToOne
|
|
8
8
|
end
|
9
9
|
|
10
10
|
contract(
|
11
|
-
ArrayOf[ -> (v) { v.class.ancestors.include?(ReeDto::EntityDSL) } ],
|
11
|
+
ArrayOf[ -> (v) { v.class.ancestors.include?(ReeDto::EntityDSL) || v.class.ancestors.include?(ReeDto::DSL) } ],
|
12
12
|
Sequel::Dataset,
|
13
13
|
Ksplat[
|
14
14
|
reverse?: Bool,
|
@@ -83,6 +83,13 @@ module ReeDto::DtoInstanceMethods
|
|
83
83
|
@changed_fields.to_a
|
84
84
|
end
|
85
85
|
|
86
|
+
def set_as_changed(name)
|
87
|
+
if has_value?(name)
|
88
|
+
@changed_fields ||= Set.new
|
89
|
+
@changed_fields << name
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
86
93
|
contract Block => Any
|
87
94
|
def each_field(&proc)
|
88
95
|
self.class.fields.select { has_value?(_1.name) }.each do |field|
|
@@ -30,6 +30,13 @@ RSpec.describe ReeDto::DSL do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
context "fields" do
|
33
|
+
it {
|
34
|
+
dto = ReeDto::DtoClass.new(string: "str")
|
35
|
+
expect(dto.changed_fields).to eq([])
|
36
|
+
dto.set_as_changed(:string)
|
37
|
+
expect(dto.changed_fields).to eq([:string])
|
38
|
+
}
|
39
|
+
|
33
40
|
it {
|
34
41
|
dto = ReeDto::DtoClass.new
|
35
42
|
expect(dto.with_default).to eq(1)
|
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.119
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ruslan Gatiyatov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ree
|