ledger_sync-domains 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfad9de4dbe74676429795415511fd9874f332f160ae7c121d8d1a61ca8afefa
4
- data.tar.gz: 640a6b9b508313c156d559da4fb1d0baf3161752e3229147cde27f0354f942c5
3
+ metadata.gz: d1fb828826dc023ee107776c16eb98f31851901369f594df39054efe19cf432c
4
+ data.tar.gz: 8317376fdcb39e6eb28750dbf6f74cc4e873190a4b1ce9b121682ed056ad2a9a
5
5
  SHA512:
6
- metadata.gz: 020124a36b0c66859d443a06a7c8445490dcd67dca4820c5ae7853c6a967cc7cc19838d55475ed42f80e1e3688b0ec1473defc411487e4bfb8eb568e37101c64
7
- data.tar.gz: 998ef055f3710f630cf24b6a24991fdb53efcf39d682b046e1b2101a0cd86301223bfa0769083220b87ea9ee2f96eabfeaad906ea1b8568919941036f14e8377
6
+ metadata.gz: 99a9d86a95ade23fadf90f3ec19c67b0a7176d5b40ab27f8c9d41bc56060c7262488b3dceff344cdf20f87c1ba16122626f8c61b94205c424e89d7c8857f8b64
7
+ data.tar.gz: 016733a34a47b67aa01c691bb615882b5a8363aeea9f2e83450633b8f0f19f88f3e68aeeeab6332e8223cd294c5798e5fcabfa0c26f33be03526904230abba3d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.0.2] - 2022-01-25
4
+
5
+ - Fix: Include extra query filtering in Operations
6
+ - Fix: Error return after validation falied in perform action of operation class.
7
+
3
8
  ## [1.0.1] - 2021-12-21
4
9
 
5
10
  - Fix: Removing constant is private method. Sigh.
@@ -27,7 +32,7 @@
27
32
  ## [1.0.0.rc5] - 2021-11-05
28
33
 
29
34
  - Add: Introduce Serializer::Relation to proxy AR Queries
30
- - Refactor Struct out of Serializer
35
+ - Chore: Refactor Struct out of Serializer
31
36
 
32
37
  ## [1.0.0.rc4] - 2021-09-23
33
38
 
@@ -39,7 +44,7 @@
39
44
 
40
45
  ## [1.0.0.rc2] - 2021-09-06
41
46
 
42
- - Serialized OpenStruct uses serializer-like class name
47
+ - Add: Serialized OpenStruct uses serializer-like class name
43
48
 
44
49
  ## [1.0.0.rc1] - 2021-08-31
45
50
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ledger_sync-domains (1.0.1)
4
+ ledger_sync-domains (1.0.2)
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.13.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,7 +29,7 @@ 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.0.4)
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)
@@ -54,27 +54,31 @@ 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.8.0)
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.1)
61
+ faraday-httpclient (~> 1.0)
62
+ faraday-multipart (~> 1.0)
62
63
  faraday-net_http (~> 1.0)
63
- faraday-net_http_persistent (~> 1.1)
64
+ faraday-net_http_persistent (~> 1.0)
64
65
  faraday-patron (~> 1.0)
65
66
  faraday-rack (~> 1.0)
66
- multipart-post (>= 1.2, < 3)
67
+ faraday-retry (~> 1.0)
67
68
  ruby2_keywords (>= 0.0.4)
68
- faraday-detailed_logger (2.4.2)
69
- faraday (>= 0.16, < 2)
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)
@@ -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.12.5-x86_64-linux)
106
+ nokogiri (1.13.1-x86_64-linux)
103
107
  racc (~> 1.4)
104
108
  openssl (2.2.1)
105
109
  ipaddr
@@ -10,7 +10,7 @@ module LedgerSync
10
10
  class Contract < LedgerSync::Ledgers::Contract
11
11
  params do
12
12
  required(:id).filled(:integer)
13
- required(:limit).value(:hash)
13
+ required(:query).value(:hash)
14
14
  end
15
15
  end
16
16
 
@@ -25,7 +25,7 @@ module LedgerSync
25
25
  end
26
26
 
27
27
  def resource
28
- @resource ||= resource_class.find_by(id: params[:id])
28
+ @resource ||= resource_class.where(params[:query]).find_by(id: params[:id])
29
29
  end
30
30
 
31
31
  def success
@@ -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(:query).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[:query]).find_by(id: params[:id])
27
34
  end
28
35
 
29
36
  def success
@@ -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(:query).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[:query]).find_by(id: params[:id])
27
34
  end
28
35
 
29
36
  def success
@@ -84,10 +84,7 @@ module LedgerSync
84
84
  )
85
85
  end
86
86
 
87
- unless valid?
88
- failure(errors)
89
- return
90
- end
87
+ return failure(errors) unless valid?
91
88
 
92
89
  @result = begin
93
90
  operate
@@ -2,6 +2,6 @@
2
2
 
3
3
  module LedgerSync
4
4
  module Domains
5
- VERSION = '1.0.1'
5
+ VERSION = '1.0.2'
6
6
  end
7
7
  end
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.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jozef Vaclavik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-20 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ledger_sync