inferno_core 0.1.3 → 0.2.0.rc2
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/main.rb +10 -0
- data/lib/inferno/apps/cli/suite.rb +19 -0
- data/lib/inferno/apps/cli/suite_input_template.rb +30 -0
- data/lib/inferno/apps/cli/suites.rb +23 -0
- data/lib/inferno/apps/web/controllers/test_sessions/create.rb +5 -2
- data/lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb +43 -0
- data/lib/inferno/apps/web/controllers/test_suites/check_configuration.rb +17 -0
- data/lib/inferno/apps/web/index.html.erb +5 -5
- data/lib/inferno/apps/web/router.rb +38 -25
- data/lib/inferno/apps/web/serializers/preset.rb +17 -0
- data/lib/inferno/apps/web/serializers/test.rb +2 -0
- data/lib/inferno/apps/web/serializers/test_group.rb +1 -0
- data/lib/inferno/apps/web/serializers/test_suite.rb +3 -0
- data/lib/inferno/config/application.rb +10 -1
- data/lib/inferno/config/boot/db.rb +16 -1
- data/lib/inferno/config/boot/presets.rb +15 -0
- data/lib/inferno/db/schema.rb +22 -22
- data/lib/inferno/dsl/resume_test_route.rb +1 -1
- data/lib/inferno/dsl/runnable.rb +18 -0
- data/lib/inferno/entities/preset.rb +24 -0
- data/lib/inferno/entities/test.rb +8 -0
- data/lib/inferno/entities/test_group.rb +8 -0
- data/lib/inferno/entities/test_suite.rb +31 -0
- data/lib/inferno/public/bundle.js +38 -38
- data/lib/inferno/repositories/in_memory_repository.rb +3 -2
- data/lib/inferno/repositories/presets.rb +22 -0
- data/lib/inferno/repositories/test_sessions.rb +12 -1
- data/lib/inferno/utils/preset_template_generator.rb +38 -0
- data/lib/inferno/utils/static_assets.rb +33 -0
- data/lib/inferno/version.rb +1 -1
- data/lib/inferno.rb +7 -6
- metadata +22 -11
@@ -54,6 +54,12 @@ module Inferno
|
|
54
54
|
}
|
55
55
|
end
|
56
56
|
|
57
|
+
def version(version = nil)
|
58
|
+
return @version if version.nil?
|
59
|
+
|
60
|
+
@version = version
|
61
|
+
end
|
62
|
+
|
57
63
|
def find_validator(validator_name)
|
58
64
|
validator = fhir_validators[validator_name]
|
59
65
|
|
@@ -64,6 +70,31 @@ module Inferno
|
|
64
70
|
fhir_validators[:default] =
|
65
71
|
Inferno::DSL::FHIRValidation::Validator.new { |v| v.url default_validator_url }
|
66
72
|
end
|
73
|
+
|
74
|
+
def configuration_messages(new_messages = nil, force_recheck: false)
|
75
|
+
return @configuration_messages = new_messages unless new_messages.nil?
|
76
|
+
|
77
|
+
@configuration_messages =
|
78
|
+
if force_recheck
|
79
|
+
@check_configuration_block ? @check_configuration_block.call : []
|
80
|
+
else
|
81
|
+
@configuration_messages || (@check_configuration_block ? @check_configuration_block.call : [])
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Provide a block which will verify any configuration needed for this
|
86
|
+
# test suite to operate properly.
|
87
|
+
#
|
88
|
+
# @yieldreturn [Array<Hash>] An array of message hashes containing the
|
89
|
+
# keys `:type` and `:message`. Type options are `info`, `warning`, and
|
90
|
+
# `error`.
|
91
|
+
def check_configuration(&block)
|
92
|
+
@check_configuration_block = block
|
93
|
+
end
|
94
|
+
|
95
|
+
def presets
|
96
|
+
@presets ||= Repositories::Presets.new.presets_for_suite(id)
|
97
|
+
end
|
67
98
|
end
|
68
99
|
end
|
69
100
|
end
|