ledger_sync-domains 1.0.0 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -2
- data/Gemfile.lock +16 -12
- data/lib/ledger_sync/domains/operation/find.rb +1 -1
- data/lib/ledger_sync/domains/operation/remove.rb +8 -1
- data/lib/ledger_sync/domains/operation/transition.rb +2 -1
- data/lib/ledger_sync/domains/operation/update.rb +8 -1
- data/lib/ledger_sync/domains/operation.rb +1 -4
- data/lib/ledger_sync/domains/serializer/relation.rb +1 -0
- data/lib/ledger_sync/domains/serializer/struct.rb +1 -1
- data/lib/ledger_sync/domains/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: 39747304db149c67fa5931f4bb55e5f641ac479a0c81736b2b8a0dc898852d6a
|
|
4
|
+
data.tar.gz: 915b258020520848ef336dff958a942ec9718bcff240be9c05e4ebf6c6ff75a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29518075759d273084208dbe9906ab74468f0ccd7318639714be8efdc1e4ae058eba8d8bc8ac8ea4329520de0e463760fdd64a4e1293c4c444c54be92d9fd69d
|
|
7
|
+
data.tar.gz: 9b1f671a116493fd55a6c35667f5e732521b1136e341d525a13b09332eef62a4a2c70c067da2919650ab56e057842774fff614bc6202327ed0b7d0eca5839ced
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.0.4] - 2022-02-15
|
|
4
|
+
|
|
5
|
+
- Fix: Do not serialize unset relationships
|
|
6
|
+
|
|
7
|
+
## [1.0.3] - 2022-02-12
|
|
8
|
+
|
|
9
|
+
- Fix: Resource shorthand operations uses limit instead of query
|
|
10
|
+
|
|
11
|
+
## [1.0.2] - 2022-01-25
|
|
12
|
+
|
|
13
|
+
- Fix: Include extra query filtering in Operations
|
|
14
|
+
- Fix: Error return after validation falied in perform action of operation class.
|
|
15
|
+
|
|
16
|
+
## [1.0.1] - 2021-12-21
|
|
17
|
+
|
|
18
|
+
- Fix: Removing constant is private method. Sigh.
|
|
19
|
+
|
|
3
20
|
## [1.0.0] - 2021-12-20
|
|
4
21
|
|
|
5
22
|
- Chore: Cleanup existing structs when serializing
|
|
@@ -23,7 +40,7 @@
|
|
|
23
40
|
## [1.0.0.rc5] - 2021-11-05
|
|
24
41
|
|
|
25
42
|
- Add: Introduce Serializer::Relation to proxy AR Queries
|
|
26
|
-
- Refactor Struct out of Serializer
|
|
43
|
+
- Chore: Refactor Struct out of Serializer
|
|
27
44
|
|
|
28
45
|
## [1.0.0.rc4] - 2021-09-23
|
|
29
46
|
|
|
@@ -35,7 +52,7 @@
|
|
|
35
52
|
|
|
36
53
|
## [1.0.0.rc2] - 2021-09-06
|
|
37
54
|
|
|
38
|
-
- Serialized OpenStruct uses serializer-like class name
|
|
55
|
+
- Add: Serialized OpenStruct uses serializer-like class name
|
|
39
56
|
|
|
40
57
|
## [1.0.0.rc1] - 2021-08-31
|
|
41
58
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ledger_sync-domains (1.0.
|
|
4
|
+
ledger_sync-domains (1.0.4)
|
|
5
5
|
ledger_sync (~> 2.3.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -20,7 +20,7 @@ GEM
|
|
|
20
20
|
concurrent-ruby (1.1.9)
|
|
21
21
|
diff-lcs (1.4.4)
|
|
22
22
|
dotenv (2.7.6)
|
|
23
|
-
dry-configurable (0.
|
|
23
|
+
dry-configurable (0.14.0)
|
|
24
24
|
concurrent-ruby (~> 1.0)
|
|
25
25
|
dry-core (~> 0.6)
|
|
26
26
|
dry-container (0.9.0)
|
|
@@ -29,11 +29,11 @@ GEM
|
|
|
29
29
|
dry-core (0.7.1)
|
|
30
30
|
concurrent-ruby (~> 1.0)
|
|
31
31
|
dry-inflector (0.2.1)
|
|
32
|
-
dry-initializer (3.
|
|
32
|
+
dry-initializer (3.1.1)
|
|
33
33
|
dry-logic (1.2.0)
|
|
34
34
|
concurrent-ruby (~> 1.0)
|
|
35
35
|
dry-core (~> 0.5, >= 0.5)
|
|
36
|
-
dry-schema (1.
|
|
36
|
+
dry-schema (1.9.0)
|
|
37
37
|
concurrent-ruby (~> 1.0)
|
|
38
38
|
dry-configurable (~> 0.13, >= 0.13.0)
|
|
39
39
|
dry-core (~> 0.5, >= 0.5)
|
|
@@ -54,34 +54,38 @@ GEM
|
|
|
54
54
|
dry-schema (~> 1.8, >= 1.8.0)
|
|
55
55
|
factory_bot (6.2.0)
|
|
56
56
|
activesupport (>= 5.0.0)
|
|
57
|
-
faraday (1.
|
|
57
|
+
faraday (1.9.3)
|
|
58
58
|
faraday-em_http (~> 1.0)
|
|
59
59
|
faraday-em_synchrony (~> 1.0)
|
|
60
60
|
faraday-excon (~> 1.1)
|
|
61
|
-
faraday-httpclient (~> 1.0
|
|
61
|
+
faraday-httpclient (~> 1.0)
|
|
62
|
+
faraday-multipart (~> 1.0)
|
|
62
63
|
faraday-net_http (~> 1.0)
|
|
63
|
-
faraday-net_http_persistent (~> 1.
|
|
64
|
+
faraday-net_http_persistent (~> 1.0)
|
|
64
65
|
faraday-patron (~> 1.0)
|
|
65
66
|
faraday-rack (~> 1.0)
|
|
66
|
-
|
|
67
|
+
faraday-retry (~> 1.0)
|
|
67
68
|
ruby2_keywords (>= 0.0.4)
|
|
68
|
-
faraday-detailed_logger (2.
|
|
69
|
-
faraday (>= 0.16, <
|
|
69
|
+
faraday-detailed_logger (2.5.0)
|
|
70
|
+
faraday (>= 0.16, < 3)
|
|
70
71
|
faraday-em_http (1.0.0)
|
|
71
72
|
faraday-em_synchrony (1.0.0)
|
|
72
73
|
faraday-excon (1.1.0)
|
|
73
74
|
faraday-httpclient (1.0.1)
|
|
75
|
+
faraday-multipart (1.0.3)
|
|
76
|
+
multipart-post (>= 1.2, < 3)
|
|
74
77
|
faraday-net_http (1.0.1)
|
|
75
78
|
faraday-net_http_persistent (1.2.0)
|
|
76
79
|
faraday-patron (1.0.0)
|
|
77
80
|
faraday-rack (1.0.0)
|
|
81
|
+
faraday-retry (1.0.3)
|
|
78
82
|
faraday_middleware (1.2.0)
|
|
79
83
|
faraday (~> 1.0)
|
|
80
84
|
fingerprintable (1.2.1)
|
|
81
85
|
colorize
|
|
82
86
|
i18n (1.8.11)
|
|
83
87
|
concurrent-ruby (~> 1.0)
|
|
84
|
-
ipaddr (1.2.
|
|
88
|
+
ipaddr (1.2.4)
|
|
85
89
|
ledger_sync (2.3.1)
|
|
86
90
|
activemodel
|
|
87
91
|
dry-schema
|
|
@@ -99,7 +103,7 @@ GEM
|
|
|
99
103
|
simply_serializable (>= 1.5.1)
|
|
100
104
|
minitest (5.15.0)
|
|
101
105
|
multipart-post (2.1.1)
|
|
102
|
-
nokogiri (1.
|
|
106
|
+
nokogiri (1.13.1-x86_64-linux)
|
|
103
107
|
racc (~> 1.4)
|
|
104
108
|
openssl (2.2.1)
|
|
105
109
|
ipaddr
|
|
@@ -7,6 +7,13 @@ module LedgerSync
|
|
|
7
7
|
module Domains
|
|
8
8
|
class Operation
|
|
9
9
|
class Remove < Resource
|
|
10
|
+
class Contract < LedgerSync::Ledgers::Contract
|
|
11
|
+
params do
|
|
12
|
+
required(:id).filled(:integer)
|
|
13
|
+
required(:limit).value(:hash)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
10
17
|
private
|
|
11
18
|
|
|
12
19
|
def operate
|
|
@@ -23,7 +30,7 @@ module LedgerSync
|
|
|
23
30
|
end
|
|
24
31
|
|
|
25
32
|
def resource
|
|
26
|
-
@resource ||= resource_class.find_by(id: params[:id])
|
|
33
|
+
@resource ||= resource_class.where(params[:limit]).find_by(id: params[:id])
|
|
27
34
|
end
|
|
28
35
|
|
|
29
36
|
def success
|
|
@@ -14,6 +14,7 @@ module LedgerSync
|
|
|
14
14
|
required(:event).value(:string)
|
|
15
15
|
required(:attrs).maybe(:hash)
|
|
16
16
|
required(:attrs).maybe(:array)
|
|
17
|
+
required(:limit).value(:hash)
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
|
|
@@ -41,7 +42,7 @@ module LedgerSync
|
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
def resource
|
|
44
|
-
@resource ||= resource_class.find_by(id: params[:id])
|
|
45
|
+
@resource ||= resource_class.where(params[:limit]).find_by(id: params[:id])
|
|
45
46
|
end
|
|
46
47
|
|
|
47
48
|
def resource_class
|
|
@@ -7,6 +7,13 @@ module LedgerSync
|
|
|
7
7
|
module Domains
|
|
8
8
|
class Operation
|
|
9
9
|
class Update < Resource
|
|
10
|
+
class Contract < LedgerSync::Ledgers::Contract
|
|
11
|
+
params do
|
|
12
|
+
required(:id).filled(:integer)
|
|
13
|
+
required(:limit).value(:hash)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
10
17
|
private
|
|
11
18
|
|
|
12
19
|
def operate
|
|
@@ -23,7 +30,7 @@ module LedgerSync
|
|
|
23
30
|
end
|
|
24
31
|
|
|
25
32
|
def resource
|
|
26
|
-
@resource ||= resource_class.find_by(id: params[:id])
|
|
33
|
+
@resource ||= resource_class.where(params[:limit]).find_by(id: params[:id])
|
|
27
34
|
end
|
|
28
35
|
|
|
29
36
|
def success
|
|
@@ -53,7 +53,7 @@ module LedgerSync
|
|
|
53
53
|
class_name = name.pop.gsub(/[^0-9a-z ]/i, '').gsub(/.*\KSerializer/, '')
|
|
54
54
|
struct_name = "#{class_name}Struct"
|
|
55
55
|
module_name = name.empty? ? Object : Object.const_get(name.join('::'))
|
|
56
|
-
module_name.remove_const(struct_name) if module_name.const_defined?(struct_name)
|
|
56
|
+
# module_name.remove_const(struct_name) if module_name.const_defined?(struct_name)
|
|
57
57
|
module_name.const_set(struct_name, Class.new(OpenStruct))
|
|
58
58
|
|
|
59
59
|
klass.with_lazy_references(
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ledger_sync-domains
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jozef Vaclavik
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ledger_sync
|