kinetic_sdk 5.0.26 → 5.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/kinetic_sdk/task/lib/handlers.rb +18 -5
- data/lib/kinetic_sdk/task/lib/trees.rb +3 -2
- data/lib/kinetic_sdk/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: e8637eaa13377299182574e1e99d04b4956dd10c56042e3ecbf88e9fa73de6ce
|
4
|
+
data.tar.gz: 6b826e2698e7f371424d5003eb4b2ce1b83e688ca2553769a9be0a49baea33ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd359dfec6a58c1e69e9fb29828a7aacb551aa5fb017eac28383c85359315b0de4b6e3ddf729b9dc9b82817e664a653d42ff654352035065f20773badd474d03
|
7
|
+
data.tar.gz: 7e79cf6f3fa34bf71ef2a200c28a16d86848a0ad7a449738fb7af8e0bbead08f2a3a05325978a99622046d0ad88a25ac6640d83843df245423498c1d45023477
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [5.0.27](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.27) (2024-06-26)
|
4
|
+
|
5
|
+
**Implemented enhancements:**
|
6
|
+
|
7
|
+
- Enhance the export_handlers method to export all handlers. Previously, this method was
|
8
|
+
limited to only exporting the first page of handlers since it wasn't handling pagination.
|
9
|
+
|
3
10
|
## [5.0.26](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.26) (2024-03-28)
|
4
11
|
|
5
12
|
**Implemented enhancements:**
|
@@ -109,11 +109,24 @@ module KineticSdk
|
|
109
109
|
def export_handlers(headers=header_basic_auth)
|
110
110
|
raise StandardError.new "An export directory must be defined to export handlers." if @options[:export_directory].nil?
|
111
111
|
@logger.info("Exporting handlers to #{@options[:export_directory]}.")
|
112
|
-
|
113
|
-
|
114
|
-
#
|
115
|
-
|
116
|
-
|
112
|
+
|
113
|
+
# Setup the parameters sent to the find_handlers method.
|
114
|
+
# limit and offset are used for pagination.
|
115
|
+
limit, offset, count = 10, 0, nil
|
116
|
+
params = { "limit" => limit }
|
117
|
+
|
118
|
+
# Paginate through all the handlers
|
119
|
+
while (count.nil? || offset < count)
|
120
|
+
# Get the handler metadata to geta all handler_ids
|
121
|
+
response = find_handlers(params, headers)
|
122
|
+
count = response.content["count"].to_i
|
123
|
+
# Export each handler
|
124
|
+
(response.content["handlers"] || []).each do |handler|
|
125
|
+
export_handler(handler['definitionId'], headers)
|
126
|
+
end
|
127
|
+
# Increment the offset to the next page
|
128
|
+
offset += limit
|
129
|
+
params["offset"] = offset
|
117
130
|
end
|
118
131
|
end
|
119
132
|
|
@@ -288,7 +288,8 @@ module KineticSdk
|
|
288
288
|
@logger.info("Exporting trees and local routines for source \"#{source_name}\" to #{@options[:export_directory]}.")
|
289
289
|
end
|
290
290
|
|
291
|
-
# Setup the parameters sent to the find_trees method.
|
291
|
+
# Setup the parameters sent to the find_trees method.
|
292
|
+
# limit and offset are used for pagination.
|
292
293
|
limit, offset, count = 10, 0, nil
|
293
294
|
params = {
|
294
295
|
"source" => source_name,
|
@@ -299,7 +300,7 @@ module KineticSdk
|
|
299
300
|
# Paginate through all the trees and routines for the source
|
300
301
|
while (count.nil? || offset < count)
|
301
302
|
response = find_trees(params, headers)
|
302
|
-
count = response.content["count"].to_i
|
303
|
+
count = response.content["count"].to_i
|
303
304
|
# Export each tree
|
304
305
|
(response.content["trees"] || []).each do |tree|
|
305
306
|
if export_opts[:include_workflows] || (!tree.has_key?("event") || tree["event"].nil?)
|
data/lib/kinetic_sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kinetic_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kinetic Data
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slugify
|