kinetic_sdk 7.0.0.rc2 → 7.0.0.rc3

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: d17b093333b568589b62518a2d39f94d34bc0a82833a18df3aa0fae4c9e4d913
4
- data.tar.gz: e90ffa58599c343b80e7907102f3a7f858035f1150de4a8fd0a3f5b151dcf66a
3
+ metadata.gz: 7728373bd9c4a15c643c54aed99acd289e5f776ee0819c8b14f7aea9ec54c106
4
+ data.tar.gz: d22c5e6907360c11cb886dfb2c58f5c80c5434fcd2b8d669f846b074a57d78ae
5
5
  SHA512:
6
- metadata.gz: 78a37fe4b1776e46ebe64d64e4c779967cec791292474378155cca09a835a5041e12deea60ba28d7f713621ded57f2dfeb99b50cd14e9d5b802354a885a9bb70
7
- data.tar.gz: c3f15b84bbb614618944866ab1f3d5f59eea9875a1ef23a3e4452079eca425e9d5a0eae872345606e063d6be3b35654791b348ba4019a382646afd44afde1637
6
+ metadata.gz: 0eaa0e7c58dead1010dbd1bd7964f42cf762a712ab7bc888037e6a8e6709b2af1b2562df834ed0d759cc1e677473ffacad035582b10542baaaf45d58401c4979
7
+ data.tar.gz: f882b337544ec35443094eb971e821859d9480994ab7200519f090607672bc4e35ae284a04bb84aa2ffdc7fb15f1e6755c9712905c9188c518bb3751a06fdde3
data/CHANGELOG.md CHANGED
@@ -1,6 +1,36 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ## [7.0.0.rc3](https://github.com/kineticdata/kinetic-sdk-rb/tree/7.0.0.rc3) (2026-09-01)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Fixed a crash in `import_trees` and `import_trees_threaded` that aborted template installs
9
+ with `NoMethodError: undefined method 'document' for an instance of File`. The tree
10
+ comparison introduced in 7.x passed a raw `File` handle to `REXML::XPath.first`, which
11
+ requires a parsed document.
12
+ - Removed the tree comparison entirely, restoring the unconditional import behavior of 5.0.29.
13
+ The comparison identified trees by a `//definitionId` element that exists only in routine
14
+ exports, never in the tree exports `import_trees` reads, so it could not succeed. See the
15
+ specs in `spec/kinetic_sdk/task/trees_spec.rb`.
16
+ - The per-tree and per-routine rescues in the threaded importers no longer discard exceptions
17
+ silently; failures are logged and propagated.
18
+ - `trees.rb` now requires `rexml/document` explicitly rather than relying on load order.
19
+
20
+ **Implemented enhancements:**
21
+
22
+ - Added rspec and the first unit test coverage, run with `bundle exec rspec` or `rake spec`.
23
+
24
+
25
+ ## [7.0.0.rc2](https://github.com/kineticdata/kinetic-sdk-rb/tree/7.0.0.rc2) (2026-09-01)
26
+
27
+ **Fixed bugs:**
28
+
29
+ - Declared `concurrent-ruby` and `rexml` as runtime dependencies. Both were required by the
30
+ library but missing from the gemspec, so the published gem could fail to load.
31
+ - Pinned `BUNDLED WITH` to a concrete Bundler version; the range value broke `bundle install`.
32
+
33
+
4
34
  ## [7.0.0-rc1](https://github.com/kineticdata/kinetic-sdk-rb/tree/7.0.0-rc1) (2026-08-31)
5
35
 
6
36
  **Breaking changes:**
data/Rakefile CHANGED
@@ -7,7 +7,19 @@ YARD::Rake::YardocTask.new do |t|
7
7
  t.stats_options = %w( --list-undoc )
8
8
  end
9
9
 
10
+ # Run the specs. Guarded so the Rakefile still loads (and `rake build` still
11
+ # works) in an environment where the development dependencies are absent.
12
+ begin
13
+ require "rspec/core/rake_task"
14
+ RSpec::Core::RakeTask.new(:spec)
15
+ rescue LoadError
16
+ desc "Run the specs (rspec is not installed)"
17
+ task :spec do
18
+ abort "rspec is not available. Run `bundle install` first."
19
+ end
20
+ end
21
+
10
22
  # Generate Yard documentation
11
23
  task :doc => [:yard]
12
24
  task :rdoc => [:yard]
13
- task :default => [:doc]
25
+ task :default => [:spec, :doc]
data/kinetic_sdk.gemspec CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "bundler", ">= 1.17"
27
27
  spec.add_development_dependency "rake", ">= 13.0.1"
28
28
  spec.add_development_dependency "yard", "~> 0.9.45"
29
+ spec.add_development_dependency "rspec", "~> 3.13"
29
30
 
30
31
  spec.metadata["yard.run"] = "yri"
31
32
  end
@@ -1,3 +1,5 @@
1
+ require 'rexml/document'
2
+
1
3
  module KineticSdk
2
4
  class Task
3
5
  # Delete a tree.
@@ -146,12 +148,7 @@ module KineticSdk
146
148
  @logger.info("Importing all Trees from Export Directory")
147
149
  Dir["#{@options[:export_directory]}/sources/**/*.xml"].sort.each do |file|
148
150
  tree_file = File.new(file, "rb")
149
- match = compare_trees(tree_file)
150
- if !match
151
- import_tree(tree_file, force_overwrite, headers)
152
- else
153
- #Matching trees, skipping
154
- end
151
+ import_tree(tree_file, force_overwrite, headers)
155
152
  end
156
153
  end
157
154
  def import_trees_threaded(force_overwrite=false, headers=header_basic_auth)
@@ -164,48 +161,18 @@ module KineticSdk
164
161
  Dir["#{@options[:export_directory]}/sources/**/*.xml"].sort.each do |file|
165
162
  promises << Concurrent::Promise.execute(executor: pool) do
166
163
  begin
167
-
168
164
  tree_file = File.new(file, "rb")
169
- match = compare_trees(tree_file)
170
- if !match
171
- import_tree(tree_file, force_overwrite, headers)
172
- else
173
- #Matching trees, skipping
174
- end
175
- rescue
165
+ import_tree(tree_file, force_overwrite, headers)
166
+ rescue => e
167
+ @logger.error("Failed to import Tree #{file}: #{e.class}: #{e.message}")
168
+ raise
176
169
  end
177
-
178
170
  end
179
171
  end
180
172
  promises.each(&:wait!)
181
173
  pool.shutdown
182
174
  pool.wait_for_termination
183
175
  end
184
- # Import a tree
185
- #
186
- # If the tree already exists on the server, this will fail unless forced
187
- # to overwrite.
188
- #
189
- # The source named in the tree content must also exist on the server, or
190
- # the import will fail.
191
- #
192
- # @param tree [String] content from tree file
193
- # @param force_overwrite [Boolean] whether to overwrite a tree if it exists, default is false
194
- # @param headers [Hash] hash of headers to send, default is basic authentication
195
- # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
196
- def compare_trees(tree, headers=header_basic_auth)
197
- definitionId = REXML::XPath.first(tree, "//definitionId")&.text
198
- @logger.info("Querying for Tree #{definitionId}")
199
- response = find_tree(definitionId, { "include" => "details,export" })
200
- @logger.info("Comparing new and old tree")
201
- prev_tree = response.content
202
- if prev_tree == tree
203
- return true
204
- else
205
- return false
206
- end
207
- end
208
-
209
176
  # Import a routine
210
177
  #
211
178
  # If the routine already exists on the server, this will fail unless
@@ -248,9 +215,11 @@ module KineticSdk
248
215
  Dir["#{@options[:export_directory]}/routines/*.xml"].sort.each do |file|
249
216
  promises << Concurrent::Promise.execute(executor: pool) do
250
217
  begin
251
- routine_file = File.new(file, "rb")
252
- import_routine(routine_file, force_overwrite, headers)
253
- rescue
218
+ routine_file = File.new(file, "rb")
219
+ import_routine(routine_file, force_overwrite, headers)
220
+ rescue => e
221
+ @logger.error("Failed to import Routine #{file}: #{e.class}: #{e.message}")
222
+ raise
254
223
  end
255
224
  end
256
225
  end
@@ -3,5 +3,5 @@ module KineticSdk
3
3
  # Version of Kinetic SDK
4
4
  #
5
5
  # @return [String] Version of the SDK
6
- VERSION = "7.0.0.rc2"
6
+ VERSION = "7.0.0.rc3"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kinetic_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0.rc2
4
+ version: 7.0.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kinetic Data
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.9.45
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.13'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3.13'
125
139
  description:
126
140
  email:
127
141
  - support@kineticdata.com