inferno_core 0.4.37 → 0.4.39
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/lib/inferno/apps/cli/console.rb +3 -0
- data/lib/inferno/apps/cli/main.rb +29 -10
- data/lib/inferno/apps/cli/migration.rb +2 -2
- data/lib/inferno/apps/cli/templates/.env.development +1 -1
- data/lib/inferno/apps/cli/templates/.env.production +1 -1
- data/lib/inferno/apps/cli/templates/.env.test +1 -1
- data/lib/inferno/apps/cli/templates/config/nginx.background.conf.tt +16 -0
- data/lib/inferno/apps/cli/templates/config/nginx.conf.tt +16 -0
- data/lib/inferno/apps/cli/templates/docker-compose.background.yml.tt +11 -0
- data/lib/inferno/apps/cli/templates/docker-compose.yml.tt +4 -0
- data/lib/inferno/apps/cli/templates/lib/%library_name%/igs/README.md +21 -0
- data/lib/inferno/apps/cli/templates/lib/%library_name%.rb.tt +8 -3
- data/lib/inferno/apps/cli/templates/spec/%library_name%/patient_group_spec.rb.tt +25 -6
- data/lib/inferno/config/boot/sidekiq.rb +5 -0
- data/lib/inferno/config/boot/validator.rb +2 -0
- data/lib/inferno/dsl/auth_info.rb +174 -0
- data/lib/inferno/dsl/resume_test_route.rb +59 -20
- data/lib/inferno/dsl/runnable.rb +1 -1
- data/lib/inferno/dsl/suite_endpoint.rb +1 -2
- data/lib/inferno/jobs/invoke_validator_session.rb +1 -0
- data/lib/inferno/public/bundle.js +3 -3
- data/lib/inferno/repositories/session_data.rb +24 -1
- data/lib/inferno/utils/middleware/request_logger.rb +1 -1
- data/lib/inferno/version.rb +1 -1
- metadata +6 -4
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative '../dsl/auth_info'
|
1
2
|
require_relative '../dsl/oauth_credentials'
|
2
3
|
|
3
4
|
module Inferno
|
@@ -21,7 +22,7 @@ module Inferno
|
|
21
22
|
)
|
22
23
|
end
|
23
24
|
|
24
|
-
def load(test_session_id:, name:, type: 'text')
|
25
|
+
def load(test_session_id:, name:, type: 'text') # rubocop:disable Metrics/CyclomaticComplexity
|
25
26
|
raw_value =
|
26
27
|
self.class::Model
|
27
28
|
.find(test_session_id:, name: name.to_s.downcase)
|
@@ -32,6 +33,8 @@ module Inferno
|
|
32
33
|
DSL::OAuthCredentials.new(JSON.parse(raw_value || '{}'))
|
33
34
|
when 'checkbox'
|
34
35
|
JSON.parse(raw_value || '[]')
|
36
|
+
when 'auth_info'
|
37
|
+
DSL::AuthInfo.new(JSON.parse(raw_value || '{}'))
|
35
38
|
else
|
36
39
|
raw_value
|
37
40
|
end
|
@@ -64,6 +67,8 @@ module Inferno
|
|
64
67
|
serialize_checkbox_input(params)
|
65
68
|
when 'oauth_credentials'
|
66
69
|
serialize_oauth_credentials_input(params)
|
70
|
+
when 'auth_info'
|
71
|
+
serialize_auth_info(params)
|
67
72
|
else
|
68
73
|
raise Exceptions::UnknownSessionDataType, params
|
69
74
|
end
|
@@ -103,6 +108,24 @@ module Inferno
|
|
103
108
|
credentials.to_s
|
104
109
|
end
|
105
110
|
|
111
|
+
def serialize_auth_info(params)
|
112
|
+
auth =
|
113
|
+
if params[:value].is_a? String
|
114
|
+
DSL::AuthInfo.new(JSON.parse(params[:value]))
|
115
|
+
elsif !params[:value].is_a? DSL::AuthInfo
|
116
|
+
raise Exceptions::BadSessionDataType.new(
|
117
|
+
params[:name],
|
118
|
+
DSL::AuthInfo.name,
|
119
|
+
params[:value].class
|
120
|
+
)
|
121
|
+
else
|
122
|
+
params[:value]
|
123
|
+
end
|
124
|
+
|
125
|
+
auth.name = params[:name]
|
126
|
+
auth.to_s
|
127
|
+
end
|
128
|
+
|
106
129
|
class Model < Sequel::Model(db)
|
107
130
|
many_to_one :test_session, class: 'Inferno::Repositories::TestSessions::Model', key: :test_session_id
|
108
131
|
end
|
@@ -34,7 +34,7 @@ module Inferno
|
|
34
34
|
|
35
35
|
# rack.after_reply is handled by puma, which doesn't process requests
|
36
36
|
# in unit tests, so we manually run them when in the test environment
|
37
|
-
env['rack.after_reply']&.each(&:call) if
|
37
|
+
env['rack.after_reply']&.each(&:call) if ENV['APP_ENV'] == 'test'
|
38
38
|
|
39
39
|
response
|
40
40
|
end
|
data/lib/inferno/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.39
|
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-
|
13
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -312,14 +312,14 @@ dependencies:
|
|
312
312
|
requirements:
|
313
313
|
- - "~>"
|
314
314
|
- !ruby/object:Gem::Version
|
315
|
-
version:
|
315
|
+
version: 7.2.4
|
316
316
|
type: :runtime
|
317
317
|
prerelease: false
|
318
318
|
version_requirements: !ruby/object:Gem::Requirement
|
319
319
|
requirements:
|
320
320
|
- - "~>"
|
321
321
|
- !ruby/object:Gem::Version
|
322
|
-
version:
|
322
|
+
version: 7.2.4
|
323
323
|
- !ruby/object:Gem::Dependency
|
324
324
|
name: sqlite3
|
325
325
|
requirement: !ruby/object:Gem::Requirement
|
@@ -578,6 +578,7 @@ files:
|
|
578
578
|
- lib/inferno/apps/cli/templates/docker-compose.yml.tt
|
579
579
|
- lib/inferno/apps/cli/templates/lib/%library_name%.rb.tt
|
580
580
|
- lib/inferno/apps/cli/templates/lib/%library_name%/igs/.keep
|
581
|
+
- lib/inferno/apps/cli/templates/lib/%library_name%/igs/README.md
|
581
582
|
- lib/inferno/apps/cli/templates/lib/%library_name%/igs/put_ig_package_dot_tgz_here
|
582
583
|
- lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
|
583
584
|
- lib/inferno/apps/cli/templates/run.sh
|
@@ -642,6 +643,7 @@ files:
|
|
642
643
|
- lib/inferno/db/schema.rb
|
643
644
|
- lib/inferno/dsl.rb
|
644
645
|
- lib/inferno/dsl/assertions.rb
|
646
|
+
- lib/inferno/dsl/auth_info.rb
|
645
647
|
- lib/inferno/dsl/configurable.rb
|
646
648
|
- lib/inferno/dsl/fhir_client.rb
|
647
649
|
- lib/inferno/dsl/fhir_client_builder.rb
|