ledger_sync 2.6.0 → 3.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 +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/gem-workflow.yml +11 -9
- data/.gitignore +3 -1
- data/.rubocop.yml +7 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +140 -114
- data/documentation/generators/generator.rb +1 -1
- data/documentation/generators/reference/generator.rb +1 -3
- data/documentation/generators/template.rb +1 -1
- data/ledger_sync.gemspec +22 -23
- data/lib/ledger_sync/deserializer.rb +4 -4
- data/lib/ledger_sync/error/ledger_errors.rb +2 -8
- data/lib/ledger_sync/error/operation_errors.rb +1 -0
- data/lib/ledger_sync/error/resource_errors.rb +2 -2
- data/lib/ledger_sync/ledger_configuration_store.rb +4 -4
- data/lib/ledger_sync/ledgers/client.rb +3 -3
- data/lib/ledger_sync/ledgers/mixins/infer_serializer_mixin.rb +12 -24
- data/lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb +3 -5
- data/lib/ledger_sync/resource.rb +5 -5
- data/lib/ledger_sync/resource_attribute/dirty_mixin.rb +2 -2
- data/lib/ledger_sync/serialization/mixin.rb +1 -1
- data/lib/ledger_sync/serializer.rb +4 -4
- data/lib/ledger_sync/test/support/factory_bot.rb +2 -2
- data/lib/ledger_sync/test/support/qa/ledger_support_setup.rb +2 -2
- data/lib/ledger_sync/test/support/record_collection.rb +1 -1
- data/lib/ledger_sync/type/reference_many.rb +1 -1
- data/lib/ledger_sync/type/value_mixin.rb +1 -1
- data/lib/ledger_sync/util/dotenv_updator.rb +1 -1
- data/lib/ledger_sync/util/resource_converter/attribute_set.rb +1 -1
- data/lib/ledger_sync/util/resource_converter.rb +8 -8
- data/lib/ledger_sync/util/resources_builder.rb +23 -25
- data/lib/ledger_sync/util/signer.rb +4 -2
- data/lib/ledger_sync/util/string_helpers.rb +1 -1
- data/lib/ledger_sync/version.rb +2 -2
- metadata +47 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feaa06a91bd1760d0ca4de9402dc6d1d1432bd8eec8b3e62a1c171bbb52a283c
|
4
|
+
data.tar.gz: 415fbc751e267184d742496c80a7a6b85247af5bac2f51ec8d7e2d1bedfb9684
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41969bc36721a1bf150ad86e23a85ddd23773273dfc531e5c5bcfe9c63e1f9f96de2fbe8f4e23f12ea295ca1a1b6e6941eda88d9784165a7cad92fdbf7863366
|
7
|
+
data.tar.gz: fd8783e983a38abf9de7ebc5b9474f6c05cabec19d0007c9bcd38b540cd0b5707e8f18afadf5acf242f22a12a13119be7d5ce9444251ed4a97866feedfccd296
|
@@ -9,28 +9,30 @@ jobs:
|
|
9
9
|
strategy:
|
10
10
|
matrix:
|
11
11
|
os: [ubuntu-latest]
|
12
|
-
ruby-version: ['2.
|
12
|
+
ruby-version: ['3.1.6', '3.2.6', '3.3.6']
|
13
13
|
runs-on: ${{ matrix.os }}
|
14
14
|
steps:
|
15
15
|
- uses: actions/checkout@v3
|
16
16
|
with:
|
17
17
|
persist-credentials: false
|
18
18
|
fetch-depth: 0
|
19
|
-
- name: Ruby Setup
|
19
|
+
- name: Ruby Setup
|
20
20
|
uses: ruby/setup-ruby@v1
|
21
21
|
with:
|
22
22
|
ruby-version: ${{ matrix.ruby-version }}
|
23
23
|
bundler-cache: true
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
- name: Bundle install
|
25
|
+
run: |
|
26
|
+
gem install bundler
|
27
|
+
bundle config path vendor/bundle
|
28
|
+
bundle install --jobs 4 --retry 3
|
29
|
+
- name: Rubocop
|
30
|
+
run: bundle exec rubocop
|
29
31
|
rspec:
|
30
32
|
strategy:
|
31
33
|
matrix:
|
32
34
|
os: [ubuntu-latest]
|
33
|
-
ruby-version: ['2.
|
35
|
+
ruby-version: ['3.1.6', '3.2.6', '3.3.6']
|
34
36
|
runs-on: ${{ matrix.os }}
|
35
37
|
steps:
|
36
38
|
- uses: actions/checkout@v3
|
@@ -67,7 +69,7 @@ jobs:
|
|
67
69
|
- name: Ruby Setup and Bundle
|
68
70
|
uses: ruby/setup-ruby@v1
|
69
71
|
with:
|
70
|
-
ruby-version:
|
72
|
+
ruby-version: 3.1.6
|
71
73
|
bundler-cache: true
|
72
74
|
- name: Publish to RubyGems
|
73
75
|
run: |
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -4,9 +4,12 @@ AllCops:
|
|
4
4
|
Exclude:
|
5
5
|
- "documentation/site/_plugins/**/*"
|
6
6
|
- "vendor/**/*"
|
7
|
-
TargetRubyVersion:
|
7
|
+
TargetRubyVersion: 3.1
|
8
8
|
NewCops: enable
|
9
9
|
|
10
|
+
Gemspec/DevelopmentDependencies:
|
11
|
+
Enabled: False
|
12
|
+
|
10
13
|
Layout/LineLength:
|
11
14
|
Enabled: True
|
12
15
|
Max: 120
|
@@ -41,6 +44,9 @@ Lint/RaiseException:
|
|
41
44
|
Lint/StructNewOverride:
|
42
45
|
Enabled: True
|
43
46
|
|
47
|
+
Naming/VariableNumber:
|
48
|
+
Enabled: False
|
49
|
+
|
44
50
|
Style/AccessorGrouping:
|
45
51
|
Enabled: True
|
46
52
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ledger_sync (
|
4
|
+
ledger_sync (3.0.2)
|
5
5
|
activemodel
|
6
6
|
dotenv
|
7
7
|
dry-schema
|
8
8
|
dry-validation
|
9
|
-
faraday
|
10
|
-
faraday-detailed_logger
|
11
|
-
faraday_middleware
|
9
|
+
faraday (>= 2.2.0)
|
12
10
|
fingerprintable (>= 1.2.1)
|
13
11
|
nokogiri
|
14
12
|
openssl (> 2.2.0)
|
@@ -21,54 +19,72 @@ PATH
|
|
21
19
|
GEM
|
22
20
|
remote: https://rubygems.org/
|
23
21
|
specs:
|
24
|
-
activemodel (7.
|
25
|
-
activesupport (= 7.
|
26
|
-
activesupport (7.
|
27
|
-
|
22
|
+
activemodel (7.2.2.1)
|
23
|
+
activesupport (= 7.2.2.1)
|
24
|
+
activesupport (7.2.2.1)
|
25
|
+
base64
|
26
|
+
benchmark (>= 0.3)
|
27
|
+
bigdecimal
|
28
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
29
|
+
connection_pool (>= 2.2.5)
|
30
|
+
drb
|
28
31
|
i18n (>= 1.6, < 2)
|
32
|
+
logger (>= 1.4.2)
|
29
33
|
minitest (>= 5.1)
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
+
securerandom (>= 0.3)
|
35
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
36
|
+
addressable (2.8.7)
|
37
|
+
public_suffix (>= 2.0.2, < 7.0)
|
38
|
+
ast (2.4.3)
|
34
39
|
awesome_print (1.9.2)
|
35
|
-
|
36
|
-
|
37
|
-
|
40
|
+
base64 (0.2.0)
|
41
|
+
benchmark (0.4.0)
|
42
|
+
bigdecimal (3.1.9)
|
43
|
+
bump (0.10.0)
|
44
|
+
byebug (12.0.0)
|
45
|
+
childprocess (5.1.0)
|
46
|
+
logger (~> 1.5)
|
38
47
|
climate_control (1.2.0)
|
39
48
|
colorize (1.1.0)
|
40
|
-
concurrent-ruby (1.
|
41
|
-
|
49
|
+
concurrent-ruby (1.3.5)
|
50
|
+
connection_pool (2.5.1)
|
51
|
+
coveralls_reborn (0.28.0)
|
42
52
|
simplecov (~> 0.22.0)
|
43
53
|
term-ansicolor (~> 1.7)
|
44
54
|
thor (~> 1.2)
|
45
55
|
tins (~> 1.32)
|
46
|
-
crack (0.
|
56
|
+
crack (1.0.0)
|
57
|
+
bigdecimal
|
47
58
|
rexml
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
59
|
+
date (3.4.1)
|
60
|
+
diff-lcs (1.5.1)
|
61
|
+
docile (1.4.1)
|
62
|
+
dotenv (3.1.8)
|
63
|
+
drb (2.2.1)
|
64
|
+
dry-configurable (1.3.0)
|
65
|
+
dry-core (~> 1.1)
|
53
66
|
zeitwerk (~> 2.6)
|
54
|
-
dry-core (1.
|
67
|
+
dry-core (1.1.0)
|
55
68
|
concurrent-ruby (~> 1.0)
|
69
|
+
logger
|
56
70
|
zeitwerk (~> 2.6)
|
57
|
-
dry-inflector (1.
|
58
|
-
dry-initializer (3.
|
59
|
-
dry-logic (1.
|
71
|
+
dry-inflector (1.2.0)
|
72
|
+
dry-initializer (3.2.0)
|
73
|
+
dry-logic (1.6.0)
|
74
|
+
bigdecimal
|
60
75
|
concurrent-ruby (~> 1.0)
|
61
|
-
dry-core (~> 1.
|
76
|
+
dry-core (~> 1.1)
|
62
77
|
zeitwerk (~> 2.6)
|
63
|
-
dry-schema (1.
|
78
|
+
dry-schema (1.14.1)
|
64
79
|
concurrent-ruby (~> 1.0)
|
65
80
|
dry-configurable (~> 1.0, >= 1.0.1)
|
66
|
-
dry-core (~> 1.
|
67
|
-
dry-initializer (~> 3.
|
68
|
-
dry-logic (
|
69
|
-
dry-types (
|
81
|
+
dry-core (~> 1.1)
|
82
|
+
dry-initializer (~> 3.2)
|
83
|
+
dry-logic (~> 1.5)
|
84
|
+
dry-types (~> 1.8)
|
70
85
|
zeitwerk (~> 2.6)
|
71
|
-
dry-types (1.
|
86
|
+
dry-types (1.8.2)
|
87
|
+
bigdecimal (~> 3.0)
|
72
88
|
concurrent-ruby (~> 1.0)
|
73
89
|
dry-core (~> 1.0)
|
74
90
|
dry-inflector (~> 1.0)
|
@@ -80,116 +96,124 @@ GEM
|
|
80
96
|
dry-initializer (~> 3.0)
|
81
97
|
dry-schema (>= 1.12, < 2)
|
82
98
|
zeitwerk (~> 2.6)
|
83
|
-
factory_bot (6.1
|
84
|
-
activesupport (>=
|
85
|
-
faraday (
|
86
|
-
faraday-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
faraday-net_http (~> 1.0)
|
92
|
-
faraday-net_http_persistent (~> 1.0)
|
93
|
-
faraday-patron (~> 1.0)
|
94
|
-
faraday-rack (~> 1.0)
|
95
|
-
faraday-retry (~> 1.0)
|
96
|
-
ruby2_keywords (>= 0.0.4)
|
97
|
-
faraday-detailed_logger (2.5.0)
|
98
|
-
faraday (>= 0.16, < 3)
|
99
|
-
faraday-em_http (1.0.0)
|
100
|
-
faraday-em_synchrony (1.0.0)
|
101
|
-
faraday-excon (1.1.0)
|
102
|
-
faraday-httpclient (1.0.1)
|
103
|
-
faraday-multipart (1.0.4)
|
104
|
-
multipart-post (~> 2)
|
105
|
-
faraday-net_http (1.0.1)
|
106
|
-
faraday-net_http_persistent (1.2.0)
|
107
|
-
faraday-patron (1.0.0)
|
108
|
-
faraday-rack (1.0.0)
|
109
|
-
faraday-retry (1.0.3)
|
110
|
-
faraday_middleware (1.2.0)
|
111
|
-
faraday (~> 1.0)
|
99
|
+
factory_bot (6.5.1)
|
100
|
+
activesupport (>= 6.1.0)
|
101
|
+
faraday (2.12.2)
|
102
|
+
faraday-net_http (>= 2.0, < 3.5)
|
103
|
+
json
|
104
|
+
logger
|
105
|
+
faraday-net_http (3.4.0)
|
106
|
+
net-http (>= 0.5.0)
|
112
107
|
fingerprintable (1.2.1)
|
113
108
|
colorize
|
114
|
-
hashdiff (1.
|
115
|
-
i18n (1.14.
|
109
|
+
hashdiff (1.1.2)
|
110
|
+
i18n (1.14.7)
|
116
111
|
concurrent-ruby (~> 1.0)
|
117
112
|
iniparse (1.5.0)
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
113
|
+
io-console (0.8.0)
|
114
|
+
irb (1.15.2)
|
115
|
+
pp (>= 0.6.0)
|
116
|
+
rdoc (>= 4.0.0)
|
117
|
+
reline (>= 0.4.2)
|
118
|
+
json (2.10.2)
|
119
|
+
language_server-protocol (3.17.0.4)
|
120
|
+
lint_roller (1.1.0)
|
121
|
+
logger (1.7.0)
|
122
|
+
mini_portile2 (2.8.8)
|
123
|
+
minitest (5.25.5)
|
124
|
+
net-http (0.6.0)
|
125
|
+
uri
|
126
|
+
nokogiri (1.16.7)
|
122
127
|
mini_portile2 (~> 2.8.2)
|
123
128
|
racc (~> 1.4)
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
childprocess (>= 0.6.3, < 5)
|
129
|
+
observer (0.1.2)
|
130
|
+
openssl (3.2.0)
|
131
|
+
overcommit (0.67.1)
|
132
|
+
childprocess (>= 0.6.3, < 6)
|
129
133
|
iniparse (~> 1.4)
|
130
|
-
|
131
|
-
|
134
|
+
rexml (>= 3.3.9)
|
135
|
+
parallel (1.27.0)
|
136
|
+
parser (3.3.8.0)
|
132
137
|
ast (~> 2.4.1)
|
133
138
|
racc
|
134
139
|
pd_ruby (0.2.3)
|
135
140
|
colorize
|
136
|
-
|
137
|
-
|
138
|
-
|
141
|
+
pp (0.6.2)
|
142
|
+
prettyprint
|
143
|
+
prettyprint (0.2.0)
|
144
|
+
prism (1.4.0)
|
145
|
+
psych (5.2.3)
|
146
|
+
date
|
147
|
+
stringio
|
148
|
+
public_suffix (6.0.1)
|
149
|
+
racc (1.8.1)
|
150
|
+
rack (3.1.12)
|
139
151
|
rainbow (3.1.1)
|
140
|
-
rake (13.
|
141
|
-
|
152
|
+
rake (13.2.1)
|
153
|
+
rdoc (6.13.1)
|
154
|
+
psych (>= 4.0.0)
|
155
|
+
regexp_parser (2.10.0)
|
156
|
+
reline (0.6.1)
|
157
|
+
io-console (~> 0.5)
|
142
158
|
resonad (1.4.0)
|
143
|
-
rexml (3.
|
144
|
-
rspec (3.
|
145
|
-
rspec-core (~> 3.
|
146
|
-
rspec-expectations (~> 3.
|
147
|
-
rspec-mocks (~> 3.
|
148
|
-
rspec-core (3.
|
149
|
-
rspec-support (~> 3.
|
150
|
-
rspec-expectations (3.
|
159
|
+
rexml (3.4.1)
|
160
|
+
rspec (3.13.0)
|
161
|
+
rspec-core (~> 3.13.0)
|
162
|
+
rspec-expectations (~> 3.13.0)
|
163
|
+
rspec-mocks (~> 3.13.0)
|
164
|
+
rspec-core (3.13.2)
|
165
|
+
rspec-support (~> 3.13.0)
|
166
|
+
rspec-expectations (3.13.3)
|
151
167
|
diff-lcs (>= 1.2.0, < 2.0)
|
152
|
-
rspec-support (~> 3.
|
153
|
-
rspec-mocks (3.
|
168
|
+
rspec-support (~> 3.13.0)
|
169
|
+
rspec-mocks (3.13.2)
|
154
170
|
diff-lcs (>= 1.2.0, < 2.0)
|
155
|
-
rspec-support (~> 3.
|
156
|
-
rspec-support (3.
|
157
|
-
rubocop (1.
|
171
|
+
rspec-support (~> 3.13.0)
|
172
|
+
rspec-support (3.13.1)
|
173
|
+
rubocop (1.75.2)
|
174
|
+
json (~> 2.3)
|
175
|
+
language_server-protocol (~> 3.17.0.2)
|
176
|
+
lint_roller (~> 1.1.0)
|
158
177
|
parallel (~> 1.10)
|
159
|
-
parser (>=
|
178
|
+
parser (>= 3.3.0.2)
|
160
179
|
rainbow (>= 2.2.2, < 4.0)
|
161
|
-
regexp_parser (>=
|
162
|
-
|
163
|
-
rubocop-ast (>= 0.6.0)
|
180
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
181
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
164
182
|
ruby-progressbar (~> 1.7)
|
165
|
-
unicode-display_width (>=
|
166
|
-
rubocop-ast (1.
|
167
|
-
parser (>= 3.
|
183
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
184
|
+
rubocop-ast (1.44.1)
|
185
|
+
parser (>= 3.3.7.2)
|
186
|
+
prism (~> 1.4)
|
168
187
|
ruby-progressbar (1.13.0)
|
169
|
-
|
188
|
+
securerandom (0.4.1)
|
170
189
|
simplecov (0.22.0)
|
171
190
|
docile (~> 1.1)
|
172
191
|
simplecov-html (~> 0.11)
|
173
192
|
simplecov_json_formatter (~> 0.1)
|
174
|
-
simplecov-html (0.
|
193
|
+
simplecov-html (0.13.1)
|
175
194
|
simplecov-lcov (0.8.0)
|
176
195
|
simplecov_json_formatter (0.1.4)
|
177
196
|
simply_serializable (1.5.1)
|
178
197
|
fingerprintable (>= 1.2.1)
|
198
|
+
stringio (3.1.6)
|
179
199
|
sync (0.5.0)
|
180
|
-
term-ansicolor (1.
|
200
|
+
term-ansicolor (1.11.2)
|
181
201
|
tins (~> 1.0)
|
182
|
-
thor (1.
|
183
|
-
tins (1.
|
202
|
+
thor (1.3.2)
|
203
|
+
tins (1.37.0)
|
204
|
+
bigdecimal
|
184
205
|
sync
|
185
206
|
tzinfo (2.0.6)
|
186
207
|
concurrent-ruby (~> 1.0)
|
187
|
-
unicode-display_width (1.
|
188
|
-
|
208
|
+
unicode-display_width (3.1.4)
|
209
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
210
|
+
unicode-emoji (4.0.4)
|
211
|
+
uri (1.0.3)
|
212
|
+
webmock (3.25.1)
|
189
213
|
addressable (>= 2.8.0)
|
190
214
|
crack (>= 0.3.2)
|
191
215
|
hashdiff (>= 0.4.0, < 2.0.0)
|
192
|
-
zeitwerk (2.6.
|
216
|
+
zeitwerk (2.6.18)
|
193
217
|
|
194
218
|
PLATFORMS
|
195
219
|
ruby
|
@@ -197,20 +221,22 @@ PLATFORMS
|
|
197
221
|
|
198
222
|
DEPENDENCIES
|
199
223
|
awesome_print
|
200
|
-
bump (~> 0.
|
224
|
+
bump (~> 0.10.0)
|
201
225
|
bundler (~> 2.1)
|
202
226
|
byebug
|
203
227
|
climate_control
|
204
228
|
coveralls_reborn
|
205
|
-
factory_bot (~> 6.1
|
229
|
+
factory_bot (~> 6.5.1)
|
230
|
+
irb (~> 1.15)
|
206
231
|
ledger_sync!
|
207
|
-
|
232
|
+
observer (~> 0.1.0)
|
233
|
+
overcommit (~> 0.67.1)
|
208
234
|
rake (~> 13.0)
|
209
235
|
rspec (~> 3.2)
|
210
|
-
rubocop (
|
236
|
+
rubocop (~> 1.75)
|
211
237
|
simplecov
|
212
238
|
simplecov-lcov
|
213
239
|
webmock
|
214
240
|
|
215
241
|
BUNDLED WITH
|
216
|
-
2.2
|
242
|
+
2.6.2
|
@@ -15,7 +15,7 @@ module Docs
|
|
15
15
|
def write
|
16
16
|
template = ERB.new(File.read(template_path), trim_mode: '-')
|
17
17
|
yellow "Generating template: #{template_path}"
|
18
|
-
File.
|
18
|
+
File.write(destination_path, template.result_with_hash(data))
|
19
19
|
green "Wrote to destination: #{destination_path}"
|
20
20
|
end
|
21
21
|
end
|
data/ledger_sync.gemspec
CHANGED
@@ -8,17 +8,15 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'ledger_sync'
|
9
9
|
spec.version = LedgerSync.version
|
10
10
|
|
11
|
-
spec.required_ruby_version = '>=
|
11
|
+
spec.required_ruby_version = '>= 3.1'
|
12
12
|
|
13
13
|
# spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version=
|
14
14
|
spec.authors = ['Ryan Jackson']
|
15
|
-
spec.
|
16
|
-
spec.description = 'LedgerSync is a simple library that allows you to sync common objects to popular accounting '\
|
15
|
+
spec.description = 'LedgerSync is a simple library that allows you to sync common objects to popular accounting ' \
|
17
16
|
'software like QuickBooks Online, Xero, NetSuite, etc.'
|
18
17
|
spec.email = ['ryanwjackson@gmail.com']
|
19
18
|
spec.homepage = 'https://github.com/LedgerSync/ledger_sync'
|
20
19
|
spec.licenses = ['MIT']
|
21
|
-
spec.rubygems_version = '3.0.3'
|
22
20
|
spec.summary = 'Sync common objects to accounting software.'
|
23
21
|
|
24
22
|
# Specify which files should be added to the gem when it is released.
|
@@ -31,32 +29,33 @@ Gem::Specification.new do |spec|
|
|
31
29
|
spec.require_paths = ['lib']
|
32
30
|
|
33
31
|
spec.add_development_dependency('awesome_print', '>= 0')
|
34
|
-
spec.add_development_dependency('bump', '~> 0.
|
32
|
+
spec.add_development_dependency('bump', '~> 0.10.0')
|
35
33
|
spec.add_development_dependency('bundler', '~> 2.1')
|
36
34
|
spec.add_development_dependency('byebug', '>= 0')
|
37
35
|
spec.add_development_dependency('climate_control')
|
38
36
|
spec.add_development_dependency('coveralls_reborn')
|
39
|
-
spec.add_development_dependency('factory_bot', '~> 6.1
|
40
|
-
spec.add_development_dependency('
|
37
|
+
spec.add_development_dependency('factory_bot', '~> 6.5.1')
|
38
|
+
spec.add_development_dependency('irb', '~> 1.15')
|
39
|
+
spec.add_development_dependency('observer', '~> 0.1.0')
|
40
|
+
spec.add_development_dependency('overcommit', '~> 0.67.1')
|
41
41
|
spec.add_development_dependency('rake', '~> 13.0')
|
42
42
|
spec.add_development_dependency('rspec', '~> 3.2')
|
43
|
-
spec.add_development_dependency('rubocop', '1.
|
43
|
+
spec.add_development_dependency('rubocop', '~> 1.62')
|
44
44
|
spec.add_development_dependency('simplecov')
|
45
45
|
spec.add_development_dependency('simplecov-lcov')
|
46
46
|
spec.add_development_dependency('webmock', '>= 0')
|
47
|
-
spec.
|
48
|
-
spec.
|
49
|
-
spec.
|
50
|
-
spec.
|
51
|
-
spec.
|
52
|
-
spec.
|
53
|
-
spec.
|
54
|
-
spec.
|
55
|
-
spec.
|
56
|
-
spec.
|
57
|
-
spec.
|
58
|
-
spec.
|
59
|
-
spec.
|
60
|
-
spec.
|
61
|
-
spec.add_runtime_dependency('simply_serializable', '>= 1.5.1')
|
47
|
+
spec.add_dependency('activemodel', '>= 0')
|
48
|
+
spec.add_dependency('dotenv')
|
49
|
+
spec.add_dependency('dry-schema')
|
50
|
+
spec.add_dependency('dry-validation')
|
51
|
+
spec.add_dependency('faraday', '>= 2.2.0')
|
52
|
+
spec.add_dependency('fingerprintable', '>= 1.2.1')
|
53
|
+
spec.add_dependency('nokogiri', '>= 0')
|
54
|
+
spec.add_dependency('openssl', '> 2.2.0')
|
55
|
+
spec.add_dependency('pd_ruby', '>= 0')
|
56
|
+
spec.add_dependency('rack', '>= 2.2.3')
|
57
|
+
spec.add_dependency('rainbow', '~> 3.0')
|
58
|
+
spec.add_dependency('resonad', '>= 0')
|
59
|
+
spec.add_dependency('simply_serializable', '>= 1.5.1')
|
60
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
62
61
|
end
|
@@ -71,7 +71,7 @@ module LedgerSync
|
|
71
71
|
@attributes ||= Serialization::DeserializerAttributeSet.new(serializer_class: self)
|
72
72
|
end
|
73
73
|
|
74
|
-
def self.references_one(resource_attribute, args = {}, &
|
74
|
+
def self.references_one(resource_attribute, args = {}, &)
|
75
75
|
attribute(
|
76
76
|
resource_attribute,
|
77
77
|
{
|
@@ -79,11 +79,11 @@ module LedgerSync
|
|
79
79
|
deserializer: deserializer_from(resource_attribute, args)
|
80
80
|
)
|
81
81
|
}.merge(args),
|
82
|
-
&
|
82
|
+
&
|
83
83
|
)
|
84
84
|
end
|
85
85
|
|
86
|
-
def self.references_many(resource_attribute, args = {}, &
|
86
|
+
def self.references_many(resource_attribute, args = {}, &)
|
87
87
|
attribute(
|
88
88
|
resource_attribute,
|
89
89
|
{
|
@@ -91,7 +91,7 @@ module LedgerSync
|
|
91
91
|
deserializer: deserializer_from(resource_attribute, args)
|
92
92
|
)
|
93
93
|
}.merge(args),
|
94
|
-
&
|
94
|
+
&
|
95
95
|
)
|
96
96
|
end
|
97
97
|
|
@@ -46,11 +46,7 @@ module LedgerSync
|
|
46
46
|
client_class: client.class
|
47
47
|
).rate_limiting_wait_in_seconds
|
48
48
|
|
49
|
-
super
|
50
|
-
client: client,
|
51
|
-
message: message,
|
52
|
-
response: response
|
53
|
-
)
|
49
|
+
super
|
54
50
|
end
|
55
51
|
end
|
56
52
|
|
@@ -62,9 +58,7 @@ module LedgerSync
|
|
62
58
|
|
63
59
|
super(
|
64
60
|
*args,
|
65
|
-
**
|
66
|
-
message: "Unknown URL format for #{resource.class}"
|
67
|
-
}.merge(keywords)
|
61
|
+
message: "Unknown URL format for #{resource.class}", **keywords
|
68
62
|
)
|
69
63
|
end
|
70
64
|
end
|
@@ -15,6 +15,7 @@ module LedgerSync
|
|
15
15
|
class DuplicateLedgerResourceError < self; end
|
16
16
|
class NotFoundError < self; end
|
17
17
|
class LedgerValidationError < self; end
|
18
|
+
|
18
19
|
class PerformedOperationError < self
|
19
20
|
def initialize(operation:, message: nil, response: nil)
|
20
21
|
message ||= 'Operation has already been performed. Please check the result.'
|
@@ -22,8 +22,8 @@ module LedgerSync
|
|
22
22
|
when LedgerSync::ResourceAttribute::Reference::Many
|
23
23
|
invalid_classes = value.reject { |e| e.is_a?(type_resource_class) }.map(&:class)
|
24
24
|
if type_resource_class.is_a?(Array)
|
25
|
-
"an array of one or more of the following: #{type_resource_class.name}. Given array containing: "\
|
26
|
-
|
25
|
+
"an array of one or more of the following: #{type_resource_class.name}. Given array containing: " \
|
26
|
+
"#{invalid_classes.join(', ')}"
|
27
27
|
else
|
28
28
|
"an array of #{type_resource_class.name}. Given array containing: #{invalid_classes.join(', ')}"
|
29
29
|
end
|
@@ -32,12 +32,12 @@ module LedgerSync
|
|
32
32
|
@base_module_to_config_mapping.fetch(base_module, nil)
|
33
33
|
end
|
34
34
|
|
35
|
-
def each(&
|
36
|
-
configs.each(&
|
35
|
+
def each(&)
|
36
|
+
configs.each(&)
|
37
37
|
end
|
38
38
|
|
39
|
-
def find(&
|
40
|
-
configs.values.find(&
|
39
|
+
def find(&)
|
40
|
+
configs.values.find(&)
|
41
41
|
end
|
42
42
|
|
43
43
|
def register_ledger(ledger_config:)
|