inferno_core 0.4.42 → 0.4.43

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8f329ee45a8c5a94d752daa7f50a034ae900f57df282cfeec331cc172abdfd7
4
- data.tar.gz: 6b0d7cd2e5e8cfb5e3789b4e2cc86d13486b09694070601f5953fa46c7766f99
3
+ metadata.gz: '09f9e6a4ff6df2749650a972de54dbf8e693de38469c3ac8cb781ee99cbf6ce4'
4
+ data.tar.gz: 2153922e52c9207e092526b7a0bedaca8b9333530c4c2e41515083001ba09097
5
5
  SHA512:
6
- metadata.gz: e044ed87ac72e961f4eec0094dfd573cd7aadb4207fc07909bdd9aa28fe87f985f197f1f24c860553898454d4585718a28ecd6b9e3d490e98659b5d272de943d
7
- data.tar.gz: f1f94d784c036b2852f56f730bc69ab1fe9b03bd6ba51aa90b3ece7db958aa00fe200fc7cca5e58075f865168568eac0891de565e62353edbda90f3b628a3e28
6
+ metadata.gz: fe29bbefe0208e36c4e9919dba3292f35779f1c9d8e9810e98b03837ef73b3538bf19bd752e659733da7bc6b646a190249a7017b44ff45a679e29b2faa3d91fe
7
+ data.tar.gz: 8b43e4f565366c80930ab4150c1c1a493fc8fe8551295851ef49eef213e42a185521abd62438e5a0514f51463968bf24e84824aa72c9ef20f5880a65b5145cb1
@@ -164,6 +164,7 @@ module Inferno
164
164
  runnable.add_message('error', e.message)
165
165
  raise Inferno::Exceptions::ErrorInValidatorException, "Unable to connect to validator at #{url}."
166
166
  end
167
+
167
168
  outcome = operation_outcome_from_validator_response(response, runnable)
168
169
 
169
170
  message_hashes = message_hashes_from_outcome(outcome, resource, profile_url)
@@ -240,7 +241,9 @@ module Inferno
240
241
  validator_session_id =
241
242
  validator_session_repo.find_validator_session_id(test_suite_id,
242
243
  name.to_s, requirements)
244
+
243
245
  @session_id = validator_session_id if validator_session_id
246
+
244
247
  wrapped_resource = {
245
248
  cliContext: {
246
249
  **cli_context.definition,
@@ -278,6 +281,11 @@ module Inferno
278
281
 
279
282
  # @private
280
283
  def operation_outcome_from_hl7_wrapped_response(response_hash)
284
+ # This is a workaround for some test kits which for legacy reasons
285
+ # call this method directly with a String instead of a Hash.
286
+ # See FI-3178.
287
+ response_hash = JSON.parse(remove_invalid_characters(response_hash)) if response_hash.is_a? String
288
+
281
289
  if response_hash['sessionId'] && response_hash['sessionId'] != @session_id
282
290
  validator_session_repo.save(test_suite_id:, validator_session_id: response_hash['sessionId'],
283
291
  validator_name: name.to_s, suite_options: requirements)
@@ -285,7 +293,7 @@ module Inferno
285
293
  end
286
294
 
287
295
  # assume for now that one resource -> one request
288
- issues = response_hash['outcomes'][0]['issues']&.map do |i|
296
+ issues = (response_hash.dig('outcomes', 0, 'issues') || []).map do |i|
289
297
  { severity: i['level'].downcase, expression: i['location'], details: { text: i['message'] } }
290
298
  end
291
299
  # this is circuitous, ideally we would map this response directly to message_hashes
@@ -1,4 +1,4 @@
1
1
  module Inferno
2
2
  # Standard patterns for gem versions: https://guides.rubygems.org/patterns/
3
- VERSION = '0.4.42'.freeze
3
+ VERSION = '0.4.43'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inferno_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.42
4
+ version: 0.4.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen MacVicar
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-09-19 00:00:00.000000000 Z
13
+ date: 2024-09-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport