ledger_sync 2.0.2 → 2.3.1
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/workflows/gem-workflow.yml +4 -4
- data/.travis.yml +1 -0
- data/Gemfile.lock +87 -77
- data/documentation/generate.rb +1 -1
- data/documentation/helper_methods.rb +3 -3
- data/ledger_sync.gemspec +6 -6
- data/lib/ledger_sync/error/ledger_errors.rb +3 -1
- data/lib/ledger_sync/ledgers/client.rb +4 -4
- data/lib/ledger_sync/resource_attribute/mixin.rb +1 -1
- data/lib/ledger_sync/result.rb +17 -11
- data/lib/ledger_sync/test/support/factory_bot.rb +1 -1
- data/lib/ledger_sync/type/reference_many.rb +2 -1
- data/lib/ledger_sync/type/string_from_set.rb +1 -1
- data/lib/ledger_sync/util/validator.rb +2 -2
- data/lib/ledger_sync/version.rb +1 -1
- data/lib/ledger_sync.rb +1 -2
- metadata +31 -31
- data/lib/ledger_sync/resource_adaptor.rb +0 -54
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f4d1b564e236739a5eff9353f6874de8448732bab53ad022c7767ce1b6ad0760
|
|
4
|
+
data.tar.gz: ceed82b24334e02854b175197e8b0708fe5b457c7376edbda7e9c25c0e7ee66f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36b00397f1ec6b4aa044d5fc3233b7aa19ec1ec346a98fbd7e28794503b086bb1b07a5e9262f096390b65dd73cca5580be7dfb6bcddec82185e8bf3e34078bd2
|
|
7
|
+
data.tar.gz: 503a37dd1ddb695791be7d3bb894f52646c255cd9fc26d4d20b96d77f112bfdf3875f9f7d3dd62ee8b16146a869728fe119fc9a509d7bc21d63ad7b6f0cb1a8d
|
|
@@ -8,7 +8,7 @@ jobs:
|
|
|
8
8
|
rubocop:
|
|
9
9
|
strategy:
|
|
10
10
|
matrix:
|
|
11
|
-
ruby-version: [2.6.3, 2.6.6, 2.7.1]
|
|
11
|
+
ruby-version: [2.5.8, 2.6.3, 2.6.6, 2.7.1, 3.0.2]
|
|
12
12
|
runs-on: [ubuntu-latest]
|
|
13
13
|
steps:
|
|
14
14
|
- uses: actions/checkout@v2
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
rspec:
|
|
25
25
|
strategy:
|
|
26
26
|
matrix:
|
|
27
|
-
ruby-version: [2.6.3, 2.6.6, 2.7.1]
|
|
27
|
+
ruby-version: [2.5.8, 2.6.3, 2.6.6, 2.7.1, 3.0.2]
|
|
28
28
|
runs-on: [ubuntu-latest]
|
|
29
29
|
steps:
|
|
30
30
|
- uses: actions/checkout@v2
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
flag-name: run-${{ matrix.ruby-version }}
|
|
47
47
|
publish:
|
|
48
48
|
runs-on: ubuntu-latest
|
|
49
|
-
needs: [
|
|
49
|
+
needs: ["rubocop", "rspec"]
|
|
50
50
|
if: github.event_name == 'release' && github.event.action == 'created'
|
|
51
51
|
steps:
|
|
52
52
|
- name: Checkout
|
|
@@ -68,4 +68,4 @@ jobs:
|
|
|
68
68
|
gem build *.gemspec
|
|
69
69
|
gem push *.gem
|
|
70
70
|
env:
|
|
71
|
-
GEM_HOST_API_KEY: "${{ secrets.RUBY_GEM_KEY }}"
|
|
71
|
+
GEM_HOST_API_KEY: "${{ secrets.RUBY_GEM_KEY }}"
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ledger_sync (2.
|
|
4
|
+
ledger_sync (2.3.1)
|
|
5
5
|
activemodel
|
|
6
|
-
|
|
7
|
-
dry-
|
|
8
|
-
dry-validation (~> 1.5.6)
|
|
6
|
+
dry-schema
|
|
7
|
+
dry-validation
|
|
9
8
|
faraday
|
|
10
9
|
faraday-detailed_logger
|
|
11
10
|
faraday_middleware
|
|
@@ -14,31 +13,32 @@ PATH
|
|
|
14
13
|
openssl (~> 2.2.0)
|
|
15
14
|
pd_ruby
|
|
16
15
|
rack (~> 2.2.3)
|
|
16
|
+
rainbow (~> 3.0)
|
|
17
17
|
resonad
|
|
18
18
|
simply_serializable (>= 1.5.1)
|
|
19
19
|
|
|
20
20
|
GEM
|
|
21
21
|
remote: https://rubygems.org/
|
|
22
22
|
specs:
|
|
23
|
-
activemodel (6.
|
|
24
|
-
activesupport (= 6.
|
|
25
|
-
activesupport (6.
|
|
23
|
+
activemodel (6.1.4.1)
|
|
24
|
+
activesupport (= 6.1.4.1)
|
|
25
|
+
activesupport (6.1.4.1)
|
|
26
26
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
27
|
-
i18n (>=
|
|
28
|
-
minitest (
|
|
29
|
-
tzinfo (~>
|
|
30
|
-
zeitwerk (~> 2.
|
|
31
|
-
addressable (2.
|
|
27
|
+
i18n (>= 1.6, < 2)
|
|
28
|
+
minitest (>= 5.1)
|
|
29
|
+
tzinfo (~> 2.0)
|
|
30
|
+
zeitwerk (~> 2.3)
|
|
31
|
+
addressable (2.8.0)
|
|
32
32
|
public_suffix (>= 2.0.2, < 5.0)
|
|
33
33
|
ast (2.4.2)
|
|
34
34
|
awesome_print (1.9.2)
|
|
35
35
|
bump (0.9.0)
|
|
36
36
|
byebug (11.1.3)
|
|
37
|
-
childprocess (4.
|
|
38
|
-
climate_control (1.0.
|
|
37
|
+
childprocess (4.1.0)
|
|
38
|
+
climate_control (1.0.1)
|
|
39
39
|
colorator (1.1.0)
|
|
40
40
|
colorize (0.8.1)
|
|
41
|
-
concurrent-ruby (1.1.
|
|
41
|
+
concurrent-ruby (1.1.9)
|
|
42
42
|
coveralls (0.7.2)
|
|
43
43
|
multi_json (~> 1.3)
|
|
44
44
|
rest-client (= 1.6.7)
|
|
@@ -48,7 +48,7 @@ GEM
|
|
|
48
48
|
crack (0.4.5)
|
|
49
49
|
rexml
|
|
50
50
|
diff-lcs (1.4.4)
|
|
51
|
-
docile (1.
|
|
51
|
+
docile (1.4.0)
|
|
52
52
|
dotenv (2.7.6)
|
|
53
53
|
dry-configurable (0.12.1)
|
|
54
54
|
concurrent-ruby (~> 1.0)
|
|
@@ -64,114 +64,126 @@ GEM
|
|
|
64
64
|
dry-logic (1.2.0)
|
|
65
65
|
concurrent-ruby (~> 1.0)
|
|
66
66
|
dry-core (~> 0.5, >= 0.5)
|
|
67
|
-
dry-schema (1.
|
|
67
|
+
dry-schema (1.6.2)
|
|
68
68
|
concurrent-ruby (~> 1.0)
|
|
69
69
|
dry-configurable (~> 0.8, >= 0.8.3)
|
|
70
|
-
dry-core (~> 0.
|
|
71
|
-
dry-equalizer (~> 0.2)
|
|
70
|
+
dry-core (~> 0.5, >= 0.5)
|
|
72
71
|
dry-initializer (~> 3.0)
|
|
73
72
|
dry-logic (~> 1.0)
|
|
74
|
-
dry-types (~> 1.
|
|
73
|
+
dry-types (~> 1.5)
|
|
75
74
|
dry-types (1.5.1)
|
|
76
75
|
concurrent-ruby (~> 1.0)
|
|
77
76
|
dry-container (~> 0.3)
|
|
78
77
|
dry-core (~> 0.5, >= 0.5)
|
|
79
78
|
dry-inflector (~> 0.1, >= 0.1.2)
|
|
80
79
|
dry-logic (~> 1.0, >= 1.0.2)
|
|
81
|
-
dry-validation (1.
|
|
80
|
+
dry-validation (1.6.0)
|
|
82
81
|
concurrent-ruby (~> 1.0)
|
|
83
82
|
dry-container (~> 0.7, >= 0.7.1)
|
|
84
83
|
dry-core (~> 0.4)
|
|
85
84
|
dry-equalizer (~> 0.2)
|
|
86
85
|
dry-initializer (~> 3.0)
|
|
87
86
|
dry-schema (~> 1.5, >= 1.5.2)
|
|
88
|
-
em-websocket (0.5.
|
|
87
|
+
em-websocket (0.5.3)
|
|
89
88
|
eventmachine (>= 0.12.9)
|
|
90
|
-
http_parser.rb (~> 0
|
|
89
|
+
http_parser.rb (~> 0)
|
|
91
90
|
eventmachine (1.2.7)
|
|
92
91
|
factory_bot (6.1.0)
|
|
93
92
|
activesupport (>= 5.0.0)
|
|
94
|
-
faraday (1.
|
|
93
|
+
faraday (1.8.0)
|
|
95
94
|
faraday-em_http (~> 1.0)
|
|
96
95
|
faraday-em_synchrony (~> 1.0)
|
|
97
96
|
faraday-excon (~> 1.1)
|
|
97
|
+
faraday-httpclient (~> 1.0.1)
|
|
98
98
|
faraday-net_http (~> 1.0)
|
|
99
99
|
faraday-net_http_persistent (~> 1.1)
|
|
100
|
+
faraday-patron (~> 1.0)
|
|
101
|
+
faraday-rack (~> 1.0)
|
|
100
102
|
multipart-post (>= 1.2, < 3)
|
|
101
103
|
ruby2_keywords (>= 0.0.4)
|
|
102
|
-
faraday-detailed_logger (2.
|
|
103
|
-
faraday (>= 0.
|
|
104
|
+
faraday-detailed_logger (2.4.2)
|
|
105
|
+
faraday (>= 0.16, < 2)
|
|
104
106
|
faraday-em_http (1.0.0)
|
|
105
107
|
faraday-em_synchrony (1.0.0)
|
|
106
108
|
faraday-excon (1.1.0)
|
|
109
|
+
faraday-httpclient (1.0.1)
|
|
107
110
|
faraday-net_http (1.0.1)
|
|
108
|
-
faraday-net_http_persistent (1.
|
|
109
|
-
|
|
111
|
+
faraday-net_http_persistent (1.2.0)
|
|
112
|
+
faraday-patron (1.0.0)
|
|
113
|
+
faraday-rack (1.0.0)
|
|
114
|
+
faraday_middleware (1.2.0)
|
|
110
115
|
faraday (~> 1.0)
|
|
111
|
-
ffi (1.15.
|
|
116
|
+
ffi (1.15.4)
|
|
112
117
|
fingerprintable (1.2.1)
|
|
113
118
|
colorize
|
|
114
119
|
forwardable-extended (2.6.0)
|
|
115
120
|
hashdiff (1.0.1)
|
|
116
|
-
http_parser.rb (0.
|
|
117
|
-
i18n (
|
|
121
|
+
http_parser.rb (0.8.0)
|
|
122
|
+
i18n (1.8.11)
|
|
118
123
|
concurrent-ruby (~> 1.0)
|
|
119
124
|
iniparse (1.5.0)
|
|
120
|
-
|
|
125
|
+
ipaddr (1.2.3)
|
|
126
|
+
jekyll (4.2.1)
|
|
121
127
|
addressable (~> 2.4)
|
|
122
128
|
colorator (~> 1.0)
|
|
123
129
|
em-websocket (~> 0.5)
|
|
124
|
-
i18n (~> 0
|
|
125
|
-
jekyll-sass-converter (~>
|
|
130
|
+
i18n (~> 1.0)
|
|
131
|
+
jekyll-sass-converter (~> 2.0)
|
|
126
132
|
jekyll-watch (~> 2.0)
|
|
127
|
-
kramdown (~>
|
|
133
|
+
kramdown (~> 2.3)
|
|
134
|
+
kramdown-parser-gfm (~> 1.0)
|
|
128
135
|
liquid (~> 4.0)
|
|
129
|
-
mercenary (~> 0.
|
|
136
|
+
mercenary (~> 0.4.0)
|
|
130
137
|
pathutil (~> 0.9)
|
|
131
|
-
rouge (
|
|
138
|
+
rouge (~> 3.0)
|
|
132
139
|
safe_yaml (~> 1.0)
|
|
140
|
+
terminal-table (~> 2.0)
|
|
133
141
|
jekyll-menus (0.6.1)
|
|
134
142
|
jekyll (>= 3.6, < 5.0)
|
|
135
143
|
jekyll-paginate (1.1.0)
|
|
136
|
-
jekyll-paginate-v2 (
|
|
137
|
-
jekyll (
|
|
138
|
-
jekyll-sass-converter (1.
|
|
139
|
-
|
|
144
|
+
jekyll-paginate-v2 (3.0.0)
|
|
145
|
+
jekyll (>= 3.0, < 5.0)
|
|
146
|
+
jekyll-sass-converter (2.1.0)
|
|
147
|
+
sassc (> 2.0.1, < 3.0)
|
|
140
148
|
jekyll-watch (2.2.1)
|
|
141
149
|
listen (~> 3.0)
|
|
142
|
-
kramdown (
|
|
150
|
+
kramdown (2.3.1)
|
|
151
|
+
rexml
|
|
152
|
+
kramdown-parser-gfm (1.1.0)
|
|
153
|
+
kramdown (~> 2.0)
|
|
143
154
|
liquid (4.0.3)
|
|
144
|
-
listen (3.
|
|
155
|
+
listen (3.7.0)
|
|
145
156
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
146
157
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
147
|
-
mercenary (0.
|
|
148
|
-
mime-types (3.
|
|
158
|
+
mercenary (0.4.0)
|
|
159
|
+
mime-types (3.4.1)
|
|
149
160
|
mime-types-data (~> 3.2015)
|
|
150
|
-
mime-types-data (3.2021.
|
|
151
|
-
mini_portile2 (2.
|
|
161
|
+
mime-types-data (3.2021.1115)
|
|
162
|
+
mini_portile2 (2.6.1)
|
|
152
163
|
minitest (5.14.4)
|
|
153
164
|
multi_json (1.15.0)
|
|
154
165
|
multipart-post (2.1.1)
|
|
155
|
-
nokogiri (1.
|
|
156
|
-
mini_portile2 (~> 2.
|
|
166
|
+
nokogiri (1.12.5)
|
|
167
|
+
mini_portile2 (~> 2.6.1)
|
|
157
168
|
racc (~> 1.4)
|
|
158
|
-
openssl (2.2.
|
|
169
|
+
openssl (2.2.1)
|
|
170
|
+
ipaddr
|
|
159
171
|
overcommit (0.57.0)
|
|
160
172
|
childprocess (>= 0.6.3, < 5)
|
|
161
173
|
iniparse (~> 1.4)
|
|
162
|
-
parallel (1.
|
|
163
|
-
parser (3.0.1
|
|
174
|
+
parallel (1.21.0)
|
|
175
|
+
parser (3.0.3.1)
|
|
164
176
|
ast (~> 2.4.1)
|
|
165
177
|
pathutil (0.16.2)
|
|
166
178
|
forwardable-extended (~> 2.6)
|
|
167
179
|
pd_ruby (0.2.3)
|
|
168
180
|
colorize
|
|
169
181
|
public_suffix (4.0.6)
|
|
170
|
-
racc (1.
|
|
182
|
+
racc (1.6.0)
|
|
171
183
|
rack (2.2.3)
|
|
172
184
|
rainbow (3.0.0)
|
|
173
|
-
rake (13.0.
|
|
174
|
-
rb-fsevent (0.
|
|
185
|
+
rake (13.0.6)
|
|
186
|
+
rb-fsevent (0.11.0)
|
|
175
187
|
rb-inotify (0.10.1)
|
|
176
188
|
ffi (~> 1.0)
|
|
177
189
|
regexp_parser (2.1.1)
|
|
@@ -179,7 +191,7 @@ GEM
|
|
|
179
191
|
rest-client (1.6.7)
|
|
180
192
|
mime-types (>= 1.16)
|
|
181
193
|
rexml (3.2.5)
|
|
182
|
-
rouge (3.26.
|
|
194
|
+
rouge (3.26.1)
|
|
183
195
|
rspec (3.10.0)
|
|
184
196
|
rspec-core (~> 3.10.0)
|
|
185
197
|
rspec-expectations (~> 3.10.0)
|
|
@@ -192,7 +204,7 @@ GEM
|
|
|
192
204
|
rspec-mocks (3.10.2)
|
|
193
205
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
194
206
|
rspec-support (~> 3.10.0)
|
|
195
|
-
rspec-support (3.10.
|
|
207
|
+
rspec-support (3.10.3)
|
|
196
208
|
rubocop (1.0.0)
|
|
197
209
|
parallel (~> 1.10)
|
|
198
210
|
parser (>= 2.7.1.5)
|
|
@@ -202,38 +214,36 @@ GEM
|
|
|
202
214
|
rubocop-ast (>= 0.6.0)
|
|
203
215
|
ruby-progressbar (~> 1.7)
|
|
204
216
|
unicode-display_width (>= 1.4.0, < 2.0)
|
|
205
|
-
rubocop-ast (1.
|
|
206
|
-
parser (>=
|
|
217
|
+
rubocop-ast (1.13.0)
|
|
218
|
+
parser (>= 3.0.1.1)
|
|
207
219
|
ruby-progressbar (1.11.0)
|
|
208
|
-
ruby2_keywords (0.0.
|
|
220
|
+
ruby2_keywords (0.0.5)
|
|
209
221
|
safe_yaml (1.0.5)
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
sass-listen (4.0.0)
|
|
213
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
214
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
|
222
|
+
sassc (2.4.0)
|
|
223
|
+
ffi (~> 1.9)
|
|
215
224
|
simplecov (0.21.2)
|
|
216
225
|
docile (~> 1.1)
|
|
217
226
|
simplecov-html (~> 0.11)
|
|
218
227
|
simplecov_json_formatter (~> 0.1)
|
|
219
228
|
simplecov-html (0.12.3)
|
|
220
229
|
simplecov-lcov (0.8.0)
|
|
221
|
-
simplecov_json_formatter (0.1.
|
|
230
|
+
simplecov_json_formatter (0.1.3)
|
|
222
231
|
simply_serializable (1.5.1)
|
|
223
232
|
fingerprintable (>= 1.2.1)
|
|
224
233
|
term-ansicolor (1.2.2)
|
|
225
234
|
tins (~> 0.8)
|
|
235
|
+
terminal-table (2.0.0)
|
|
236
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
|
226
237
|
thor (0.18.1)
|
|
227
|
-
thread_safe (0.3.6)
|
|
228
238
|
tins (0.13.2)
|
|
229
|
-
tzinfo (
|
|
230
|
-
|
|
231
|
-
unicode-display_width (1.
|
|
232
|
-
webmock (3.
|
|
233
|
-
addressable (>= 2.
|
|
239
|
+
tzinfo (2.0.4)
|
|
240
|
+
concurrent-ruby (~> 1.0)
|
|
241
|
+
unicode-display_width (1.8.0)
|
|
242
|
+
webmock (3.14.0)
|
|
243
|
+
addressable (>= 2.8.0)
|
|
234
244
|
crack (>= 0.3.2)
|
|
235
245
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
236
|
-
zeitwerk (2.
|
|
246
|
+
zeitwerk (2.5.1)
|
|
237
247
|
|
|
238
248
|
PLATFORMS
|
|
239
249
|
ruby
|
|
@@ -247,10 +257,10 @@ DEPENDENCIES
|
|
|
247
257
|
coveralls
|
|
248
258
|
dotenv
|
|
249
259
|
factory_bot (~> 6.1.0)
|
|
250
|
-
jekyll (~>
|
|
251
|
-
jekyll-menus (~> 0.6.
|
|
260
|
+
jekyll (~> 4.2.0)
|
|
261
|
+
jekyll-menus (~> 0.6.1)
|
|
252
262
|
jekyll-paginate (~> 1.1)
|
|
253
|
-
jekyll-paginate-v2 (~>
|
|
263
|
+
jekyll-paginate-v2 (~> 3.0)
|
|
254
264
|
ledger_sync!
|
|
255
265
|
overcommit (~> 0.57.0)
|
|
256
266
|
rake (~> 13.0)
|
|
@@ -261,4 +271,4 @@ DEPENDENCIES
|
|
|
261
271
|
webmock
|
|
262
272
|
|
|
263
273
|
BUNDLED WITH
|
|
264
|
-
2.
|
|
274
|
+
2.2.22
|
data/documentation/generate.rb
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
def green(str)
|
|
4
|
-
puts str.
|
|
4
|
+
puts Rainbow(str).green
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def yellow(str)
|
|
8
|
-
puts str.
|
|
8
|
+
puts Rainbow(str).yellow
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def red(str)
|
|
12
|
-
puts str.
|
|
12
|
+
puts Rainbow(str).red
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def nl
|
data/ledger_sync.gemspec
CHANGED
|
@@ -38,10 +38,10 @@ Gem::Specification.new do |spec|
|
|
|
38
38
|
spec.add_development_dependency('coveralls')
|
|
39
39
|
spec.add_development_dependency('dotenv')
|
|
40
40
|
spec.add_development_dependency('factory_bot', '~> 6.1.0')
|
|
41
|
-
spec.add_development_dependency('jekyll', '~>
|
|
42
|
-
spec.add_development_dependency('jekyll-menus', '~> 0.6.
|
|
41
|
+
spec.add_development_dependency('jekyll', '~> 4.2.0')
|
|
42
|
+
spec.add_development_dependency('jekyll-menus', '~> 0.6.1')
|
|
43
43
|
spec.add_development_dependency('jekyll-paginate', '~> 1.1')
|
|
44
|
-
spec.add_development_dependency('jekyll-paginate-v2', '~>
|
|
44
|
+
spec.add_development_dependency('jekyll-paginate-v2', '~> 3.0')
|
|
45
45
|
spec.add_development_dependency('overcommit', '~> 0.57.0')
|
|
46
46
|
spec.add_development_dependency('rake', '~> 13.0')
|
|
47
47
|
spec.add_development_dependency('rspec', '~> 3.2')
|
|
@@ -50,9 +50,8 @@ Gem::Specification.new do |spec|
|
|
|
50
50
|
spec.add_development_dependency('simplecov-lcov')
|
|
51
51
|
spec.add_development_dependency('webmock', '>= 0')
|
|
52
52
|
spec.add_runtime_dependency('activemodel', '>= 0')
|
|
53
|
-
spec.add_runtime_dependency('
|
|
54
|
-
spec.add_runtime_dependency('dry-
|
|
55
|
-
spec.add_runtime_dependency('dry-validation', '~> 1.5.6')
|
|
53
|
+
spec.add_runtime_dependency('dry-schema')
|
|
54
|
+
spec.add_runtime_dependency('dry-validation')
|
|
56
55
|
spec.add_runtime_dependency('faraday', '>= 0')
|
|
57
56
|
spec.add_runtime_dependency('faraday-detailed_logger', '>= 0')
|
|
58
57
|
spec.add_runtime_dependency('faraday_middleware', '>= 0')
|
|
@@ -61,6 +60,7 @@ Gem::Specification.new do |spec|
|
|
|
61
60
|
spec.add_runtime_dependency('openssl', '~> 2.2.0')
|
|
62
61
|
spec.add_runtime_dependency('pd_ruby', '>= 0')
|
|
63
62
|
spec.add_runtime_dependency('rack', '~> 2.2.3')
|
|
63
|
+
spec.add_runtime_dependency('rainbow', '~> 3.0')
|
|
64
64
|
spec.add_runtime_dependency('resonad', '>= 0')
|
|
65
65
|
spec.add_runtime_dependency('simply_serializable', '>= 1.5.1')
|
|
66
66
|
end
|
|
@@ -56,8 +56,8 @@ module LedgerSync
|
|
|
56
56
|
)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
def searcher_class_for(*args)
|
|
60
|
-
self.class.searcher_class_for(*args)
|
|
59
|
+
def searcher_class_for(*args, **keywords)
|
|
60
|
+
self.class.searcher_class_for(*args, **keywords)
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def url_for(*_args)
|
|
@@ -93,8 +93,8 @@ module LedgerSync
|
|
|
93
93
|
{}
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
-
def operation_class_for(*args)
|
|
97
|
-
Client.operation_class_for(*args)
|
|
96
|
+
def operation_class_for(*args, **keywords)
|
|
97
|
+
Client.operation_class_for(*args, **keywords)
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
def resource_from_ledger_type(type:, converter: nil)
|
data/lib/ledger_sync/result.rb
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
module LedgerSync
|
|
4
4
|
module ResultBase
|
|
5
5
|
module HelperMethods
|
|
6
|
-
def Success(value = nil, *args) # rubocop:disable Naming/MethodName
|
|
7
|
-
self::Success.new(value, *args)
|
|
6
|
+
def Success(value = nil, *args, **keywords) # rubocop:disable Naming/MethodName
|
|
7
|
+
self::Success.new(value, *args, **keywords)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
def Failure(error = nil, *args) # rubocop:disable Naming/MethodName
|
|
11
|
-
self::Failure.new(error, *args)
|
|
10
|
+
def Failure(error = nil, *args, **keywords) # rubocop:disable Naming/MethodName
|
|
11
|
+
self::Failure.new(error, *args, **keywords)
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
@@ -24,6 +24,12 @@ module LedgerSync
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
class Result
|
|
27
|
+
module ResultTypeBase
|
|
28
|
+
def initialize(*args, **keywords) # rubocop:disable Lint/UnusedMethodArgument
|
|
29
|
+
super(*args)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
27
33
|
include ResultBase
|
|
28
34
|
end
|
|
29
35
|
|
|
@@ -37,10 +43,10 @@ module LedgerSync
|
|
|
37
43
|
end
|
|
38
44
|
end
|
|
39
45
|
|
|
40
|
-
def initialize(*args,
|
|
41
|
-
@operation = operation
|
|
42
|
-
@resource = resource
|
|
43
|
-
@response = response
|
|
46
|
+
def initialize(*args, **keywords)
|
|
47
|
+
@operation = keywords.fetch(:operation)
|
|
48
|
+
@resource = keywords.fetch(:resource)
|
|
49
|
+
@response = keywords.fetch(:response)
|
|
44
50
|
super(*args)
|
|
45
51
|
end
|
|
46
52
|
end
|
|
@@ -63,10 +69,10 @@ module LedgerSync
|
|
|
63
69
|
end
|
|
64
70
|
end
|
|
65
71
|
|
|
66
|
-
def initialize(*args, searcher:, **keywords)
|
|
72
|
+
def initialize(*args, searcher:, **keywords) # rubocop:disable Lint/UnusedMethodArgument
|
|
67
73
|
@resources = searcher.resources
|
|
68
74
|
@searcher = searcher
|
|
69
|
-
super(*args
|
|
75
|
+
super(*args)
|
|
70
76
|
end
|
|
71
77
|
|
|
72
78
|
def next_searcher
|
|
@@ -99,7 +105,7 @@ module LedgerSync
|
|
|
99
105
|
end
|
|
100
106
|
end
|
|
101
107
|
|
|
102
|
-
def initialize(validator:
|
|
108
|
+
def initialize(validator, **keywords) # rubocop:disable Lint/UnusedMethodArgument
|
|
103
109
|
raise 'The argument must be a validator' unless validator.is_a?(Util::Validator)
|
|
104
110
|
|
|
105
111
|
@validator = validator
|
|
@@ -32,7 +32,8 @@ module LedgerSync
|
|
|
32
32
|
:reference_many
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
def valid?(
|
|
35
|
+
def valid?(args = {})
|
|
36
|
+
value = args.fetch(:value)
|
|
36
37
|
return false unless value.is_a?(Array)
|
|
37
38
|
return true if (resource_classes & value.map(&:class)).any?
|
|
38
39
|
return true if value.is_a?(Array) && value.empty?
|
|
@@ -40,11 +40,11 @@ module LedgerSync
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def failure
|
|
43
|
-
ValidationResult.Failure(
|
|
43
|
+
ValidationResult.Failure(self)
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def success
|
|
47
|
-
ValidationResult.Success(
|
|
47
|
+
ValidationResult.Success(self)
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
end
|
data/lib/ledger_sync/version.rb
CHANGED
data/lib/ledger_sync.rb
CHANGED
|
@@ -6,7 +6,7 @@ require 'dry-validation'
|
|
|
6
6
|
require 'logger'
|
|
7
7
|
require 'resonad'
|
|
8
8
|
require 'uri'
|
|
9
|
-
require '
|
|
9
|
+
require 'rainbow'
|
|
10
10
|
require 'fingerprintable'
|
|
11
11
|
require 'simply_serializable'
|
|
12
12
|
require 'active_model'
|
|
@@ -47,7 +47,6 @@ require 'ledger_sync/util/mixins/resource_registerable_mixin'
|
|
|
47
47
|
require 'ledger_sync/util/mixins/dupable_mixin'
|
|
48
48
|
require 'ledger_sync/result'
|
|
49
49
|
require 'ledger_sync/operation'
|
|
50
|
-
require 'ledger_sync/resource_adaptor'
|
|
51
50
|
|
|
52
51
|
Gem.find_files('ledger_sync/type/**/*.rb').each { |path| require path }
|
|
53
52
|
Gem.find_files('ledger_sync/serialization/type/**/*.rb').each { |path| require path }
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ledger_sync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Jackson
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2019-05-21 00:00:00.000000000 Z
|
|
@@ -128,28 +128,28 @@ dependencies:
|
|
|
128
128
|
requirements:
|
|
129
129
|
- - "~>"
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version:
|
|
131
|
+
version: 4.2.0
|
|
132
132
|
type: :development
|
|
133
133
|
prerelease: false
|
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
136
|
- - "~>"
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
|
-
version:
|
|
138
|
+
version: 4.2.0
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
140
|
name: jekyll-menus
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - "~>"
|
|
144
144
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: 0.6.
|
|
145
|
+
version: 0.6.1
|
|
146
146
|
type: :development
|
|
147
147
|
prerelease: false
|
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
149
|
requirements:
|
|
150
150
|
- - "~>"
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: 0.6.
|
|
152
|
+
version: 0.6.1
|
|
153
153
|
- !ruby/object:Gem::Dependency
|
|
154
154
|
name: jekyll-paginate
|
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -170,14 +170,14 @@ dependencies:
|
|
|
170
170
|
requirements:
|
|
171
171
|
- - "~>"
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: '
|
|
173
|
+
version: '3.0'
|
|
174
174
|
type: :development
|
|
175
175
|
prerelease: false
|
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
177
|
requirements:
|
|
178
178
|
- - "~>"
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
|
-
version: '
|
|
180
|
+
version: '3.0'
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
182
|
name: overcommit
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -291,7 +291,7 @@ dependencies:
|
|
|
291
291
|
- !ruby/object:Gem::Version
|
|
292
292
|
version: '0'
|
|
293
293
|
- !ruby/object:Gem::Dependency
|
|
294
|
-
name:
|
|
294
|
+
name: dry-schema
|
|
295
295
|
requirement: !ruby/object:Gem::Requirement
|
|
296
296
|
requirements:
|
|
297
297
|
- - ">="
|
|
@@ -304,34 +304,20 @@ dependencies:
|
|
|
304
304
|
- - ">="
|
|
305
305
|
- !ruby/object:Gem::Version
|
|
306
306
|
version: '0'
|
|
307
|
-
- !ruby/object:Gem::Dependency
|
|
308
|
-
name: dry-schema
|
|
309
|
-
requirement: !ruby/object:Gem::Requirement
|
|
310
|
-
requirements:
|
|
311
|
-
- - "~>"
|
|
312
|
-
- !ruby/object:Gem::Version
|
|
313
|
-
version: 1.5.4
|
|
314
|
-
type: :runtime
|
|
315
|
-
prerelease: false
|
|
316
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
317
|
-
requirements:
|
|
318
|
-
- - "~>"
|
|
319
|
-
- !ruby/object:Gem::Version
|
|
320
|
-
version: 1.5.4
|
|
321
307
|
- !ruby/object:Gem::Dependency
|
|
322
308
|
name: dry-validation
|
|
323
309
|
requirement: !ruby/object:Gem::Requirement
|
|
324
310
|
requirements:
|
|
325
|
-
- - "
|
|
311
|
+
- - ">="
|
|
326
312
|
- !ruby/object:Gem::Version
|
|
327
|
-
version:
|
|
313
|
+
version: '0'
|
|
328
314
|
type: :runtime
|
|
329
315
|
prerelease: false
|
|
330
316
|
version_requirements: !ruby/object:Gem::Requirement
|
|
331
317
|
requirements:
|
|
332
|
-
- - "
|
|
318
|
+
- - ">="
|
|
333
319
|
- !ruby/object:Gem::Version
|
|
334
|
-
version:
|
|
320
|
+
version: '0'
|
|
335
321
|
- !ruby/object:Gem::Dependency
|
|
336
322
|
name: faraday
|
|
337
323
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -444,6 +430,20 @@ dependencies:
|
|
|
444
430
|
- - "~>"
|
|
445
431
|
- !ruby/object:Gem::Version
|
|
446
432
|
version: 2.2.3
|
|
433
|
+
- !ruby/object:Gem::Dependency
|
|
434
|
+
name: rainbow
|
|
435
|
+
requirement: !ruby/object:Gem::Requirement
|
|
436
|
+
requirements:
|
|
437
|
+
- - "~>"
|
|
438
|
+
- !ruby/object:Gem::Version
|
|
439
|
+
version: '3.0'
|
|
440
|
+
type: :runtime
|
|
441
|
+
prerelease: false
|
|
442
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
443
|
+
requirements:
|
|
444
|
+
- - "~>"
|
|
445
|
+
- !ruby/object:Gem::Version
|
|
446
|
+
version: '3.0'
|
|
447
447
|
- !ruby/object:Gem::Dependency
|
|
448
448
|
name: resonad
|
|
449
449
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -731,7 +731,6 @@ files:
|
|
|
731
731
|
- lib/ledger_sync/ledgers/searcher.rb
|
|
732
732
|
- lib/ledger_sync/operation.rb
|
|
733
733
|
- lib/ledger_sync/resource.rb
|
|
734
|
-
- lib/ledger_sync/resource_adaptor.rb
|
|
735
734
|
- lib/ledger_sync/resource_attribute.rb
|
|
736
735
|
- lib/ledger_sync/resource_attribute/dirty_mixin.rb
|
|
737
736
|
- lib/ledger_sync/resource_attribute/mixin.rb
|
|
@@ -833,7 +832,7 @@ homepage: https://github.com/LedgerSync/ledger_sync
|
|
|
833
832
|
licenses:
|
|
834
833
|
- MIT
|
|
835
834
|
metadata: {}
|
|
836
|
-
post_install_message:
|
|
835
|
+
post_install_message:
|
|
837
836
|
rdoc_options: []
|
|
838
837
|
require_paths:
|
|
839
838
|
- lib
|
|
@@ -848,8 +847,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
848
847
|
- !ruby/object:Gem::Version
|
|
849
848
|
version: '0'
|
|
850
849
|
requirements: []
|
|
851
|
-
|
|
852
|
-
|
|
850
|
+
rubyforge_project:
|
|
851
|
+
rubygems_version: 2.7.6.2
|
|
852
|
+
signing_key:
|
|
853
853
|
specification_version: 4
|
|
854
854
|
summary: Sync common objects to accounting software.
|
|
855
855
|
test_files: []
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module LedgerSync
|
|
4
|
-
class ResourceAdaptor
|
|
5
|
-
module Mixin
|
|
6
|
-
module ClassMethods
|
|
7
|
-
def attribute(record_attribute, args = {})
|
|
8
|
-
resource_attribute = args.fetch(:resource_attribute, record_attribute)
|
|
9
|
-
|
|
10
|
-
attributes[record_attribute.to_sym] = {
|
|
11
|
-
record_attribute: record_attribute,
|
|
12
|
-
resource_attribute: resource_attribute
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
define_method(resource_attribute) do
|
|
16
|
-
resource.send(record_attribute)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
define_method("#{resource_attribute}=") do |*setter_args|
|
|
20
|
-
resource.send("#{record_attribute}=", *setter_args)
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def attributes
|
|
25
|
-
@attributes ||= {}
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
module InstanceMethods
|
|
30
|
-
def initialize(args = {})
|
|
31
|
-
@resource = args.fetch(:resource).dup
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def self.included(base)
|
|
36
|
-
base.extend(ClassMethods)
|
|
37
|
-
base.attr_reader(:resource)
|
|
38
|
-
base.attribute(:ledger_id)
|
|
39
|
-
base.attribute(:external_id)
|
|
40
|
-
base.include(InstanceMethods)
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def initialize(*)
|
|
45
|
-
raise NotImplementedError
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def self.inherited(base)
|
|
49
|
-
base.include(Mixin)
|
|
50
|
-
|
|
51
|
-
super
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|