inferno_core 0.6.0 → 0.6.1

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: ee348703cfa562d9316b03c470d62aebd0d4ac232d8dc6029bbac392cb5a64d1
4
- data.tar.gz: 666f20e627f22eea29c764f9d10c6a2e421142edd0525631566a678f73ed3a45
3
+ metadata.gz: 511a1a15fdcb49bcf9a58821b087d8a42394085f6c735971857a2e45710b7269
4
+ data.tar.gz: 2635bf69d9662b8afbaea341348d8dbc446707c6804be1f491c555376b8e31a6
5
5
  SHA512:
6
- metadata.gz: 85323238cd047bd7408aa5e50dcbf8bd7ff4bca02bbc985928627bf5431189bb6cee9f0d660218d7bd0684fb38e0f6bfd49aea164cdd08352c463cadaa30ed58
7
- data.tar.gz: 8cd139293bf774f09749cbe3e723df226b2b74b79a3141ae144e09e573afcc8712495d9fa80eb62b901e05f5f0e2c7cc2810ea4b2e47ee70b53571964ad04683
6
+ metadata.gz: 3a31b3fe1f72ff67cc2be3c8ff11d7dfd7f6c7c203e84c55b2072f205343c6c522686accc2b927088d31ade270fa127d8ad741fbced1827497f4a3d8102d9df3
7
+ data.tar.gz: 1bc84724a28ae55cecc8550b51143f3c2f4ff414891c8241012ca1f94e7ea20915a801d3c3616b4ab5a4667caf12f42a273f589ad2537ab13faec9aa36144c7e
@@ -7,6 +7,7 @@ RUN mkdir -p $INSTALL_PATH
7
7
  WORKDIR $INSTALL_PATH
8
8
 
9
9
  ADD lib/<%= library_name %>/metadata.rb $INSTALL_PATH/lib/<%= library_name %>/metadata.rb
10
+ ADD lib/<%= library_name %>/version.rb $INSTALL_PATH/lib/<%= library_name %>/version.rb
10
11
  ADD *.gemspec $INSTALL_PATH
11
12
  ADD Gemfile* $INSTALL_PATH
12
13
  RUN gem install bundler
@@ -157,7 +157,7 @@ module Inferno
157
157
  end
158
158
 
159
159
  # @see Inferno::DSL::FHIRResourceValidation#resource_is_valid?
160
- def resource_is_valid?(resource, profile_url, runnable)
160
+ def resource_is_valid?(resource, profile_url, runnable, add_messages_to_runnable: true) # rubocop:disable Metrics/CyclomaticComplexity
161
161
  profile_url ||= FHIR::Definitions.resource_definition(resource.resourceType).url
162
162
 
163
163
  begin
@@ -173,8 +173,10 @@ module Inferno
173
173
 
174
174
  message_hashes = message_hashes_from_outcome(outcome, resource, profile_url)
175
175
 
176
- message_hashes
177
- .each { |message_hash| runnable.add_message(message_hash[:type], message_hash[:message]) }
176
+ if add_messages_to_runnable
177
+ message_hashes
178
+ .each { |message_hash| runnable.add_message(message_hash[:type], message_hash[:message]) }
179
+ end
178
180
 
179
181
  unless response.status == 200
180
182
  raise Inferno::Exceptions::ErrorInValidatorException,
@@ -30,9 +30,13 @@ module Inferno
30
30
  # @param resource [FHIR::Model]
31
31
  # @param profile_url [String]
32
32
  # @param validator [Symbol] the name of the validator to use
33
+ # @param add_messages_to_runnable [Boolean] whether to add validation messages to runnable or not
33
34
  # @return [Boolean] whether the resource is valid
34
- def resource_is_valid?(resource: self.resource, profile_url: nil, validator: :default)
35
- find_validator(validator).resource_is_valid?(resource, profile_url, self)
35
+ def resource_is_valid?(
36
+ resource: self.resource, profile_url: nil,
37
+ validator: :default, add_messages_to_runnable: true
38
+ )
39
+ find_validator(validator).resource_is_valid?(resource, profile_url, self, add_messages_to_runnable:)
36
40
  end
37
41
 
38
42
  # Find a particular validator. Looks through a runnable's parents up to
@@ -113,7 +117,7 @@ module Inferno
113
117
  end
114
118
 
115
119
  # @see Inferno::DSL::FHIRValidation#resource_is_valid?
116
- def resource_is_valid?(resource, profile_url, runnable)
120
+ def resource_is_valid?(resource, profile_url, runnable, add_messages_to_runnable: true) # rubocop:disable Metrics/CyclomaticComplexity
117
121
  profile_url ||= FHIR::Definitions.resource_definition(resource.resourceType).url
118
122
 
119
123
  begin
@@ -128,8 +132,10 @@ module Inferno
128
132
 
129
133
  message_hashes = message_hashes_from_outcome(outcome, resource, profile_url)
130
134
 
131
- message_hashes
132
- .each { |message_hash| runnable.add_message(message_hash[:type], message_hash[:message]) }
135
+ if add_messages_to_runnable
136
+ message_hashes
137
+ .each { |message_hash| runnable.add_message(message_hash[:type], message_hash[:message]) }
138
+ end
133
139
 
134
140
  unless response.status == 200
135
141
  raise Inferno::Exceptions::ErrorInValidatorException,
@@ -1,4 +1,4 @@
1
1
  module Inferno
2
2
  # Standard patterns for gem versions: https://guides.rubygems.org/patterns/
3
- VERSION = '0.6.0'.freeze
3
+ VERSION = '0.6.1'.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.6.0
4
+ version: 0.6.1
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: 2025-01-21 00:00:00.000000000 Z
13
+ date: 2025-01-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -54,6 +54,20 @@ dependencies:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
56
  version: 0.25.2
57
+ - !ruby/object:Gem::Dependency
58
+ name: concurrent-ruby
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '='
62
+ - !ruby/object:Gem::Version
63
+ version: 1.3.4
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '='
69
+ - !ruby/object:Gem::Version
70
+ version: 1.3.4
57
71
  - !ruby/object:Gem::Dependency
58
72
  name: dotenv
59
73
  requirement: !ruby/object:Gem::Requirement