kinetic_sdk 5.0.23 → 5.0.24
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 +7 -0
- data/lib/kinetic_sdk/task/lib/export.rb +1 -1
- data/lib/kinetic_sdk/task/lib/trees.rb +20 -6
- data/lib/kinetic_sdk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 75c12f87315bc7166b04e3b37bc8e18b6a1f592d4a397a9b241919439e6daba9
|
|
4
|
+
data.tar.gz: 1b10422f3500fb4db654d811dd5db5c6eb7a2d0471c44231eedfeaca4b373d45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afd08693d9f448d0b82cee38f213f65135f9e9b16ba9828fe1d4769f28d1d89c9ad2d94c4be08ec9ee88ec9a0f2bc6c75a2bc7429fbbb6acd3b629fa41f99f72
|
|
7
|
+
data.tar.gz: 7fe741c9b21dfba525e5889453e0904236a09217ca8c43781fd484873e1aed131bd013334235394d65871790058c37fc77bdf7856ac2b0196a06fd24c57e03d6
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [5.0.24](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.24) (2024-03-28)
|
|
4
|
+
|
|
5
|
+
**Implemented enhancements:**
|
|
6
|
+
|
|
7
|
+
- Enhance the export_trees method to export all trees. Previously, this method was
|
|
8
|
+
limited to only exporting the first page of trees since it wasn't handling pagination.
|
|
9
|
+
|
|
3
10
|
## [5.0.23](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.23) (2024-01-31)
|
|
4
11
|
|
|
5
12
|
**Implemented enhancements:**
|
|
@@ -41,7 +41,7 @@ module KineticSdk
|
|
|
41
41
|
# * access keys
|
|
42
42
|
#
|
|
43
43
|
# @param headers [Hash] hash of headers to send, default is basic authentication
|
|
44
|
-
# @
|
|
44
|
+
# @return nil
|
|
45
45
|
def export_all_except_trees(headers=header_basic_auth)
|
|
46
46
|
export_sources(headers)
|
|
47
47
|
export_handlers(headers)
|
|
@@ -288,13 +288,27 @@ 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
|
-
#
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
291
|
+
# Setup the parameters sent to the find_trees method. Limit is used for pagination.
|
|
292
|
+
limit, offset, count = 10, 0, nil
|
|
293
|
+
params = {
|
|
294
|
+
"source" => source_name,
|
|
295
|
+
"include" => "details",
|
|
296
|
+
"limit" => limit
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
# Paginate through all the trees and routines for the source
|
|
300
|
+
while (count.nil? || offset < count)
|
|
301
|
+
response = find_trees(params, headers)
|
|
302
|
+
count = response.content["count"].to_i if count.nil?
|
|
303
|
+
# Export each tree
|
|
304
|
+
(response.content["trees"] || []).each do |tree|
|
|
305
|
+
if export_opts[:include_workflows] || (!tree.has_key?("event") || tree["event"].nil?)
|
|
306
|
+
export_tree(tree['title'], headers, export_opts)
|
|
307
|
+
end
|
|
297
308
|
end
|
|
309
|
+
# Increment the offset to the next page
|
|
310
|
+
offset += limit
|
|
311
|
+
params["offset"] = offset
|
|
298
312
|
end
|
|
299
313
|
end
|
|
300
314
|
|
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.24
|
|
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-03-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: slugify
|
|
@@ -744,7 +744,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
744
744
|
- !ruby/object:Gem::Version
|
|
745
745
|
version: '0'
|
|
746
746
|
requirements: []
|
|
747
|
-
rubygems_version: 3.
|
|
747
|
+
rubygems_version: 3.3.3
|
|
748
748
|
signing_key:
|
|
749
749
|
specification_version: 4
|
|
750
750
|
summary: Ruby SDK for Kinetic Data application APIs
|