From aa1dfdf68c89c200be2ad645ec2d3d452962f7f2 Mon Sep 17 00:00:00 2001 From: Inferno CI Date: Thu, 19 Dec 2024 19:22:24 +0000 Subject: [PATCH] generate docs --- docs/docs/FHIR.html | 119 + docs/docs/FHIR/Client.html | 436 + docs/docs/FHIR/Json.html | 121 + docs/docs/FHIR/Model.html | 142 + docs/docs/FHIR/Xml.html | 121 + docs/docs/Hanami.html | 115 + docs/docs/Hanami/Middleware.html | 115 + docs/docs/Hanami/Middleware/BodyParser.html | 131 + .../Middleware/BodyParser/JsonParser.html | 191 + docs/docs/Inferno.html | 245 + docs/docs/Inferno/Application.html | 124 + docs/docs/Inferno/CLI.html | 117 + docs/docs/Inferno/CLI/Console.html | 203 + docs/docs/Inferno/CLI/Evaluate.html | 713 ++ docs/docs/Inferno/CLI/Execute.html | 2443 ++++++ docs/docs/Inferno/CLI/Main.html | 691 ++ docs/docs/Inferno/CLI/Migration.html | 197 + docs/docs/Inferno/CLI/New.html | 381 + docs/docs/Inferno/CLI/Services.html | 420 + docs/docs/Inferno/CLI/Suite.html | 303 + docs/docs/Inferno/CLI/SuiteInputTemplate.html | 229 + docs/docs/Inferno/CLI/Suites.html | 231 + docs/docs/Inferno/DSL.html | 167 + docs/docs/Inferno/DSL/Assertions.html | 1040 +++ docs/docs/Inferno/DSL/AuthInfo.html | 1421 ++++ docs/docs/Inferno/DSL/Configurable.html | 328 + .../DSL/Configurable/Configuration.html | 532 ++ docs/docs/Inferno/DSL/FHIRClient.html | 2190 +++++ .../Inferno/DSL/FHIRClient/ClassMethods.html | 234 + docs/docs/Inferno/DSL/FHIRClientBuilder.html | 749 ++ docs/docs/Inferno/DSL/FHIREvaluation.html | 119 + .../Inferno/DSL/FHIREvaluation/Config.html | 320 + .../DSL/FHIREvaluation/DatasetLoader.html | 264 + .../DSL/FHIREvaluation/EvaluationContext.html | 570 ++ .../DSL/FHIREvaluation/EvaluationResult.html | 871 ++ .../Inferno/DSL/FHIREvaluation/Evaluator.html | 360 + .../docs/Inferno/DSL/FHIREvaluation/Rule.html | 191 + .../Inferno/DSL/FHIRResourceValidation.html | 155 + .../FHIRResourceValidation/ClassMethods.html | 257 + .../DSL/FHIRResourceValidation/Validator.html | 1258 +++ docs/docs/Inferno/DSL/FHIRValidation.html | 363 + .../DSL/FHIRValidation/ClassMethods.html | 362 + .../Inferno/DSL/FHIRValidation/Validator.html | 774 ++ docs/docs/Inferno/DSL/FhirpathEvaluation.html | 307 + .../DSL/FhirpathEvaluation/ClassMethods.html | 105 + .../DSL/FhirpathEvaluation/Evaluator.html | 472 ++ docs/docs/Inferno/DSL/HTTPClient.html | 1112 +++ .../Inferno/DSL/HTTPClient/ClassMethods.html | 234 + docs/docs/Inferno/DSL/HTTPClientBuilder.html | 440 + .../docs/Inferno/DSL/InputOutputHandling.html | 694 ++ docs/docs/Inferno/DSL/JWKS.html | 365 + docs/docs/Inferno/DSL/Links.html | 889 ++ docs/docs/Inferno/DSL/Messages.html | 454 + docs/docs/Inferno/DSL/OAuthCredentials.html | 674 ++ docs/docs/Inferno/DSL/RequestStorage.html | 547 ++ .../DSL/RequestStorage/ClassMethods.html | 378 + docs/docs/Inferno/DSL/Results.html | 894 ++ docs/docs/Inferno/DSL/Runnable.html | 1917 +++++ docs/docs/Inferno/DSL/SuiteEndpoint.html | 1655 ++++ docs/docs/Inferno/DSL/SuiteOption.html | 448 + docs/docs/Inferno/Entities.html | 130 + docs/docs/Inferno/Entities/Entity.html | 268 + docs/docs/Inferno/Entities/HasRunnable.html | 207 + docs/docs/Inferno/Entities/Header.html | 1139 +++ docs/docs/Inferno/Entities/IG.html | 793 ++ docs/docs/Inferno/Entities/Input.html | 461 + docs/docs/Inferno/Entities/Message.html | 839 ++ docs/docs/Inferno/Entities/Preset.html | 267 + docs/docs/Inferno/Entities/Request.html | 7477 +++++++++++++++++ docs/docs/Inferno/Entities/Result.html | 2954 +++++++ docs/docs/Inferno/Entities/SessionData.html | 1019 +++ docs/docs/Inferno/Entities/Test.html | 967 +++ docs/docs/Inferno/Entities/TestGroup.html | 1003 +++ docs/docs/Inferno/Entities/TestKit.html | 1304 +++ docs/docs/Inferno/Entities/TestRun.html | 2854 +++++++ docs/docs/Inferno/Entities/TestSession.html | 1778 ++++ docs/docs/Inferno/Entities/TestSuite.html | 1229 +++ .../Inferno/Entities/ValidatorSession.html | 245 + docs/docs/Inferno/Exceptions.html | 115 + .../Exceptions/AssertionException.html | 202 + .../Exceptions/BadSessionDataType.html | 204 + .../Inferno/Exceptions/CancelException.html | 202 + .../DuplicateEntityIdException.html | 204 + .../Exceptions/ErrorInFhirpathException.html | 218 + .../Exceptions/ErrorInValidatorException.html | 218 + .../Exceptions/FhirpathNotFoundException.html | 204 + .../InvalidRunnableIdException.html | 204 + .../Exceptions/NotUserRunnableException.html | 204 + .../Inferno/Exceptions/OmitException.html | 202 + .../Exceptions/ParentNotLoadedException.html | 204 + .../Inferno/Exceptions/PassException.html | 202 + .../Exceptions/RequiredInputsNotFound.html | 204 + .../Inferno/Exceptions/SkipException.html | 202 + .../Exceptions/TestResultException.html | 128 + .../Exceptions/UnknownAttributeException.html | 206 + .../Exceptions/UnknownSessionDataType.html | 204 + .../ValidatorNotFoundException.html | 204 + .../Inferno/Exceptions/WaitException.html | 202 + docs/docs/Inferno/Jobs.html | 195 + docs/docs/Inferno/Jobs/ExecuteTestRun.html | 203 + .../Inferno/Jobs/InvokeValidatorSession.html | 219 + docs/docs/Inferno/Jobs/ResumeTestRun.html | 203 + docs/docs/Inferno/Repositories.html | 140 + docs/docs/Inferno/Repositories/Headers.html | 145 + .../Inferno/Repositories/Headers/Model.html | 248 + docs/docs/Inferno/Repositories/IGs.html | 145 + .../Repositories/InMemoryRepository.html | 429 + docs/docs/Inferno/Repositories/Messages.html | 227 + .../Inferno/Repositories/Messages/Model.html | 254 + docs/docs/Inferno/Repositories/Presets.html | 304 + .../docs/Inferno/Repositories/Repository.html | 1115 +++ docs/docs/Inferno/Repositories/Requests.html | 702 ++ .../Inferno/Repositories/Requests/Model.html | 451 + docs/docs/Inferno/Repositories/Results.html | 819 ++ .../Inferno/Repositories/Results/Model.html | 510 ++ .../Inferno/Repositories/SessionData.html | 776 ++ .../Repositories/SessionData/Model.html | 121 + docs/docs/Inferno/Repositories/Tags.html | 145 + .../docs/Inferno/Repositories/Tags/Model.html | 193 + .../docs/Inferno/Repositories/TestGroups.html | 145 + docs/docs/Inferno/Repositories/TestKits.html | 145 + docs/docs/Inferno/Repositories/TestRuns.html | 927 ++ .../Inferno/Repositories/TestRuns/Model.html | 280 + .../Inferno/Repositories/TestSessions.html | 499 ++ .../Repositories/TestSessions/Model.html | 260 + .../docs/Inferno/Repositories/TestSuites.html | 145 + docs/docs/Inferno/Repositories/Tests.html | 145 + .../ValidateRunnableReference.html | 371 + .../Repositories/ValidatorSessions.html | 338 + .../Repositories/ValidatorSessions/Model.html | 193 + docs/docs/Inferno/SpecSupport.html | 295 + docs/docs/Inferno/Utils.html | 119 + docs/docs/Inferno/Utils/IgDownloader.html | 477 ++ docs/docs/Inferno/Utils/Migration.html | 207 + docs/docs/Inferno/Utils/NamedThorActions.html | 514 ++ docs/docs/Inferno/Utils/PresetProcessor.html | 676 ++ .../Utils/PresetTemplateGenerator.html | 525 ++ docs/docs/Inferno/Web.html | 228 + docs/docs/Inferno/Web/Controllers.html | 119 + .../Inferno/Web/Controllers/Controller.html | 304 + .../Inferno/Web/Controllers/Requests.html | 115 + .../Web/Controllers/Requests/Show.html | 213 + .../Inferno/Web/Controllers/TestRuns.html | 119 + .../Web/Controllers/TestRuns/Create.html | 340 + .../Web/Controllers/TestRuns/Destroy.html | 245 + .../Web/Controllers/TestRuns/Results.html | 115 + .../Controllers/TestRuns/Results/Index.html | 209 + .../Web/Controllers/TestRuns/Show.html | 235 + .../TestSessionFormPostController.html | 310 + .../Inferno/Web/Controllers/TestSessions.html | 119 + .../Controllers/TestSessions/ClientShow.html | 263 + .../Web/Controllers/TestSessions/Create.html | 300 + .../Controllers/TestSessions/LastTestRun.html | 221 + .../Web/Controllers/TestSessions/Results.html | 115 + .../TestSessions/Results/Index.html | 217 + .../Controllers/TestSessions/SessionData.html | 117 + .../TestSessions/SessionData/ApplyPreset.html | 309 + .../TestSessions/SessionData/Index.html | 275 + .../Web/Controllers/TestSessions/Show.html | 213 + .../Inferno/Web/Controllers/TestSuites.html | 117 + .../TestSuites/CheckConfiguration.html | 215 + .../Web/Controllers/TestSuites/Index.html | 207 + .../Web/Controllers/TestSuites/Show.html | 213 + docs/docs/Inferno/Web/Serializers.html | 117 + .../Web/Serializers/HashValueExtractor.html | 194 + docs/docs/Inferno/Web/Serializers/Header.html | 137 + docs/docs/Inferno/Web/Serializers/Input.html | 137 + .../Web/Serializers/MarkdownExtractor.html | 200 + .../docs/Inferno/Web/Serializers/Message.html | 137 + docs/docs/Inferno/Web/Serializers/Preset.html | 137 + .../docs/Inferno/Web/Serializers/Request.html | 137 + docs/docs/Inferno/Web/Serializers/Result.html | 137 + .../Inferno/Web/Serializers/Serializer.html | 231 + .../Inferno/Web/Serializers/SessionData.html | 137 + .../Inferno/Web/Serializers/SuiteOption.html | 137 + docs/docs/Inferno/Web/Serializers/Test.html | 137 + .../Inferno/Web/Serializers/TestGroup.html | 137 + .../docs/Inferno/Web/Serializers/TestRun.html | 137 + .../Inferno/Web/Serializers/TestSession.html | 137 + .../Inferno/Web/Serializers/TestSuite.html | 137 + docs/docs/InfernoFHIRModelExtensions.html | 393 + docs/docs/InfernoJson.html | 195 + docs/docs/InfernoXml.html | 195 + docs/docs/Rack.html | 127 + docs/docs/Rack/Request.html | 201 + docs/docs/Rack/Request/Headers.html | 684 ++ docs/docs/_index.html | 1556 ++++ docs/docs/class_list.html | 54 + docs/docs/css/common.css | 1 + docs/docs/css/full_list.css | 58 + docs/docs/css/style.css | 503 ++ docs/docs/file.README.html | 258 + docs/docs/file_list.html | 59 + docs/docs/frames.html | 22 + docs/docs/index.html | 258 + docs/docs/js/app.js | 344 + docs/docs/js/full_list.js | 242 + docs/docs/js/jquery.js | 4 + docs/docs/method_list.html | 4774 +++++++++++ docs/docs/top-level-namespace.html | 110 + 200 files changed, 92584 insertions(+) create mode 100644 docs/docs/FHIR.html create mode 100644 docs/docs/FHIR/Client.html create mode 100644 docs/docs/FHIR/Json.html create mode 100644 docs/docs/FHIR/Model.html create mode 100644 docs/docs/FHIR/Xml.html create mode 100644 docs/docs/Hanami.html create mode 100644 docs/docs/Hanami/Middleware.html create mode 100644 docs/docs/Hanami/Middleware/BodyParser.html create mode 100644 docs/docs/Hanami/Middleware/BodyParser/JsonParser.html create mode 100644 docs/docs/Inferno.html create mode 100644 docs/docs/Inferno/Application.html create mode 100644 docs/docs/Inferno/CLI.html create mode 100644 docs/docs/Inferno/CLI/Console.html create mode 100644 docs/docs/Inferno/CLI/Evaluate.html create mode 100644 docs/docs/Inferno/CLI/Execute.html create mode 100644 docs/docs/Inferno/CLI/Main.html create mode 100644 docs/docs/Inferno/CLI/Migration.html create mode 100644 docs/docs/Inferno/CLI/New.html create mode 100644 docs/docs/Inferno/CLI/Services.html create mode 100644 docs/docs/Inferno/CLI/Suite.html create mode 100644 docs/docs/Inferno/CLI/SuiteInputTemplate.html create mode 100644 docs/docs/Inferno/CLI/Suites.html create mode 100644 docs/docs/Inferno/DSL.html create mode 100644 docs/docs/Inferno/DSL/Assertions.html create mode 100644 docs/docs/Inferno/DSL/AuthInfo.html create mode 100644 docs/docs/Inferno/DSL/Configurable.html create mode 100644 docs/docs/Inferno/DSL/Configurable/Configuration.html create mode 100644 docs/docs/Inferno/DSL/FHIRClient.html create mode 100644 docs/docs/Inferno/DSL/FHIRClient/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/FHIRClientBuilder.html create mode 100644 docs/docs/Inferno/DSL/FHIREvaluation.html create mode 100644 docs/docs/Inferno/DSL/FHIREvaluation/Config.html create mode 100644 docs/docs/Inferno/DSL/FHIREvaluation/DatasetLoader.html create mode 100644 docs/docs/Inferno/DSL/FHIREvaluation/EvaluationContext.html create mode 100644 docs/docs/Inferno/DSL/FHIREvaluation/EvaluationResult.html create mode 100644 docs/docs/Inferno/DSL/FHIREvaluation/Evaluator.html create mode 100644 docs/docs/Inferno/DSL/FHIREvaluation/Rule.html create mode 100644 docs/docs/Inferno/DSL/FHIRResourceValidation.html create mode 100644 docs/docs/Inferno/DSL/FHIRResourceValidation/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/FHIRResourceValidation/Validator.html create mode 100644 docs/docs/Inferno/DSL/FHIRValidation.html create mode 100644 docs/docs/Inferno/DSL/FHIRValidation/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/FHIRValidation/Validator.html create mode 100644 docs/docs/Inferno/DSL/FhirpathEvaluation.html create mode 100644 docs/docs/Inferno/DSL/FhirpathEvaluation/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/FhirpathEvaluation/Evaluator.html create mode 100644 docs/docs/Inferno/DSL/HTTPClient.html create mode 100644 docs/docs/Inferno/DSL/HTTPClient/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/HTTPClientBuilder.html create mode 100644 docs/docs/Inferno/DSL/InputOutputHandling.html create mode 100644 docs/docs/Inferno/DSL/JWKS.html create mode 100644 docs/docs/Inferno/DSL/Links.html create mode 100644 docs/docs/Inferno/DSL/Messages.html create mode 100644 docs/docs/Inferno/DSL/OAuthCredentials.html create mode 100644 docs/docs/Inferno/DSL/RequestStorage.html create mode 100644 docs/docs/Inferno/DSL/RequestStorage/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/Results.html create mode 100644 docs/docs/Inferno/DSL/Runnable.html create mode 100644 docs/docs/Inferno/DSL/SuiteEndpoint.html create mode 100644 docs/docs/Inferno/DSL/SuiteOption.html create mode 100644 docs/docs/Inferno/Entities.html create mode 100644 docs/docs/Inferno/Entities/Entity.html create mode 100644 docs/docs/Inferno/Entities/HasRunnable.html create mode 100644 docs/docs/Inferno/Entities/Header.html create mode 100644 docs/docs/Inferno/Entities/IG.html create mode 100644 docs/docs/Inferno/Entities/Input.html create mode 100644 docs/docs/Inferno/Entities/Message.html create mode 100644 docs/docs/Inferno/Entities/Preset.html create mode 100644 docs/docs/Inferno/Entities/Request.html create mode 100644 docs/docs/Inferno/Entities/Result.html create mode 100644 docs/docs/Inferno/Entities/SessionData.html create mode 100644 docs/docs/Inferno/Entities/Test.html create mode 100644 docs/docs/Inferno/Entities/TestGroup.html create mode 100644 docs/docs/Inferno/Entities/TestKit.html create mode 100644 docs/docs/Inferno/Entities/TestRun.html create mode 100644 docs/docs/Inferno/Entities/TestSession.html create mode 100644 docs/docs/Inferno/Entities/TestSuite.html create mode 100644 docs/docs/Inferno/Entities/ValidatorSession.html create mode 100644 docs/docs/Inferno/Exceptions.html create mode 100644 docs/docs/Inferno/Exceptions/AssertionException.html create mode 100644 docs/docs/Inferno/Exceptions/BadSessionDataType.html create mode 100644 docs/docs/Inferno/Exceptions/CancelException.html create mode 100644 docs/docs/Inferno/Exceptions/DuplicateEntityIdException.html create mode 100644 docs/docs/Inferno/Exceptions/ErrorInFhirpathException.html create mode 100644 docs/docs/Inferno/Exceptions/ErrorInValidatorException.html create mode 100644 docs/docs/Inferno/Exceptions/FhirpathNotFoundException.html create mode 100644 docs/docs/Inferno/Exceptions/InvalidRunnableIdException.html create mode 100644 docs/docs/Inferno/Exceptions/NotUserRunnableException.html create mode 100644 docs/docs/Inferno/Exceptions/OmitException.html create mode 100644 docs/docs/Inferno/Exceptions/ParentNotLoadedException.html create mode 100644 docs/docs/Inferno/Exceptions/PassException.html create mode 100644 docs/docs/Inferno/Exceptions/RequiredInputsNotFound.html create mode 100644 docs/docs/Inferno/Exceptions/SkipException.html create mode 100644 docs/docs/Inferno/Exceptions/TestResultException.html create mode 100644 docs/docs/Inferno/Exceptions/UnknownAttributeException.html create mode 100644 docs/docs/Inferno/Exceptions/UnknownSessionDataType.html create mode 100644 docs/docs/Inferno/Exceptions/ValidatorNotFoundException.html create mode 100644 docs/docs/Inferno/Exceptions/WaitException.html create mode 100644 docs/docs/Inferno/Jobs.html create mode 100644 docs/docs/Inferno/Jobs/ExecuteTestRun.html create mode 100644 docs/docs/Inferno/Jobs/InvokeValidatorSession.html create mode 100644 docs/docs/Inferno/Jobs/ResumeTestRun.html create mode 100644 docs/docs/Inferno/Repositories.html create mode 100644 docs/docs/Inferno/Repositories/Headers.html create mode 100644 docs/docs/Inferno/Repositories/Headers/Model.html create mode 100644 docs/docs/Inferno/Repositories/IGs.html create mode 100644 docs/docs/Inferno/Repositories/InMemoryRepository.html create mode 100644 docs/docs/Inferno/Repositories/Messages.html create mode 100644 docs/docs/Inferno/Repositories/Messages/Model.html create mode 100644 docs/docs/Inferno/Repositories/Presets.html create mode 100644 docs/docs/Inferno/Repositories/Repository.html create mode 100644 docs/docs/Inferno/Repositories/Requests.html create mode 100644 docs/docs/Inferno/Repositories/Requests/Model.html create mode 100644 docs/docs/Inferno/Repositories/Results.html create mode 100644 docs/docs/Inferno/Repositories/Results/Model.html create mode 100644 docs/docs/Inferno/Repositories/SessionData.html create mode 100644 docs/docs/Inferno/Repositories/SessionData/Model.html create mode 100644 docs/docs/Inferno/Repositories/Tags.html create mode 100644 docs/docs/Inferno/Repositories/Tags/Model.html create mode 100644 docs/docs/Inferno/Repositories/TestGroups.html create mode 100644 docs/docs/Inferno/Repositories/TestKits.html create mode 100644 docs/docs/Inferno/Repositories/TestRuns.html create mode 100644 docs/docs/Inferno/Repositories/TestRuns/Model.html create mode 100644 docs/docs/Inferno/Repositories/TestSessions.html create mode 100644 docs/docs/Inferno/Repositories/TestSessions/Model.html create mode 100644 docs/docs/Inferno/Repositories/TestSuites.html create mode 100644 docs/docs/Inferno/Repositories/Tests.html create mode 100644 docs/docs/Inferno/Repositories/ValidateRunnableReference.html create mode 100644 docs/docs/Inferno/Repositories/ValidatorSessions.html create mode 100644 docs/docs/Inferno/Repositories/ValidatorSessions/Model.html create mode 100644 docs/docs/Inferno/SpecSupport.html create mode 100644 docs/docs/Inferno/Utils.html create mode 100644 docs/docs/Inferno/Utils/IgDownloader.html create mode 100644 docs/docs/Inferno/Utils/Migration.html create mode 100644 docs/docs/Inferno/Utils/NamedThorActions.html create mode 100644 docs/docs/Inferno/Utils/PresetProcessor.html create mode 100644 docs/docs/Inferno/Utils/PresetTemplateGenerator.html create mode 100644 docs/docs/Inferno/Web.html create mode 100644 docs/docs/Inferno/Web/Controllers.html create mode 100644 docs/docs/Inferno/Web/Controllers/Controller.html create mode 100644 docs/docs/Inferno/Web/Controllers/Requests.html create mode 100644 docs/docs/Inferno/Web/Controllers/Requests/Show.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Create.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Destroy.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Results.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Results/Index.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Show.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessionFormPostController.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/ClientShow.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/Create.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/LastTestRun.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/Results.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/Results/Index.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/SessionData.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/ApplyPreset.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/Index.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/Show.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSuites.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSuites/CheckConfiguration.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSuites/Index.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSuites/Show.html create mode 100644 docs/docs/Inferno/Web/Serializers.html create mode 100644 docs/docs/Inferno/Web/Serializers/HashValueExtractor.html create mode 100644 docs/docs/Inferno/Web/Serializers/Header.html create mode 100644 docs/docs/Inferno/Web/Serializers/Input.html create mode 100644 docs/docs/Inferno/Web/Serializers/MarkdownExtractor.html create mode 100644 docs/docs/Inferno/Web/Serializers/Message.html create mode 100644 docs/docs/Inferno/Web/Serializers/Preset.html create mode 100644 docs/docs/Inferno/Web/Serializers/Request.html create mode 100644 docs/docs/Inferno/Web/Serializers/Result.html create mode 100644 docs/docs/Inferno/Web/Serializers/Serializer.html create mode 100644 docs/docs/Inferno/Web/Serializers/SessionData.html create mode 100644 docs/docs/Inferno/Web/Serializers/SuiteOption.html create mode 100644 docs/docs/Inferno/Web/Serializers/Test.html create mode 100644 docs/docs/Inferno/Web/Serializers/TestGroup.html create mode 100644 docs/docs/Inferno/Web/Serializers/TestRun.html create mode 100644 docs/docs/Inferno/Web/Serializers/TestSession.html create mode 100644 docs/docs/Inferno/Web/Serializers/TestSuite.html create mode 100644 docs/docs/InfernoFHIRModelExtensions.html create mode 100644 docs/docs/InfernoJson.html create mode 100644 docs/docs/InfernoXml.html create mode 100644 docs/docs/Rack.html create mode 100644 docs/docs/Rack/Request.html create mode 100644 docs/docs/Rack/Request/Headers.html create mode 100644 docs/docs/_index.html create mode 100644 docs/docs/class_list.html create mode 100644 docs/docs/css/common.css create mode 100644 docs/docs/css/full_list.css create mode 100644 docs/docs/css/style.css create mode 100644 docs/docs/file.README.html create mode 100644 docs/docs/file_list.html create mode 100644 docs/docs/frames.html create mode 100644 docs/docs/index.html create mode 100644 docs/docs/js/app.js create mode 100644 docs/docs/js/full_list.js create mode 100644 docs/docs/js/jquery.js create mode 100644 docs/docs/method_list.html create mode 100644 docs/docs/top-level-namespace.html diff --git a/docs/docs/FHIR.html b/docs/docs/FHIR.html new file mode 100644 index 000000000..7b54db667 --- /dev/null +++ b/docs/docs/FHIR.html @@ -0,0 +1,119 @@ + + + + + + + Module: FHIR + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: FHIR + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_client.rb,
+ lib/inferno/ext/fhir_models.rb,
lib/inferno/ext/fhir_models.rb,
lib/inferno/ext/fhir_models.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Json, Xml + + + + Classes: Client, Model + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/FHIR/Client.html b/docs/docs/FHIR/Client.html new file mode 100644 index 000000000..f8b899e22 --- /dev/null +++ b/docs/docs/FHIR/Client.html @@ -0,0 +1,436 @@ + + + + + + + Class: FHIR::Client + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: FHIR::Client + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_client.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #auth_infoObject + + + + + +

+
+

Returns the value of attribute auth_info.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+3
+4
+5
+
+
# File 'lib/inferno/ext/fhir_client.rb', line 3
+
+def auth_info
+  @auth_info
+end
+
+
+ + + +
+

+ + #oauth_credentialsObject + + + + + +

+
+

Returns the value of attribute oauth_credentials.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+3
+4
+5
+
+
# File 'lib/inferno/ext/fhir_client.rb', line 3
+
+def oauth_credentials
+  @oauth_credentials
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #able_to_refresh?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/inferno/ext/fhir_client.rb', line 9
+
+def able_to_refresh?
+  !!(auth_info&.able_to_refresh? || oauth_credentials&.able_to_refresh?)
+end
+
+
+ +
+

+ + #need_to_refresh?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+5
+6
+7
+
+
# File 'lib/inferno/ext/fhir_client.rb', line 5
+
+def need_to_refresh?
+  !!(auth_info&.need_to_refresh? || oauth_credentials&.need_to_refresh?)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/FHIR/Json.html b/docs/docs/FHIR/Json.html new file mode 100644 index 000000000..d203ac90f --- /dev/null +++ b/docs/docs/FHIR/Json.html @@ -0,0 +1,121 @@ + + + + + + + Module: FHIR::Json + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: FHIR::Json + + + +

+
+ + + + +
+
Extended by:
+
InfernoJson
+
+ + + + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods included from InfernoJson

+

from_json

+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/FHIR/Model.html b/docs/docs/FHIR/Model.html new file mode 100644 index 000000000..e56716515 --- /dev/null +++ b/docs/docs/FHIR/Model.html @@ -0,0 +1,142 @@ + + + + + + + Class: FHIR::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: FHIR::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
InfernoFHIRModelExtensions
+
+ + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ + + + + + + +

Instance Attribute Summary

+ +

Attributes included from InfernoFHIRModelExtensions

+

#source_hash, #source_text

+ + + + + + + + + +

Method Summary

+ +

Methods included from InfernoFHIRModelExtensions

+

#initialize, #source_contents

+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/FHIR/Xml.html b/docs/docs/FHIR/Xml.html new file mode 100644 index 000000000..c4da8e2b5 --- /dev/null +++ b/docs/docs/FHIR/Xml.html @@ -0,0 +1,121 @@ + + + + + + + Module: FHIR::Xml + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: FHIR::Xml + + + +

+
+ + + + +
+
Extended by:
+
InfernoXml
+
+ + + + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods included from InfernoXml

+

from_xml

+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Hanami.html b/docs/docs/Hanami.html new file mode 100644 index 000000000..2c97b88f2 --- /dev/null +++ b/docs/docs/Hanami.html @@ -0,0 +1,115 @@ + + + + + + + Module: Hanami + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Hanami + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/json_parser.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Middleware + + + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Hanami/Middleware.html b/docs/docs/Hanami/Middleware.html new file mode 100644 index 000000000..05f6b8184 --- /dev/null +++ b/docs/docs/Hanami/Middleware.html @@ -0,0 +1,115 @@ + + + + + + + Module: Hanami::Middleware + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Hanami::Middleware + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/json_parser.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: BodyParser + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Hanami/Middleware/BodyParser.html b/docs/docs/Hanami/Middleware/BodyParser.html new file mode 100644 index 000000000..41cc74132 --- /dev/null +++ b/docs/docs/Hanami/Middleware/BodyParser.html @@ -0,0 +1,131 @@ + + + + + + + Class: Hanami::Middleware::BodyParser + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Hanami::Middleware::BodyParser + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/json_parser.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: JsonParser + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Hanami/Middleware/BodyParser/JsonParser.html b/docs/docs/Hanami/Middleware/BodyParser/JsonParser.html new file mode 100644 index 000000000..7a33fd8fe --- /dev/null +++ b/docs/docs/Hanami/Middleware/BodyParser/JsonParser.html @@ -0,0 +1,191 @@ + + + + + + + Class: Hanami::Middleware::BodyParser::JsonParser + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Hanami::Middleware::BodyParser::JsonParser + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/json_parser.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .mime_typesObject + + + + + +

+ + + + +
+
+
+
+5
+6
+7
+
+
# File 'lib/inferno/ext/json_parser.rb', line 5
+
+def self.mime_types
+  ['application/json', 'application/vnd.api+json', 'application/fhir+json']
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno.html b/docs/docs/Inferno.html new file mode 100644 index 000000000..8c9f40f84 --- /dev/null +++ b/docs/docs/Inferno.html @@ -0,0 +1,245 @@ + + + + + + + Module: Inferno + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno.rb,
+ lib/inferno/dsl.rb,
lib/inferno/jobs.rb,
lib/inferno/version.rb,
lib/inferno/apps/cli.rb,
lib/inferno/dsl/jwks.rb,
lib/inferno/entities.rb,
lib/inferno/dsl/links.rb,
lib/inferno/exceptions.rb,
lib/inferno/dsl/results.rb,
lib/inferno/entities/ig.rb,
lib/inferno/test_runner.rb,
lib/inferno/apps/cli/new.rb,
lib/inferno/dsl/messages.rb,
lib/inferno/dsl/runnable.rb,
lib/inferno/repositories.rb,
lib/inferno/spec_support.rb,
lib/inferno/apps/cli/main.rb,
lib/inferno/dsl/auth_info.rb,
lib/inferno/entities/test.rb,
lib/inferno/apps/cli/suite.rb,
lib/inferno/dsl/assertions.rb,
lib/inferno/entities/input.rb,
lib/inferno/apps/cli/suites.rb,
lib/inferno/apps/web/router.rb,
lib/inferno/dsl/fhir_client.rb,
lib/inferno/dsl/http_client.rb,
lib/inferno/entities/entity.rb,
lib/inferno/entities/header.rb,
lib/inferno/entities/preset.rb,
lib/inferno/entities/result.rb,
lib/inferno/utils/migration.rb,
lib/inferno/apps/cli/console.rb,
lib/inferno/apps/cli/execute.rb,
lib/inferno/dsl/configurable.rb,
lib/inferno/dsl/suite_option.rb,
lib/inferno/entities/message.rb,
lib/inferno/entities/request.rb,
lib/inferno/repositories/igs.rb,
lib/inferno/apps/cli/evaluate.rb,
lib/inferno/apps/cli/services.rb,
lib/inferno/entities/test_kit.rb,
lib/inferno/entities/test_run.rb,
lib/inferno/repositories/tags.rb,
lib/inferno/result_collection.rb,
lib/inferno/result_summarizer.rb,
lib/inferno/apps/cli/migration.rb,
lib/inferno/config/application.rb,
lib/inferno/dsl/suite_endpoint.rb,
lib/inferno/repositories/tests.rb,
lib/inferno/dsl/fhir_validation.rb,
lib/inferno/dsl/request_storage.rb,
lib/inferno/entities/attributes.rb,
lib/inferno/entities/test_group.rb,
lib/inferno/entities/test_suite.rb,
lib/inferno/utils/ig_downloader.rb,
lib/inferno/utils/static_assets.rb,
lib/inferno/apps/web/application.rb,
lib/inferno/jobs/resume_test_run.rb,
lib/inferno/repositories/headers.rb,
lib/inferno/repositories/presets.rb,
lib/inferno/repositories/results.rb,
lib/inferno/utils/persist_inputs.rb,
lib/inferno/dsl/oauth_credentials.rb,
lib/inferno/dsl/resume_test_route.rb,
lib/inferno/entities/has_runnable.rb,
lib/inferno/entities/session_data.rb,
lib/inferno/entities/test_session.rb,
lib/inferno/jobs/execute_test_run.rb,
lib/inferno/repositories/messages.rb,
lib/inferno/repositories/requests.rb,
lib/inferno/utils/verify_runnable.rb,
lib/inferno/repositories/test_kits.rb,
lib/inferno/repositories/test_runs.rb,
lib/inferno/utils/preset_processor.rb,
lib/inferno/dsl/fhir_client_builder.rb,
lib/inferno/dsl/fhirpath_evaluation.rb,
lib/inferno/dsl/http_client_builder.rb,
lib/inferno/repositories/repository.rb,
lib/inferno/dsl/fhir_evaluation/rule.rb,
lib/inferno/repositories/test_groups.rb,
lib/inferno/repositories/test_suites.rb,
lib/inferno/utils/markdown_formatter.rb,
lib/inferno/utils/named_thor_actions.rb,
lib/inferno/apps/web/serializers/test.rb,
lib/inferno/dsl/input_output_handling.rb,
lib/inferno/dsl/tcp_exception_handler.rb,
lib/inferno/repositories/session_data.rb,
lib/inferno/apps/cli/execute/serialize.rb,
lib/inferno/apps/web/serializers/input.rb,
lib/inferno/dsl/fhir_evaluation/config.rb,
lib/inferno/entities/validator_session.rb,
lib/inferno/repositories/test_sessions.rb,
lib/inferno/apps/web/serializers/header.rb,
lib/inferno/apps/web/serializers/preset.rb,
lib/inferno/apps/web/serializers/result.rb,
lib/inferno/apps/web/serializers/message.rb,
lib/inferno/apps/web/serializers/request.rb,
lib/inferno/dsl/fhir_resource_validation.rb,
lib/inferno/apps/cli/suite_input_template.rb,
lib/inferno/apps/web/serializers/test_run.rb,
lib/inferno/dsl/fhir_evaluation/evaluator.rb,
lib/inferno/jobs/invoke_validator_session.rb,
lib/inferno/apps/cli/execute/json_outputter.rb,
lib/inferno/apps/web/controllers/controller.rb,
lib/inferno/apps/web/serializers/serializer.rb,
lib/inferno/apps/web/serializers/test_group.rb,
lib/inferno/apps/web/serializers/test_suite.rb,
lib/inferno/repositories/validator_sessions.rb,
lib/inferno/utils/middleware/request_logger.rb,
lib/inferno/utils/preset_template_generator.rb,
lib/inferno/apps/cli/execute/plain_outputter.rb,
lib/inferno/apps/cli/execute/quiet_outputter.rb,
lib/inferno/apps/web/serializers/session_data.rb,
lib/inferno/apps/web/serializers/suite_option.rb,
lib/inferno/apps/web/serializers/test_session.rb,
lib/inferno/repositories/in_memory_repository.rb,
lib/inferno/apps/cli/execute/console_outputter.rb,
lib/inferno/apps/web/controllers/requests/show.rb,
lib/inferno/dsl/fhir_evaluation/dataset_loader.rb,
lib/inferno/apps/web/controllers/test_runs/show.rb,
lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_suites/show.rb,
lib/inferno/dsl/fhir_evaluation/evaluation_result.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/dsl/fhir_evaluation/evaluation_context.rb,
lib/inferno/apps/web/controllers/test_sessions/show.rb,
lib/inferno/apps/web/serializers/markdown_extractor.rb,
lib/inferno/repositories/validate_runnable_reference.rb,
lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/serializers/hash_value_extractor.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_session_form_post_controller.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: CLI, DSL, Entities, Exceptions, Jobs, Repositories, SpecSupport, Utils, Web + + + + Classes: Application + + +

+ + +

+ Constant Summary + collapse +

+ +
+ +
VERSION = +
+
+

Standard patterns for gem versions: https://guides.rubygems.org/patterns/

+ + +
+
+
+ + +
+
+
'0.5.4'.freeze
+ +
JWKS = + +
+
DSL::JWKS
+ +
Test = + +
+
Entities::Test
+ +
TestKit = + +
+
Entities::TestKit
+ +
Import = + +
+
injector
+ +
TestGroup = + +
+
Entities::TestGroup
+ +
TestSuite = + +
+
Entities::TestSuite
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .routesObject + + + + + +

+ + + + +
+
+
+
+2
+3
+4
+
+
# File 'lib/inferno.rb', line 2
+
+def self.routes
+  @routes ||= []
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Application.html b/docs/docs/Inferno/Application.html new file mode 100644 index 000000000..b04139f8e --- /dev/null +++ b/docs/docs/Inferno/Application.html @@ -0,0 +1,124 @@ + + + + + + + Class: Inferno::Application + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Application + + + +

+
+ +
+
Inherits:
+
+ Dry::System::Container + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/config/application.rb
+
+ +
+ + + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI.html b/docs/docs/Inferno/CLI.html new file mode 100644 index 000000000..27bce6844 --- /dev/null +++ b/docs/docs/Inferno/CLI.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::CLI + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::CLI + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli.rb,
+ lib/inferno/apps/cli/new.rb,
lib/inferno/apps/cli/main.rb,
lib/inferno/apps/cli/suite.rb,
lib/inferno/apps/cli/suites.rb,
lib/inferno/apps/cli/console.rb,
lib/inferno/apps/cli/execute.rb,
lib/inferno/apps/cli/evaluate.rb,
lib/inferno/apps/cli/services.rb,
lib/inferno/apps/cli/migration.rb,
lib/inferno/apps/cli/execute/serialize.rb,
lib/inferno/apps/cli/suite_input_template.rb,
lib/inferno/apps/cli/execute/json_outputter.rb,
lib/inferno/apps/cli/execute/plain_outputter.rb,
lib/inferno/apps/cli/execute/quiet_outputter.rb,
lib/inferno/apps/cli/execute/console_outputter.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Console, Evaluate, Execute, Main, Migration, New, Services, Suite, SuiteInputTemplate, Suites + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Console.html b/docs/docs/Inferno/CLI/Console.html new file mode 100644 index 000000000..cee684df2 --- /dev/null +++ b/docs/docs/Inferno/CLI/Console.html @@ -0,0 +1,203 @@ + + + + + + + Class: Inferno::CLI::Console + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Console + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/console.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runObject + + + + + +

+ + + + +
+
+
+
+4
+5
+6
+7
+8
+9
+10
+11
+12
+
+
# File 'lib/inferno/apps/cli/console.rb', line 4
+
+def run
+  require_relative '../../../inferno'
+
+  ENV['ASYNC_JOBS'] = 'false'
+  ENV['INITIALIZE_VALIDATOR_SESSIONS'] = 'false'
+
+  Inferno::Application.finalize!
+  Pry.start
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Evaluate.html b/docs/docs/Inferno/CLI/Evaluate.html new file mode 100644 index 000000000..9f944c0a1 --- /dev/null +++ b/docs/docs/Inferno/CLI/Evaluate.html @@ -0,0 +1,713 @@ + + + + + + + Class: Inferno::CLI::Evaluate + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Evaluate + + + +

+
+ +
+
Inherits:
+
+ Thor::Group + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
Utils::IgDownloader, Thor::Actions
+
+ + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/evaluate.rb
+
+ +
+ + + + +

Constant Summary

+ +

Constants included + from Utils::IgDownloader

+

Utils::IgDownloader::FHIR_PACKAGE_NAME_REG_EX, Utils::IgDownloader::FILE_URI_REG_EX, Utils::IgDownloader::HTTP_URI_END_REG_EX, Utils::IgDownloader::HTTP_URI_REG_EX

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from Utils::IgDownloader

+

#ig_file, #ig_http_url, #ig_path, #ig_registry_url, #load_ig

+ + + + +
+

Instance Method Details

+ + +
+

+ + #evaluate(ig_path, data_path, _log_level) ⇒ Object + + + + + +

+ + + + +
+
+
+
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+
+
# File 'lib/inferno/apps/cli/evaluate.rb', line 13
+
+def evaluate(ig_path, data_path, _log_level)
+  validate_args(ig_path, data_path)
+  _ig = get_ig(ig_path)
+
+  # Rule execution, and result output below will be integrated soon.
+
+  # if data_path
+  #   DatasetLoader.from_path(File.join(__dir__, data_path))
+  # else
+  #   ig.examples
+  # end
+
+  # config = Config.new
+  # evaluator = Inferno::DSL::FHIREvaluation::Evaluator.new(data, config)
+
+  # results = evaluate()
+  # output_results(results, options[:output])
+end
+
+
+ +
+

+ + #get_ig(ig_path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+
+
# File 'lib/inferno/apps/cli/evaluate.rb', line 40
+
+def get_ig(ig_path)
+  if File.exist?(ig_path)
+    ig = Inferno::Entities::IG.from_file(ig_path)
+  elsif in_user_package_cache?(ig_path.sub('@', '#'))
+    # NPM syntax for a package identifier is id@version (eg, hl7.fhir.us.core@3.1.1)
+    # but in the cache the separator is # (hl7.fhir.us.core#3.1.1)
+    cache_directory = File.join(user_package_cache, ig_path.sub('@', '#'))
+    ig = Inferno::Entities::IG.from_file(cache_directory)
+  else
+    Tempfile.create('package.tgz') do |temp_file|
+      load_ig(ig_path, nil, { force: true }, temp_file.path)
+      ig = Inferno::Entities::IG.from_file(temp_file.path)
+    end
+  end
+  ig.add_self_to_repository
+  ig
+end
+
+
+ +
+

+ + #in_user_package_cache?(ig_identifier) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+62
+63
+64
+
+
# File 'lib/inferno/apps/cli/evaluate.rb', line 62
+
+def in_user_package_cache?(ig_identifier)
+  File.directory?(File.join(user_package_cache, ig_identifier))
+end
+
+
+ +
+

+ + #output_results(results, output) ⇒ Object + + + + + +

+ + + + +
+
+
+
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+
+
# File 'lib/inferno/apps/cli/evaluate.rb', line 66
+
+def output_results(results, output)
+  if output&.end_with?('json')
+    oo = FhirEvaluator::EvaluationResult.to_operation_outcome(results)
+    File.write(output, oo.to_json)
+    puts "Results written to #{output}"
+  else
+    counts = results.group_by(&:severity).transform_values(&:count)
+    print(counts, 'Result Count')
+    puts "\n"
+    puts results
+  end
+end
+
+
+ +
+

+ + #pad(string, length) ⇒ Object + + + + + +

+ + + + +
+
+
+
+92
+93
+94
+
+
# File 'lib/inferno/apps/cli/evaluate.rb', line 92
+
+def pad(string, length)
+  format("%#{length}.#{length}s", string)
+end
+
+
+ +
+ + + + + +
+
+
+
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+
+
# File 'lib/inferno/apps/cli/evaluate.rb', line 79
+
+def print(output_fields, title)
+  puts("╔══════════════ #{title} ═══════════════╗")
+  puts('║ ╭────────────────┬──────────────────────╮ ║')
+  output_fields.each_with_index do |(key, value), i|
+    field_name = pad(key, 14)
+    field_value = pad(value.to_s, 20)
+    puts("║ │ #{field_name}#{field_value} │ ║")
+    puts('║ ├────────────────┼──────────────────────┤ ║') unless i == output_fields.length - 1
+  end
+  puts('║ ╰────────────────┴──────────────────────╯ ║')
+  puts('╚═══════════════════════════════════════════╝')
+end
+
+
+ +
+

+ + #user_package_cacheObject + + + + + +

+ + + + +
+
+
+
+58
+59
+60
+
+
# File 'lib/inferno/apps/cli/evaluate.rb', line 58
+
+def user_package_cache
+  File.join(Dir.home, '.fhir', 'packages')
+end
+
+
+ +
+

+ + #validate_args(ig_path, data_path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+32
+33
+34
+35
+36
+37
+38
+
+
# File 'lib/inferno/apps/cli/evaluate.rb', line 32
+
+def validate_args(ig_path, data_path)
+  raise 'A path to an IG is required!' unless ig_path
+
+  return unless data_path && (!File.directory? data_path)
+
+  raise "Provided path '#{data_path}' is not a directory"
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Execute.html b/docs/docs/Inferno/CLI/Execute.html new file mode 100644 index 000000000..9b101c90b --- /dev/null +++ b/docs/docs/Inferno/CLI/Execute.html @@ -0,0 +1,2443 @@ + + + + + + + Class: Inferno::CLI::Execute + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Execute + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/execute.rb,
+ lib/inferno/apps/cli/execute/serialize.rb,
lib/inferno/apps/cli/execute/json_outputter.rb,
lib/inferno/apps/cli/execute/plain_outputter.rb,
lib/inferno/apps/cli/execute/quiet_outputter.rb,
lib/inferno/apps/cli/execute/console_outputter.rb
+
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
OUTPUTTERS = + +
+
{
+  'console' => Inferno::CLI::Execute::ConsoleOutputter,
+  'plain' => Inferno::CLI::Execute::PlainOutputter,
+  'json' => Inferno::CLI::Execute::JSONOutputter,
+  'quiet' => Inferno::CLI::Execute::QuietOutputter
+}.freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #options ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute options.

    +
    + +
  • + + +
+ + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #optionsObject + + + + + +

+
+

Returns the value of attribute options.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 20
+
+def options
+  @options
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .boot_full_infernoObject + + + + + +

+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 33
+
+def self.boot_full_inferno
+  ENV['NO_DB'] = 'false'
+
+  # Inferno boot flow triggers migration and logger outputs it
+  Inferno::CLI::Execute.suppress_output { require_relative '../../../inferno' }
+
+  Inferno::Application.start(:executor)
+end
+
+
+ +
+

+ + .suppress_outputObject + + + + + +

+ + + + +
+
+
+
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 22
+
+def self.suppress_output
+  begin
+    original_stdout = $stdout.clone
+    $stdout.reopen(File.new(File::NULL, 'w+'))
+    retval = yield
+  ensure
+    $stdout.reopen(original_stdout)
+  end
+  retval
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #all_selected_groups_and_testsObject + + + + + +

+ + + + +
+
+
+
+119
+120
+121
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 119
+
+def all_selected_groups_and_tests
+  @all_selected_groups_and_tests ||= runnables_by_short_id + groups + tests
+end
+
+
+ +
+

+ + #create_params(test_session, runnable) ⇒ Object + + + + + +

+ + + + +
+
+
+
+213
+214
+215
+216
+217
+218
+219
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 213
+
+def create_params(test_session, runnable)
+  {
+    test_session_id: test_session.id,
+    runnable_id_key(runnable) => runnable.id,
+    inputs: thor_hash_to_inputs_array(inputs_and_preset)
+  }
+end
+
+
+ +
+

+ + #create_test_run(runnable) ⇒ Object + + + + + +

+ + + + +
+
+
+
+174
+175
+176
+177
+178
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 174
+
+def create_test_run(runnable)
+  test_runs_repo.create(
+    create_params(test_session, runnable).merge({ status: 'queued' })
+  )
+end
+
+
+ +
+

+ + #dispatch_job(test_run) ⇒ Object + + + + + +

+ + + + +
+
+
+
+221
+222
+223
+224
+225
+226
+227
+228
+229
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 221
+
+def dispatch_job(test_run)
+  if options[:verbose]
+    Jobs.perform(Jobs::ExecuteTestRun, test_run.id, force_synchronous: true)
+  else
+    Inferno::CLI::Execute.suppress_output do
+      Jobs.perform(Jobs::ExecuteTestRun, test_run.id, force_synchronous: true)
+    end
+  end
+end
+
+
+ +
+

+ + #find_by_short_id(repo_symbol, short_id) ⇒ Object + + + + + +

+
+ + + +
+
+
+ +

Raises:

+
    + +
  • + + + (StandardError) + + + +
  • + +
+ +
+ + + + +
+
+
+
+249
+250
+251
+252
+253
+254
+255
+256
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 249
+
+def find_by_short_id(repo_symbol, short_id)
+  repo_symbol_to_array(repo_symbol).each do |repo|
+    repo.all.each do |entity|
+      return entity if short_id == entity.short_id && suite.id == entity.suite.id
+    end
+  end
+  raise StandardError, "#{repo_symbol.to_s.humanize} #{short_id} not found."
+end
+
+
+ +
+

+ + #groupsObject + + + + + +

+ + + + +
+
+
+
+237
+238
+239
+240
+241
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 237
+
+def groups
+  return [] if options[:groups].blank?
+
+  @groups ||= options[:groups]&.map { |short_id| find_by_short_id(:group, short_id) }
+end
+
+
+ +
+

+ + #inputs_and_presetObject + + + + + +

+ + + + +
+
+
+
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 135
+
+def inputs_and_preset
+  if preset
+    preset_inputs = preset.inputs.to_h do |preset_input|
+      [preset_input[:name], preset_input[:value]]
+    end
+
+    options.fetch(:inputs, {}).reverse_merge(preset_inputs)
+  else
+    options.fetch(:inputs, {})
+  end
+end
+
+
+ +
+

+ + #load_preset_file_and_set_preset_idObject + + + + + +

+
+ + + +
+
+
+ +

Raises:

+
    + +
  • + + + (StandardError) + + + +
  • + +
+ +
+ + + + +
+
+
+
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 107
+
+def load_preset_file_and_set_preset_id
+  return unless options[:preset_file]
+  raise StandardError, 'Cannot use `--preset-id` and `--preset-file` options together' if options[:preset_id]
+
+  raise StandardError, "File #{options[:preset_file]} not found" unless File.exist? options[:preset_file]
+
+  options[:preset_id] = JSON.parse(File.read(options[:preset_file]))['id']
+  raise StandardError, "Preset #{options[:preset_file]} is missing id" if options[:preset_id].nil?
+
+  presets_repo.insert_from_file(options[:preset_file])
+end
+
+
+ +
+

+ + #outputterObject + + + + + +

+ + + + +
+
+
+
+98
+99
+100
+101
+102
+103
+104
+105
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 98
+
+def outputter
+  unless OUTPUTTERS.key? options[:outputter]
+    raise StandardError,
+          "Unrecognized outputter #{options[:outputter]}"
+  end
+
+  @outputter ||= OUTPUTTERS[options[:outputter]].new
+end
+
+
+ +
+

+ + #presetObject + + + + + +

+
+ + + +
+
+
+ +

Raises:

+
    + +
  • + + + (StandardError) + + + +
  • + +
+ +
+ + + + +
+
+
+
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 147
+
+def preset
+  return unless options[:preset_id]
+
+  @preset ||= presets_repo.find(options[:preset_id])
+
+  raise StandardError, "Preset #{options[:preset_id]} not found" if @preset.nil?
+
+  unless presets_repo.presets_for_suite(suite.id).include?(@preset)
+    raise StandardError,
+          "Preset #{options[:preset_id]} is incompatible with suite #{suite.id}"
+  end
+
+  @preset
+end
+
+
+ +
+

+ + #presets_repoObject + + + + + +

+ + + + +
+
+
+
+200
+201
+202
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 200
+
+def presets_repo
+  @presets_repo ||= Inferno::Repositories::Presets.new
+end
+
+
+ +
+ + + + + +
+
+
+
+279
+280
+281
+282
+283
+284
+285
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 279
+
+def print_error_and_exit(err, code)
+  outputter.print_error(options || {}, err)
+rescue StandardError => e
+  puts "Caught exception #{e} while printing exception #{err}. Exiting."
+ensure
+  exit(code)
+end
+
+
+ +
+ + + + + +
+
+
+
+93
+94
+95
+96
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 93
+
+def print_help_and_exit
+  puts `NO_DB=true bundle exec inferno help execute`
+  exit(0)
+end
+
+
+ +
+

+ + #repo_symbol_to_array(repo_symbol) ⇒ Object + + + + + +

+ + + + +
+
+
+
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 258
+
+def repo_symbol_to_array(repo_symbol)
+  case repo_symbol
+  when :group
+    [test_groups_repo]
+  when :test
+    [tests_repo]
+  when :group_or_test
+    [test_groups_repo, tests_repo]
+  else
+    raise StandardError, "Unrecognized repo_symbol #{repo_symbol} for `find_by_short_id`"
+  end
+end
+
+
+ +
+

+ + #results_repoObject + + + + + +

+ + + + +
+
+
+
+180
+181
+182
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 180
+
+def results_repo
+  @results_repo ||= Inferno::Repositories::Results.new
+end
+
+
+ +
+

+ + #run(options) ⇒ Object + + + + + +

+ + + + +
+
+
+
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 42
+
+def run(options)
+  print_help_and_exit if options[:help]
+
+  self.options = options
+
+  outputter.print_start_message(self.options)
+
+  load_preset_file_and_set_preset_id
+
+  results = []
+  outputter.print_around_run(self.options) do
+    if all_selected_groups_and_tests.empty?
+      test_run = create_test_run(suite)
+      run_one(suite, test_run)
+
+      results = test_runs_repo.results_for_test_run(test_run.id)
+      results = sort_results(results)
+    else
+      all_selected_groups_and_tests.each do |runnable|
+        test_run = create_test_run(runnable)
+        run_one(runnable, test_run)
+
+        results += sort_results(test_runs_repo.results_for_test_run(test_run.id))
+      end
+    end
+  end
+
+  # User may enter duplicate runnables, in which case this prevents a bug of extraneous results
+  results.uniq!(&:id)
+
+  outputter.print_results(options, results)
+  outputter.print_end_message(options)
+
+  # TODO: respect customized rollups
+  exit(0) if Inferno::ResultSummarizer.new(results).summarize == 'pass'
+
+  # exit(1) is for Thor failures
+  # exit(2) is for shell builtin failures
+  exit(3)
+rescue Sequel::ValidationFailed => e
+  print_error_and_exit(e, 4)
+rescue Sequel::ForeignKeyConstraintViolation => e
+  print_error_and_exit(e, 5)
+rescue Inferno::Exceptions::RequiredInputsNotFound => e
+  print_error_and_exit(e, 6)
+rescue Inferno::Exceptions::NotUserRunnableException => e
+  print_error_and_exit(e, 7)
+rescue StandardError => e
+  print_error_and_exit(e, 8)
+end
+
+
+ +
+

+ + #run_one(runnable, test_run) ⇒ Object + + + + + +

+ + + + +
+
+
+
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 123
+
+def run_one(runnable, test_run)
+  verify_runnable(
+    runnable,
+    thor_hash_to_inputs_array(inputs_and_preset),
+    test_session.suite_options
+  )
+
+  persist_inputs(session_data_repo, create_params(test_session, suite), test_run)
+
+  dispatch_job(test_run)
+end
+
+
+ +
+

+ + #runnable_id_key(runnable) ⇒ Object + + + + + +

+ + + + +
+
+
+
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 299
+
+def runnable_id_key(runnable)
+  case runnable_type(runnable)
+  when :suite
+    :test_suite_id
+  when :group
+    :test_group_id
+  else
+    :test_id
+  end
+end
+
+
+ +
+

+ + #runnable_type(runnable) ⇒ Object + + + + + +

+ + + + +
+
+
+
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 287
+
+def runnable_type(runnable)
+  if runnable < Inferno::TestSuite
+    :suite
+  elsif runnable < Inferno::TestGroup
+    :group
+  elsif runnable < Inferno::Test
+    :test
+  else
+    raise StandardError, "Unidentified runnable #{runnable}"
+  end
+end
+
+
+ +
+

+ + #runnables_by_short_idObject + + + + + +

+ + + + +
+
+
+
+231
+232
+233
+234
+235
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 231
+
+def runnables_by_short_id
+  return [] if options[:short_ids].blank?
+
+  @runnables_by_short_id ||= options[:short_ids]&.map { |short_id| find_by_short_id(:group_or_test, short_id) }
+end
+
+
+ +
+

+ + #session_data_repoObject + + + + + +

+ + + + +
+
+
+
+196
+197
+198
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 196
+
+def session_data_repo
+  @session_data_repo ||= Inferno::Repositories::SessionData.new
+end
+
+
+ +
+

+ + #sort_results(results) ⇒ Object + + + + + +

+ + + + +
+
+
+
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 310
+
+def sort_results(results)
+  results.sort do |result, other|
+    if result.runnable < Inferno::TestSuite
+      -1
+    elsif other.runnable < Inferno::TestSuite
+      1
+    else
+      result.runnable.short_id <=> other.runnable.short_id
+    end
+  end
+end
+
+
+ +
+

+ + #suiteObject + + + + + +

+
+ + + +
+
+
+ +

Raises:

+
    + +
  • + + + (StandardError) + + + +
  • + +
+ +
+ + + + +
+
+
+
+162
+163
+164
+165
+166
+167
+168
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 162
+
+def suite
+  @suite ||= Inferno::Repositories::TestSuites.new.find(options[:suite])
+
+  raise StandardError, "Test suite #{options[:suite]} not found" if @suite.nil?
+
+  @suite
+end
+
+
+ +
+

+ + #test_groups_repoObject + + + + + +

+ + + + +
+
+
+
+184
+185
+186
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 184
+
+def test_groups_repo
+  @test_groups_repo ||= Inferno::Repositories::TestGroups.new
+end
+
+
+ +
+

+ + #test_runs_repoObject + + + + + +

+ + + + +
+
+
+
+170
+171
+172
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 170
+
+def test_runs_repo
+  @test_runs_repo ||= Inferno::Repositories::TestRuns.new
+end
+
+
+ +
+

+ + #test_sessionObject + + + + + +

+ + + + +
+
+
+
+204
+205
+206
+207
+208
+209
+210
+211
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 204
+
+def test_session
+  @test_session ||= test_sessions_repo.create({
+                                                test_suite_id: suite.id,
+                                                suite_options: thor_hash_to_suite_options_array(
+                                                  options[:suite_options]
+                                                )
+                                              })
+end
+
+
+ +
+

+ + #test_sessions_repoObject + + + + + +

+ + + + +
+
+
+
+192
+193
+194
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 192
+
+def test_sessions_repo
+  @test_sessions_repo ||= Inferno::Repositories::TestSessions.new
+end
+
+
+ +
+

+ + #testsObject + + + + + +

+ + + + +
+
+
+
+243
+244
+245
+246
+247
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 243
+
+def tests
+  return [] if options[:tests].blank?
+
+  @tests ||= options[:tests]&.map { |short_id| find_by_short_id(:test, short_id) }
+end
+
+
+ +
+

+ + #tests_repoObject + + + + + +

+ + + + +
+
+
+
+188
+189
+190
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 188
+
+def tests_repo
+  @tests_repo ||= Inferno::Repositories::Tests.new
+end
+
+
+ +
+

+ + #thor_hash_to_inputs_array(hash = {}) ⇒ Object + + + + + +

+ + + + +
+
+
+
+275
+276
+277
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 275
+
+def thor_hash_to_inputs_array(hash = {})
+  hash.to_a.map { |pair| { name: pair[0], value: pair[1] } }
+end
+
+
+ +
+

+ + #thor_hash_to_suite_options_array(hash = {}) ⇒ Object + + + + + +

+ + + + +
+
+
+
+271
+272
+273
+
+
# File 'lib/inferno/apps/cli/execute.rb', line 271
+
+def thor_hash_to_suite_options_array(hash = {})
+  hash.to_a.map { |pair| Inferno::DSL::SuiteOption.new({ id: pair[0], value: pair[1] }) }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Main.html b/docs/docs/Inferno/CLI/Main.html new file mode 100644 index 000000000..d3b1fb852 --- /dev/null +++ b/docs/docs/Inferno/CLI/Main.html @@ -0,0 +1,691 @@ + + + + + + + Class: Inferno::CLI::Main + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Main + + + +

+
+ +
+
Inherits:
+
+ Thor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/main.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
EXECUTE_HELP = + +
+
<<~END_OF_HELP.freeze
+  Run Inferno tests in the command line. Exits with 0 only if test entity passes.
+  Must be run with test kit as working directory.
+
+  You must have background services running: `bundle exec inferno services start`
+
+  You can view suite ids with: `bundle exec inferno suites`
+
+  You can select an output format with the `--outputter` option. Current outputters
+  are console (default), plain, quiet, and json. JSON-formatted output will copy
+  Inferno's REST API: https://inferno-framework.github.io/inferno-core/api-docs/#/Result.
+
+  Examples:
+
+      (These examples only work from within the inferno_core directory).
+
+      `bundle exec inferno execute --suite dev_validator \
+                                  --inputs "url:https://hapi.fhir.org/baseR4" \
+                                           patient_id:1234321`
+      => Outputs test results
+
+      `bundle exec inferno execute --suite dev_validator \
+                                   --inputs "url:https://hapi.fhir.org/baseR4" \
+                                            patient_id:1234321 \
+                                   --tests 1.01 1.02`
+      => Run specific tests from suite
+
+      `bundle exec inferno execute --suite dev_validator \
+                                   --inputs "url:https://hapi.fhir.org/baseR4" \
+                                            patient_id:1234321 \
+                                   --outputter json`
+      => Outputs test results in JSON
+END_OF_HELP
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ +
    + +
  • + + + .exit_on_failure? ⇒ Boolean + + + + + + + + + + + + + +

    https://github.com/rails/thor/issues/244 - Make Thor exit(1) on Errors/Exceptions.

    +
    + +
  • + + +
+ +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .exit_on_failure?Boolean + + + + + +

+
+

https://github.com/rails/thor/issues/244 - Make Thor exit(1) on Errors/Exceptions

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+195
+196
+197
+
+
# File 'lib/inferno/apps/cli/main.rb', line 195
+
+def self.exit_on_failure?
+  true
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #consoleObject + + + + + +

+ + + + +
+
+
+
+52
+53
+54
+55
+
+
# File 'lib/inferno/apps/cli/main.rb', line 52
+
+def console
+  Migration.new.run(Logger::INFO)
+  Console.new.run
+end
+
+
+ +
+

+ + #evaluate(ig_path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+
+
# File 'lib/inferno/apps/cli/main.rb', line 47
+
+def evaluate(ig_path)
+  Evaluate.new.evaluate(ig_path, options[:data_path], Logger::INFO)
+end
+
+
+ +
+

+ + #executeObject + + + + + +

+ + + + +
+
+
+
+189
+190
+191
+192
+
+
# File 'lib/inferno/apps/cli/main.rb', line 189
+
+def execute
+  Execute.boot_full_inferno
+  Execute.new.run(options.dup) # dup to unfreeze Thor options
+end
+
+
+ +
+

+ + #migrateObject + + + + + +

+ + + + +
+
+
+
+58
+59
+60
+
+
# File 'lib/inferno/apps/cli/main.rb', line 58
+
+def migrate
+  Migration.new.run
+end
+
+
+ +
+

+ + #startObject + + + + + +

+ + + + +
+
+
+
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+
+
# File 'lib/inferno/apps/cli/main.rb', line 67
+
+def start
+  Migration.new.run(Logger::INFO)
+
+  without_bundler do
+    command = 'foreman start --env=/dev/null'
+
+    if `gem list -i foreman`.chomp == 'false'
+      puts "You must install foreman with 'gem install foreman' prior to running Inferno."
+    end
+
+    if options[:watch]
+      if `gem list -i rerun`.chomp == 'false'
+        puts "You must install 'rerun' with 'gem install rerun' to restart on file changes."
+      end
+
+      command = "rerun \"#{command}\" --background"
+    end
+
+    exec command
+  end
+end
+
+
+ +
+

+ + #suitesObject + + + + + +

+ + + + +
+
+
+
+90
+91
+92
+
+
# File 'lib/inferno/apps/cli/main.rb', line 90
+
+def suites
+  Suites.new.run
+end
+
+
+ +
+

+ + #versionObject + + + + + +

+ + + + +
+
+
+
+103
+104
+105
+
+
# File 'lib/inferno/apps/cli/main.rb', line 103
+
+def version
+  puts "Inferno Core v#{Inferno::VERSION}"
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Migration.html b/docs/docs/Inferno/CLI/Migration.html new file mode 100644 index 000000000..05de6c393 --- /dev/null +++ b/docs/docs/Inferno/CLI/Migration.html @@ -0,0 +1,197 @@ + + + + + + + Class: Inferno::CLI::Migration + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Migration + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/migration.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #run(log_level = Logger::DEBUG) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/cli/migration.rb', line 6
+
+def run(log_level = Logger::DEBUG)
+  Inferno::Application.start(:logging)
+  Inferno::Application['logger'].level = log_level
+
+  Utils::Migration.new.run
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/New.html b/docs/docs/Inferno/CLI/New.html new file mode 100644 index 000000000..729670ec9 --- /dev/null +++ b/docs/docs/Inferno/CLI/New.html @@ -0,0 +1,381 @@ + + + + + + + Class: Inferno::CLI::New + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::New + + + +

+
+ +
+
Inherits:
+
+ Thor::Group + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
Utils::IgDownloader, Utils::NamedThorActions, Thor::Actions
+
+ + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/new.rb
+
+ +
+ + + + +

Constant Summary

+ +

Constants included + from Utils::IgDownloader

+

Utils::IgDownloader::FHIR_PACKAGE_NAME_REG_EX, Utils::IgDownloader::FILE_URI_REG_EX, Utils::IgDownloader::HTTP_URI_END_REG_EX, Utils::IgDownloader::HTTP_URI_REG_EX

+ + + +

Constants included + from Utils::NamedThorActions

+

Utils::NamedThorActions::INFLECTOR

+ + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from Utils::IgDownloader

+

#ig_file, #ig_http_url, #ig_path, #ig_registry_url, #load_ig

+ + + + + + + + + +

Methods included from Utils::NamedThorActions

+

#human_name, #library_name, #module_name, #root_name, #test_kit_id, #test_suite_id, #title_name

+ + + + +
+

Class Method Details

+ + +
+ + + + + +
+
+
+
+37
+38
+39
+
+
# File 'lib/inferno/apps/cli/new.rb', line 37
+
+def self.banner
+  'inferno new TEST_KIT_NAME'
+end
+
+
+ +
+

+ + .source_rootObject + + + + + +

+ + + + +
+
+
+
+41
+42
+43
+
+
# File 'lib/inferno/apps/cli/new.rb', line 41
+
+def self.source_root
+  File.join(__dir__, 'templates')
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #create_test_kitObject + + + + + +

+ + + + +
+
+
+
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+
+
# File 'lib/inferno/apps/cli/new.rb', line 68
+
+def create_test_kit
+  directory('.', root_name, { mode: :preserve, recursive: true, verbose: !options['quiet'] })
+
+  inside(root_name) do
+    bundle_install
+    inferno_migrate
+    load_igs
+  end
+
+  say_unless_quiet "Created #{root_name} Inferno Test Kit!", :green
+
+  return unless options['pretend']
+
+  say_unless_quiet 'This was a dry run; re-run without `--pretend` to actually create project',
+                   :yellow
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Services.html b/docs/docs/Inferno/CLI/Services.html new file mode 100644 index 000000000..4f04abf1b --- /dev/null +++ b/docs/docs/Inferno/CLI/Services.html @@ -0,0 +1,420 @@ + + + + + + + Class: Inferno::CLI::Services + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Services + + + +

+
+ +
+
Inherits:
+
+ Thor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/services.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #buildObject + + + + + +

+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/inferno/apps/cli/services.rb', line 28
+
+def build
+  system "#{base_command} build"
+end
+
+
+ +
+

+ + #logsObject + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+50
+51
+52
+53
+
+
# File 'lib/inferno/apps/cli/services.rb', line 47
+
+def logs
+  command = "#{base_command} logs"
+  command += ' -f' if options[:follow]
+  command += " --tail #{options[:tail]}" if options[:tail]
+
+  system command
+end
+
+
+ +
+

+ + #pullObject + + + + + +

+ + + + +
+
+
+
+33
+34
+35
+
+
# File 'lib/inferno/apps/cli/services.rb', line 33
+
+def pull
+  system "#{base_command} pull"
+end
+
+
+ +
+

+ + #startObject + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+
+
# File 'lib/inferno/apps/cli/services.rb', line 15
+
+def start
+  command = "#{base_command} up"
+  command += ' -d' unless options[:foreground]
+
+  system command
+end
+
+
+ +
+

+ + #stopObject + + + + + +

+ + + + +
+
+
+
+23
+24
+25
+
+
# File 'lib/inferno/apps/cli/services.rb', line 23
+
+def stop
+  system "#{base_command} down"
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Suite.html b/docs/docs/Inferno/CLI/Suite.html new file mode 100644 index 000000000..55697339c --- /dev/null +++ b/docs/docs/Inferno/CLI/Suite.html @@ -0,0 +1,303 @@ + + + + + + + Class: Inferno::CLI::Suite + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Suite + + + +

+
+ +
+
Inherits:
+
+ Thor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/suite.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #describe(suite_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+
+
# File 'lib/inferno/apps/cli/suite.rb', line 25
+
+def describe(suite_id)
+  ENV['NO_DB'] = 'true'
+  Inferno::Application.start(:suites)
+
+  suite = Inferno::Repositories::TestSuites.new.find(suite_id)
+
+  if suite.blank?
+    message = "No suite found with id `#{suite_id}`. Run `inferno suites` to see a list of available suites"
+
+    puts TTY::Markdown.parse(message)
+    return
+  end
+
+  description = ''
+  description += "# #{suite.title}\n"
+  description += "#{suite.description}\n" if suite.description
+
+  if suite.suite_options.present?
+    description += "***\n\n"
+    description += "# Suite Options\n\n"
+    suite.suite_options.each do |option|
+      description += "* `#{option.id}`: #{option.title}\n"
+      option.list_options.each do |list_option|
+        description += "  * `#{list_option[:value]}`: #{list_option[:label]}\n"
+      end
+    end
+  end
+
+  puts TTY::Markdown.parse(description)
+end
+
+
+ +
+

+ + #input_template(suite_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+16
+17
+18
+19
+
+
# File 'lib/inferno/apps/cli/suite.rb', line 16
+
+def input_template(suite_id)
+  ENV['NO_DB'] = 'true'
+  SuiteInputTemplate.new.run(suite_id, options)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/SuiteInputTemplate.html b/docs/docs/Inferno/CLI/SuiteInputTemplate.html new file mode 100644 index 000000000..370a1fb39 --- /dev/null +++ b/docs/docs/Inferno/CLI/SuiteInputTemplate.html @@ -0,0 +1,229 @@ + + + + + + + Class: Inferno::CLI::SuiteInputTemplate + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::SuiteInputTemplate + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/suite_input_template.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #run(suite_id, options) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+
+
# File 'lib/inferno/apps/cli/suite_input_template.rb', line 6
+
+def run(suite_id, options)
+  require_relative '../../../inferno'
+
+  Inferno::Application.start(:suites)
+
+  suite = Inferno::Repositories::TestSuites.new.find(suite_id)
+  if suite.nil?
+    puts "No Test Suite found with id: #{suite_id}"
+    return 1
+  end
+
+  output = JSON.pretty_generate(Inferno::Utils::PresetTemplateGenerator.new(suite).generate)
+
+  if options[:filename].present?
+    path = File.join(Dir.pwd, 'config', 'presets', options[:filename])
+    FileUtils.mkdir_p(File.dirname(path))
+
+    File.open(path, 'w') { |f| f.puts(output) }
+  else
+    puts output
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Suites.html b/docs/docs/Inferno/CLI/Suites.html new file mode 100644 index 000000000..a117b7219 --- /dev/null +++ b/docs/docs/Inferno/CLI/Suites.html @@ -0,0 +1,231 @@ + + + + + + + Class: Inferno::CLI::Suites + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Suites + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/suites.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runObject + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
+
# File 'lib/inferno/apps/cli/suites.rb', line 6
+
+def run
+  ENV['NO_DB'] = 'true'
+
+  require_relative '../../../inferno'
+
+  Inferno::Application.start(:suites)
+
+  suites = Inferno::Repositories::TestSuites.new.all
+  suite_hash = suites.each_with_object({}) { |suite, hash| hash[suite.id] = suite.title }
+
+  id_column_length = suite_hash.keys.map(&:length).max + 2
+  title_column_length = suite_hash.values.map(&:length).max + 1
+
+  output = ''
+  output += "| #{'Title'.ljust(title_column_length)}| #{'ID'.ljust(id_column_length)}|\n"
+  output += "|-#{'-' * title_column_length}|-#{'-' * id_column_length}|\n"
+
+  suite_hash.each do |id, title|
+    output += "| #{title.ljust(title_column_length)}| #{id.ljust(id_column_length)}|\n"
+  end
+
+  puts TTY::Markdown.parse(output)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL.html b/docs/docs/Inferno/DSL.html new file mode 100644 index 000000000..d84b83a43 --- /dev/null +++ b/docs/docs/Inferno/DSL.html @@ -0,0 +1,167 @@ + + + + + + + Module: Inferno::DSL + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::Test
+
+ + + +
+
Defined in:
+
lib/inferno/dsl.rb,
+ lib/inferno/dsl/jwks.rb,
lib/inferno/dsl/links.rb,
lib/inferno/dsl/results.rb,
lib/inferno/dsl/messages.rb,
lib/inferno/dsl/runnable.rb,
lib/inferno/dsl/auth_info.rb,
lib/inferno/dsl/assertions.rb,
lib/inferno/dsl/fhir_client.rb,
lib/inferno/dsl/http_client.rb,
lib/inferno/dsl/configurable.rb,
lib/inferno/dsl/suite_option.rb,
lib/inferno/dsl/suite_endpoint.rb,
lib/inferno/dsl/fhir_validation.rb,
lib/inferno/dsl/request_storage.rb,
lib/inferno/dsl/oauth_credentials.rb,
lib/inferno/dsl/resume_test_route.rb,
lib/inferno/dsl/fhir_client_builder.rb,
lib/inferno/dsl/fhirpath_evaluation.rb,
lib/inferno/dsl/http_client_builder.rb,
lib/inferno/dsl/fhir_evaluation/rule.rb,
lib/inferno/dsl/input_output_handling.rb,
lib/inferno/dsl/tcp_exception_handler.rb,
lib/inferno/dsl/fhir_evaluation/config.rb,
lib/inferno/dsl/fhir_resource_validation.rb,
lib/inferno/dsl/fhir_evaluation/evaluator.rb,
lib/inferno/dsl/fhir_evaluation/dataset_loader.rb,
lib/inferno/dsl/fhir_evaluation/evaluation_result.rb,
lib/inferno/dsl/fhir_evaluation/evaluation_context.rb
+
+
+ +
+ +

Overview

+
+

The DSL for writing tests.

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: Assertions, Configurable, FHIRClient, FHIREvaluation, FHIRResourceValidation, FHIRValidation, FhirpathEvaluation, HTTPClient, InputOutputHandling, Links, Messages, RequestStorage, Results, Runnable + + + + Classes: AuthInfo, FHIRClientBuilder, HTTPClientBuilder, JWKS, OAuthCredentials, SuiteEndpoint, SuiteOption + + +

+ + +

+ Constant Summary + collapse +

+ +
+ +
INCLUDABLE_DSL_MODULES = + +
+
[
+  Assertions,
+  FHIRClient,
+  HTTPClient,
+  Results,
+  FHIRValidation,
+  FHIREvaluation,
+  FHIRResourceValidation,
+  FhirpathEvaluation,
+  Messages
+].freeze
+ +
EXTENDABLE_DSL_MODULES = + +
+
[
+  Runnable
+].freeze
+ +
+ + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Assertions.html b/docs/docs/Inferno/DSL/Assertions.html new file mode 100644 index 000000000..1b55f1f5f --- /dev/null +++ b/docs/docs/Inferno/DSL/Assertions.html @@ -0,0 +1,1040 @@ + + + + + + + Module: Inferno::DSL::Assertions + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Assertions + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/assertions.rb
+
+ +
+ +

Overview

+
+

This module contains the assertions used within tests to verify the +behavior of the systems under test. Failing an assertion causes a test to +immediately stop execution and receive a fail result. Additional +assertions added to this module will be available in all tests.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #assert(test, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Make an assertion

+ + +
+
+
+

Parameters:

+
    + +
  • + + test + + + + + + + — +

    a value whose truthiness will determine whether the +assertion passes or fails

    +
    + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + + — +

    failure message

    +
    + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/inferno/dsl/assertions.rb', line 16
+
+def assert(test, message = '')
+  raise Exceptions::AssertionException, message unless test
+end
+
+
+ +
+

+ + #assert_resource_type(resource_type, resource: self.resource) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check a FHIR resource’s type

+ + +
+
+
+ +
+

Examples:

+ + +
# The resource type can be a symbol, String, or FHIR::Model class
+assert_resource_type(:capability_statement)
+assert_resource_type('CapabilityStatement')
+assert_resource_type(FHIR::CapabilityStatement)
+ +
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + resource + + + (FHIR::Model) + + + (defaults to: self.resource) + + +
  • + +
+ + +
+ + + + +
+
+
+
+52
+53
+54
+55
+56
+57
+
+
# File 'lib/inferno/dsl/assertions.rb', line 52
+
+def assert_resource_type(resource_type, resource: self.resource)
+  resource_type_name = normalize_resource_type(resource_type)
+
+  assert resource&.resourceType == resource_type_name,
+         bad_resource_type_message(resource_type_name, resource&.resourceType)
+end
+
+
+ +
+

+ + #assert_response_content_type(type, request: self.request) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check the Content-Type header of a response. This assertion will fail if +the response’s content type does not begin with the provided type.

+ + +
+
+
+

Parameters:

+
    + +
  • + + type + + + (String) + + + +
  • + +
  • + + request + + + (Inferno::Entities::Request) + + + (defaults to: self.request) + + +
  • + +
+ + +
+ + + + +
+
+
+
+184
+185
+186
+187
+188
+189
+
+
# File 'lib/inferno/dsl/assertions.rb', line 184
+
+def assert_response_content_type(type, request: self.request)
+  header = request.response_header('Content-Type')
+  assert header.present?, no_content_type_message
+
+  assert header.value.start_with?(type), bad_content_type_message(type, header.value)
+end
+
+
+ +
+

+ + #assert_response_status(status, request: self.request, response: nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check a response’s status

+ + +
+
+
+

Parameters:

+
    + +
  • + + status + + + (Integer, Array<Integer>) + + + + — +

    a single integer or an array of +integer status codes

    +
    + +
  • + +
  • + + request + + + (Inferno::Entities::Request) + + + (defaults to: self.request) + + +
  • + +
  • + + response + + + (Hash) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+32
+33
+34
+35
+
+
# File 'lib/inferno/dsl/assertions.rb', line 32
+
+def assert_response_status(status, request: self.request, response: nil)
+  response ||= request&.response
+  assert Array.wrap(status).include?(response[:status]), bad_response_status_message(status, response[:status])
+end
+
+
+ +
+

+ + #assert_valid_bundle_entries(bundle: resource, resource_types: {}) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Validate each entry of a Bundle

+ +

[String,Symbol,FHIR::Model,Array<String,Symbol,FHIR::Model>,Hash] If a + string, symbol, or FHIR::Model is provided, only that resource type + will be validated. If an array of strings is provided, only those + resource types will be validated. If a hash is provided with resource + types as keys and profile urls (or nil) as values, only those resource + types will be validated against the provided profile url or the base + resource if nil.

+ + +
+
+
+ +
+

Examples:

+ + +
# Only validate Patient bundle entries
+assert_valid_bundle_entries(resource_types: 'Patient')
+
+# Only valiadte Patient and Condition bundle entries
+assert_valid_bundle_entries(resource_types: ['Patient', 'Condition'])
+
+# Only validate Patient and Condition bundle entries. Validate Patient
+# resources against the given profile, and Codition resources against the
+# base FHIR Condition resource.
+assert_valid_bundle_entries(
+  resource_types: {
+    'Patient': 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient',
+    'Condition': nil
+  }
+)
+ +
+

Parameters:

+
    + +
  • + + bundle + + + (FHIR::Bundle) + + + (defaults to: resource) + + +
  • + +
  • + + resource_types + + + + + + (defaults to: {}) + + +
  • + +
+ + +
+ + + + +
+
+
+
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+
+
# File 'lib/inferno/dsl/assertions.rb', line 106
+
+def assert_valid_bundle_entries(bundle: resource, resource_types: {})
+  assert_resource_type('Bundle', resource: bundle)
+
+  types_to_check = normalize_types_to_check(resource_types)
+
+  invalid_resources =
+    bundle
+      .entry
+      .map(&:resource)
+      .select { |resource| types_to_check.empty? || types_to_check.include?(resource.resourceType) }
+      .reject do |resource|
+        validation_params = { resource: }
+        profile = types_to_check[resource.resourceType]
+        validation_params[:profile_url] = profile if profile
+
+        resource_is_valid?(**validation_params)
+      end
+
+  assert invalid_resources.empty?, invalid_bundle_entries_message(invalid_resources)
+end
+
+
+ +
+

+ + #assert_valid_http_uri(uri, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check for a valid http/https uri

+ + +
+
+
+

Parameters:

+
    + +
  • + + uri + + + (String) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + + — +

    custom failure message

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+173
+174
+175
+176
+
+
# File 'lib/inferno/dsl/assertions.rb', line 173
+
+def assert_valid_http_uri(uri, message = '')
+  error_message = message.presence || "\"#{uri}\" is not a valid URI"
+  assert uri =~ /\A#{URI::DEFAULT_PARSER.make_regexp(['http', 'https'])}\z/, error_message
+end
+
+
+ +
+

+ + #assert_valid_json(maybe_json_string, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check for valid JSON

+ + +
+
+
+

Parameters:

+
    + +
  • + + maybe_json_string + + + (String) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + + — +

    extra failure message

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+162
+163
+164
+165
+166
+
+
# File 'lib/inferno/dsl/assertions.rb', line 162
+
+def assert_valid_json(maybe_json_string, message = '')
+  assert JSON.parse(maybe_json_string)
+rescue JSON::ParserError
+  assert false, "Invalid JSON. #{message}"
+end
+
+
+ +
+

+ + #assert_valid_resource(resource: self.resource, profile_url: nil, validator: :default) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Validate a FHIR resource

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + (defaults to: self.resource) + + +
  • + +
  • + + profile_url + + + (String) + + + (defaults to: nil) + + + — +

    url of the profile to validate against, +defaults to validating against the base FHIR resource

    +
    + +
  • + +
  • + + validator + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the validator to use

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+73
+74
+75
+76
+
+
# File 'lib/inferno/dsl/assertions.rb', line 73
+
+def assert_valid_resource(resource: self.resource, profile_url: nil, validator: :default)
+  assert resource_is_valid?(resource:, profile_url:, validator:),
+         invalid_resource_message(resource, profile_url)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/AuthInfo.html b/docs/docs/Inferno/DSL/AuthInfo.html new file mode 100644 index 000000000..2ebd61a07 --- /dev/null +++ b/docs/docs/Inferno/DSL/AuthInfo.html @@ -0,0 +1,1421 @@ + + + + + + + Class: Inferno::DSL::AuthInfo + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::AuthInfo + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/auth_info.rb
+
+ +
+ +

Overview

+
+

AuthInfo provides a user with a single input which contains the information +needed for a FHIR client to perform authorization and refresh an access +token when necessary.

+ +

AuthInfo supports the following auth_type:

+ +
    +
  • public - Client id only
  • +
  • symmetric - Confidential symmetric (i.e., with a static client id and +secret)
  • +
  • asymmetric - Confidential asymmetric (i.e., a client id with a signed +JWT rather than a client secret)
  • +
  • backend_services
  • +
+ +

When configuring an AuthInfo input, the invdidual fields are exposed as +components in the input’s options, and can be configured there similar +to normal inputs.

+ +

The AuthInfo input type supports two different modes in the UI. Different +fields will be presented to the user depending on which mode is selected:

+ +
    +
  • auth - This presents the inputs needed to perform authorization, and +is appropriate to use as an input to test groups which perform +authorization.
  • +
  • access - This presents the inputs needed to access resources assuming +that authorization has already happened, and is appropriate to use as an +input to test groups which access resources using previously granted +authorization.
  • +
+ + +
+
+
+ +
+

Examples:

+ + +
class AuthInfoExampleSuite < Inferno::TestSuite
+  input :url,
+        title: 'Base FHIR url'
+
+  group do
+    title 'Perform public authorization'
+    input :fhir_auth,
+          type: :auth_info,
+          options: {
+            mode: 'auth',
+            components: [
+              {
+                name: :auth_type,
+                default: 'public',
+                locked: true
+              }
+            ]
+          }
+
+    # Some tests here to perform authorization
+  end
+
+  group do
+    title 'FHIR API Tests'
+    input :fhir_auth,
+          type: :auth_info,
+          options: {
+            mode: 'access'
+          }
+
+    fhir_client do
+      url :url
+      auth_info :fhir_auth
+    end
+
+    # Some tests here to access FHIR API
+  end
+end
+ +
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :auth_type,
+  :use_discovery,
+  :token_url,
+  :auth_url,
+  :requested_scopes,
+  :client_id,
+  :client_secret,
+  :redirect_url, # TODO: does this belong here?
+  :pkce_support,
+  :pkce_code_challenge_method,
+  :auth_request_method,
+  :encryption_algorithm,
+  :kid,
+  :jwks,
+  :access_token,
+  :refresh_token,
+  :issue_time,
+  :expires_in,
+  :name
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #access_tokenObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #auth_request_methodObject + + + + + +

+
+

The http method which will be used to perform the request to the authorization endpoint. +Either get (default) or post

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #auth_typeObject + + + + + +

+
+

The type of authorization to be performed. One of public, symmetric, asymmetric, or backend_services

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #auth_urlObject + + + + + +

+
+

The url of the authorization endpoint

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #clientObject + + + + + +

+
+

Returns the value of attribute client.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+98
+99
+100
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 98
+
+def client
+  @client
+end
+
+
+ + + +
+

+ + #client_idObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #client_secretObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #encryption_algorithmObject + + + + + +

+
+

The encryption algorithm which will be used to sign the JWT client credentials. +Either es384 (default) or rs384

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #expires_inObject + + + + + +

+
+

The lifetime of the access token in seconds

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #issue_timeObject + + + + + +

+
+

An iso8601 formatted string representing the time the access token was issued

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #jwksObject + + + + + +

+
+

A JWKS (including private keys) which will be used instead of Inferno’s default JWKS if provided

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #kidObject + + + + + +

+
+

The key id for the keys to be used to sign the JWT client credentials. +When blank, the first key for the selected encryption algorithm will be used

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #nameObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #pkce_code_challenge_methodObject + + + + + +

+
+

Either S256 (default) or plain

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #pkce_supportObject + + + + + +

+
+

Whether PKCE will be used during authorization. Either enabled or disabled.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #redirect_urlObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #refresh_tokenObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #requested_scopesObject + + + + + +

+
+

The scopes which will be requested during authorization

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ + + +
+

+ + #token_urlObject + + + + + +

+
+

The url of the auth server’s token endpoint

+ + +
+
+
+ + +
+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/auth_info.rb', line 100
+
+
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Configurable.html b/docs/docs/Inferno/DSL/Configurable.html new file mode 100644 index 000000000..298b341b5 --- /dev/null +++ b/docs/docs/Inferno/DSL/Configurable.html @@ -0,0 +1,328 @@ + + + + + + + Module: Inferno::DSL::Configurable + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Configurable + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/configurable.rb
+
+ +
+ +

Overview

+
+

This module contains the DSL for managing runnable configuration. Runnable +configuration provides a way to modify test behavior at boot time.

+ +

The main features enabled by configuration are:

+ +
    +
  • Modifying the properties of a runnable’s inputs. This could include +locking a particular input, making a particular input optional/required, +or changing an input’s value.
  • +
  • Renaming an input/output/request to avoid name collisions when a test +suite uses the same test multiple times.
  • +
  • Tests can define custom configuration options to enable different
  • +
  • testing behavior.
  • +
+ + +
+
+
+ +
+

Examples:

+ + +
test do
+  id :json_request_test
+
+  input :url
+  output :response_body
+  makes_request :json_request
+
+  run do
+    if config.options[:include_content_type]
+      get url, headers: { 'Content-Type' => 'application/json' }
+    else
+      get url
+    end
+
+    assert_response_status(200)
+    output response_body: request.response_body
+    assert_valid_json
+  end
+end
+
+group do
+  test from :json_request_test do
+    id :json_request_without_content_type
+
+    config(
+      inputs: {
+        url: { name: :url_without_content_type }
+      },
+      outputs: {
+        response_body: { name: :response_body_without_content_type }
+      },
+      requests: {
+        json_request: { name: :json_request_without_content_type }
+      }
+    )
+  end
+
+  test from :json_request_test do
+    id :json_request_with_content_type
+
+    config(
+      options: {
+        include_content_type: true
+      },
+      inputs: {
+        url: { name: :url_with_content_type }
+      },
+      outputs: {
+        response_body: { name: :response_body_with_content_type }
+      },
+      requests: {
+        json_request: { name: :json_request_with_content_type }
+      }
+    )
+  end
+end
+ +
+ + +

Defined Under Namespace

+

+ + + + + Classes: Configuration + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #config(new_configuration = {}) ⇒ Inferno::DSL::Configurable::Configuration + + + + + +

+
+

Define/update/get the configuration for a runnable. This configuration +will be applied to the runnable and all of its children.

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_configuration + + + (Hash) + + + (defaults to: {}) + + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+
+
# File 'lib/inferno/dsl/configurable.rb', line 86
+
+def config(new_configuration = {})
+  @config ||= Configuration.new
+
+  return @config if new_configuration.blank?
+
+  @config.apply(new_configuration)
+
+  all_children.each { |child| child.config(new_configuration) }
+
+  @config
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Configurable/Configuration.html b/docs/docs/Inferno/DSL/Configurable/Configuration.html new file mode 100644 index 000000000..8363b12b5 --- /dev/null +++ b/docs/docs/Inferno/DSL/Configurable/Configuration.html @@ -0,0 +1,532 @@ + + + + + + + Class: Inferno::DSL::Configurable::Configuration + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::Configurable::Configuration + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/configurable.rb
+
+ +
+ +

Overview

+
+

This class stores a runnable’s configuration. It should never be +directly instantiated within a test suite. Instead, a runnable’s +configuration can be modified or retrieved using the config method.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ +
    + +
  • + + + #inputs ⇒ Hash + + + + + + + + + + + + + +

    The input configuration for this runnable.

    +
    + +
  • + + +
  • + + + #options ⇒ Hash + + + + + + + + + + + + + +

    The configuration options defined for this runnable.

    +
    + +
  • + + +
  • + + + #outputs ⇒ Hash + + + + + + + + + + + + + +

    The output configuration for this runnable.

    +
    + +
  • + + +
  • + + + #requests ⇒ Hash + + + + + + + + + + + + + +

    The request configuration for this runnable.

    +
    + +
  • + + +
+ + + +
+

Instance Attribute Details

+ + + +
+

+ + #configurationObject + + + + + +

+
+

Returns the value of attribute configuration.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+102
+103
+104
+
+
# File 'lib/inferno/dsl/configurable.rb', line 102
+
+def configuration
+  @configuration
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #inputsHash + + + + + +

+
+

The input configuration for this runnable.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + +
  • + +
+ +
+ + + + +
+
+
+
+137
+138
+139
+
+
# File 'lib/inferno/dsl/configurable.rb', line 137
+
+def inputs
+  configuration[:inputs] ||= {}
+end
+
+
+ +
+

+ + #optionsHash + + + + + +

+
+

The configuration options defined for this runnable.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + +
  • + +
+ +
+ + + + +
+
+
+
+128
+129
+130
+
+
# File 'lib/inferno/dsl/configurable.rb', line 128
+
+def options
+  configuration[:options] ||= {}
+end
+
+
+ +
+

+ + #outputsHash + + + + + +

+
+

The output configuration for this runnable.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + +
  • + +
+ +
+ + + + +
+
+
+
+190
+191
+192
+
+
# File 'lib/inferno/dsl/configurable.rb', line 190
+
+def outputs
+  configuration[:outputs] ||= {}
+end
+
+
+ +
+

+ + #requestsHash + + + + + +

+
+

The request configuration for this runnable.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + +
  • + +
+ +
+ + + + +
+
+
+
+230
+231
+232
+
+
# File 'lib/inferno/dsl/configurable.rb', line 230
+
+def requests
+  configuration[:requests] ||= {}
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRClient.html b/docs/docs/Inferno/DSL/FHIRClient.html new file mode 100644 index 000000000..b5bd73c61 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRClient.html @@ -0,0 +1,2190 @@ + + + + + + + Module: Inferno::DSL::FHIRClient + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRClient + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_client.rb
+
+ +
+ +

Overview

+
+

This module contains the FHIR DSL available to test writers.

+ + +
+
+
+ +
+

Examples:

+ + +
class MyTestGroup < Inferno::TestGroup
+  # create a "default" client for a group
+  fhir_client do
+    url 'https://example.com/fhir'
+  end
+
+  # create a named client for a group
+  fhir_client :with_custom_header do
+    url 'https://example.com/fhir'
+    headers 'X-my-custom-header': 'ABC123'
+  end
+
+  test :some_test do
+    run do
+      # uses the default client
+      fhir_read('Patient', 5)
+
+      # uses a named client
+      fhir_read('Patient', 5, client: :with_custom_header)
+
+      request  # the most recent request
+      response # the most recent response
+      resource # the resource from the most recent response
+      requests # all of the requests which have been made in this test
+    end
+  end
+end
+ +
+ + +

See Also:

+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #fhir_client(client = :default) ⇒ FHIR::Client + + + + + +

+
+

Return a previously defined FHIR client

+ + +
+
+
+

Parameters:

+
    + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the client

    +
    + +
  • + +
+ +

Returns:

+ + +

See Also:

+ + +
+ + + + +
+
+
+
+53
+54
+55
+56
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 53
+
+def fhir_client(client = :default)
+  fhir_clients[client] ||=
+    FHIRClientBuilder.new.build(self, self.class.fhir_client_definitions[client])
+end
+
+
+ +
+

+ + #fhir_create(resource, client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR create interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+158
+159
+160
+161
+162
+163
+164
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 158
+
+def fhir_create(resource, client: :default, name: nil, tags: [])
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      fhir_client(client).create(resource)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_delete(resource_type, id, client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR delete interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+305
+306
+307
+308
+309
+310
+311
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 305
+
+def fhir_delete(resource_type, id, client: :default, name: nil, tags: [])
+  store_request('outgoing', name:, tags:) do
+    tcp_exception_handler do
+      fhir_client(client).destroy(fhir_class_from_resource_type(resource_type), id)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_get_capability_statement(client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Fetch the capability statement.

+ + +
+
+
+

Parameters:

+
    + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+141
+142
+143
+144
+145
+146
+147
+148
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 141
+
+def fhir_get_capability_statement(client: :default, name: nil, tags: [])
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      fhir_client(client).conformance_statement
+      fhir_client(client).reply
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_history(resource_type = nil, id = nil, client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR history interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + (defaults to: nil) + + +
  • + +
  • + + id + + + (String) + + + (defaults to: nil) + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 245
+
+def fhir_history(resource_type = nil, id = nil, client: :default, name: nil, tags: [])
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      if id
+        fhir_client(client).resource_instance_history(fhir_class_from_resource_type(resource_type), id)
+      elsif resource_type
+        fhir_client(client).resource_history(fhir_class_from_resource_type(resource_type))
+      else
+        fhir_client(client).all_history
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_operation(path, body: nil, client: :default, name: nil, headers: {}, operation_method: :post, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+ +
+ Note: +

This is a placeholder method until the FHIR::Client supports +general operations. Note that while both POST and GET methods are allowed, +GET is only allowed when the operation does not affect the server’s state. +See https://build.fhir.org/operationdefinition-definitions.html#OperationDefinition.affectsState

+
+
+ +
+ Note: +

Currently does not allow for repeated parameters if using GET

+
+
+ +

Perform a FHIR operation

+ + +
+
+
+

Parameters:

+
    + +
  • + + path + + + (String) + + + +
  • + +
  • + + body + + + (FHIR::Parameters) + + + (defaults to: nil) + + + — +

    Must all be primitive if making GET request

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: {}) + + + — +

    custom headers for this operation

    +
    + +
  • + +
  • + + operation_method + + + (Symbol) + + + (defaults to: :post) + + + — +

    indicates which request type to use for the operation

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 106
+
+def fhir_operation(
+  path,
+  body: nil,
+  client: :default,
+  name: nil,
+  headers: {},
+  operation_method: :post,
+  tags: []
+)
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      operation_headers = fhir_client(client).fhir_headers
+      operation_headers.merge!('Content-Type' => 'application/fhir+json') if body.present?
+      operation_headers.merge!(headers) if headers.present?
+      case operation_method
+      when :post
+        fhir_client(client).send(:post, path, body, operation_headers)
+      when :get
+        path = "#{path}?#{body_to_path(body)}" if body.present?
+        fhir_client(client).send(:get, path, operation_headers)
+      else
+        Inferno::Application[:logger].error "Cannot perform #{operation_method} requests, use GET or POST"
+        raise ArgumentError, "Cannot perform #{operation_method} requests, use GET or POST"
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_patch(resource_type, id, patchset, client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR patch interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + patchset + + + (Array) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+228
+229
+230
+231
+232
+233
+234
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 228
+
+def fhir_patch(resource_type, id, patchset, client: :default, name: nil, tags: [])
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      fhir_client(client).partial_update(fhir_class_from_resource_type(resource_type), id, patchset)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_read(resource_type, id, client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR read interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+175
+176
+177
+178
+179
+180
+181
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 175
+
+def fhir_read(resource_type, id, client: :default, name: nil, tags: [])
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      fhir_client(client).read(fhir_class_from_resource_type(resource_type), id)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_search(resource_type = nil, client: :default, params: {}, name: nil, search_method: :get, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR search interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + (defaults to: nil) + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + params + + + (Hash) + + + (defaults to: {}) + + + — +

    the search params

    +
    + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + search_method + + + (Symbol) + + + (defaults to: :get) + + + — +

    Use :post to search via POST

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 269
+
+def fhir_search(
+  resource_type = nil,
+  client: :default,
+  params: {},
+  name: nil,
+  search_method: :get,
+  tags: []
+)
+  search =
+    if search_method == :post
+      { body: params }
+    else
+      { parameters: params }
+    end
+
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      if resource_type
+        fhir_client(client)
+          .search(fhir_class_from_resource_type(resource_type), { search: })
+      else
+        fhir_client(client).search_all({ search: })
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_transaction(bundle = nil, client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR batch/transaction interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + bundle + + + (FHIR::Bundle) + + + (defaults to: nil) + + + — +

    the FHIR batch/transaction Bundle

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+321
+322
+323
+324
+325
+326
+327
+328
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 321
+
+def fhir_transaction(bundle = nil, client: :default, name: nil, tags: [])
+  store_request('outgoing', name:, tags:) do
+    tcp_exception_handler do
+      fhir_client(client).transaction_bundle = bundle if bundle.present?
+      fhir_client(client).end_transaction
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_update(resource, id, client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR update interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+210
+211
+212
+213
+214
+215
+216
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 210
+
+def fhir_update(resource, id, client: :default, name: nil, tags: [])
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      fhir_client(client).update(resource, id)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_vread(resource_type, id, version_id, client: :default, name: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR vread interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + version_id + + + (String) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+193
+194
+195
+196
+197
+198
+199
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 193
+
+def fhir_vread(resource_type, id, version_id, client: :default, name: nil, tags: [])
+  store_request_and_refresh_token(fhir_client(client), name, tags) do
+    tcp_exception_handler do
+      fhir_client(client).vread(fhir_class_from_resource_type(resource_type), id, version_id)
+    end
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRClient/ClassMethods.html b/docs/docs/Inferno/DSL/FHIRClient/ClassMethods.html new file mode 100644 index 000000000..4963ce7a1 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRClient/ClassMethods.html @@ -0,0 +1,234 @@ + + + + + + + Module: Inferno::DSL::FHIRClient::ClassMethods + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRClient::ClassMethods + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/fhir_client.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #fhir_client(name = :default, &block) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define a FHIR client to be used by a Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + (defaults to: :default) + + + — +

    a name used to reference this particular client

    +
    + +
  • + +
  • + + block + + + + + + + — +

    a block to configure the client

    +
    + +
  • + +
+ + +

See Also:

+
    + +
  • Documentation for the client +configuration DSL
  • + +
+ +
+ + + + +
+
+
+
+387
+388
+389
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 387
+
+def fhir_client(name = :default, &block)
+  fhir_client_definitions[name] = block
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRClientBuilder.html b/docs/docs/Inferno/DSL/FHIRClientBuilder.html new file mode 100644 index 000000000..e7dda7577 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRClientBuilder.html @@ -0,0 +1,749 @@ + + + + + + + Class: Inferno::DSL::FHIRClientBuilder + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIRClientBuilder + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_client_builder.rb
+
+ +
+ +

Overview

+
+

DSL for configuring FHIR clients

+ + +
+
+
+ +
+

Examples:

+ + +
input :url
+input :fhir_credentials, type: :oauth_credentials
+input :access_token
+
+fhir_client do
+  url :url
+  headers 'My-Custom_header' => 'CUSTOM_HEADER_VALUE'
+  oauth_credentials :fhir_credentials
+end
+
+fhir_client :with_bearer_token do
+  url :url
+  bearer_token :access_token
+end
+ + +
input :url
+input :fhir_auth,
+       type: :auth_info,
+       options: {
+          mode: 'access'
+        }
+
+fhir_client do
+  url :url
+  headers 'My-Custom_header' => 'CUSTOM_HEADER_VALUE'
+  auth_info :fhir_auth
+end
+ +
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #runnable ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute runnable.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + +

+ +
+

+ + #method_missing(name) ⇒ Object + + + + + +

+ + + + +
+
+
+
+121
+122
+123
+124
+125
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 121
+
+def method_missing(name, ...)
+  return runnable.send(name, ...) if runnable.respond_to? name
+
+  super
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #runnableObject + + + + + +

+
+

Returns the value of attribute runnable.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+38
+39
+40
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 38
+
+def runnable
+  @runnable
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #auth_info(auth_info = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define auth info for a client. Auth info contains info needed for client +to perform authorization and refresh access token when necessary

+ + +
+
+
+

Parameters:

+ + + +
+ + + + +
+
+
+
+103
+104
+105
+106
+107
+108
+109
+110
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 103
+
+def auth_info(auth_info = nil)
+  @auth_info ||=
+    if auth_info.is_a? Symbol
+      runnable.send(auth_info)
+    else
+      auth_info
+    end
+end
+
+
+ +
+

+ + #bearer_token(bearer_token = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define the bearer token for a client. A string or symbol can be provided. +A string is interpreted as a token. A symbol is interpreted as the name of +an input to the Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + bearer_token + + + (String, Symbol) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+75
+76
+77
+78
+79
+80
+81
+82
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 75
+
+def bearer_token(bearer_token = nil)
+  @bearer_token ||=
+    if bearer_token.is_a? Symbol
+      runnable.send(bearer_token)
+    else
+      bearer_token
+    end
+end
+
+
+ +
+

+ + #headers(headers = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define custom headers for a client

+ + +
+
+
+

Parameters:

+
    + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+116
+117
+118
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 116
+
+def headers(headers = nil)
+  @headers ||= headers
+end
+
+
+ +
+

+ + #oauth_credentials(oauth_credentials = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define OAuth credentials for a client. These can allow a client to +automatically refresh its access token when it expires.

+ + +
+
+
+

Parameters:

+ + + +
+ + + + +
+
+
+
+89
+90
+91
+92
+93
+94
+95
+96
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 89
+
+def oauth_credentials(oauth_credentials = nil)
+  @oauth_credentials ||=
+    if oauth_credentials.is_a? Symbol
+      runnable.send(oauth_credentials)
+    else
+      oauth_credentials
+    end
+end
+
+
+ +
+

+ + #url(url = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define the base FHIR url for a client. A string or symbol can be provided. +A string is interpreted as a url. A symbol is interpreted as the name of +an input to the Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String, Symbol) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+60
+61
+62
+63
+64
+65
+66
+67
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 60
+
+def url(url = nil)
+  @url ||=
+    if url.is_a? Symbol
+      runnable.send(url)
+    else
+      url
+    end&.chomp('/')
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIREvaluation.html b/docs/docs/Inferno/DSL/FHIREvaluation.html new file mode 100644 index 000000000..bd7e71345 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIREvaluation.html @@ -0,0 +1,119 @@ + + + + + + + Module: Inferno::DSL::FHIREvaluation + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIREvaluation + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_evaluation/rule.rb,
+ lib/inferno/dsl/fhir_evaluation/config.rb,
lib/inferno/dsl/fhir_evaluation/evaluator.rb,
lib/inferno/dsl/fhir_evaluation/dataset_loader.rb,
lib/inferno/dsl/fhir_evaluation/evaluation_result.rb,
lib/inferno/dsl/fhir_evaluation/evaluation_context.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: DatasetLoader + + + + Classes: Config, EvaluationContext, EvaluationResult, Evaluator, Rule + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIREvaluation/Config.html b/docs/docs/Inferno/DSL/FHIREvaluation/Config.html new file mode 100644 index 000000000..7c3841040 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIREvaluation/Config.html @@ -0,0 +1,320 @@ + + + + + + + Class: Inferno::DSL::FHIREvaluation::Config + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIREvaluation::Config + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_evaluation/config.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
DEFAULT_FILE = + +
+
File.join(__dir__, 'default.yml')
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #data ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute data.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(config_file = nil) ⇒ Config + + + + + +

+
+

To-do: add config_file as arguments

+ + +
+
+
+ +

Raises:

+
    + +
  • + + + (TypeError) + + + +
  • + +
+ +
+ + + + +
+
+
+
+9
+10
+11
+12
+13
+14
+15
+16
+17
+
+
# File 'lib/inferno/dsl/fhir_evaluation/config.rb', line 9
+
+def initialize(config_file = nil)
+  @data = if config_file.nil?
+            YAML.load_file(File.absolute_path(DEFAULT_FILE))
+          else
+            YAML.load_file(File.absolute_path(config_file))
+          end
+
+  raise(TypeError, 'Malformed configuration') unless @data.is_a?(Hash)
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #dataObject + + + + + +

+
+

Returns the value of attribute data.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/dsl/fhir_evaluation/config.rb', line 6
+
+def data
+  @data
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIREvaluation/DatasetLoader.html b/docs/docs/Inferno/DSL/FHIREvaluation/DatasetLoader.html new file mode 100644 index 000000000..430962aa7 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIREvaluation/DatasetLoader.html @@ -0,0 +1,264 @@ + + + + + + + Module: Inferno::DSL::FHIREvaluation::DatasetLoader + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIREvaluation::DatasetLoader + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_evaluation/dataset_loader.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .from_contents(source_array) ⇒ Object + + + + + +

+ + + + +
+
+
+
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+
+
# File 'lib/inferno/dsl/fhir_evaluation/dataset_loader.rb', line 5
+
+def self.from_contents(source_array)
+  dataset = []
+
+  source_array.each do |json|
+    resource = FHIR::Json.from_json(json)
+    next if resource.nil?
+
+    dataset.push resource
+  end
+
+  dataset
+end
+
+
+ +
+

+ + .from_path(path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+
+
# File 'lib/inferno/dsl/fhir_evaluation/dataset_loader.rb', line 18
+
+def self.from_path(path)
+  dataset = []
+
+  Dir["#{path}/*.json"].each do |f|
+    resource = FHIR::Json.from_json(File.read(f))
+    next if resource.nil?
+
+    dataset.push resource
+  end
+
+  dataset
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIREvaluation/EvaluationContext.html b/docs/docs/Inferno/DSL/FHIREvaluation/EvaluationContext.html new file mode 100644 index 000000000..7a2cd649d --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIREvaluation/EvaluationContext.html @@ -0,0 +1,570 @@ + + + + + + + Class: Inferno::DSL::FHIREvaluation::EvaluationContext + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIREvaluation::EvaluationContext + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_evaluation/evaluation_context.rb
+
+ +
+ +

Overview

+
+

EvaluationContext is a wrapper class around the concepts needed to perform an evaluation: +- The IG used as the basis for evaluation +- The data being evaluated +- A summary/characterization of the data +- Evaluation results

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #config ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute config.

    +
    + +
  • + + +
  • + + + #data ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute data.

    +
    + +
  • + + +
  • + + + #ig ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute ig.

    +
    + +
  • + + +
  • + + + #results ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute results.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(ig, data, config) ⇒ EvaluationContext + + + + + +

+
+

rubocop:disable Naming/MethodParameterName

+ + +
+
+
+ + +
+ + + + +
+
+
+
+12
+13
+14
+15
+16
+17
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 12
+
+def initialize(ig, data, config) # rubocop:disable Naming/MethodParameterName
+  @ig = ig
+  @data = data
+  @results = []
+  @config = config
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #configObject (readonly) + + + + + +

+
+

Returns the value of attribute config.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 10
+
+def config
+  @config
+end
+
+
+ + + +
+

+ + #dataObject (readonly) + + + + + +

+
+

Returns the value of attribute data.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 10
+
+def data
+  @data
+end
+
+
+ + + +
+

+ + #igObject (readonly) + + + + + +

+
+

Returns the value of attribute ig.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 10
+
+def ig
+  @ig
+end
+
+
+ + + +
+

+ + #resultsObject (readonly) + + + + + +

+
+

Returns the value of attribute results.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 10
+
+def results
+  @results
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #add_result(result) ⇒ Object + + + + + +

+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 19
+
+def add_result(result)
+  results.push result
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIREvaluation/EvaluationResult.html b/docs/docs/Inferno/DSL/FHIREvaluation/EvaluationResult.html new file mode 100644 index 000000000..eb5e4015a --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIREvaluation/EvaluationResult.html @@ -0,0 +1,871 @@ + + + + + + + Class: Inferno::DSL::FHIREvaluation::EvaluationResult + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIREvaluation::EvaluationResult + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_evaluation/evaluation_result.rb
+
+ +
+ +

Overview

+
+

The result of a Rule evaluating a data set.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #issue_type ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute issue_type.

    +
    + +
  • + + +
  • + + + #message ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute message.

    +
    + +
  • + + +
  • + + + #rule ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute rule.

    +
    + +
  • + + +
  • + + + #severity ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute severity.

    +
    + +
  • + + +
  • + + + #threshold ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute threshold.

    +
    + +
  • + + +
  • + + + #value ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute value.

    +
    + +
  • + + +
+ + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(message, severity: 'warning', issue_type: 'business-rule', threshold: nil, value: nil, rule: nil) ⇒ EvaluationResult + + + + + +

+
+

Returns a new instance of EvaluationResult.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+13
+14
+15
+16
+17
+18
+19
+20
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 13
+
+def initialize(message, severity: 'warning', issue_type: 'business-rule', threshold: nil, value: nil, rule: nil)
+  @message = message
+  @severity = severity
+  @issue_type = issue_type
+  @threshold = threshold
+  @value = value
+  @rule = rule
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #issue_typeObject + + + + + +

+
+

Returns the value of attribute issue_type.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 6
+
+def issue_type
+  @issue_type
+end
+
+
+ + + +
+

+ + #messageObject + + + + + +

+
+

Returns the value of attribute message.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 6
+
+def message
+  @message
+end
+
+
+ + + +
+

+ + #ruleObject + + + + + +

+
+

Returns the value of attribute rule.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 6
+
+def rule
+  @rule
+end
+
+
+ + + +
+

+ + #severityObject + + + + + +

+
+

Returns the value of attribute severity.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 6
+
+def severity
+  @severity
+end
+
+
+ + + +
+

+ + #thresholdObject + + + + + +

+
+

Returns the value of attribute threshold.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 6
+
+def threshold
+  @threshold
+end
+
+
+ + + +
+

+ + #valueObject + + + + + +

+
+

Returns the value of attribute value.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 6
+
+def value
+  @value
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .to_operation_outcome(results) ⇒ Object + + + + + +

+ + + + +
+
+
+
+54
+55
+56
+57
+58
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 54
+
+def self.to_operation_outcome(results)
+  FHIR::OperationOutcome.new({
+                               issue: results.map(&:to_oo_issue)
+                             })
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #to_oo_issueObject + + + + + +

+ + + + +
+
+
+
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 26
+
+def to_oo_issue
+  issue = {
+    severity:,
+    code: issue_type,
+    details: { text: message }
+  }
+
+  if threshold
+    issue[:extension] ||= []
+    issue[:extension].push({
+                             # TODO: pick real extension for this
+                             url: 'https://inferno-framework.github.io/fhir_evaluator/StructureDefinition/operationoutcome-issue-threshold',
+                             valueDecimal: threshold
+                           })
+  end
+
+  if value
+    issue[:extension] ||= []
+    issue[:extension].push({
+                             # TODO: pick real extension for this
+                             url: 'https://inferno-framework.github.io/fhir_evaluator/StructureDefinition/operationoutcome-issue-value',
+                             valueDecimal: value
+                           })
+  end
+
+  issue
+end
+
+
+ +
+

+ + #to_sObject + + + + + +

+ + + + +
+
+
+
+22
+23
+24
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_result.rb', line 22
+
+def to_s
+  "#{severity.upcase}: #{message}"
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIREvaluation/Evaluator.html b/docs/docs/Inferno/DSL/FHIREvaluation/Evaluator.html new file mode 100644 index 000000000..1cc6f5931 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIREvaluation/Evaluator.html @@ -0,0 +1,360 @@ + + + + + + + Class: Inferno::DSL::FHIREvaluation::Evaluator + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIREvaluation::Evaluator + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_evaluation/evaluator.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #ig ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute ig.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(ig) ⇒ Evaluator + + + + + +

+
+

rubocop:disable Naming/MethodParameterName

+ + +
+
+
+ + +
+ + + + +
+
+
+
+15
+16
+17
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluator.rb', line 15
+
+def initialize(ig) # rubocop:disable Naming/MethodParameterName
+  @ig = ig
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #igObject + + + + + +

+
+

Returns the value of attribute ig.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluator.rb', line 13
+
+def ig
+  @ig
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #evaluate(data, config = Config.new) ⇒ Object + + + + + +

+ + + + +
+
+
+
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+
# File 'lib/inferno/dsl/fhir_evaluation/evaluator.rb', line 19
+
+def evaluate(data, config = Config.new)
+  context = EvaluationContext.new(@ig, data, config)
+
+  active_rules = []
+  config.data['Rule'].each do |rulename, rule_details|
+    active_rules << rulename if rule_details['Enabled']
+  end
+
+  Rule.descendants.each do |rule|
+    rule.new.check(context) if active_rules.include?(rule.name.demodulize)
+  end
+
+  context.results
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIREvaluation/Rule.html b/docs/docs/Inferno/DSL/FHIREvaluation/Rule.html new file mode 100644 index 000000000..15fb66643 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIREvaluation/Rule.html @@ -0,0 +1,191 @@ + + + + + + + Class: Inferno::DSL::FHIREvaluation::Rule + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIREvaluation::Rule + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_evaluation/rule.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #check(_context) ⇒ Object + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/dsl/fhir_evaluation/rule.rb', line 7
+
+def check(_context)
+  raise 'not implemented'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRResourceValidation.html b/docs/docs/Inferno/DSL/FHIRResourceValidation.html new file mode 100644 index 000000000..68fa0ad39 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRResourceValidation.html @@ -0,0 +1,155 @@ + + + + + + + Module: Inferno::DSL::FHIRResourceValidation + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRResourceValidation + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/fhir_resource_validation.rb
+
+ +
+ +

Overview

+
+

This module contains the methods needed to configure a validator to +perform validation of FHIR resources. The actual validation is performed +by an external FHIR validation service. Tests will typically rely on +assert_valid_resource for validation rather than directly calling +methods on a validator.

+ + +
+
+
+ +
+

Examples:

+ + +

+validator do
+  url 'http://example.com/validator'
+  exclude_message { |message| message.type == 'info' }
+  perform_additional_validation do |resource, profile_url|
+    if something_is_wrong
+      { type: 'error', message: 'something is wrong' }
+    else
+      { type: 'info', message: 'everything is ok' }
+    end
+  end
+end
+ +
+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + Classes: Validator + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRResourceValidation/ClassMethods.html b/docs/docs/Inferno/DSL/FHIRResourceValidation/ClassMethods.html new file mode 100644 index 000000000..cccdcb63e --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRResourceValidation/ClassMethods.html @@ -0,0 +1,257 @@ + + + + + + + Module: Inferno::DSL::FHIRResourceValidation::ClassMethods + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRResourceValidation::ClassMethods + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_resource_validation.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #fhir_resource_validator(name = :default, required_suite_options: nil, &block) ⇒ Object + + + + + +

+
+

Define a validator

+ + +
+
+
+ +
+

Examples:

+ + +
fhir_resource_validator do
+  url 'http://example.com/validator'
+  exclude_message { |message| message.type == 'info' }
+  perform_additional_validation do |resource, profile_url|
+    if something_is_wrong
+      { type: 'error', message: 'something is wrong' }
+    else
+      { type: 'info', message: 'everything is ok' }
+    end
+  end
+end
+ +
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the validator, only needed if you are +using multiple validators

    +
    + +
  • + +
  • + + required_suite_options + + + (Hash) + + + (defaults to: nil) + + + — +

    suite options that must be +selected in order to use this validator

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 383
+
+def fhir_resource_validator(name = :default, required_suite_options: nil, &block)
+  current_validators = fhir_validators[name] || []
+
+  new_validator = Inferno::DSL::FHIRResourceValidation::Validator.new(name, id, required_suite_options, &block)
+
+  current_validators.reject! { |validator| validator.requirements == required_suite_options }
+  current_validators << new_validator
+
+  fhir_validators[name] = current_validators
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRResourceValidation/Validator.html b/docs/docs/Inferno/DSL/FHIRResourceValidation/Validator.html new file mode 100644 index 000000000..feccf635c --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRResourceValidation/Validator.html @@ -0,0 +1,1258 @@ + + + + + + + Class: Inferno::DSL::FHIRResourceValidation::Validator + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIRResourceValidation::Validator + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_resource_validation.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #name ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute name.

    +
    + +
  • + + +
  • + + + #requirements ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute requirements.

    +
    + +
  • + + +
  • + + + #session_id ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute session_id.

    +
    + +
  • + + +
  • + + + #test_suite_id ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute test_suite_id.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #nameObject + + + + + +

+
+

Returns the value of attribute name.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+30
+31
+32
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 30
+
+def name
+  @name
+end
+
+
+ + + +
+

+ + #requirementsObject (readonly) + + + + + +

+
+

Returns the value of attribute requirements.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+29
+30
+31
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 29
+
+def requirements
+  @requirements
+end
+
+
+ + + +
+

+ + #session_idObject + + + + + +

+
+

Returns the value of attribute session_id.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+30
+31
+32
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 30
+
+def session_id
+  @session_id
+end
+
+
+ + + +
+

+ + #test_suite_idObject + + + + + +

+
+

Returns the value of attribute test_suite_id.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+30
+31
+32
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 30
+
+def test_suite_id
+  @test_suite_id
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #cli_context(definition = nil) ⇒ Object + + + + + +

+
+

Set the cliContext used as part of each validation request. +Fields may be passed as either a Hash or block. +Note that all fields included here will be sent directly in requests, +there is no check that the fields are correct.

+ + +
+
+
+ +
+

Examples:

+ + +
# Passing fields in a block
+fhir_resource_validator do
+  url 'http://example.com/validator'
+  cli_context do
+    noExtensibleBindingMessages true
+    allowExampleUrls true
+    txServer nil
+  end
+end
+ + +
# Passing fields in a Hash
+fhir_resource_validator do
+  url 'http://example.org/validator'
+  cli_context({
+    noExtensibleBindingMessages: true,
+    allowExampleUrls: true,
+    txServer: nil
+  })
+end
+ +
+

Parameters:

+
    + +
  • + + definition + + + (Hash) + + + (defaults to: nil) + + + — +

    raw fields to set, optional

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 98
+
+def cli_context(definition = nil, &)
+  if @cli_context
+    if definition
+      @cli_context.definition.merge!(definition.deep_symbolize_keys)
+    elsif block_given?
+      @cli_context.instance_eval(&)
+    end
+  else
+    @cli_context = CliContext.new(definition || {}, &)
+  end
+  @cli_context
+end
+
+
+ +
+

+ + #exclude_message {|message| ... } ⇒ Object + + + + + +

+
+

Filter out unwanted validation messages. Any messages for which the +block evalutates to a truthy value will be excluded.

+ + +
+
+
+ +
+

Examples:

+ + +
validator do
+  exclude_message { |message| message.type == 'info' }
+end
+ +
+ +

Yield Parameters:

+ + +
+ + + + +
+
+
+
+154
+155
+156
+157
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 154
+
+def exclude_message(&block)
+  @exclude_message = block if block_given?
+  @exclude_message
+end
+
+
+ +
+

+ + #igs(*validator_igs) ⇒ Object + + + + + +

+
+

Set the IGs that the validator will need to load

+ + +
+
+
+ +
+

Examples:

+ + +
igs "hl7.fhir.us.core#4.0.0"
+ + +
igs("hl7.fhir.us.core#3.1.1", "hl7.fhir.us.core#6.0.0")
+ +
+

Parameters:

+
    + +
  • + + validator_igs + + + (Array<String>) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+64
+65
+66
+67
+68
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 64
+
+def igs(*validator_igs)
+  cli_context(igs: validator_igs) if validator_igs
+
+  cli_context.igs
+end
+
+
+ +
+

+ + #perform_additional_validation {|resource, profile_url| ... } ⇒ Object + + + + + +

+
+

Perform validation steps in addition to FHIR validation.

+ + +
+
+
+ +
+

Examples:

+ + +
perform_additional_validation do |resource, profile_url|
+  if something_is_wrong
+    { type: 'error', message: 'something is wrong' }
+  else
+    { type: 'info', message: 'everything is ok' }
+  end
+end
+ +
+ +

Yield Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + + — +

    the resource being validated

    +
    + +
  • + +
  • + + profile_url + + + (String) + + + + — +

    the profile the resource is being +validated against

    +
    + +
  • + +
+

Yield Returns:

+
    + +
  • + + + (Array<Hash<Symbol, String>>, Hash<Symbol, String>) + + + + — +

    The +block should return a Hash or an Array of Hashes if any validation +messages should be added. The Hash must contain two keys: :type +and :message. :type can have a value of 'info', 'warning', +or 'error'. A type of 'error' means the resource is invalid. +:message contains the message string itself.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+135
+136
+137
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 135
+
+def perform_additional_validation(&block)
+  additional_validations << block
+end
+
+
+ +
+

+ + #resource_is_valid?(resource, profile_url, runnable) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +

See Also:

+
    + +
  • Inferno::DSL::FHIRResourceValidation#resource_is_valid?
  • + +
+ +
+ + + + +
+
+
+
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 160
+
+def resource_is_valid?(resource, profile_url, runnable)
+  profile_url ||= FHIR::Definitions.resource_definition(resource.resourceType).url
+
+  begin
+    response = call_validator(resource, profile_url)
+  rescue StandardError => e
+    # This could be a complete failure to connect (validator isn't running)
+    # or a timeout (validator took too long to respond).
+    runnable.add_message('error', e.message)
+    raise Inferno::Exceptions::ErrorInValidatorException, "Unable to connect to validator at #{url}."
+  end
+
+  outcome = operation_outcome_from_validator_response(response, runnable)
+
+  message_hashes = message_hashes_from_outcome(outcome, resource, profile_url)
+
+  message_hashes
+    .each { |message_hash| runnable.add_message(message_hash[:type], message_hash[:message]) }
+
+  unless response.status == 200
+    raise Inferno::Exceptions::ErrorInValidatorException,
+          'Error occurred in the validator. Review Messages tab or validator service logs for more information.'
+  end
+
+  message_hashes
+    .none? { |message_hash| message_hash[:type] == 'error' }
+rescue Inferno::Exceptions::ErrorInValidatorException
+  raise
+rescue StandardError => e
+  runnable.add_message('error', e.message)
+  raise Inferno::Exceptions::ErrorInValidatorException,
+        'Error occurred in the validator. Review Messages tab or validator service logs for more information.'
+end
+
+
+ +
+

+ + #url(validator_url = nil) ⇒ Object + + + + + +

+
+

Set the url of the validator service

+ + +
+
+
+

Parameters:

+
    + +
  • + + validator_url + + + (String) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+52
+53
+54
+55
+56
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 52
+
+def url(validator_url = nil)
+  @url = validator_url if validator_url
+  @url ||= default_validator_url
+  @url
+end
+
+
+ +
+

+ + #validate(resource, profile_url) ⇒ String + + + + + +

+
+

Post a resource to the validation service for validating.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + +
  • + +
  • + + profile_url + + + (String) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the body of the validation response

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+273
+274
+275
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 273
+
+def validate(resource, profile_url)
+  call_validator(resource, profile_url).body
+end
+
+
+ +
+

+ + #validator_session_repoObject + + + + + +

+ + + + +
+
+
+
+45
+46
+47
+
+
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 45
+
+def validator_session_repo
+  @validator_session_repo ||= Inferno::Repositories::ValidatorSessions.new
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRValidation.html b/docs/docs/Inferno/DSL/FHIRValidation.html new file mode 100644 index 000000000..e5b2680a6 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRValidation.html @@ -0,0 +1,363 @@ + + + + + + + Module: Inferno::DSL::FHIRValidation + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRValidation + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/fhir_validation.rb
+
+ +
+ +

Overview

+
+

This module contains the methods needed to configure a validator to +perform validation of FHIR resources. The actual validation is performed +by an external FHIR validation service. Tests will typically rely on +assert_valid_resource for validation rather than directly calling +methods on a validator.

+ + +
+
+
+ +
+

Examples:

+ + +

+validator do
+  url 'http://example.com/validator'
+  exclude_message { |message| message.type == 'info' }
+  perform_additional_validation do |resource, profile_url|
+    if something_is_wrong
+      { type: 'error', message: 'something is wrong' }
+    else
+      { type: 'info', message: 'everything is ok' }
+    end
+  end
+end
+ +
+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + Classes: Validator + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #find_validator(validator_name) ⇒ Object + + + + + +

+
+

Find a particular validator. Looks through a runnable’s parents up to +the suite to find a validator with a particular name

+ + +
+
+
+ + +
+ + + + +
+
+
+
+40
+41
+42
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 40
+
+def find_validator(validator_name)
+  self.class.find_validator(validator_name, suite_options)
+end
+
+
+ +
+

+ + #resource_is_valid?(resource: self.resource, profile_url: nil, validator: :default) ⇒ Boolean + + + + + +

+
+

Perform validation, and add validation messages to the runnable

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + (defaults to: self.resource) + + +
  • + +
  • + + profile_url + + + (String) + + + (defaults to: nil) + + +
  • + +
  • + + validator + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the validator to use

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + + — +

    whether the resource is valid

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 34
+
+def resource_is_valid?(resource: self.resource, profile_url: nil, validator: :default)
+  find_validator(validator).resource_is_valid?(resource, profile_url, self)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRValidation/ClassMethods.html b/docs/docs/Inferno/DSL/FHIRValidation/ClassMethods.html new file mode 100644 index 000000000..113b6c9d8 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRValidation/ClassMethods.html @@ -0,0 +1,362 @@ + + + + + + + Module: Inferno::DSL::FHIRValidation::ClassMethods + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRValidation::ClassMethods + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_validation.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #find_validator(validator_name, selected_suite_options = nil) ⇒ Object + + + + + +

+
+

Find a particular validator. Looks through a runnable’s parents up to +the suite to find a validator with a particular name

+ + +
+
+
+ +

Raises:

+ + +
+ + + + +
+
+
+
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 270
+
+def find_validator(validator_name, selected_suite_options = nil)
+  validators = fhir_validators[validator_name] ||
+               Array.wrap(parent&.find_validator(validator_name, selected_suite_options))
+
+  validator =
+    if selected_suite_options.present?
+      validators.find do |possible_validator|
+        possible_validator.requirements.nil? || selected_suite_options >= possible_validator.requirements
+      end
+    else
+      validators.first
+    end
+
+  raise Exceptions::ValidatorNotFoundException, validator_name if validator.nil?
+
+  validator
+end
+
+
+ +
+

+ + #validator(name = :default, required_suite_options: nil, &block) ⇒ Object + + + + + +

+
+

Define a validator

+ + +
+
+
+ +
+

Examples:

+ + +
validator do
+  url 'http://example.com/validator'
+  exclude_message { |message| message.type == 'info' }
+  perform_additional_validation do |resource, profile_url|
+    if something_is_wrong
+      { type: 'error', message: 'something is wrong' }
+    else
+      { type: 'info', message: 'everything is ok' }
+    end
+  end
+end
+ +
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the validator, only needed if you are +using multiple validators

    +
    + +
  • + +
  • + + required_suite_options + + + (Hash) + + + (defaults to: nil) + + + — +

    suite options that must be +selected in order to use this validator

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 257
+
+def validator(name = :default, required_suite_options: nil, &block)
+  current_validators = fhir_validators[name] || []
+
+  new_validator = Inferno::DSL::FHIRValidation::Validator.new(required_suite_options, &block)
+
+  current_validators.reject! { |validator| validator.requirements == required_suite_options }
+  current_validators << new_validator
+
+  fhir_validators[name] = current_validators
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRValidation/Validator.html b/docs/docs/Inferno/DSL/FHIRValidation/Validator.html new file mode 100644 index 000000000..0f39990fd --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRValidation/Validator.html @@ -0,0 +1,774 @@ + + + + + + + Class: Inferno::DSL::FHIRValidation::Validator + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIRValidation::Validator + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_validation.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #requirements ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute requirements.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #requirementsObject (readonly) + + + + + +

+
+

Returns the value of attribute requirements.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+45
+46
+47
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 45
+
+def requirements
+  @requirements
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #exclude_message {|message| ... } ⇒ Object + + + + + +

+
+

Filter out unwanted validation messages. Any messages for which the +block evalutates to a truthy value will be excluded.

+ + +
+
+
+ +
+

Examples:

+ + +
validator do
+  exclude_message { |message| message.type == 'info' }
+end
+ +
+ +

Yield Parameters:

+ + +
+ + + + +
+
+
+
+110
+111
+112
+113
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 110
+
+def exclude_message(&block)
+  @exclude_message = block if block_given?
+  @exclude_message
+end
+
+
+ +
+

+ + #perform_additional_validation {|resource, profile_url| ... } ⇒ Object + + + + + +

+
+

Perform validation steps in addition to FHIR validation.

+ + +
+
+
+ +
+

Examples:

+ + +
perform_additional_validation do |resource, profile_url|
+  if something_is_wrong
+    { type: 'error', message: 'something is wrong' }
+  else
+    { type: 'info', message: 'everything is ok' }
+  end
+end
+ +
+ +

Yield Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + + — +

    the resource being validated

    +
    + +
  • + +
  • + + profile_url + + + (String) + + + + — +

    the profile the resource is being +validated against

    +
    + +
  • + +
+

Yield Returns:

+
    + +
  • + + + (Array<Hash<Symbol, String>>, Hash<Symbol, String>) + + + + — +

    The +block should return a Hash or an Array of Hashes if any validation +messages should be added. The Hash must contain two keys: :type +and :message. :type can have a value of 'info', 'warning', +or 'error'. A type of 'error' means the resource is invalid. +:message contains the message string itself.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+91
+92
+93
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 91
+
+def perform_additional_validation(&block)
+  additional_validations << block
+end
+
+
+ +
+

+ + #resource_is_valid?(resource, profile_url, runnable) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +

See Also:

+ + +
+ + + + +
+
+
+
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 116
+
+def resource_is_valid?(resource, profile_url, runnable)
+  profile_url ||= FHIR::Definitions.resource_definition(resource.resourceType).url
+
+  begin
+    response = call_validator(resource, profile_url)
+  rescue StandardError => e
+    # This could be a complete failure to connect (validator isn't running)
+    # or a timeout (validator took too long to respond).
+    runnable.add_message('error', e.message)
+    raise Inferno::Exceptions::ErrorInValidatorException, "Unable to connect to validator at #{url}."
+  end
+  outcome = operation_outcome_from_validator_response(response, runnable)
+
+  message_hashes = message_hashes_from_outcome(outcome, resource, profile_url)
+
+  message_hashes
+    .each { |message_hash| runnable.add_message(message_hash[:type], message_hash[:message]) }
+
+  unless response.status == 200
+    raise Inferno::Exceptions::ErrorInValidatorException,
+          'Error occurred in the validator. Review Messages tab or validator service logs for more information.'
+  end
+
+  message_hashes
+    .none? { |message_hash| message_hash[:type] == 'error' }
+rescue Inferno::Exceptions::ErrorInValidatorException
+  raise
+rescue StandardError => e
+  runnable.add_message('error', e.message)
+  raise Inferno::Exceptions::ErrorInValidatorException,
+        'Error occurred in the validator. Review Messages tab or validator service logs for more information.'
+end
+
+
+ +
+

+ + #url(validator_url = nil) ⇒ Object + + + + + +

+
+

Set the url of the validator service

+ + +
+
+
+

Parameters:

+
    + +
  • + + validator_url + + + (String) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+61
+62
+63
+64
+65
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 61
+
+def url(validator_url = nil)
+  @url = validator_url if validator_url
+  @url ||= default_validator_url
+  @url
+end
+
+
+ +
+

+ + #validate(resource, profile_url) ⇒ String + + + + + +

+
+

Post a resource to the validation service for validating.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + +
  • + +
  • + + profile_url + + + (String) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the body of the validation response

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+203
+204
+205
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 203
+
+def validate(resource, profile_url)
+  call_validator(resource, profile_url).body
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FhirpathEvaluation.html b/docs/docs/Inferno/DSL/FhirpathEvaluation.html new file mode 100644 index 000000000..f345481ba --- /dev/null +++ b/docs/docs/Inferno/DSL/FhirpathEvaluation.html @@ -0,0 +1,307 @@ + + + + + + + Module: Inferno::DSL::FhirpathEvaluation + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FhirpathEvaluation + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/fhirpath_evaluation.rb
+
+ +
+ +

Overview

+
+ +
+ Note: +

the element field can either be a primitive value (string, boolean, etc.) or a FHIR::Model.

+
+
+ +

This module contains the methods needed to perform FHIRPath evaluations +on FHIR resources/elements. The actual evaluation is typically performed by an external +FHIRPath evaluation service.

+ +

Tests can leverage the evaluation functionality by calling evaluate_fhirpath to retrieve +results of FHIRPath expressions.

+ +

results will be an array representing the result of evaluating the given +expression against the given root element. Each “result” in the returned +array will be in the form +{ "type": "[FHIR datatype of the result]", "element": "[result value of the FHIRPath expression]" }.

+ + +
+
+
+ +
+

Examples:

+ + +

+results = evaluate_fhirpath(resource: patient_resource, path: 'Patient.name.given')
+ +
+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + Classes: Evaluator + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #evaluate_fhirpath(resource:, path:, url: nil) ⇒ Array<Hash> + + + + + +

+
+

Evaluates a fhirpath expression for a given FHIR resource

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + + — +

    the root FHIR resource to use when evaluating the fhirpath expression.

    +
    + +
  • + +
  • + + path + + + (String) + + + + — +

    The FHIRPath expression to evaluate.

    +
    + +
  • + +
  • + + url + + + (String) + + + (defaults to: nil) + + + — +

    the url of the fhirpath service to use.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    An array of hashes representing the result of evaluating the given expression against +the given root resource.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+31
+32
+33
+
+
# File 'lib/inferno/dsl/fhirpath_evaluation.rb', line 31
+
+def evaluate_fhirpath(resource:, path:, url: nil)
+  self.class.evaluator(url).evaluate_fhirpath(resource, path, self)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FhirpathEvaluation/ClassMethods.html b/docs/docs/Inferno/DSL/FhirpathEvaluation/ClassMethods.html new file mode 100644 index 000000000..592ceb6f1 --- /dev/null +++ b/docs/docs/Inferno/DSL/FhirpathEvaluation/ClassMethods.html @@ -0,0 +1,105 @@ + + + + + + + Module: Inferno::DSL::FhirpathEvaluation::ClassMethods + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FhirpathEvaluation::ClassMethods + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhirpath_evaluation.rb
+
+ +
+ + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FhirpathEvaluation/Evaluator.html b/docs/docs/Inferno/DSL/FhirpathEvaluation/Evaluator.html new file mode 100644 index 000000000..39b102766 --- /dev/null +++ b/docs/docs/Inferno/DSL/FhirpathEvaluation/Evaluator.html @@ -0,0 +1,472 @@ + + + + + + + Class: Inferno::DSL::FhirpathEvaluation::Evaluator + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FhirpathEvaluation::Evaluator + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhirpath_evaluation.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #call_fhirpath_service(fhir_resource, fhirpath_expression) ⇒ Object + + + + + +

+ + + + +
+
+
+
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+
+
# File 'lib/inferno/dsl/fhirpath_evaluation.rb', line 96
+
+def call_fhirpath_service(fhir_resource, fhirpath_expression)
+  Faraday.new(
+    url,
+    request: { timeout: 600 }
+  ).post(
+    "evaluate?path=#{fhirpath_expression}",
+    fhir_resource.to_json,
+    content_type: 'application/json'
+  )
+end
+
+
+ +
+

+ + #evaluate_fhirpath(fhir_resource, fhirpath_expression, runnable) ⇒ Array<Hash> + + + + + +

+
+ +
+ Note: +

the element field can either be a primitive value (string, boolean, etc.) or a FHIR::Model.

+
+
+ +

Evaluates a fhirpath expression for a given FHIR resource

+ + +
+
+
+

Parameters:

+
    + +
  • + + fhir_resource + + + (FHIR::Model) + + + + — +

    the root FHIR resource to use when evaluating the fhirpath expression.

    +
    + +
  • + +
  • + + fhirpath_expression + + + (String) + + + + — +

    The FHIRPath expression to evaluate.

    +
    + +
  • + +
  • + + runnable + + + (Inferno::Test) + + + + — +

    to add any error message that occurs.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    An array hashes representing the result of evaluating the given expression against +the given root resource. Each “result” in the returned array will be in the form +{ "type": "[FHIR datatype of the result]", "element": "[result value of the FHIRPath expression]" }.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+
+
# File 'lib/inferno/dsl/fhirpath_evaluation.rb', line 63
+
+def evaluate_fhirpath(fhir_resource, fhirpath_expression, runnable)
+  begin
+    response = call_fhirpath_service(fhir_resource, fhirpath_expression)
+  rescue StandardError => e
+    # This could be a complete failure to connect (fhirpath service isn't running)
+    # or a timeout (fhirpath service took too long to respond).
+    runnable.add_message('error', e.message)
+    raise Inferno::Exceptions::ErrorInFhirpathException, "Unable to connect to FHIRPath service at #{url}."
+  end
+
+  sanitized_body = remove_invalid_characters(response.body)
+  return transform_fhirpath_results(JSON.parse(sanitized_body)) if response.status.to_s.start_with? '2'
+
+  runnable.add_message('error', "FHIRPath service Response: HTTP #{response.status}\n#{sanitized_body}")
+  raise Inferno::Exceptions::ErrorInFhirpathException,
+        'FHIRPath service call failed. Review Messages tab for more information.'
+rescue JSON::ParserError
+  runnable.add_message('error', "Invalid FHIRPath service response format:\n#{sanitized_body}")
+  raise Inferno::Exceptions::ErrorInFhirpathException,
+        'Error occurred in the FHIRPath service. Review Messages tab for more information.'
+end
+
+
+ +
+

+ + #url(fhirpath_url = nil) ⇒ String + + + + + +

+
+

Set/Get the url of the fhirpath service

+ + +
+
+
+

Parameters:

+
    + +
  • + + fhirpath_url + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+50
+51
+52
+
+
# File 'lib/inferno/dsl/fhirpath_evaluation.rb', line 50
+
+def url(fhirpath_url = nil)
+  @url ||= fhirpath_url || default_fhirpath_url
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/HTTPClient.html b/docs/docs/Inferno/DSL/HTTPClient.html new file mode 100644 index 000000000..ed22c67a5 --- /dev/null +++ b/docs/docs/Inferno/DSL/HTTPClient.html @@ -0,0 +1,1112 @@ + + + + + + + Module: Inferno::DSL::HTTPClient + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::HTTPClient + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/http_client.rb
+
+ +
+ +

Overview

+
+

This module contains the HTTP DSL available to test writers.

+ + +
+
+
+ +
+

Examples:

+ + +
class MyTestGroup < Inferno::TestGroup
+  # create a "default" client for a group
+  http_client do
+    url 'https://example.com/'
+  end
+
+  test :some_test do
+    run do
+      # performs a GET to https://example.com
+      get
+      # performs a GET to https://example.com/abc
+      get('abc')
+
+      request  # the most recent request
+      response # the most recent response
+      requests # all of the requests which have been made in this test
+    end
+  end
+end
+ +
+ + +

See Also:

+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #delete(url = '', client: :default, name: :nil, headers: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform an HTTP DELETE request

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + (defaults to: '') + + + — +

    if this request is using a defined client, this will +be appended to the client’s url. Must be an absolute url for requests +made without a defined client

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: :nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + + — +

    Input headers here

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+
+
# File 'lib/inferno/dsl/http_client.rb', line 136
+
+def delete(url = '', client: :default, name: :nil, headers: nil, tags: [])
+  store_request('outgoing', name:, tags:) do
+    tcp_exception_handler do
+      client = http_client(client)
+
+      if client
+        client.delete(url, nil, headers)
+      elsif url.match?(%r{\Ahttps?://})
+        connection.delete(url, nil, headers)
+      else
+        raise StandardError, 'Must use an absolute url or define an HTTP client with a base url'
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #get(url = '', client: :default, name: nil, headers: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform an HTTP GET request

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + (defaults to: '') + + + — +

    if this request is using a defined client, this will +be appended to the client’s url. Must be an absolute url for requests +made without a defined client

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + + — +

    Input headers here

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+
+
# File 'lib/inferno/dsl/http_client.rb', line 73
+
+def get(url = '', client: :default, name: nil, headers: nil, tags: [])
+  store_request('outgoing', name:, tags:) do
+    tcp_exception_handler do
+      client = http_client(client)
+
+      if client
+        client.get(url, nil, headers)
+      elsif url.match?(%r{\Ahttps?://})
+        connection.get(url, nil, headers)
+      else
+        raise StandardError, 'Must use an absolute url or define an HTTP client with a base url'
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #http_client(client = :default) ⇒ Faraday::Connection + + + + + +

+
+

Return a previously defined HTTP client

+ + +
+
+
+

Parameters:

+
    + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the client

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Faraday::Connection) + + + +
  • + +
+ +

See Also:

+
    + +
  • HTTPClientBuilder
  • + +
+ +
+ + + + +
+
+
+
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+
+
# File 'lib/inferno/dsl/http_client.rb', line 46
+
+def http_client(client = :default)
+  return http_clients[client] if http_clients[client]
+
+  definition = self.class.http_client_definitions[client]
+  return nil if definition.nil?
+
+  tcp_exception_handler do
+    http_clients[client] = HTTPClientBuilder.new.build(self, definition)
+  end
+end
+
+
+ +
+

+ + #post(url = '', body: nil, client: :default, name: nil, headers: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform an HTTP POST request

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + (defaults to: '') + + + — +

    if this request is using a defined client, this will +be appended to the client’s url. Must be an absolute url for requests +made without a defined client

    +
    + +
  • + +
  • + + body + + + (String) + + + (defaults to: nil) + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + + — +

    Input headers here

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+
+
# File 'lib/inferno/dsl/http_client.rb', line 109
+
+def post(url = '', body: nil, client: :default, name: nil, headers: nil, tags: [])
+  store_request('outgoing', name:, tags:) do
+    tcp_exception_handler do
+      client = http_client(client)
+
+      if client
+        client.post(url, body, headers)
+      elsif url.match?(%r{\Ahttps?://})
+        connection.post(url, body, headers)
+      else
+        raise StandardError, 'Must use an absolute url or define an HTTP client with a base url'
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #stream(block, url = '', limit = 100, client: :default, name: nil, headers: nil, tags: []) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform an HTTP GET request and stream the response

+ + +
+
+
+

Parameters:

+
    + +
  • + + block + + + (Proc) + + + + — +

    A Proc object whose input will be the string chunks +received while streaming response to the get request.

    +
    + +
  • + +
  • + + url + + + (String) + + + (defaults to: '') + + + — +

    If this request is using a defined client, this will +be appended to the client’s url. Must be an absolute url for requests +made without a defined client

    +
    + +
  • + +
  • + + limit + + + (Integer) + + + (defaults to: 100) + + + — +

    The number of streamed-in chunks to be stored in +the response body. This optional input defaults to 100.

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + + — +

    Input headers here

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+
+
# File 'lib/inferno/dsl/http_client.rb', line 167
+
+def stream(block, url = '', limit = 100, client: :default, name: nil, headers: nil, tags: [])
+  streamed = []
+
+  collector = proc do |chunk, bytes|
+    streamed << chunk if limit.positive?
+    limit -= 1
+    block.call(chunk, bytes)
+  end
+
+  store_request('outgoing', name:, tags:) do
+    tcp_exception_handler do
+      client = http_client(client)
+
+      if client
+        response = client.get(url, nil, headers) { |req| req.options.on_data = collector }
+      elsif url.match?(%r{\Ahttps?://})
+        response = connection.get(url, nil, headers) { |req| req.options.on_data = collector }
+      else
+        raise StandardError, 'Must use an absolute url or define an HTTP client with a base url'
+      end
+      response.env.body = streamed.join
+      response
+    end
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/HTTPClient/ClassMethods.html b/docs/docs/Inferno/DSL/HTTPClient/ClassMethods.html new file mode 100644 index 000000000..73937d125 --- /dev/null +++ b/docs/docs/Inferno/DSL/HTTPClient/ClassMethods.html @@ -0,0 +1,234 @@ + + + + + + + Module: Inferno::DSL::HTTPClient::ClassMethods + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::HTTPClient::ClassMethods + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/http_client.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #http_client(name = :default, &block) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define a HTTP client to be used by a Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + (defaults to: :default) + + + — +

    a name used to reference this particular client

    +
    + +
  • + +
  • + + block + + + + + + + — +

    a block to configure the client

    +
    + +
  • + +
+ + +

See Also:

+
    + +
  • Documentation for the client +configuration DSL
  • + +
+ +
+ + + + +
+
+
+
+206
+207
+208
+
+
# File 'lib/inferno/dsl/http_client.rb', line 206
+
+def http_client(name = :default, &block)
+  http_client_definitions[name] = block
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/HTTPClientBuilder.html b/docs/docs/Inferno/DSL/HTTPClientBuilder.html new file mode 100644 index 000000000..39e2b03e9 --- /dev/null +++ b/docs/docs/Inferno/DSL/HTTPClientBuilder.html @@ -0,0 +1,440 @@ + + + + + + + Class: Inferno::DSL::HTTPClientBuilder + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::HTTPClientBuilder + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/http_client_builder.rb
+
+ +
+ +

Overview

+
+

This module contains the HTTP DSL available to test writers.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #runnable ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute runnable.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + +

+ +
+

+ + #method_missing(name) ⇒ Object + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+50
+51
+
+
# File 'lib/inferno/dsl/http_client_builder.rb', line 47
+
+def method_missing(name, ...)
+  return runnable.send(name, ...) if runnable.respond_to? name
+
+  super
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #runnableObject + + + + + +

+
+

Returns the value of attribute runnable.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/dsl/http_client_builder.rb', line 7
+
+def runnable
+  @runnable
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #headers(headers = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define custom headers for a client

+ + +
+
+
+

Parameters:

+
    + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+42
+43
+44
+
+
# File 'lib/inferno/dsl/http_client_builder.rb', line 42
+
+def headers(headers = nil)
+  @headers ||= headers
+end
+
+
+ +
+

+ + #url(url = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define the base url for an HTTP client. A string or symbol can be +provided. A string is interpreted as a url. A symbol is interpreted as +the name of an input to the Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String, Symbol) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+29
+30
+31
+32
+33
+34
+35
+36
+
+
# File 'lib/inferno/dsl/http_client_builder.rb', line 29
+
+def url(url = nil)
+  @url ||=
+    if url.is_a? Symbol
+      runnable.send(url)
+    else
+      url
+    end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/InputOutputHandling.html b/docs/docs/Inferno/DSL/InputOutputHandling.html new file mode 100644 index 000000000..ef3e5d19f --- /dev/null +++ b/docs/docs/Inferno/DSL/InputOutputHandling.html @@ -0,0 +1,694 @@ + + + + + + + Module: Inferno::DSL::InputOutputHandling + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::InputOutputHandling + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/input_output_handling.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #input(identifier, *other_identifiers, **input_params) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define inputs

+ + +
+
+
+ +
+

Examples:

+ + +
input :patient_id, title: 'Patient ID', description: 'The ID of the patient being searched for',
+                  default: 'default_patient_id'
+ + +
input :textarea, title: 'Textarea Input Example', type: 'textarea', optional: true
+ +
+

Parameters:

+
    + +
  • + + identifier + + + (Symbol) + + + + — +

    identifier for the input

    +
    + +
  • + +
  • + + other_identifiers + + + (Symbol) + + + + — +

    array of symbols if specifying multiple inputs

    +
    + +
  • + +
  • + + input_params + + + (Hash) + + + + — +

    options for input such as type, description, or title

    +
    + +
  • + +
  • + + options + + + (Hash) + + + + — +

    a customizable set of options

    +
    + +
  • + +
+ + + + + + + + +

Options Hash (**input_params):

+
    + +
  • + :title + (String) + + + + + —

    Human readable title for input

    +
    + +
  • + +
  • + :description + (String) + + + + + —

    Description for the input

    +
    + +
  • + +
  • + :type + (String) + + + + + —
    + + + + + + + + + +
    texttextarearadiocheckboxoauth_credentials
    +
    + +
  • + +
  • + :default + (String) + + + + + —

    The default value for the input

    +
    + +
  • + +
  • + :optional + (Boolean) + + + + + —

    Set to true to not require input for test execution

    +
    + +
  • + +
  • + :locked + (Boolean) + + + + + —

    If true, the user can not alter the value

    +
    + +
  • + +
  • + :options + (Hash) + + + + + —

    Possible input option formats based on input type

    +
    + +
  • + +
+ + + +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+
+
# File 'lib/inferno/dsl/input_output_handling.rb', line 24
+
+def input(identifier, *other_identifiers, **input_params)
+  if other_identifiers.present?
+    [identifier, *other_identifiers].compact.each do |input_identifier|
+      inputs << input_identifier
+      config.add_input(input_identifier)
+      children
+        .reject { |child| child.inputs.include? input_identifier }
+        .each do |child|
+          child.input(input_identifier)
+        end
+    end
+  else
+    inputs << identifier
+    config.add_input(identifier, input_params)
+    children
+      .reject { |child| child.inputs.include? identifier }
+      .each do |child|
+        child.input(identifier, **input_params)
+      end
+  end
+end
+
+
+ +
+

+ + #input_order(*new_input_order) ⇒ Array<String, Symbol> + + + + + +

+
+

Define a particular order for inputs to be presented in the API/UI

+ + +
+
+
+ +
+

Examples:

+ + +
group do
+  input :input1, :input2, :input3
+  input_order :input3, :input2, :input1
+end
+ +
+

Parameters:

+
    + +
  • + + new_input_order + + + (Array<String,Symbol>) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<String, Symbol>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+116
+117
+118
+119
+120
+
+
# File 'lib/inferno/dsl/input_output_handling.rb', line 116
+
+def input_order(*new_input_order)
+  return @input_order = new_input_order if new_input_order.present?
+
+  @input_order ||= []
+end
+
+
+ +
+

+ + #output(identifier, *other_identifiers, **output_definition) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define outputs

+ + +
+
+
+ +
+

Examples:

+ + +
output :patient_id, :condition_id, :observation_id
+ + +
output :oauth_credentials, type: 'oauth_credentials'
+ +
+

Parameters:

+
    + +
  • + + identifier + + + (Symbol) + + + + — +

    identifier for the output

    +
    + +
  • + +
  • + + other_identifiers + + + (Symbol) + + + + — +

    array of symbols if specifying multiple outputs

    +
    + +
  • + +
  • + + output_definition + + + (Hash) + + + + — +

    options for output

    +
    + +
  • + +
+ + + + + + + + +

Options Hash (**output_definition):

+
    + +
  • + :type + (String) + + + + + —

    text, textarea, or oauth_credentials

    +
    + +
  • + +
+ + + +
+ + + + +
+
+
+
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+
+
# File 'lib/inferno/dsl/input_output_handling.rb', line 57
+
+def output(identifier, *other_identifiers, **output_definition)
+  if other_identifiers.present?
+    [identifier, *other_identifiers].compact.each do |output_identifier|
+      outputs << output_identifier
+      config.add_output(output_identifier)
+      children
+        .reject { |child| child.outputs.include? output_identifier }
+        .each do |child|
+          child.output(output_identifier)
+        end
+    end
+  else
+    outputs << identifier
+    config.add_output(identifier, output_definition)
+    children
+      .reject { |child| child.outputs.include? identifier }
+      .each do |child|
+        child.output(identifier, **output_definition)
+      end
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/JWKS.html b/docs/docs/Inferno/DSL/JWKS.html new file mode 100644 index 000000000..e16148fe1 --- /dev/null +++ b/docs/docs/Inferno/DSL/JWKS.html @@ -0,0 +1,365 @@ + + + + + + + Class: Inferno::DSL::JWKS + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::JWKS + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/jwks.rb
+
+ +
+ +

Overview

+
+

The JWKS class provides methods to handle JSON Web Key Sets (JWKS) +within Inferno.

+ +

This class allows users to fetch, parse, and manage JWKS, ensuring +that the necessary keys for verifying tokens are available.

+ + +
+
+
+ + +
+ + + + + + + +

+ Class Method Summary + collapse +

+ +
    + +
  • + + + .jwks(user_jwks: nil) ⇒ JWT::JWK::Set + + + + + + + + + + + + + +

    Parses and returns a JWT::JWK::Set object from the provided JWKS string or from the file located at the JWKS path.

    +
    + +
  • + + +
  • + + + .jwks_json ⇒ String + + + + + + + + + + + + + +

    Returns a formatted JSON string of the JWKS public keys that are used for verification.

    +
    + +
  • + + +
+ + + + +
+

Class Method Details

+ + +
+

+ + .jwks(user_jwks: nil) ⇒ JWT::JWK::Set + + + + + +

+
+

Parses and returns a JWT::JWK::Set object from the provided JWKS string +or from the file located at the JWKS path. If a user-provided JWKS string +is not available, it reads the JWKS from the file.

+ + +
+
+
+ +
+

Examples:

+ + +
# Using a user-provided JWKS string
+user_jwks = '{"keys":[...]}'
+jwks_set = Inferno::JWKS.jwks(user_jwks: user_jwks)
+
+# Using the default JWKS file
+jwks_set = Inferno::JWKS.jwks
+ +
+

Parameters:

+
    + +
  • + + user_jwks + + + (String, nil) + + + (defaults to: nil) + + + — +

    An optional json containing the JWKS. +If not provided, the method reads from the file.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (JWT::JWK::Set) + + + + — +

    The parsed JWKS set.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+71
+72
+73
+
+
# File 'lib/inferno/dsl/jwks.rb', line 71
+
+def jwks(user_jwks: nil)
+  JWT::JWK::Set.new(JSON.parse(user_jwks.presence || default_jwks_json))
+end
+
+
+ +
+

+ + .jwks_jsonString + + + + + +

+
+

Returns a formatted JSON string of the JWKS public keys that are used for verification. +This method filters out keys that do not have the ‘verify’ operation.

+ + +
+
+
+ +
+

Examples:

+ + +
jwks_json = Inferno::JWKS.jwks_json
+puts jwks_json
+ +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    The formatted JSON string of the JWKS public keys.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+
+
# File 'lib/inferno/dsl/jwks.rb', line 18
+
+def jwks_json
+  @jwks_json ||=
+    JSON.pretty_generate(
+      { keys: jwks.export[:keys].select { |key| key[:key_ops]&.include?('verify') } }
+    )
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Links.html b/docs/docs/Inferno/DSL/Links.html new file mode 100644 index 000000000..cfe322b87 --- /dev/null +++ b/docs/docs/Inferno/DSL/Links.html @@ -0,0 +1,889 @@ + + + + + + + Module: Inferno::DSL::Links + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Links + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/links.rb
+
+ +
+ +

Overview

+
+

This module contains methods to add test suite links which are displayed in the footer of the UI

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
DEFAULT_TYPES = + +
+
{
+  'report_issue' => 'Report Issue',
+  'source_code' => 'Open Source',
+  'download' => 'Download',
+  'ig' => 'Implementation Guide'
+}.freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+
+
+

Add a link to the test suit links list.

+ + +
+
+
+ +
+

Examples:

+ + +
add_link('source_code', 'Source Code', 'https://github.com/onc-healthit/onc-certification-g10-test-kit/')
+add_link('custom_type', 'Custom Link', 'https://custom-link.com')
+ +
+

Parameters:

+
    + +
  • + + type + + + (String) + + + + — +

    The type of the link. Default types: report_issue, source_code, download, or ig. +Custom types are also allowed.

    +
    + +
  • + +
  • + + label + + + (String) + + + + — +

    The label for the link, describing its purpose.

    +
    + +
  • + +
  • + + url + + + (String) + + + + — +

    The URL the link points to.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    The updated array of links.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+51
+52
+53
+
+
# File 'lib/inferno/dsl/links.rb', line 51
+
+def add_link(type, label, url)
+  links << { type:, label:, url: }
+end
+
+
+ +
+

+ + #download_url(url, label: nil) ⇒ Array<Hash> + + + + + +

+
+

Add a link to the latest release version of the test kit.

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + + — +

    The URL to the latest release version of the test kit.

    +
    + +
  • + +
  • + + label + + + (String) + + + (defaults to: nil) + + + — +

    (optional) A custom label for the link.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    The updated array of links.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+78
+79
+80
+
+
# File 'lib/inferno/dsl/links.rb', line 78
+
+def download_url(url, label: nil)
+  add_predefined_link('download', url, label)
+end
+
+
+ +
+

+ + #ig_url(url, label: nil) ⇒ Array<Hash> + + + + + +

+
+

Add a link to the implementation guide.

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + + — +

    The URL to the implementation guide.

    +
    + +
  • + +
  • + + label + + + (String) + + + (defaults to: nil) + + + — +

    (optional) A custom label for the link.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    The updated array of links.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+69
+70
+71
+
+
# File 'lib/inferno/dsl/links.rb', line 69
+
+def ig_url(url, label: nil)
+  add_predefined_link('ig', url, label)
+end
+
+
+ +
+
+
+

Set/get a list of links which are displayed in the footer of the UI.

+ + +
+
+
+ +
+

Examples:

+ + +
links [
+  {
+    type: 'report_issue',
+    label: 'Report Issue',
+    url: 'https://github.com/onc-healthit/onc-certification-g10-test-kit/issues/'
+  },
+  {
+    type: 'source_code'
+    label: 'Open Source',
+    url: 'https://github.com/onc-healthit/onc-certification-g10-test-kit/'
+  }
+]
+ +
+

Parameters:

+
    + +
  • + + links + + + (Array<Hash>) + + + (defaults to: nil) + + + — +

    A list of Hashes for the links to be +displayed. Each hash needs a type:, label:, and url: entry. +Default types: report_issue, source_code, download, or ig.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    an array of hashes or an empty array

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+
+
# File 'lib/inferno/dsl/links.rb', line 33
+
+def links(links = nil)
+  @links ||= []
+  return @links if links.nil?
+
+  @links.concat(links)
+end
+
+
+ +
+

+ + #report_issue_url(url, label: nil) ⇒ Array<Hash> + + + + + +

+
+

Add a link to report an issue in the footer of the UI.

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + + — +

    The URL for reporting an issue.

    +
    + +
  • + +
  • + + label + + + (String) + + + (defaults to: nil) + + + — +

    (optional) A custom label for the link.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    The updated array of links.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+87
+88
+89
+
+
# File 'lib/inferno/dsl/links.rb', line 87
+
+def report_issue_url(url, label: nil)
+  add_predefined_link('report_issue', url, label)
+end
+
+
+ +
+

+ + #source_code_url(url, label: nil) ⇒ Array<Hash> + + + + + +

+
+

Add a link to the source code repository.

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + + — +

    The URL to the source code repository.

    +
    + +
  • + +
  • + + label + + + (String) + + + (defaults to: nil) + + + — +

    (optional) A custom label for the link.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    The updated array of links.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+60
+61
+62
+
+
# File 'lib/inferno/dsl/links.rb', line 60
+
+def source_code_url(url, label: nil)
+  add_predefined_link('source_code', url, label)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Messages.html b/docs/docs/Inferno/DSL/Messages.html new file mode 100644 index 000000000..1a76a74a6 --- /dev/null +++ b/docs/docs/Inferno/DSL/Messages.html @@ -0,0 +1,454 @@ + + + + + + + Module: Inferno::DSL::Messages + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Messages + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/messages.rb
+
+ +
+ +

Overview

+
+

This module contains methods to add meessages to runnable results

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #add_message(type, message) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Add a message to the result.

+ + +
+
+
+

Parameters:

+
    + +
  • + + type + + + (String) + + + + — +

    error, warning, or info

    +
    + +
  • + +
  • + + message + + + (String) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+18
+19
+20
+
+
# File 'lib/inferno/dsl/messages.rb', line 18
+
+def add_message(type, message)
+  messages << { type: type.to_s, message: format_markdown(message) }
+end
+
+
+ +
+

+ + #info(message = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Add an informational message to the results of a test. If passed a +block, a failed assertion will become an info message and test execution +will continue.

+ + +
+
+
+ +
+

Examples:

+ + +
# Add an info message
+info 'This message will be added to the test results'
+
+# The message for the failed assertion will be treated as an info
+# message. Test exection will continue.
+info { assert false == true }
+ +
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+
+
# File 'lib/inferno/dsl/messages.rb', line 35
+
+def info(message = nil)
+  unless block_given?
+    add_message('info', message) unless message.nil?
+    return
+  end
+
+  yield
+rescue Exceptions::AssertionException => e
+  add_message('info', e.message)
+end
+
+
+ +
+

+ + #warning(message = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Add a warning message to the results of a test. If passed a block, a +failed assertion will become a warning message and test execution will +continue.

+ + +
+
+
+ +
+

Examples:

+ + +
# Add a warning message
+warning 'This message will be added to the test results'
+
+# The message for the failed assertion will be treated as a warning
+# message. Test exection will continue.
+warning { assert false == true }
+ +
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+
+
# File 'lib/inferno/dsl/messages.rb', line 59
+
+def warning(message = nil)
+  unless block_given?
+    add_message('warning', message) unless message.nil?
+    return
+  end
+
+  yield
+rescue Exceptions::AssertionException => e
+  add_message('warning', e.message)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/OAuthCredentials.html b/docs/docs/Inferno/DSL/OAuthCredentials.html new file mode 100644 index 000000000..323a9facb --- /dev/null +++ b/docs/docs/Inferno/DSL/OAuthCredentials.html @@ -0,0 +1,674 @@ + + + + + + + Class: Inferno::DSL::OAuthCredentials + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::OAuthCredentials + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/oauth_credentials.rb
+
+ +
+ +

Overview

+
+

OAuthCredentials provide a user with a single input which allows a fhir +client to use a bearer token and automatically refresh the token when it +expires.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :access_token,
+  :refresh_token,
+  :token_url,
+  :client_id,
+  :client_secret,
+  :token_retrieval_time,
+  :expires_in,
+  :name
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #access_tokenObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #clientObject + + + + + +

+
+

Returns the value of attribute client.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+22
+23
+24
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 22
+
+def client
+  @client
+end
+
+
+ + + +
+

+ + #client_idObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #client_secretObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #expires_inObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #nameObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #refresh_tokenObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #token_retrieval_timeObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #token_urlObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/RequestStorage.html b/docs/docs/Inferno/DSL/RequestStorage.html new file mode 100644 index 000000000..afa411e34 --- /dev/null +++ b/docs/docs/Inferno/DSL/RequestStorage.html @@ -0,0 +1,547 @@ + + + + + + + Module: Inferno::DSL::RequestStorage + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::RequestStorage + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/request_storage.rb
+
+ +
+ +

Overview

+
+

This module handles storing and retrieving requests/responses made by +FHIR/HTTP clients

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #load_tagged_requests(*tags) ⇒ Inferno::Entities::Request + + + + + +

+
+

Returns requests which match all of the given tags

+ + +
+
+
+

Parameters:

+
    + +
  • + + tags + + + (String) + + + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 43
+
+def load_tagged_requests(*tags)
+  return [] if tags.blank?
+
+  Repositories::Requests.new.tagged_requests(test_session_id, tags).tap do |tagged_requests|
+    requests.concat(tagged_requests)
+  end
+end
+
+
+ +
+

+ + #requestInferno::Entities::Request? + + + + + +

+
+

Returns the most recent FHIR/HTTP request

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 20
+
+def request
+  requests.last
+end
+
+
+ +
+

+ + #requestsArray<Inferno::Entities::Request> + + + + + +

+
+

Returns the FHIR/HTTP requests that have been made in this Test

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 13
+
+def requests
+  @requests ||= []
+end
+
+
+ +
+

+ + #resourceFHIR::Model? + + + + + +

+
+

Returns the FHIR resource from the response to the most recent FHIR +request

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+35
+36
+37
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 35
+
+def resource
+  request&.resource
+end
+
+
+ +
+

+ + #responseHash? + + + + + +

+
+

Returns the response from the most recent FHIR/HTTP request

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash, nil) + + + +
  • + +
+ +
+ + + + +
+
+
+
+27
+28
+29
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 27
+
+def response
+  request&.response
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/RequestStorage/ClassMethods.html b/docs/docs/Inferno/DSL/RequestStorage/ClassMethods.html new file mode 100644 index 000000000..c0ebc07eb --- /dev/null +++ b/docs/docs/Inferno/DSL/RequestStorage/ClassMethods.html @@ -0,0 +1,378 @@ + + + + + + + Module: Inferno::DSL::RequestStorage::ClassMethods + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::RequestStorage::ClassMethods + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/request_storage.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #makes_request(*identifiers) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Specify the named requests made by a test

+ + +
+
+
+

Parameters:

+
    + +
  • + + identifiers + + + (Symbol) + + + + — +

    one or more request identifiers

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+105
+106
+107
+108
+109
+110
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 105
+
+def makes_request(*identifiers)
+  named_requests_made.concat(identifiers).uniq!
+  identifiers.each do |identifier|
+    config.add_request(identifier)
+  end
+end
+
+
+ +
+

+ + #receives_request(identifier) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Specify the name for a request received by a test

+ + +
+
+
+

Parameters:

+
    + +
  • + + identifier + + + (Symbol) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+116
+117
+118
+119
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 116
+
+def receives_request(identifier)
+  config.add_request(identifier)
+  @incoming_request_name = identifier
+end
+
+
+ +
+

+ + #uses_request(*identifiers) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Specify the named requests used by a test

+ + +
+
+
+

Parameters:

+
    + +
  • + + identifiers + + + (Symbol) + + + + — +

    one or more request identifiers

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+130
+131
+132
+133
+134
+135
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 130
+
+def uses_request(*identifiers)
+  named_requests_used.concat(identifiers).uniq!
+  identifiers.each do |identifier|
+    config.add_request(identifier)
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Results.html b/docs/docs/Inferno/DSL/Results.html new file mode 100644 index 000000000..1c61a649e --- /dev/null +++ b/docs/docs/Inferno/DSL/Results.html @@ -0,0 +1,894 @@ + + + + + + + Module: Inferno::DSL::Results + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Results + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/results.rb
+
+ +
+ +

Overview

+
+

This module contains methods to set test results.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #omit(message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as omitted.

+ + +
+
+
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+45
+46
+47
+
+
# File 'lib/inferno/dsl/results.rb', line 45
+
+def omit(message = '')
+  raise Exceptions::OmitException, message
+end
+
+
+ +
+

+ + #omit_if(test, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as omitted if a condition +is true.

+ + +
+
+
+

Parameters:

+
    + +
  • + + test + + + (Boolean) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+55
+56
+57
+
+
# File 'lib/inferno/dsl/results.rb', line 55
+
+def omit_if(test, message = '')
+  raise Exceptions::OmitException, message if test
+end
+
+
+ +
+

+ + #pass(message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as passed.

+ + +
+
+
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/inferno/dsl/results.rb', line 9
+
+def pass(message = '')
+  raise Exceptions::PassException, message
+end
+
+
+ +
+

+ + #pass_if(test, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as passed if a condition +is true.

+ + +
+
+
+

Parameters:

+
    + +
  • + + test + + + (Boolean) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/dsl/results.rb', line 19
+
+def pass_if(test, message = '')
+  raise Exceptions::PassException, message if test
+end
+
+
+ +
+

+ + #skip(message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as skipped.

+ + +
+
+
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+27
+28
+29
+
+
# File 'lib/inferno/dsl/results.rb', line 27
+
+def skip(message = '')
+  raise Exceptions::SkipException, message
+end
+
+
+ +
+

+ + #skip_if(test, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as skipped if a condition +is true.

+ + +
+
+
+

Parameters:

+
    + +
  • + + test + + + (Boolean) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+37
+38
+39
+
+
# File 'lib/inferno/dsl/results.rb', line 37
+
+def skip_if(test, message = '')
+  raise Exceptions::SkipException, message if test
+end
+
+
+ +
+

+ + #wait(identifier:, message: '', timeout: 300) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and wait for execution to resume.

+ + +
+
+
+ +
+

Examples:

+ + +
resume_test_route :get, '/launch' do
+  request.query_parameters['iss']
+end
+
+test do
+  input :issuer
+  receives_request :launch
+
+  run do
+    wait(
+      identifier: issuer,
+      message: "Wating to receive a request with an issuer of #{issuer}"
+    )
+  end
+end
+ +
+

Parameters:

+
    + +
  • + + identifier + + + (String) + + + + — +

    An identifier which can uniquely identify +this test run based on an incoming request. This is necessary so that +the correct test run can be resumed.

    +
    + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
  • + + timeout + + + (Integer) + + + (defaults to: 300) + + + — +

    Number of seconds to wait for an incoming +request

    +
    + +
  • + +
+ +

Raises:

+ + +

See Also:

+ + +
+ + + + +
+
+
+
+85
+86
+87
+88
+89
+90
+
+
# File 'lib/inferno/dsl/results.rb', line 85
+
+def wait(identifier:, message: '', timeout: 300)
+  identifier(identifier)
+  wait_timeout(timeout)
+
+  raise Exceptions::WaitException, message
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Runnable.html b/docs/docs/Inferno/DSL/Runnable.html new file mode 100644 index 000000000..fbd9ed333 --- /dev/null +++ b/docs/docs/Inferno/DSL/Runnable.html @@ -0,0 +1,1917 @@ + + + + + + + Module: Inferno::DSL::Runnable + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Runnable + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/runnable.rb
+
+ +
+ +

Overview

+
+

This module contains the DSL for defining child entities in the test +definition framework.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #parentObject + + + + + +

+
+

Returns the value of attribute parent.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+12
+13
+14
+
+
# File 'lib/inferno/dsl/runnable.rb', line 12
+
+def parent
+  @parent
+end
+
+
+ + + +
+

+ + #suite_option_requirementsObject (readonly) + + + + + +

+
+

Returns the value of attribute suite_option_requirements.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/dsl/runnable.rb', line 13
+
+def suite_option_requirements
+  @suite_option_requirements
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #block(&block) ⇒ Proc + + + + Also known as: + run + + + + +

+
+

Set/Get the block that is executed when a runnable is run

+ + +
+
+
+

Parameters:

+
    + +
  • + + block + + + (Proc) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Proc) + + + + — +

    the block that is executed when a runnable is run

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+303
+304
+305
+306
+307
+
+
# File 'lib/inferno/dsl/runnable.rb', line 303
+
+def block(&block)
+  return @block unless block_given?
+
+  @block = block
+end
+
+
+ +
+

+ + #description(new_description = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s description

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_description + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the description

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+235
+236
+237
+238
+239
+
+
# File 'lib/inferno/dsl/runnable.rb', line 235
+
+def description(new_description = nil)
+  return @description if new_description.nil?
+
+  @description = format_markdown(new_description)
+end
+
+
+ +
+

+ + #id(new_id = nil) ⇒ String, Symbol + + + + + +

+
+

Set/Get a runnable’s id

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_id + + + (String, Symbol) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String, Symbol) + + + + — +

    the id

    +
    + +
  • + +
+

Raises:

+ + +
+ + + + +
+
+
+
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+
+
# File 'lib/inferno/dsl/runnable.rb', line 192
+
+def id(new_id = nil)
+  return @id if new_id.nil? && @id.present?
+
+  prefix =
+    if parent
+      "#{parent.id}-"
+    else
+      ''
+    end
+
+  @base_id = new_id || @base_id || default_id
+
+  final_id = "#{prefix}#{@base_id}"
+
+  raise Exceptions::InvalidRunnableIdException, final_id if final_id.length > 255
+
+  @id = final_id
+end
+
+
+ +
+

+ + #input_instructions(new_input_instructions = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s input instructions

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_input_instructions + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the input instructions

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+255
+256
+257
+258
+259
+
+
# File 'lib/inferno/dsl/runnable.rb', line 255
+
+def input_instructions(new_input_instructions = nil)
+  return @input_instructions if new_input_instructions.nil?
+
+  @input_instructions = format_markdown(new_input_instructions)
+end
+
+
+ +
+

+ + #optional(optional = true) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Mark as optional. Tests are required by default.

+ + +
+
+
+

Parameters:

+
    + +
  • + + optional + + + (Boolean) + + + (defaults to: true) + + +
  • + +
+ + +
+ + + + +
+
+
+
+265
+266
+267
+
+
# File 'lib/inferno/dsl/runnable.rb', line 265
+
+def optional(optional = true) # rubocop:disable Style/OptionalBooleanParameter
+  @optional = optional
+end
+
+
+ +
+

+ + #optional?Boolean + + + + + +

+
+

The test or group is optional if true

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+283
+284
+285
+
+
# File 'lib/inferno/dsl/runnable.rb', line 283
+
+def optional?
+  !!@optional
+end
+
+
+ +
+

+ + #required(required = true) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Mark as required

+ +

Tests are required by default. This method is provided to make an +existing optional test required.

+ + +
+
+
+

Parameters:

+
    + +
  • + + required + + + (Boolean) + + + (defaults to: true) + + +
  • + +
+ + +
+ + + + +
+
+
+
+276
+277
+278
+
+
# File 'lib/inferno/dsl/runnable.rb', line 276
+
+def required(required = true) # rubocop:disable Style/OptionalBooleanParameter
+  @optional = !required
+end
+
+
+ +
+

+ + #required?Boolean + + + + + +

+
+

The test or group is required if true

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+290
+291
+292
+
+
# File 'lib/inferno/dsl/runnable.rb', line 290
+
+def required?
+  !optional?
+end
+
+
+ +
+

+ + #required_suite_options(suite_option_requirements) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Set/get suite options required for this runnable to be executed.

+ + +
+
+
+ +
+

Examples:

+ + +
suite_option :ig_version,
+            list_options: [
+              {
+                label: 'IG v1',
+                value: 'ig_v1'
+              },
+              {
+                label: 'IG v2',
+                value: 'ig_v2'
+              }
+            ]
+
+group from: :ig_v1_group,
+      required_suite_options: { ig_version: 'ig_v1' }
+
+group from: :ig_v2_group do
+  required_suite_options ig_version: 'ig_v2'
+end
+ +
+

Parameters:

+
    + +
  • + + suite_option_requirements + + + (Hash) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+448
+449
+450
+451
+452
+453
+
+
# File 'lib/inferno/dsl/runnable.rb', line 448
+
+def required_suite_options(suite_option_requirements)
+  @suite_option_requirements =
+    suite_option_requirements.map do |key, value|
+      DSL::SuiteOption.new(id: key, value:)
+    end
+end
+
+
+ +
+

+ + #resume_test_route(method, path, tags: [], result: 'pass') { ... } ⇒ void + + + + + +

+
+

This method returns an undefined value.

Create a route which will resume a test run when a request is received

+ + +
+
+
+ +
+

Examples:

+ + +
resume_test_route :get, '/launch', tags: ['launch'] do
+  request.query_parameters['iss']
+end
+
+test do
+  input :issuer
+  receives_request :launch
+
+  run do
+    wait(
+      identifier: issuer,
+      message: "Wating to receive a request with an issuer of #{issuer}"
+    )
+  end
+end
+ +
+

Parameters:

+
    + +
  • + + method + + + (Symbol) + + + + — +

    the HTTP request type (:get, :post, etc.) for the +incoming request

    +
    + +
  • + +
  • + + path + + + (String) + + + + — +

    the path for this request. The route will be served +with a prefix of /custom/TEST_SUITE_ID to prevent path conflicts. +Any of the path options available in Hanami +Router +can be used here.

    +
    + +
  • + +
  • + + tags + + + (Array<String>) + + + (defaults to: []) + + + — +

    a list of tags to assign to the request

    +
    + +
  • + +
  • + + result + + + (String) + + + (defaults to: 'pass') + + + — +

    the result for the waiting test. Must be one of: +‘pass’, ‘fail’, ‘skip’, ‘omit’, ‘cancel’

    +
    + +
  • + +
+ +

Yields:

+
    + +
  • + + + + + + + +

    This method takes a block which must return the identifier +defined when a test was set to wait for the test run that hit this +route. The block has access to the request method which returns a +Entities::Request object with the information for the +incoming request.

    +
    + +
  • + +
+ +

See Also:

+ + +
+ + + + +
+
+
+
+359
+360
+361
+362
+363
+364
+365
+366
+367
+
+
# File 'lib/inferno/dsl/runnable.rb', line 359
+
+def resume_test_route(method, path, tags: [], result: 'pass', &block)
+  route_class = Class.new(ResumeTestRoute) do |klass|
+    klass.singleton_class.instance_variable_set(:@test_run_identifier_block, block)
+    klass.singleton_class.instance_variable_set(:@tags, tags)
+    klass.singleton_class.instance_variable_set(:@result, result)
+  end
+
+  route(method, path, route_class)
+end
+
+
+ +
+

+ + #route(method, path, handler) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Create a route to handle a request

+ + +
+
+
+

Parameters:

+
    + +
  • + + method + + + (Symbol) + + + + — +

    the HTTP request type (:get, :post, etc.) for the +incoming request. :all will accept all HTTP request types.

    +
    + +
  • + +
  • + + path + + + (String) + + + + — +

    the path for this request. The route will be served +with a prefix of /custom/TEST_SUITE_ID to prevent path conflicts. +Any of the path options available in Hanami +Router +can be used here.

    +
    + +
  • + +
  • + + handler + + + (#call) + + + + — +

    the route handler. This can be any Rack +compatible object (e.g. a Proc object, a Sinatra +app) as described in the Hanami Router +documentation.

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+401
+402
+403
+
+
# File 'lib/inferno/dsl/runnable.rb', line 401
+
+def route(method, path, handler)
+  Inferno.routes << { method:, path:, handler:, suite: }
+end
+
+
+ +
+

+ + #short_description(new_short_description = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s short one-sentence description

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_short_description + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the one-sentence description

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+245
+246
+247
+248
+249
+
+
# File 'lib/inferno/dsl/runnable.rb', line 245
+
+def short_description(new_short_description = nil)
+  return @short_description if new_short_description.nil?
+
+  @short_description = format_markdown(new_short_description)
+end
+
+
+ +
+

+ + #short_title(new_short_title = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s short title

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_short_title + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the short title

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+225
+226
+227
+228
+229
+
+
# File 'lib/inferno/dsl/runnable.rb', line 225
+
+def short_title(new_short_title = nil)
+  return @short_title if new_short_title.nil?
+
+  @short_title = new_short_title
+end
+
+
+ +
+

+ + #suite_endpoint(method, path, endpoint_class) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Create an endpoint to receive incoming requests during a Test Run.

+ + +
+
+
+ +
+

Examples:

+ + +
suite_endpoint :post, '/my_suite_endpoint', MySuiteEndpoint
+ +
+

Parameters:

+
    + +
  • + + method + + + (Symbol) + + + + — +

    the HTTP request type (:get, :post, etc.) for the +incoming request

    +
    + +
  • + +
  • + + path + + + (String) + + + + — +

    the path for this request. The route will be served +with a prefix of /custom/TEST_SUITE_ID to prevent path conflicts. +Any of the path options available in Hanami +Router +can be used here.

    +
    + +
  • + +
  • + + a + + + (Class) + + + + — +

    subclass of Inferno::DSL::SuiteEndpoint

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+383
+384
+385
+
+
# File 'lib/inferno/dsl/runnable.rb', line 383
+
+def suite_endpoint(method, path, endpoint_class)
+  route(method, path, endpoint_class)
+end
+
+
+ +
+

+ + #title(new_title = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s title

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_title + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the title

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+215
+216
+217
+218
+219
+
+
# File 'lib/inferno/dsl/runnable.rb', line 215
+
+def title(new_title = nil)
+  return @title if new_title.nil?
+
+  @title = new_title
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/SuiteEndpoint.html b/docs/docs/Inferno/DSL/SuiteEndpoint.html new file mode 100644 index 000000000..0da5f82ee --- /dev/null +++ b/docs/docs/Inferno/DSL/SuiteEndpoint.html @@ -0,0 +1,1655 @@ + + + + + + + Class: Inferno::DSL::SuiteEndpoint + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::SuiteEndpoint + + + +

+
+ +
+
Inherits:
+
+ Hanami::Action + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/suite_endpoint.rb
+
+ +
+ +

Overview

+
+

A base class for creating endpoints to test client requests. This class is +based on Hanami::Action, and may be used similarly to a normal Hanami +endpoint.

+ + +
+
+
+ +
+

Examples:

+ + +
class AuthorizedEndpoint < Inferno::DSL::SuiteEndpoint
+  # Identify the incoming request based on a bearer token
+  def test_run_identifier
+    request.header['authorization']&.delete_prefix('Bearer ')
+  end
+
+  # Return a json FHIR Patient resource
+  def make_response
+    response.status = 200
+    response.body = FHIR::Patient.new(id: 'abcdef').to_json
+    response.format = :json
+  end
+
+  # Update the waiting test to pass when the incoming request is received.
+  # This will resume the test run.
+  def update_result
+    results_repo.update(result.id, result: 'pass')
+  end
+
+  # Apply the 'authorized' tag to the incoming request so that it may be
+  # used by later tests.
+  def tags
+    ['authorized']
+  end
+end
+
+class AuthorizedRequestSuite < Inferno::TestSuite
+  id :authorized_suite
+  suite_endpoint :get, '/authorized_endpoint', AuthorizedEndpoint
+
+  group do
+    title 'Authorized Request Group'
+
+    test do
+      title 'Wait for authorized request'
+
+      input :bearer_token
+
+      run do
+        wait(
+          identifier: bearer_token,
+          message: "Waiting to receive a request with bearer_token: #{bearer_token}" \
+                   "at `#{Inferno::Application['base_url']}/custom/authorized_suite/authorized_endpoint`"
+        )
+      end
+    end
+  end
+end
+ +
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #req ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute req.

    +
    + +
  • + + +
  • + + + #res ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute res.

    +
    + +
  • + + +
+ + + + + +

+ Overrides These methods should be overridden by subclasses to +define the behavior of the endpoint + collapse +

+ +
    + +
  • + + + #make_response ⇒ Void + + + + + + + + + + + + + +

    Override this method to build the response.

    +
    + +
  • + + +
  • + + + #name ⇒ String + + + + + + + + + + + + + +

    Override this method to assign a name to the request.

    +
    + +
  • + + +
  • + + + #persist_request? ⇒ Boolean + + + + + + + + + + + + + +

    Override this method to specify whether this request should be persisted.

    +
    + +
  • + + +
  • + + + #tags ⇒ Array<String> + + + + + + + + + + + + + +

    Override this method to define the tags which will be applied to the request.

    +
    + +
  • + + +
  • + + + #test_run_identifier ⇒ String + + + + + + + + + + + + + +

    Override this method to determine a test run’s identifier based on an incoming request.

    +
    + +
  • + + +
  • + + + #update_result ⇒ Void + + + + + + + + + + + + + +

    Override this method to update the current waiting result.

    +
    + +
  • + + +
+ +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #reqObject (readonly) + + + + + +

+
+

Returns the value of attribute req.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+61
+62
+63
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 61
+
+def req
+  @req
+end
+
+
+ + + +
+

+ + #resObject (readonly) + + + + + +

+
+

Returns the value of attribute res.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+61
+62
+63
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 61
+
+def res
+  @res
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #loggerLogger + + + + + +

+
+

Returns Inferno’s logger.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Logger) + + + + — +

    Inferno’s logger

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+215
+216
+217
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 215
+
+def logger
+  @logger ||= Application['logger']
+end
+
+
+ +
+

+ + #make_responseVoid + + + + + +

+
+

Override this method to build the response.

+ + +
+
+
+ +
+

Examples:

+ + +
def make_response
+  response.status = 200
+  response.body = { abc: 123 }.to_json
+  response.format = :json
+end
+ +
+ +

Returns:

+
    + +
  • + + + (Void) + + + +
  • + +
+ +
+ + + + +
+
+
+
+91
+92
+93
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 91
+
+def make_response
+  nil
+end
+
+
+ +
+

+ + #nameString + + + + + +

+
+

Override this method to assign a name to the request

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+106
+107
+108
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 106
+
+def name
+  result&.runnable&.incoming_request_name
+end
+
+
+ +
+

+ + #persist_request?Boolean + + + + + +

+
+

Override this method to specify whether this request should be +persisted. Defaults to true.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+127
+128
+129
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 127
+
+def persist_request?
+  true
+end
+
+
+ +
+

+ + #requestHanami::Action::Request + + + + + +

+
+

The incoming request as a Hanami::Action::Request

+ + +
+
+
+ +
+

Examples:

+ + +
request.params               # Get url/query params
+request.body.read            # Get body
+request.headers['accept']    # Get Accept header
+ +
+ +

Returns:

+
    + +
  • + + + (Hanami::Action::Request) + + + +
  • + +
+ +
+ + + + +
+
+
+
+171
+172
+173
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 171
+
+def request
+  req
+end
+
+
+ +
+

+ + #requests_repoInferno::Repositories::Requests + + + + + +

+
+ + + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+139
+140
+141
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 139
+
+def requests_repo
+  @requests_repo ||= Inferno::Repositories::Requests.new
+end
+
+
+ +
+

+ + #responseHanami::Action::Response + + + + + +

+
+

The response as a Hanami::Action::Response. Modify this to build the +response to the incoming request.

+ + +
+
+
+ +
+

Examples:

+ + +
response.status = 200        # Set the status
+response.body = 'Ok'         # Set the body
+# Set headers
+response.headers.merge!('X-Custom-Header' => 'CUSTOM_HEADER_VALUE')
+ +
+ +

Returns:

+
    + +
  • + + + (Hanami::Action::Response) + + + +
  • + +
+ +
+ + + + +
+
+
+
+185
+186
+187
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 185
+
+def response
+  res
+end
+
+
+ +
+

+ + #resultInferno::Entities::Result + + + + + +

+
+

The result which is waiting for incoming requests for the current test +run

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+203
+204
+205
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 203
+
+def result
+  @result ||= find_result
+end
+
+
+ +
+

+ + #results_repoInferno::Repositories::Results + + + + + +

+
+ + + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+144
+145
+146
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 144
+
+def results_repo
+  @results_repo ||= Inferno::Repositories::Results.new
+end
+
+
+ +
+

+ + #tagsArray<String> + + + + + +

+
+

Override this method to define the tags which will be applied to the +request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Array<String>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+99
+100
+101
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 99
+
+def tags
+  @tags ||= []
+end
+
+
+ +
+

+ + #testInferno::Entities::Test + + + + + +

+
+

The test which is currently waiting for incoming requests

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+210
+211
+212
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 210
+
+def test
+  @test ||= tests_repo.find(result.test_id)
+end
+
+
+ +
+

+ + #test_runInferno::Entities::TestRun + + + + + +

+
+

The test run which is waiting for incoming requests

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+192
+193
+194
+195
+196
+197
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 192
+
+def test_run
+  @test_run ||=
+    test_runs_repo.find_latest_waiting_by_identifier(find_test_run_identifier).tap do |test_run|
+      halt 500, "Unable to find test run with identifier '#{test_run_identifier}'." if test_run.nil?
+    end
+end
+
+
+ +
+

+ + #test_run_identifierString + + + + + +

+
+

Override this method to determine a test run’s identifier based on an +incoming request.

+ + +
+
+
+ +
+

Examples:

+ + +
def test_run_identifier
+  # Identify the test session of an incoming request based on the bearer
+  # token
+  request.headers['authorization']&.delete_prefix('Bearer ')
+end
+ +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+77
+78
+79
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 77
+
+def test_run_identifier
+  nil
+end
+
+
+ +
+

+ + #test_runs_repoInferno::Repositories::TestRuns + + + + + +

+
+ + + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+149
+150
+151
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 149
+
+def test_runs_repo
+  @test_runs_repo ||= Inferno::Repositories::TestRuns.new
+end
+
+
+ +
+

+ + #tests_repoInferno::Repositories::Tests + + + + + +

+
+ + + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+154
+155
+156
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 154
+
+def tests_repo
+  @tests_repo ||= Inferno::Repositories::Tests.new
+end
+
+
+ +
+

+ + #update_resultVoid + + + + + +

+
+

Override this method to update the current waiting result. To resume the +test run, set the result to something other than ‘waiting’.

+ + +
+
+
+ +
+

Examples:

+ + +
def update_result
+  results_repo.update(result.id, result: 'pass')
+end
+ +
+ +

Returns:

+
    + +
  • + + + (Void) + + + +
  • + +
+ +
+ + + + +
+
+
+
+119
+120
+121
+
+
# File 'lib/inferno/dsl/suite_endpoint.rb', line 119
+
+def update_result
+  nil
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/SuiteOption.html b/docs/docs/Inferno/DSL/SuiteOption.html new file mode 100644 index 000000000..fde29bf18 --- /dev/null +++ b/docs/docs/Inferno/DSL/SuiteOption.html @@ -0,0 +1,448 @@ + + + + + + + Class: Inferno::DSL::SuiteOption + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::SuiteOption + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/suite_option.rb
+
+ +
+ +

Overview

+
+

This class is used to represent TestSuite-level options which are selected +by the user, and can affect which tests/groups are displayed and run as +well as the behavior of those tests.

+ + +
+
+
+ + +

See Also:

+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :title,
+  :description,
+  :list_options,
+  :value
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #descriptionObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ + + +
+

+ + #idObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ + + +
+

+ + #list_optionsObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ + + +
+

+ + #titleObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ + + +
+

+ + #valueObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities.html b/docs/docs/Inferno/Entities.html new file mode 100644 index 000000000..810ad67b4 --- /dev/null +++ b/docs/docs/Inferno/Entities.html @@ -0,0 +1,130 @@ + + + + + + + Module: Inferno::Entities + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Entities + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities.rb,
+ lib/inferno/entities/ig.rb,
lib/inferno/entities/test.rb,
lib/inferno/entities/input.rb,
lib/inferno/entities/entity.rb,
lib/inferno/entities/header.rb,
lib/inferno/entities/preset.rb,
lib/inferno/entities/result.rb,
lib/inferno/entities/message.rb,
lib/inferno/entities/request.rb,
lib/inferno/entities/test_kit.rb,
lib/inferno/entities/test_run.rb,
lib/inferno/entities/attributes.rb,
lib/inferno/entities/test_group.rb,
lib/inferno/entities/test_suite.rb,
lib/inferno/entities/has_runnable.rb,
lib/inferno/entities/session_data.rb,
lib/inferno/entities/test_session.rb,
lib/inferno/entities/validator_session.rb
+
+
+ +
+ +

Overview

+
+

Entities are domain objects whose identity is based on an id. Entities +don’t know anything about persistence, which is handled by Repositories.

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: HasRunnable + + + + Classes: Entity, Header, IG, Input, Message, Preset, Request, Result, SessionData, Test, TestGroup, TestKit, TestRun, TestSession, TestSuite, ValidatorSession + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Entity.html b/docs/docs/Inferno/Entities/Entity.html new file mode 100644 index 000000000..a6e519667 --- /dev/null +++ b/docs/docs/Inferno/Entities/Entity.html @@ -0,0 +1,268 @@ + + + + + + + Class: Inferno::Entities::Entity + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Entity + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/entity.rb
+
+ +
+ + + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(params, attributes) ⇒ Entity + + + + + +

+
+

Returns a new instance of Entity.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+4
+5
+6
+
+
# File 'lib/inferno/entities/entity.rb', line 4
+
+def initialize(params, attributes)
+  attributes.each { |name| instance_variable_set("@#{name}", params[name]) }
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+8
+9
+10
+11
+12
+
+
# File 'lib/inferno/entities/entity.rb', line 8
+
+def to_hash
+  self.class::ATTRIBUTES.each_with_object({}) do |attribute, hash|
+    hash[attribute] = send(attribute)
+  end.compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/HasRunnable.html b/docs/docs/Inferno/Entities/HasRunnable.html new file mode 100644 index 000000000..2a067648a --- /dev/null +++ b/docs/docs/Inferno/Entities/HasRunnable.html @@ -0,0 +1,207 @@ + + + + + + + Module: Inferno::Entities::HasRunnable + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Entities::HasRunnable + + + +

+
+ + + + + + + + + +
+
Included in:
+
Preset, Result, TestRun
+
+ + + +
+
Defined in:
+
lib/inferno/entities/has_runnable.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runnableInferno::Entities::Test, ... + + + + + +

+
+

Returns the Test, TestGroup, or TestSuite associated with this entity

+ + +
+
+ + + + + +
+
+
+
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/entities/has_runnable.rb', line 7
+
+def runnable
+  return @runnable if @runnable
+
+  @runnable = test || test_group || test_suite || load_runnable
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Header.html b/docs/docs/Inferno/Entities/Header.html new file mode 100644 index 000000000..01494792e --- /dev/null +++ b/docs/docs/Inferno/Entities/Header.html @@ -0,0 +1,1139 @@ + + + + + + + Class: Inferno::Entities::Header + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Header + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/header.rb
+
+ +
+ +

Overview

+
+

A Header represents an HTTP request/response header

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[:id, :request_id, :name, :type, :value].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ Header + + + + + +

+
+

Returns a new instance of Header.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/inferno/entities/header.rb', line 20
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the header.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the header

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ + + +
+

+ + #nameString + + + + + +

+
+

Returns header name.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    header name

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ + + +
+

+ + #request_idString + + + + + +

+
+

Returns index of the HTTP request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    index of the HTTP request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ + + +
+

+ + #typeString + + + + + +

+
+

Returns request/response.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    request/response

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ + + +
+

+ + #valueString + + + + + +

+
+

Returns header value.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    header value

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #request?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+
+
# File 'lib/inferno/entities/header.rb', line 24
+
+def request?
+  type == 'request'
+end
+
+
+ +
+

+ + #response?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/inferno/entities/header.rb', line 28
+
+def response?
+  type == 'response'
+end
+
+
+ +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+32
+33
+34
+35
+36
+37
+38
+39
+40
+
+
# File 'lib/inferno/entities/header.rb', line 32
+
+def to_hash
+  {
+    id:,
+    request_id:,
+    type:,
+    name:,
+    value:
+  }.compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/IG.html b/docs/docs/Inferno/Entities/IG.html new file mode 100644 index 000000000..361738d8b --- /dev/null +++ b/docs/docs/Inferno/Entities/IG.html @@ -0,0 +1,793 @@ + + + + + + + Class: Inferno::Entities::IG + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::IG + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/ig.rb
+
+ +
+ +

Overview

+
+

IG is a wrapper class around the relevant concepts inside an IG. +Not everything within an IG is currently used by Inferno.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :profiles,
+  :extensions,
+  :value_sets,
+  :search_params,
+  :examples
+].freeze
+ +
FILES_TO_SKIP = +
+
+

These files aren’t FHIR resources

+ + +
+
+
+ + +
+
+
['package.json', 'validation-summary.json'].freeze
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + + + +

Methods inherited from Entity

+

#to_hash

+
+

Constructor Details

+ +
+

+ + #initialize(**params) ⇒ IG + + + + + +

+
+

Returns a new instance of IG.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+
# File 'lib/inferno/entities/ig.rb', line 26
+
+def initialize(**params)
+  super(params, ATTRIBUTES)
+
+  @profiles = []
+  @extensions = []
+  @value_sets = []
+  @examples = []
+  @search_params = []
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .from_directory(ig_directory) ⇒ Object + + + + + +

+ + + + +
+
+
+
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+
+
# File 'lib/inferno/entities/ig.rb', line 77
+
+def self.from_directory(ig_directory)
+  ig = IG.new
+
+  ig_path = Pathname.new(ig_directory)
+  Dir.glob("#{ig_path}/**/*") do |f|
+    relative_path = Pathname.new(f).relative_path_from(ig_path).to_s
+    next if skip_item?(relative_path, File.directory?(f))
+
+    begin
+      resource = FHIR::Json.from_json(File.read(f))
+      next if resource.nil?
+
+      ig.handle_resource(resource, relative_path)
+    rescue StandardError
+      next
+    end
+  end
+  ig
+end
+
+
+ +
+

+ + .from_file(ig_path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+
+
# File 'lib/inferno/entities/ig.rb', line 36
+
+def self.from_file(ig_path)
+  raise "#{ig_path} does not exist" unless File.exist?(ig_path)
+
+  # fhir_models by default logs the entire content of non-FHIR files
+  # which could be things like a package.json
+  original_logger = FHIR.logger
+  FHIR.logger = Logger.new('/dev/null')
+
+  if File.directory?(ig_path)
+    from_directory(ig_path)
+  elsif ig_path.end_with? '.tgz'
+    from_tgz(ig_path)
+  else
+    raise "Unable to load #{ig_path} as it does not appear to be a directory or a .tgz file"
+  end
+ensure
+  FHIR.logger = original_logger if defined? original_logger
+end
+
+
+ +
+

+ + .from_tgz(ig_path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+
+
# File 'lib/inferno/entities/ig.rb', line 55
+
+def self.from_tgz(ig_path)
+  tar = Gem::Package::TarReader.new(
+    Zlib::GzipReader.open(ig_path)
+  )
+
+  ig = IG.new
+
+  tar.each do |entry|
+    next if skip_item?(entry.full_name, entry.directory?)
+
+    begin
+      resource = FHIR::Json.from_json(entry.read)
+      next if resource.nil?
+
+      ig.handle_resource(resource, entry.full_name)
+    rescue StandardError
+      next
+    end
+  end
+  ig
+end
+
+
+ +
+

+ + .skip_item?(relative_path, is_directory) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+
+
# File 'lib/inferno/entities/ig.rb', line 100
+
+def self.skip_item?(relative_path, is_directory)
+  return true if is_directory
+
+  file_name = relative_path.split('/').last
+
+  return true unless file_name.end_with? '.json'
+  return true unless relative_path.start_with? 'package/'
+
+  return true if file_name.start_with? '.' # ignore hidden files
+  return true if file_name.end_with? '.openapi.json'
+  return true if FILES_TO_SKIP.include? file_name
+
+  false
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #extract_package_id(ig_resource) ⇒ Object + + + + + +

+ + + + +
+
+
+
+134
+135
+136
+
+
# File 'lib/inferno/entities/ig.rb', line 134
+
+def extract_package_id(ig_resource)
+  "#{ig_resource.id}##{ig_resource.version || 'current'}"
+end
+
+
+ +
+

+ + #handle_resource(resource, relative_path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+
+
# File 'lib/inferno/entities/ig.rb', line 115
+
+def handle_resource(resource, relative_path)
+  case resource.resourceType
+  when 'StructureDefinition'
+    if resource.type == 'Extension'
+      extensions.push resource
+    else
+      profiles.push resource
+    end
+  when 'ValueSet'
+    value_sets.push resource
+  when 'SearchParameter'
+    search_params.push resource
+  when 'ImplementationGuide'
+    @id = extract_package_id(resource)
+  else
+    examples.push(resource) if relative_path.start_with? 'package/example'
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Input.html b/docs/docs/Inferno/Entities/Input.html new file mode 100644 index 000000000..264b064fd --- /dev/null +++ b/docs/docs/Inferno/Entities/Input.html @@ -0,0 +1,461 @@ + + + + + + + Class: Inferno::Entities::Input + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Input + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/input.rb
+
+ +
+ +

Overview

+
+

This class represents an Input for a runnable.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :name,
+  :title,
+  :description,
+  :type,
+  :default,
+  :optional,
+  :options,
+  :locked,
+  :value
+].freeze
+ +
UNINHERITABLE_ATTRIBUTES = +
+
+

These attributes require special handling when merging input +definitions.

+ + +
+
+
+ + +
+
+
[
+  # Locking an input only has meaning at the level it is locked.
+  # Consider:
+  # - ParentGroup
+  #   - Group 1, input :a
+  #   - Group 2, input :a, locked: true
+  # The input 'a' should be only be locked when running Group 2 in
+  # isolation. It should not be locked when running Group 1 or the
+  # ParentGroup.
+  :locked,
+  # Input type is sometimes only a UI concern (e.g. text vs. textarea), so
+  # it is common to not redeclare the type everywhere it's used and needs
+  # special handling to avoid clobbering the type with the default (text)
+  # type.
+  :type
+].freeze
+ +
INHERITABLE_ATTRIBUTES = +
+
+

These are the attributes that can be directly copied when merging a +runnable’s input with the input of one of its children.

+ + +
+
+
+ + +
+
+
(ATTRIBUTES - UNINHERITABLE_ATTRIBUTES).freeze
+ +
MERGEABLE_ATTRIBUTES = +
+
+

These are the attributes that can be directly copied when merging a +runnable’s input with an input configuration.

+ + +
+
+
+ + +
+
+
(ATTRIBUTES - [:type]).freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(**params) ⇒ Input + + + + + +

+
+

Returns a new instance of Input.

+ + +
+
+
+ +

Raises:

+ + +
+ + + + +
+
+
+
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+
+
# File 'lib/inferno/entities/input.rb', line 48
+
+def initialize(**params)
+  bad_params = params.keys - ATTRIBUTES
+
+  raise Exceptions::UnknownAttributeException.new(bad_params, self.class) if bad_params.present?
+
+  params
+    .compact
+    .each { |key, value| send("#{key}=", value) }
+
+  self.name = name.to_s if params[:name].present?
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #==(other) ⇒ Object + + + + + +

+ + + + +
+
+
+
+115
+116
+117
+118
+119
+
+
# File 'lib/inferno/entities/input.rb', line 115
+
+def ==(other)
+  return false unless other.is_a? Input
+
+  ATTRIBUTES.all? { |attribute| send(attribute) == other.send(attribute) }
+end
+
+
+ +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+106
+107
+108
+109
+110
+111
+112
+113
+
+
# File 'lib/inferno/entities/input.rb', line 106
+
+def to_hash
+  ATTRIBUTES.each_with_object({}) do |attribute, hash|
+    value = send(attribute)
+    next if value.nil?
+
+    hash[attribute] = value
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Message.html b/docs/docs/Inferno/Entities/Message.html new file mode 100644 index 000000000..7a646007b --- /dev/null +++ b/docs/docs/Inferno/Entities/Message.html @@ -0,0 +1,839 @@ + + + + + + + Class: Inferno::Entities::Message + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Message + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/message.rb
+
+ +
+ +

Overview

+
+

A Message represents a message generated during a test.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[:id, :index, :message, :result_id, :result, :type].freeze
+ +
TYPES = + +
+
['error', 'warning', 'info'].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + + + +

Methods inherited from Entity

+

#to_hash

+
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ Message + + + + + +

+
+

Returns a new instance of Message.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+23
+24
+25
+
+
# File 'lib/inferno/entities/message.rb', line 23
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the message.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the message

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #indexString + + + + + +

+
+

Returns index of the message. Used for ordering.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    index of the message. Used for ordering.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #messageString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #resultInferno::Entities::Result + + + + + +

+
+ + + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #result_idString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #typeString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Preset.html b/docs/docs/Inferno/Entities/Preset.html new file mode 100644 index 000000000..051d9e6b1 --- /dev/null +++ b/docs/docs/Inferno/Entities/Preset.html @@ -0,0 +1,267 @@ + + + + + + + Class: Inferno::Entities::Preset + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Preset + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
HasRunnable
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/preset.rb
+
+ +
+ +

Overview

+
+

A Preset represents a set of input values for a runnable.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :test_suite_id,
+  :inputs,
+  :title
+].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from HasRunnable

+

#runnable

+ + + + + + + + + + + + + + + +

Methods inherited from Entity

+

#to_hash

+
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ Preset + + + + + +

+
+

Returns a new instance of Preset.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/entities/preset.rb', line 19
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Request.html b/docs/docs/Inferno/Entities/Request.html new file mode 100644 index 000000000..ba3bf5538 --- /dev/null +++ b/docs/docs/Inferno/Entities/Request.html @@ -0,0 +1,7477 @@ + + + + + + + Class: Inferno::Entities::Request + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Request + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/request.rb
+
+ +
+ +

Overview

+
+

A Request represents a request and response issued during a test.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id, :index, :verb, :url, :direction, :name, :status,
+  :request_body, :response_body, :result_id, :test_session_id, :created_at,
+  :updated_at, :headers, :tags
+].freeze
+ +
SUMMARY_FIELDS = + +
+
[
+  :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+

Returns creation timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    creation timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #directionString + + + + + +

+
+

Returns incoming/outgoing.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    incoming/outgoing

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #headersArray<Inferno::Entities::Header> + + + + + +

+
+

Returns http request/response headers.

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #indexString + + + + + +

+
+

Returns index of the request. Used for ordering.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    index of the request. Used for ordering.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #nameString + + + + + +

+
+

Returns name for the request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    name for the request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #request_bodyString + + + + + +

+
+

Returns body of the http request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    body of the http request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #response_bodyString + + + + + +

+
+

Returns body of the http response.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    body of the http response

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #result_idString + + + + + +

+
+

Returns id of the result for this request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the result for this request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #statusString + + + + + +

+
+

Returns http response status code.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    http response status code

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #test_session_idString + + + + + +

+
+

Returns id of the test session for this request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the test session for this request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+

Returns update timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    update timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #urlString + + + + + +

+
+

Returns request url.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    request url

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #verbString + + + + + +

+
+

Returns http verb.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    http verb

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers, :tags
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+    format_tags(params[:tags] || [])
+  end
+
+  def format_tags(raw_tags)
+    @tags = raw_tags.map do |tag|
+      case tag
+      when Hash
+        tag[:name]
+      when String
+        tag
+      end
+    end
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      tags:,
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil, tags: [])
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method.downcase,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil, tags: [])
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method].downcase,
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers,
+        tags:
+      )
+    end
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #format_tags(raw_tags) ⇒ Object + + + + + +

+ + + + +
+
+
+
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+
+
# File 'lib/inferno/entities/request.rb', line 54
+
+def format_tags(raw_tags)
+  @tags = raw_tags.map do |tag|
+    case tag
+    when Hash
+      tag[:name]
+    when String
+      tag
+    end
+  end
+end
+
+
+ +
+

+ + #query_parametersHash<String, String> + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash<String, String>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+66
+67
+68
+
+
# File 'lib/inferno/entities/request.rb', line 66
+
+def query_parameters
+  Addressable::URI.parse(url).query_values || {}
+end
+
+
+ +
+

+ + #requestHash + + + + + +

+
+

Return a hash of the request parameters

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + + — +

    A Hash with :verb, :url, :headers, and :body +fields

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+104
+105
+106
+107
+108
+109
+110
+111
+
+
# File 'lib/inferno/entities/request.rb', line 104
+
+def request
+  {
+    verb:,
+    url:,
+    headers: request_headers,
+    body: request_body
+  }
+end
+
+
+ +
+

+ + #request_header(name) ⇒ Inferno::Entities::Header? + + + + + +

+
+

Find a request header

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (String) + + + + — +

    the header name.

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+82
+83
+84
+
+
# File 'lib/inferno/entities/request.rb', line 82
+
+def request_header(name)
+  request_headers.find { |header| header.name.casecmp(name).zero? }
+end
+
+
+ +
+

+ + #request_headersArray<Inferno::Entities::Header> + + + + + +

+
+

All of the request headers

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+89
+90
+91
+
+
# File 'lib/inferno/entities/request.rb', line 89
+
+def request_headers
+  headers.select(&:request?)
+end
+
+
+ +
+

+ + #resourceFHIR::Model? + + + + + +

+
+

Return the FHIR resource from the response body.

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+148
+149
+150
+
+
# File 'lib/inferno/entities/request.rb', line 148
+
+def resource
+  FHIR.from_contents(response_body)
+end
+
+
+ +
+

+ + #responseHash + + + + + +

+
+

Return a hash of the response parameters

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + + — +

    A Hash with :status, :headers, and :body fields

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+116
+117
+118
+119
+120
+121
+122
+
+
# File 'lib/inferno/entities/request.rb', line 116
+
+def response
+  {
+    status:,
+    headers: response_headers,
+    body: response_body
+  }
+end
+
+
+ +
+

+ + #response_header(name) ⇒ Inferno::Entities::Header? + + + + + +

+
+

Find a response header

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (String) + + + + — +

    the header name

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+74
+75
+76
+
+
# File 'lib/inferno/entities/request.rb', line 74
+
+def response_header(name)
+  response_headers.find { |header| header.name.casecmp(name).zero? }
+end
+
+
+ +
+

+ + #response_headersArray<Inferno::Entities::Header> + + + + + +

+
+

All of the response headers

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+96
+97
+98
+
+
# File 'lib/inferno/entities/request.rb', line 96
+
+def response_headers
+  headers.select(&:response?)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Result.html b/docs/docs/Inferno/Entities/Result.html new file mode 100644 index 000000000..98372c04f --- /dev/null +++ b/docs/docs/Inferno/Entities/Result.html @@ -0,0 +1,2954 @@ + + + + + + + Class: Inferno::Entities::Result + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Result + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
HasRunnable
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/result.rb
+
+ +
+ +

Overview

+
+

A Result represents the result of running a Test, TestGroup, +or TestSuite

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+  :test_group, :test_suite_id, :test_suite, :test_run_id,
+  :test_session_id, :result, :result_message, :messages, :requests,
+  :input_json, :output_json
+].freeze
+ +
RESULT_OPTIONS = + +
+
['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from HasRunnable

+

#runnable

+ + + + + + + + + + + + + + + +

Methods inherited from Entity

+

#to_hash

+
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ Result + + + + + +

+
+

Returns a new instance of Result.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+55
+56
+57
+58
+59
+60
+
+
# File 'lib/inferno/entities/result.rb', line 55
+
+def initialize(params)
+  super(params, ATTRIBUTES - [:messages, :requests])
+
+  @messages = (params[:messages] || []).map { |message| Message.new(message) }
+  @requests = (params[:requests] || []).map { |request| Request.new(request) }
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+

Returns creation timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    creation timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #input_jsonString + + + + + +

+
+

Returns JSON string of the inputs used for this result.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    JSON string of the inputs used for this result

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #messagesArray<Inferno::Entities::Message> + + + + + +

+
+

result

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #output_jsonString + + + + + +

+
+

Returns JSON string of the outputs created by this result.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    JSON string of the outputs created by this result

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #requestsArray<Inferno::Entities::Request> + + + + + +

+
+

associated with this result

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #resultString + + + + + +

+
+

running, wait, cancel)

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the result (pass, fail, skip, omit, error,

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #result_messageString + + + + + +

+
+

Returns summary message for this result.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    summary message for this result

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #testTest? + + + + + +

+
+

Returns the Test this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Test, nil) + + + + — +

    the Test this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_groupTestGroup? + + + + + +

+
+

Returns the TestGroup this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (TestGroup, nil) + + + + — +

    the TestGroup this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_group_idString? + + + + + +

+
+

Returns id of the TestGroup this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + + — +

    id of the TestGroup this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_idString? + + + + + +

+
+

Returns id of the Test this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + + — +

    id of the Test this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_run_idString + + + + + +

+
+

Returns the TestRun this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the TestRun this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_session_idString + + + + + +

+
+

Returns the TestSession this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the TestSession this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_suiteTestSuite? + + + + + +

+
+

Returns the TestSuite this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (TestSuite, nil) + + + + — +

    the TestSuite this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_suite_idString? + + + + + +

+
+

Returns id of the TestSuite this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + + — +

    id of the TestSuite this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+

Returns update timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    update timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  def initialize(params)
+    super(params, ATTRIBUTES - [:messages, :requests])
+
+    @messages = (params[:messages] || []).map { |message| Message.new(message) }
+    @requests = (params[:requests] || []).map { |request| Request.new(request) }
+  end
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #optional?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+62
+63
+64
+
+
# File 'lib/inferno/entities/result.rb', line 62
+
+def optional?
+  runnable.nil? || runnable.optional?
+end
+
+
+ +
+

+ + #required?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+66
+67
+68
+
+
# File 'lib/inferno/entities/result.rb', line 66
+
+def required?
+  !optional?
+end
+
+
+ +
+

+ + #waiting?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+71
+72
+73
+
+
# File 'lib/inferno/entities/result.rb', line 71
+
+def waiting?
+  result == 'wait'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/SessionData.html b/docs/docs/Inferno/Entities/SessionData.html new file mode 100644 index 000000000..e39786532 --- /dev/null +++ b/docs/docs/Inferno/Entities/SessionData.html @@ -0,0 +1,1019 @@ + + + + + + + Class: Inferno::Entities::SessionData + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::SessionData + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/session_data.rb
+
+ +
+ +

Overview

+
+

SessionData represents a piece of saved state for a TestSession. +These are used to store test inputs and outputs.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ SessionData + + + + + +

+
+

Returns a new instance of SessionData.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+23
+24
+25
+
+
# File 'lib/inferno/entities/session_data.rb', line 23
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the test input.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the test input

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #nameString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #test_session_idString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #valueString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+
+
# File 'lib/inferno/entities/session_data.rb', line 27
+
+def to_hash
+  {
+    id:,
+    name:,
+    value:,
+    test_session_id:,
+    created_at:,
+    updated_at:
+  }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Test.html b/docs/docs/Inferno/Entities/Test.html new file mode 100644 index 000000000..b4b48b305 --- /dev/null +++ b/docs/docs/Inferno/Entities/Test.html @@ -0,0 +1,967 @@ + + + + + + + Class: Inferno::Entities::Test + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Test + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable
+
+ + + +
+
Includes:
+
DSL
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/test.rb
+
+ +
+ + + + +

Constant Summary

+ +

Constants included + from DSL

+

DSL::EXTENDABLE_DSL_MODULES, DSL::INCLUDABLE_DSL_MODULES

+ + +

Instance Attribute Summary collapse

+
    + +
  • + + + #result_message ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute result_message.

    +
    + +
  • + + +
  • + + + #scratch ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute scratch.

    +
    + +
  • + + +
  • + + + #suite_options ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute suite_options.

    +
    + +
  • + + +
  • + + + #test_session_id ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute test_session_id.

    +
    + +
  • + + +
+ + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + +
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + +

+ +
+

+ + #method_missing(name) ⇒ Object + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+50
+51
+52
+53
+54
+
+
# File 'lib/inferno/entities/test.rb', line 47
+
+def method_missing(name, ...)
+  parent_instance = self.class.parent&.new
+  if parent_instance.respond_to?(name)
+    parent_instance.send(name, ...)
+  else
+    super
+  end
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #result_messageObject + + + + + +

+
+

Returns the value of attribute result_message.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/entities/test.rb', line 13
+
+def result_message
+  @result_message
+end
+
+
+ + + +
+

+ + #scratchObject (readonly) + + + + + +

+
+

Returns the value of attribute scratch.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+14
+15
+16
+
+
# File 'lib/inferno/entities/test.rb', line 14
+
+def scratch
+  @scratch
+end
+
+
+ + + +
+

+ + #suite_optionsObject (readonly) + + + + + +

+
+

Returns the value of attribute suite_options.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+14
+15
+16
+
+
# File 'lib/inferno/entities/test.rb', line 14
+
+def suite_options
+  @suite_options
+end
+
+
+ + + +
+

+ + #test_session_idObject (readonly) + + + + + +

+
+

Returns the value of attribute test_session_id.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+14
+15
+16
+
+
# File 'lib/inferno/entities/test.rb', line 14
+
+def test_session_id
+  @test_session_id
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .input(name, *other_names, **input_params) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define inputs for this Test

+ + +
+
+
+ +
+

Examples:

+ + +
input :patientid, title: 'Patient ID', description: 'The ID of the patient being searched for'
+ + +
input :textarea, title: 'Textarea Input Example', type: 'textarea'
+ +
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + + — +

    name of the input

    +
    + +
  • + +
  • + + other_names + + + (Symbol) + + + + — +

    array of symbols if specifying multiple inputs

    +
    + +
  • + +
  • + + input_params + + + (Hash) + + + + — +

    options for input such as type, description, or title

    +
    + +
  • + +
+ + + + + + + + +

Options Hash (**input_params):

+
    + +
  • + :title + (String) + + + + + —

    Human readable title for input

    +
    + +
  • + +
  • + :description + (String) + + + + + —

    Description for the input

    +
    + +
  • + +
  • + :type + (String) + + + + + —
    + + + + + + +
    ‘text’‘textarea’
    +
    + +
  • + +
+ + + +
+ + + + +
+
+
+
+75
+76
+77
+78
+79
+80
+81
+82
+83
+
+
# File 'lib/inferno/entities/test.rb', line 75
+
+def input(name, *other_names, **input_params)
+  super
+
+  if other_names.present?
+    [name, *other_names].each { |input| attr_reader input }
+  else
+    attr_reader name
+  end
+end
+
+
+ +
+

+ + .output(*output_definitions, **_output_params) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define outputs for this Test

+ + +
+
+
+ +
+

Examples:

+ + +
output :patient_id, :bearer_token
+ +
+

Parameters:

+
    + +
  • + + output_definitions + + + (Symbol) + + + +
  • + +
  • + + _output_params + + + (Hash) + + + + — +

    Unused parameter. Just makes method +signature compatible with Inferno::DSL::InputOutputHandling.output

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+93
+94
+95
+96
+97
+98
+99
+
+
# File 'lib/inferno/entities/test.rb', line 93
+
+def output(*output_definitions, **_output_params)
+  super
+
+  output_definitions.each do |output|
+    attr_accessor output
+  end
+end
+
+
+ +
+

+ + .short_idObject + + + + + +

+ + + + +
+
+
+
+106
+107
+108
+109
+110
+111
+112
+
+
# File 'lib/inferno/entities/test.rb', line 106
+
+def short_id
+  @short_id ||= begin
+    prefix = parent.respond_to?(:short_id) ? "#{parent.short_id}." : ''
+    suffix = parent ? (parent.tests.find_index(self) + 1).to_s.rjust(2, '0') : 'x'
+    "#{prefix}#{suffix}"
+  end
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #output(outputs) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Set output values. Once set, these values will be available to any +subsequent tests.

+ + +
+
+
+ +
+

Examples:

+ + +
output(patient_id: '5', bearer_token: 'ABC')
+ +
+

Parameters:

+
    + +
  • + + outputs + + + (Hash) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+31
+32
+33
+34
+35
+36
+
+
# File 'lib/inferno/entities/test.rb', line 31
+
+def output(outputs)
+  outputs.each do |key, value|
+    send("#{key}=", value)
+    outputs_to_persist[key] = value
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestGroup.html b/docs/docs/Inferno/Entities/TestGroup.html new file mode 100644 index 000000000..54fbd4b7c --- /dev/null +++ b/docs/docs/Inferno/Entities/TestGroup.html @@ -0,0 +1,1003 @@ + + + + + + + Class: Inferno::Entities::TestGroup + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestGroup + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable, DSL::FHIRClient::ClassMethods, DSL::HTTPClient::ClassMethods, DSL::Runnable
+
+ + + +
+
Includes:
+
DSL::Assertions, DSL::FHIRValidation, DSL::FhirpathEvaluation, DSL::Messages, DSL::Results
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/test_group.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #result_message ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute result_message.

    +
    + +
  • + + +
  • + + + #results ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute results.

    +
    + +
  • + + +
+ + + + + +

Attributes included from DSL::Runnable

+

#parent, #suite_option_requirements

+ + + +

+ Class Method Summary + collapse +

+ + + + + + + + + + + + + + +

Methods included from DSL::FHIRClient::ClassMethods

+

fhir_client

+ + + + + + + + + +

Methods included from DSL::HTTPClient::ClassMethods

+

http_client

+ + + + + + + + + +

Methods included from DSL::Runnable

+

block, description, id, input_instructions, optional, optional?, required, required?, required_suite_options, resume_test_route, route, short_description, short_title, suite_endpoint, title

+ + + + + + + + + + + + + + + +

Methods included from DSL::Messages

+

#add_message, #info, #warning

+ + + + + + + + + +

Methods included from DSL::Assertions

+

#assert, #assert_resource_type, #assert_response_content_type, #assert_response_status, #assert_valid_bundle_entries, #assert_valid_http_uri, #assert_valid_json, #assert_valid_resource

+ + + + + + + + + +

Methods included from DSL::Results

+

#omit, #omit_if, #pass, #pass_if, #skip, #skip_if, #wait

+ + + + + + + + + +

Methods included from DSL::FhirpathEvaluation

+

#evaluate_fhirpath

+ + + + + + + + + +

Methods included from DSL::FHIRValidation

+

#find_validator, #resource_is_valid?

+
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + +

+ +
+

+ + #method_missing(name) ⇒ Object + + + + + +

+ + + + +
+
+
+
+28
+29
+30
+31
+32
+33
+34
+35
+
+
# File 'lib/inferno/entities/test_group.rb', line 28
+
+def method_missing(name, ...)
+  parent_instance = self.class.parent&.new
+  if parent_instance.respond_to?(name)
+    parent_instance.send(name, ...)
+  else
+    super
+  end
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #result_messageObject + + + + + +

+
+

Returns the value of attribute result_message.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/inferno/entities/test_group.rb', line 20
+
+def result_message
+  @result_message
+end
+
+
+ + + +
+

+ + #resultsObject + + + + + +

+
+

Returns the value of attribute results.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/inferno/entities/test_group.rb', line 20
+
+def results
+  @results
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .groupvoid + + + + + +

+
+

This method returns an undefined value.

Add a child group

+ + +
+
+
+ + +
+ + + + +
+
+
+
+70
+71
+72
+73
+
+
# File 'lib/inferno/entities/test_group.rb', line 70
+
+def group(...)
+  ()
+  define_child(...)
+end
+
+
+ +
+

+ + .groups(options = nil) ⇒ Array<Inferno::Entities::TestGroup> + + + + + +

+
+

Get this group’s child groups, filtered by suite options, if provided.

+ + +
+
+
+

Parameters:

+ + +

Returns:

+ + +
+ + + + +
+
+
+
+53
+54
+55
+
+
# File 'lib/inferno/entities/test_group.rb', line 53
+
+def groups(options = nil)
+  children(options).select { |child| child < Inferno::Entities::TestGroup }
+end
+
+
+ +
+

+ + .run_as_group(value = true) ⇒ void + + + + + +

+
+

This method returns an undefined value.

When true, this group’s children can not be run individually in the +UI, and this group must be run as a group.

+ + +
+
+
+

Parameters:

+
    + +
  • + + value + + + (Boolean) + + + (defaults to: true) + + +
  • + +
+ + +
+ + + + +
+
+
+
+127
+128
+129
+
+
# File 'lib/inferno/entities/test_group.rb', line 127
+
+def run_as_group(value = true) # rubocop:disable Style/OptionalBooleanParameter
+  @run_as_group = value
+end
+
+
+ +
+

+ + .run_as_group?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+132
+133
+134
+
+
# File 'lib/inferno/entities/test_group.rb', line 132
+
+def run_as_group?
+  @run_as_group || false
+end
+
+
+ +
+

+ + .short_idString + + + + + +

+
+

Returns A short numeric id which is displayed in the UI.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    A short numeric id which is displayed in the UI

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+99
+100
+101
+102
+103
+104
+105
+
+
# File 'lib/inferno/entities/test_group.rb', line 99
+
+def short_id
+  @short_id ||= begin
+    prefix = parent.respond_to?(:short_id) ? "#{parent.short_id}." : ''
+    suffix = parent ? (parent.groups.find_index(self) + 1).to_s : 'X'
+    "#{prefix}#{suffix}"
+  end
+end
+
+
+ +
+

+ + .testvoid + + + + + +

+
+

This method returns an undefined value.

Add a test

+ + +
+
+
+ + +
+ + + + +
+
+
+
+77
+78
+79
+80
+
+
# File 'lib/inferno/entities/test_group.rb', line 77
+
+def test(...)
+  ()
+  define_child(...)
+end
+
+
+ +
+

+ + .tests(options = nil) ⇒ Array<Inferno::Entities::Test> + + + + + +

+
+

Get this group’s child tests, filtered by suite options, if provided.

+ + +
+
+
+

Parameters:

+ + +

Returns:

+ + +
+ + + + +
+
+
+
+62
+63
+64
+
+
# File 'lib/inferno/entities/test_group.rb', line 62
+
+def tests(options = nil)
+  children(options).select { |child| child < Inferno::Entities::Test }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestKit.html b/docs/docs/Inferno/Entities/TestKit.html new file mode 100644 index 000000000..1ddad9374 --- /dev/null +++ b/docs/docs/Inferno/Entities/TestKit.html @@ -0,0 +1,1304 @@ + + + + + + + Class: Inferno::Entities::TestKit + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestKit + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/test_kit.rb
+
+ +
+ +

Overview

+
+ + + +
+
+
+ +
+

Examples:

+ + +

+module USCoreTestKit
+  class Metadata < Inferno::Entities::TestKit
+    id :us_core
+    title 'US Core Test Kit'
+    description <<~DESCRIPTION
+      This is a big markdown description of the test kit.
+    DESCRIPTION
+    suite_ids ['us_core_v311', 'us_core_v400', 'us_core_v501', 'us_core_v610']
+    tags ['SMART App Launch', 'US Core']
+    last_updated '2024-03-07'
+    version '0.6.4'
+    maturity 'High'
+    authors ['Author One', 'Author Two']
+    repo 'https://github.com/inferno-framework/us-core-test-kit'
+  end
+end
+ +
+ + +
+ + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .authors(new_authors = nil) ⇒ Array<String> + + + + + +

+
+

Set/get the list of authors for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_authors + + + (Array<String>) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<String>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+127
+128
+129
+130
+131
+
+
# File 'lib/inferno/entities/test_kit.rb', line 127
+
+def authors(new_authors = nil)
+  return @authors if new_authors.nil?
+
+  @authors = new_authors
+end
+
+
+ +
+

+ + .description(new_description = nil) ⇒ String + + + + + +

+
+

Set/get the description for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_description + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+57
+58
+59
+60
+61
+
+
# File 'lib/inferno/entities/test_kit.rb', line 57
+
+def description(new_description = nil)
+  return @description if new_description.nil?
+
+  @description = new_description
+end
+
+
+ +
+

+ + .id(new_id = nil) ⇒ Symbol, String + + + + + +

+
+

Set/get the id for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_id + + + (Symbol, String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Symbol, String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/test_kit.rb', line 37
+
+def id(new_id = nil)
+  return @id if new_id.nil?
+
+  @id = new_id
+end
+
+
+ +
+

+ + .last_updated(new_last_updated = nil) ⇒ String + + + + + +

+
+

Set/get the last updated date for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_last_updated + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+77
+78
+79
+80
+81
+
+
# File 'lib/inferno/entities/test_kit.rb', line 77
+
+def last_updated(new_last_updated = nil)
+  return @last_updated if new_last_updated.nil?
+
+  @last_updated = new_last_updated
+end
+
+
+ +
+

+ + .maturity(new_maturity = nil) ⇒ String + + + + + +

+
+

Set/get the maturity level for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_maturity + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+97
+98
+99
+100
+101
+
+
# File 'lib/inferno/entities/test_kit.rb', line 97
+
+def maturity(new_maturity = nil)
+  return @maturity if new_maturity.nil?
+
+  @maturity = new_maturity
+end
+
+
+ +
+

+ + .optionsHash{Symbol,String=>Array<Inferno::DSL::SuiteOption>} + + + + + +

+
+

Get the options for the suites in the test kit

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+146
+147
+148
+149
+150
+
+
# File 'lib/inferno/entities/test_kit.rb', line 146
+
+def options
+  return @options if @options.present?
+
+  @options = suites.each_with_object({}) { |suite, hash| hash[suite.id] = suite.suite_options }
+end
+
+
+ +
+

+ + .repo(new_repo = nil) ⇒ String + + + + + +

+
+

Set/get the code repository url for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_repo + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+117
+118
+119
+120
+121
+
+
# File 'lib/inferno/entities/test_kit.rb', line 117
+
+def repo(new_repo = nil)
+  return @repo if new_repo.nil?
+
+  @repo = new_repo
+end
+
+
+ +
+

+ + .suite_ids(new_ids = nil) ⇒ Array<Symbol,String> + + + + + +

+
+

Set/get the suite ids for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_ids + + + (Array<Symbol,String>) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Symbol,String>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+107
+108
+109
+110
+111
+
+
# File 'lib/inferno/entities/test_kit.rb', line 107
+
+def suite_ids(new_ids = nil)
+  return @suite_ids || [] if new_ids.nil?
+
+  @suite_ids = new_ids
+end
+
+
+ +
+

+ + .suitesArray<Inferno::Entities::TestSuite> + + + + + +

+
+

Get the suites whose ids are defined in suite_ids

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+136
+137
+138
+139
+140
+141
+
+
# File 'lib/inferno/entities/test_kit.rb', line 136
+
+def suites
+  return @suites if @suites.present?
+
+  repo = Inferno::Repositories::TestSuites.new
+  @suites = suite_ids.map { |id| repo.find(id) }
+end
+
+
+ +
+

+ + .tags(new_tags = nil) ⇒ Array<String> + + + + + +

+
+

Set/get the tags for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_tags + + + (Array<String>) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<String>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+67
+68
+69
+70
+71
+
+
# File 'lib/inferno/entities/test_kit.rb', line 67
+
+def tags(new_tags = nil)
+  return @tags if new_tags.nil?
+
+  @tags = new_tags
+end
+
+
+ +
+

+ + .title(new_title = nil) ⇒ String + + + + + +

+
+

Set/get the title for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_title + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+47
+48
+49
+50
+51
+
+
# File 'lib/inferno/entities/test_kit.rb', line 47
+
+def title(new_title = nil)
+  return @title if new_title.nil?
+
+  @title = new_title
+end
+
+
+ +
+

+ + .version(new_version = nil) ⇒ String + + + + + +

+
+

Set/get the version for the test kit

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_version + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+87
+88
+89
+90
+91
+
+
# File 'lib/inferno/entities/test_kit.rb', line 87
+
+def version(new_version = nil)
+  return @version if new_version.nil?
+
+  @version = new_version
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestRun.html b/docs/docs/Inferno/Entities/TestRun.html new file mode 100644 index 000000000..58f536887 --- /dev/null +++ b/docs/docs/Inferno/Entities/TestRun.html @@ -0,0 +1,2854 @@ + + + + + + + Class: Inferno::Entities::TestRun + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestRun + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
HasRunnable
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/test_run.rb
+
+ +
+ +

Overview

+
+

A TestRun represents a request to execute an executable set of tests.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
STATUS_OPTIONS = + +
+
['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :test_session_id,
+  :status,
+  :test_suite_id,
+  :test_group_id,
+  :test_id,
+  :test,
+  :test_group,
+  :test_suite,
+  :inputs,
+  :results,
+  :identifier,
+  :wait_timeout,
+  :created_at,
+  :updated_at
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from HasRunnable

+

#runnable

+ + + + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ TestRun + + + + + +

+
+

How to define test run inputs? Class in this file? Separate Entity?

+ + +
+
+
+ + +
+ + + + +
+
+
+
+61
+62
+63
+64
+65
+
+
# File 'lib/inferno/entities/test_run.rb', line 61
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+
+  @test_session = params[:test_session]
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+

Returns creation timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    creation timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the test run.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the test run

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #identifierString? + + + + + +

+
+

Returns identfier for a waiting TestRun.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + + — +

    identfier for a waiting TestRun

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #inputsArray<Hash> + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Array<Hash>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #resultsArray<Inferno::Entities::Result> + + + + + +

+
+ + + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #statusString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #testTest? + + + + + +

+
+

Returns the Test this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Test, nil) + + + + — +

    the Test this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #test_groupTestGroup? + + + + + +

+
+

Returns the TestGroup this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (TestGroup, nil) + + + + — +

    the TestGroup this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #test_group_idString? + + + + + +

+
+

Returns id of the TestGroup this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + + — +

    id of the TestGroup this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #test_idString? + + + + + +

+
+

Returns id of the Test this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + + — +

    id of the Test this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #test_sessionObject + + + + + +

+
+

Returns the value of attribute test_session.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+57
+58
+59
+
+
# File 'lib/inferno/entities/test_run.rb', line 57
+
+def test_session
+  @test_session
+end
+
+
+ + + +
+

+ + #test_session_idString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #test_suiteTestSuite? + + + + + +

+
+

Returns the TestSuite this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (TestSuite, nil) + + + + — +

    the TestSuite this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #test_suite_idString? + + + + + +

+
+

Returns id of the TestSuite this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + + — +

    id of the TestSuite this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+

Returns update timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    update timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ + + +
+

+ + #wait_timeoutObject + + + + + +

+
+

A TestRun represents a request to execute an executable set of tests.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
# File 'lib/inferno/entities/test_run.rb', line 34
+
+class TestRun < Entity
+  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
+  ATTRIBUTES = [
+    :id,
+    :test_session_id,
+    :status,
+    :test_suite_id,
+    :test_group_id,
+    :test_id,
+    :test,
+    :test_group,
+    :test_suite,
+    :inputs,
+    :results,
+    :identifier,
+    :wait_timeout,
+    :created_at,
+    :updated_at
+  ].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  attr_accessor :test_session
+
+  # How to define test run inputs?  Class in this file?  Separate Entity?
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    @test_session = params[:test_session]
+  end
+
+  def to_hash
+    super.merge(test_session:).compact
+  end
+
+  def test_count(selected_suite_options = [])
+    @test_count ||= runnable.test_count(selected_suite_options)
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #test_count(selected_suite_options = []) ⇒ Object + + + + + +

+ + + + +
+
+
+
+71
+72
+73
+
+
# File 'lib/inferno/entities/test_run.rb', line 71
+
+def test_count(selected_suite_options = [])
+  @test_count ||= runnable.test_count(selected_suite_options)
+end
+
+
+ +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_run.rb', line 67
+
+def to_hash
+  super.merge(test_session:).compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestSession.html b/docs/docs/Inferno/Entities/TestSession.html new file mode 100644 index 000000000..86618e8e1 --- /dev/null +++ b/docs/docs/Inferno/Entities/TestSession.html @@ -0,0 +1,1778 @@ + + + + + + + Class: Inferno::Entities::TestSession + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestSession + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/test_session.rb
+
+ +
+ +

Overview

+
+

A TestSession represents an individual testing session.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :created_at,
+  :updated_at,
+  :test_suite_id,
+  :test_suite,
+  :test_runs,
+  :results,
+  :suite_options
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ TestSession + + + + + +

+
+

Returns a new instance of TestSession.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+
+
# File 'lib/inferno/entities/test_session.rb', line 38
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+
+  self.suite_options ||= []
+
+  test_suite&.suite_options&.each do |option|
+    if suite_options.none? { |selected_option| selected_option.id == option.id }
+      suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+    end
+  end
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+

Returns creation timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    creation timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #resultsArray<Inferno::Entities::TestResult> + + + + + +

+
+

Returns the TestResults +associated with this session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Array<Inferno::Entities::TestResult>) + + + + — +

    the TestResults +associated with this session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #suite_optionsHash + + + + + +

+
+

Returns the suite options associated with this session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + + — +

    the suite options associated with this session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #test_runsArray<Inferno::Entities::TestRun> + + + + + +

+
+

Returns the TestRuns associated +with this session.

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #test_suiteInferno::Entities::TestSuite + + + + + +

+
+

Returns the TestSuite being run in this +session.

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #test_suite_idString + + + + + +

+
+

Returns id of the TestSuite being run in this session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the TestSuite being run in this session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+

Returns update timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    update timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #suite_options_hashObject + + + + + +

+ + + + +
+
+
+
+64
+65
+66
+67
+68
+
+
# File 'lib/inferno/entities/test_session.rb', line 64
+
+def suite_options_hash
+  (suite_options || []).each_with_object({}) do |option, hash|
+    hash[option.id] = option.value
+  end
+end
+
+
+ +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+54
+55
+56
+57
+58
+59
+60
+61
+62
+
+
# File 'lib/inferno/entities/test_session.rb', line 54
+
+def to_hash
+  session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+    hash[attribute] = send(attribute)
+  end
+
+  session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+  session_hash.compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestSuite.html b/docs/docs/Inferno/Entities/TestSuite.html new file mode 100644 index 000000000..4597009f5 --- /dev/null +++ b/docs/docs/Inferno/Entities/TestSuite.html @@ -0,0 +1,1229 @@ + + + + + + + Class: Inferno::Entities::TestSuite + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestSuite + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable, DSL::FHIRClient::ClassMethods, DSL::HTTPClient::ClassMethods, DSL::Links, DSL::Runnable
+
+ + + +
+
Includes:
+
DSL::Assertions, DSL::FHIRResourceValidation, DSL::FHIRValidation, DSL::FhirpathEvaluation, DSL::Messages, DSL::Results
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/test_suite.rb
+
+ +
+ +

Overview

+
+

A TestSuite represents a packaged group of tests, usually for a +single Implementation Guide

+ + +
+
+
+ + +
+ + +

Constant Summary

+ +

Constants included + from DSL::Links

+

DSL::Links::DEFAULT_TYPES

+ + +

Instance Attribute Summary collapse

+
    + +
  • + + + #result_message ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute result_message.

    +
    + +
  • + + +
  • + + + #results ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute results.

    +
    + +
  • + + +
+ + + + + +

Attributes included from DSL::Runnable

+

#parent, #suite_option_requirements

+ + + +

+ Class Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from DSL::Runnable

+

block, description, id, input_instructions, optional, optional?, required, required?, required_suite_options, resume_test_route, route, short_description, short_title, suite_endpoint, title

+ + + + + + + + + + + + + + + +

Methods included from DSL::Links

+

add_link, download_url, ig_url, links, report_issue_url, source_code_url

+ + + + + + + + + +

Methods included from DSL::FHIRClient::ClassMethods

+

fhir_client

+ + + + + + + + + +

Methods included from DSL::HTTPClient::ClassMethods

+

http_client

+ + + + + + + + + + +

Methods included from DSL::Messages

+

#add_message, #info, #warning

+ + + + + + + + + +

Methods included from DSL::Assertions

+

#assert, #assert_resource_type, #assert_response_content_type, #assert_response_status, #assert_valid_bundle_entries, #assert_valid_http_uri, #assert_valid_json, #assert_valid_resource

+ + + + + + + + + +

Methods included from DSL::Results

+

#omit, #omit_if, #pass, #pass_if, #skip, #skip_if, #wait

+ + + + + + + + + +

Methods included from DSL::FhirpathEvaluation

+

#evaluate_fhirpath

+ + + + + + + + + + + + + + + +

Methods included from DSL::FHIRValidation

+

#find_validator, #resource_is_valid?

+ +
+

Instance Attribute Details

+ + + +
+

+ + #result_messageObject + + + + + +

+
+

Returns the value of attribute result_message.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/inferno/entities/test_suite.rb', line 28
+
+def result_message
+  @result_message
+end
+
+
+ + + +
+

+ + #resultsObject + + + + + +

+
+

Returns the value of attribute results.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/inferno/entities/test_suite.rb', line 28
+
+def results
+  @results
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .check_configuration(&block) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Provide a block which will verify any configuration needed for this +test suite to operate properly.

+ + +
+
+
+ +

Yield Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    An array of message hashes containing the +keys :type and :message. Type options are info, warning, and +error.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+
+
# File 'lib/inferno/entities/test_suite.rb', line 118
+
+def check_configuration(&block)
+  @check_configuration_block = lambda do
+    block.call&.each do |configuration_message|
+      case configuration_message[:type]
+      when 'warning'
+        Application[:logger].warn(configuration_message[:message])
+      when 'error'
+        Application[:logger].error(configuration_message[:message])
+      end
+    end
+  end
+end
+
+
+ +
+

+ + .groupvoid + + + + + +

+
+

This method returns an undefined value.

Add a child group

+ + +
+
+
+ + +
+ + + + +
+
+
+
+67
+68
+69
+70
+
+
# File 'lib/inferno/entities/test_suite.rb', line 67
+
+def group(...)
+  ()
+  define_child(...)
+end
+
+
+ +
+

+ + .groups(options = nil) ⇒ Array<Inferno::Entities::TestGroup> + + + + + +

+
+

Get this suite’s child groups, filtered by suite options, if provided.

+ + +
+
+
+

Parameters:

+ + +

Returns:

+ + +
+ + + + +
+
+
+
+59
+60
+61
+
+
# File 'lib/inferno/entities/test_suite.rb', line 59
+
+def groups(options = nil)
+  children(options).select { |child| child < Inferno::Entities::TestGroup }
+end
+
+
+ +
+

+ + .suite_option(identifier, **option_params) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define an option for this suite. Options are used to define suite-wide +configuration which is selected by a user at the start of a test +session. These options can be used to change what tests/groups are run +or behavior within particular tests.

+ + +
+
+
+ +
+

Examples:

+ + +
suite_option :ig_version,
+            list_options: [
+              {
+                label: 'IG v1',
+                value: 'ig_v1'
+              },
+              {
+                label: 'IG v2',
+                value: 'ig_v2'
+              }
+            ]
+
+group from: :ig_v1_group,
+      required_suite_options: { ig_version: 'ig_v1' }
+
+group from: :ig_v2_group do
+  required_suite_options ig_version: 'ig_v2'
+end
+ +
+

Parameters:

+
    + +
  • + + identifier + + + (Symbol, String) + + + + — +

    The identifier which will be used +to refer to this option

    +
    + +
  • + +
  • + + option_params + + + (Hash) + + + + — +

    a customizable set of options

    +
    + +
  • + +
+ + + + + + +

Options Hash (**option_params):

+
    + +
  • + :title + (String) + + + + + —

    Title which will be displayed in +the UI

    +
    + +
  • + +
  • + :list_options + (Array<Hash>) + + + + + —

    The list of possible +values for this option. Each hash needs to have a label: and a +value: entry which are Strings.

    +
    + +
  • + +
+ + + +
+ + + + +
+
+
+
+169
+170
+171
+
+
# File 'lib/inferno/entities/test_suite.rb', line 169
+
+def suite_option(identifier, **option_params)
+  suite_options << DSL::SuiteOption.new(option_params.merge(id: identifier))
+end
+
+
+ +
+

+ + .suite_optionsArray<Inferno::DSL::SuiteOption> + + + + + +

+
+

Returns The options defined for +this suite.

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+175
+176
+177
+
+
# File 'lib/inferno/entities/test_suite.rb', line 175
+
+def suite_options
+  @suite_options ||= []
+end
+
+
+ +
+

+ + .suite_summary(suite_summary = nil) ⇒ String? + + + + + +

+
+

Set/get a description which for this test suite which will be +displayed in the UI.

+ + +
+
+
+

Parameters:

+
    + +
  • + + suite_summary + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + +
  • + +
+ +
+ + + + +
+
+
+
+185
+186
+187
+188
+189
+
+
# File 'lib/inferno/entities/test_suite.rb', line 185
+
+def suite_summary(suite_summary = nil)
+  return @suite_summary if suite_summary.nil?
+
+  @suite_summary = format_markdown(suite_summary)
+end
+
+
+ +
+

+ + .test_kitInferno::Entities::TestKit + + + + + +

+
+

Get the TestKit this suite belongs to

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+
+
# File 'lib/inferno/entities/test_suite.rb', line 194
+
+def test_kit
+  return @test_kit if @test_kit
+
+  module_name = name
+
+  while module_name.present? && @test_kit.nil?
+    module_name = module_name.deconstantize
+
+    next unless const_defined?("#{module_name}::Metadata")
+
+    @test_kit = const_get("#{module_name}::Metadata")
+  end
+
+  @test_kit
+end
+
+
+ +
+

+ + .version(version = nil) ⇒ String? + + + + + +

+
+

Set/get the version of this test suite. Defaults to the TestKit +version.

+ + +
+
+
+

Parameters:

+
    + +
  • + + version + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + +
  • + +
+ +
+ + + + +
+
+
+
+93
+94
+95
+96
+97
+
+
# File 'lib/inferno/entities/test_suite.rb', line 93
+
+def version(version = nil)
+  @version = version if version.present?
+
+  @version || test_kit&.version
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/ValidatorSession.html b/docs/docs/Inferno/Entities/ValidatorSession.html new file mode 100644 index 000000000..4948faf16 --- /dev/null +++ b/docs/docs/Inferno/Entities/ValidatorSession.html @@ -0,0 +1,245 @@ + + + + + + + Class: Inferno::Entities::ValidatorSession + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::ValidatorSession + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/validator_session.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :created_at,
+  :updated_at,
+  :validator_session_id,
+  :test_suite_id,
+  :validator_name,
+  :suite_options,
+  :validator_index
+].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + + + +

Methods inherited from Entity

+

#to_hash

+
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ ValidatorSession + + + + + +

+
+

Returns a new instance of ValidatorSession.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+17
+18
+19
+
+
# File 'lib/inferno/entities/validator_session.rb', line 17
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions.html b/docs/docs/Inferno/Exceptions.html new file mode 100644 index 000000000..3d2f92247 --- /dev/null +++ b/docs/docs/Inferno/Exceptions.html @@ -0,0 +1,115 @@ + + + + + + + Module: Inferno::Exceptions + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/AssertionException.html b/docs/docs/Inferno/Exceptions/AssertionException.html new file mode 100644 index 000000000..797492240 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/AssertionException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::AssertionException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::AssertionException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/exceptions.rb', line 7
+
+def result
+  'fail'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/BadSessionDataType.html b/docs/docs/Inferno/Exceptions/BadSessionDataType.html new file mode 100644 index 000000000..8e2d64ebf --- /dev/null +++ b/docs/docs/Inferno/Exceptions/BadSessionDataType.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::BadSessionDataType + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::BadSessionDataType + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(name, expected_class_names, actual_class) ⇒ BadSessionDataType + + + + + +

+
+

Returns a new instance of BadSessionDataType.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+112
+113
+114
+
+
# File 'lib/inferno/exceptions.rb', line 112
+
+def initialize(name, expected_class_names, actual_class)
+  super("Expected '#{name}' to be a #{expected_class_names}, but found a #{actual_class.name}.")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/CancelException.html b/docs/docs/Inferno/Exceptions/CancelException.html new file mode 100644 index 000000000..8bbce0ca8 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/CancelException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::CancelException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::CancelException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+37
+38
+39
+
+
# File 'lib/inferno/exceptions.rb', line 37
+
+def result
+  'cancel'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/DuplicateEntityIdException.html b/docs/docs/Inferno/Exceptions/DuplicateEntityIdException.html new file mode 100644 index 000000000..7ef7891a1 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/DuplicateEntityIdException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::DuplicateEntityIdException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::DuplicateEntityIdException + + + +

+
+ +
+
Inherits:
+
+ StandardError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(id) ⇒ DuplicateEntityIdException + + + + + +

+
+

Returns a new instance of DuplicateEntityIdException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+124
+125
+126
+
+
# File 'lib/inferno/exceptions.rb', line 124
+
+def initialize(id)
+  super("ID '#{id}' already exists. Ensure the uniqueness of the IDs.")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/ErrorInFhirpathException.html b/docs/docs/Inferno/Exceptions/ErrorInFhirpathException.html new file mode 100644 index 000000000..3825bc6cb --- /dev/null +++ b/docs/docs/Inferno/Exceptions/ErrorInFhirpathException.html @@ -0,0 +1,218 @@ + + + + + + + Exception: Inferno::Exceptions::ErrorInFhirpathException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::ErrorInFhirpathException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ +

Overview

+
+

ErrorInFhirpathException is used when an exception occurred in +calling the FHIRPath service, for example a connection timeout +or an unexpected response format. +Note: This class extends TestResultException instead of RuntimeError +to bypass printing the stack trace in the UI, since +the stack trace of this exception is not likely be useful. +Instead the message should point to where in the fhirpath evaluator an error occurred.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+81
+82
+83
+
+
# File 'lib/inferno/exceptions.rb', line 81
+
+def result
+  'error'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/ErrorInValidatorException.html b/docs/docs/Inferno/Exceptions/ErrorInValidatorException.html new file mode 100644 index 000000000..00d9bb7f2 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/ErrorInValidatorException.html @@ -0,0 +1,218 @@ + + + + + + + Exception: Inferno::Exceptions::ErrorInValidatorException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::ErrorInValidatorException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ +

Overview

+
+

ErrorInValidatorException is used when an exception occurred in +calling the validator service, for example a connection timeout +or an unexpected response format. +Note: This class extends TestResultException instead of RuntimeError +to bypass printing the stack trace in the UI, since +the stack trace of this exception is not likely be useful. +Instead the message should point to where in the validator an error occurred.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+50
+51
+52
+
+
# File 'lib/inferno/exceptions.rb', line 50
+
+def result
+  'error'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/FhirpathNotFoundException.html b/docs/docs/Inferno/Exceptions/FhirpathNotFoundException.html new file mode 100644 index 000000000..8c1cb301c --- /dev/null +++ b/docs/docs/Inferno/Exceptions/FhirpathNotFoundException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::FhirpathNotFoundException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::FhirpathNotFoundException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(fhirpath_name) ⇒ FhirpathNotFoundException + + + + + +

+
+

Returns a new instance of FhirpathNotFoundException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+68
+69
+70
+
+
# File 'lib/inferno/exceptions.rb', line 68
+
+def initialize(fhirpath_name)
+  super("No '#{fhirpath_name}' FHIRPath evaluator found")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/InvalidRunnableIdException.html b/docs/docs/Inferno/Exceptions/InvalidRunnableIdException.html new file mode 100644 index 000000000..f17fd8fd7 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/InvalidRunnableIdException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::InvalidRunnableIdException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::InvalidRunnableIdException + + + +

+
+ +
+
Inherits:
+
+ StandardError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(id) ⇒ InvalidRunnableIdException + + + + + +

+
+

Returns a new instance of InvalidRunnableIdException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+118
+119
+120
+
+
# File 'lib/inferno/exceptions.rb', line 118
+
+def initialize(id)
+  super("ID '#{id}' exceeds the maximum id length of 255 characters")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/NotUserRunnableException.html b/docs/docs/Inferno/Exceptions/NotUserRunnableException.html new file mode 100644 index 000000000..95d7fce4e --- /dev/null +++ b/docs/docs/Inferno/Exceptions/NotUserRunnableException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::NotUserRunnableException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::NotUserRunnableException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initializeNotUserRunnableException + + + + + +

+
+

Returns a new instance of NotUserRunnableException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+93
+94
+95
+
+
# File 'lib/inferno/exceptions.rb', line 93
+
+def initialize
+  super('The chosen runnable must be run as part of a group')
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/OmitException.html b/docs/docs/Inferno/Exceptions/OmitException.html new file mode 100644 index 000000000..1764bafa2 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/OmitException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::OmitException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::OmitException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/exceptions.rb', line 19
+
+def result
+  'omit'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/ParentNotLoadedException.html b/docs/docs/Inferno/Exceptions/ParentNotLoadedException.html new file mode 100644 index 000000000..f19210e0b --- /dev/null +++ b/docs/docs/Inferno/Exceptions/ParentNotLoadedException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::ParentNotLoadedException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::ParentNotLoadedException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(klass, id) ⇒ ParentNotLoadedException + + + + + +

+
+

Returns a new instance of ParentNotLoadedException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+56
+57
+58
+
+
# File 'lib/inferno/exceptions.rb', line 56
+
+def initialize(klass, id)
+  super("No #{klass.name.demodulize} found with id '#{id}'")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/PassException.html b/docs/docs/Inferno/Exceptions/PassException.html new file mode 100644 index 000000000..fc0cb5da6 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/PassException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::PassException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::PassException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+25
+26
+27
+
+
# File 'lib/inferno/exceptions.rb', line 25
+
+def result
+  'pass'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/RequiredInputsNotFound.html b/docs/docs/Inferno/Exceptions/RequiredInputsNotFound.html new file mode 100644 index 000000000..1c6d2f77b --- /dev/null +++ b/docs/docs/Inferno/Exceptions/RequiredInputsNotFound.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::RequiredInputsNotFound + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::RequiredInputsNotFound + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(missing_inputs) ⇒ RequiredInputsNotFound + + + + + +

+
+

Returns a new instance of RequiredInputsNotFound.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+87
+88
+89
+
+
# File 'lib/inferno/exceptions.rb', line 87
+
+def initialize(missing_inputs)
+  super("Missing the following required inputs: #{missing_inputs.join(', ')}")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/SkipException.html b/docs/docs/Inferno/Exceptions/SkipException.html new file mode 100644 index 000000000..9dcc10ab9 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/SkipException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::SkipException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::SkipException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/exceptions.rb', line 13
+
+def result
+  'skip'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/TestResultException.html b/docs/docs/Inferno/Exceptions/TestResultException.html new file mode 100644 index 000000000..5763082d8 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/TestResultException.html @@ -0,0 +1,128 @@ + + + + + + + Exception: Inferno::Exceptions::TestResultException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::TestResultException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/UnknownAttributeException.html b/docs/docs/Inferno/Exceptions/UnknownAttributeException.html new file mode 100644 index 000000000..5a4d6486b --- /dev/null +++ b/docs/docs/Inferno/Exceptions/UnknownAttributeException.html @@ -0,0 +1,206 @@ + + + + + + + Exception: Inferno::Exceptions::UnknownAttributeException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::UnknownAttributeException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(attributes, klass) ⇒ UnknownAttributeException + + + + + +

+
+

Returns a new instance of UnknownAttributeException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+99
+100
+101
+102
+
+
# File 'lib/inferno/exceptions.rb', line 99
+
+def initialize(attributes, klass)
+  attributes_string = attributes.map { |attribute| "'#{attribute}'" }.join(', ')
+  super("Unknown attributes for #{klass.name}: #{attributes_string}")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/UnknownSessionDataType.html b/docs/docs/Inferno/Exceptions/UnknownSessionDataType.html new file mode 100644 index 000000000..b52f1b93f --- /dev/null +++ b/docs/docs/Inferno/Exceptions/UnknownSessionDataType.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::UnknownSessionDataType + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::UnknownSessionDataType + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(output) ⇒ UnknownSessionDataType + + + + + +

+
+

Returns a new instance of UnknownSessionDataType.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+106
+107
+108
+
+
# File 'lib/inferno/exceptions.rb', line 106
+
+def initialize(output)
+  super("Unknown type '#{output[:type]}' for '#{output[:name]}'.")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/ValidatorNotFoundException.html b/docs/docs/Inferno/Exceptions/ValidatorNotFoundException.html new file mode 100644 index 000000000..2fe0b2c9e --- /dev/null +++ b/docs/docs/Inferno/Exceptions/ValidatorNotFoundException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::ValidatorNotFoundException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::ValidatorNotFoundException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(validator_name) ⇒ ValidatorNotFoundException + + + + + +

+
+

Returns a new instance of ValidatorNotFoundException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+62
+63
+64
+
+
# File 'lib/inferno/exceptions.rb', line 62
+
+def initialize(validator_name)
+  super("No '#{validator_name}' validator found")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/WaitException.html b/docs/docs/Inferno/Exceptions/WaitException.html new file mode 100644 index 000000000..1071a3379 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/WaitException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::WaitException + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::WaitException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+31
+32
+33
+
+
# File 'lib/inferno/exceptions.rb', line 31
+
+def result
+  'wait'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Jobs.html b/docs/docs/Inferno/Jobs.html new file mode 100644 index 000000000..cded16ad6 --- /dev/null +++ b/docs/docs/Inferno/Jobs.html @@ -0,0 +1,195 @@ + + + + + + + Module: Inferno::Jobs + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Jobs + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/jobs.rb,
+ lib/inferno/jobs/resume_test_run.rb,
lib/inferno/jobs/execute_test_run.rb,
lib/inferno/jobs/invoke_validator_session.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: ExecuteTestRun, InvokeValidatorSession, ResumeTestRun + + +

+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .perform(job_klass, *params, force_synchronous: false) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+13
+14
+15
+
+
# File 'lib/inferno/jobs.rb', line 9
+
+def self.perform(job_klass, *params, force_synchronous: false)
+  if force_synchronous || (Application['async_jobs'] == false)
+    job_klass.new.perform(*params)
+  else
+    job_klass.perform_async(*params)
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Jobs/ExecuteTestRun.html b/docs/docs/Inferno/Jobs/ExecuteTestRun.html new file mode 100644 index 000000000..0e8b35acc --- /dev/null +++ b/docs/docs/Inferno/Jobs/ExecuteTestRun.html @@ -0,0 +1,203 @@ + + + + + + + Class: Inferno::Jobs::ExecuteTestRun + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Jobs::ExecuteTestRun + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
Sidekiq::Worker
+
+ + + + + + +
+
Defined in:
+
lib/inferno/jobs/execute_test_run.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #perform(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/jobs/execute_test_run.rb', line 6
+
+def perform(test_run_id)
+  test_run = Inferno::Repositories::TestRuns.new.find(test_run_id)
+  test_session = Inferno::Repositories::TestSessions.new.find(test_run.test_session_id)
+
+  TestRunner.new(test_session:, test_run:).start
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Jobs/InvokeValidatorSession.html b/docs/docs/Inferno/Jobs/InvokeValidatorSession.html new file mode 100644 index 000000000..1962d305b --- /dev/null +++ b/docs/docs/Inferno/Jobs/InvokeValidatorSession.html @@ -0,0 +1,219 @@ + + + + + + + Class: Inferno::Jobs::InvokeValidatorSession + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Jobs::InvokeValidatorSession + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
Sidekiq::Worker
+
+ + + + + + +
+
Defined in:
+
lib/inferno/jobs/invoke_validator_session.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #perform(suite_id, validator_name, validator_index) ⇒ Object + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+
+
# File 'lib/inferno/jobs/invoke_validator_session.rb', line 7
+
+def perform(suite_id, validator_name, validator_index)
+  suite = Inferno::Repositories::TestSuites.new.find suite_id
+  validator = suite.fhir_validators[validator_name.to_sym][validator_index]
+  response_body = validator.validate(FHIR::Patient.new, 'http://hl7.org/fhir/StructureDefinition/Patient')
+  res = JSON.parse(response_body)
+  session_id = res['sessionId']
+  session_repo = Inferno::Repositories::ValidatorSessions.new
+  session_repo.save(test_suite_id: suite_id, validator_session_id: session_id,
+                    validator_name:, suite_options: validator.requirements)
+  validator.session_id = session_id
+rescue JSON::ParserError
+  Inferno::Application['logger']
+    .error("InvokeValidatorSession - error unexpected response format from validator: #{response_body}")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Jobs/ResumeTestRun.html b/docs/docs/Inferno/Jobs/ResumeTestRun.html new file mode 100644 index 000000000..abb3f57da --- /dev/null +++ b/docs/docs/Inferno/Jobs/ResumeTestRun.html @@ -0,0 +1,203 @@ + + + + + + + Class: Inferno::Jobs::ResumeTestRun + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Jobs::ResumeTestRun + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
Sidekiq::Worker
+
+ + + + + + +
+
Defined in:
+
lib/inferno/jobs/resume_test_run.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #perform(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/jobs/resume_test_run.rb', line 6
+
+def perform(test_run_id)
+  test_run = Inferno::Repositories::TestRuns.new.find(test_run_id)
+  test_session = Inferno::Repositories::TestSessions.new.find(test_run.test_session_id)
+
+  TestRunner.new(test_session:, test_run:, resume: true).start
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories.html b/docs/docs/Inferno/Repositories.html new file mode 100644 index 000000000..0c2afc595 --- /dev/null +++ b/docs/docs/Inferno/Repositories.html @@ -0,0 +1,140 @@ + + + + + + + Module: Inferno::Repositories + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Repositories + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories.rb,
+ lib/inferno/repositories/igs.rb,
lib/inferno/repositories/tags.rb,
lib/inferno/repositories/tests.rb,
lib/inferno/repositories/headers.rb,
lib/inferno/repositories/presets.rb,
lib/inferno/repositories/results.rb,
lib/inferno/repositories/messages.rb,
lib/inferno/repositories/requests.rb,
lib/inferno/repositories/test_kits.rb,
lib/inferno/repositories/test_runs.rb,
lib/inferno/repositories/repository.rb,
lib/inferno/repositories/test_groups.rb,
lib/inferno/repositories/test_suites.rb,
lib/inferno/repositories/session_data.rb,
lib/inferno/repositories/test_sessions.rb,
lib/inferno/repositories/validator_sessions.rb,
lib/inferno/repositories/in_memory_repository.rb,
lib/inferno/repositories/validate_runnable_reference.rb
+
+
+ +
+ +

Overview

+
+

Repositories provide an abstraction layer for dealing with entity +persistence. All code for interacting with the database lives in +repositories. The rest of the codebase interacts with the database through a +public api provided by various repositories.

+ +

Naming Convention: A repository should be named the plural version of +the entity name. For example:

+ +
    +
  • TestSessions is the repsitory for the TestSession entity
  • +
  • TestGroups is the repository for the TestGroup entity
  • +
+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: ValidateRunnableReference + + + + Classes: Headers, IGs, InMemoryRepository, Messages, Presets, Repository, Requests, Results, SessionData, Tags, TestGroups, TestKits, TestRuns, TestSessions, TestSuites, Tests, ValidatorSessions + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Headers.html b/docs/docs/Inferno/Repositories/Headers.html new file mode 100644 index 000000000..88320cd6e --- /dev/null +++ b/docs/docs/Inferno/Repositories/Headers.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::Headers + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Headers + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/headers.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, #create, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Headers/Model.html b/docs/docs/Inferno/Repositories/Headers/Model.html new file mode 100644 index 000000000..66ae0da6e --- /dev/null +++ b/docs/docs/Inferno/Repositories/Headers/Model.html @@ -0,0 +1,248 @@ + + + + + + + Class: Inferno::Repositories::Headers::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Headers::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/headers.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+10
+
+
# File 'lib/inferno/repositories/headers.rb', line 7
+
+def before_create
+  self.id = SecureRandom.uuid
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+12
+13
+14
+15
+
+
# File 'lib/inferno/repositories/headers.rb', line 12
+
+def validate
+  super
+  errors.add(:request_id, 'must be present') if request_id.blank?
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/IGs.html b/docs/docs/Inferno/Repositories/IGs.html new file mode 100644 index 000000000..cab42e522 --- /dev/null +++ b/docs/docs/Inferno/Repositories/IGs.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::IGs + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::IGs + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/igs.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the IG entity.

+ + +
+
+
+ + +
+ + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, #insert

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/InMemoryRepository.html b/docs/docs/Inferno/Repositories/InMemoryRepository.html new file mode 100644 index 000000000..7e8bb9e0a --- /dev/null +++ b/docs/docs/Inferno/Repositories/InMemoryRepository.html @@ -0,0 +1,429 @@ + + + + + + + Class: Inferno::Repositories::InMemoryRepository + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::InMemoryRepository + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable
+
+ + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/in_memory_repository.rb
+
+ +
+ +
+

Direct Known Subclasses

+

IGs, Presets, TestGroups, TestKits, TestSuites, Tests

+
+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .allObject + + + + + +

+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 28
+
+def all
+  @all ||= []
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #exists?(id) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+23
+24
+25
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 23
+
+def exists?(id)
+  all_by_id.key?(id.to_s)
+end
+
+
+ +
+

+ + #find(id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 19
+
+def find(id)
+  all_by_id[id.to_s]
+end
+
+
+ +
+

+ + #insert(entity) ⇒ Object + + + + + +

+
+ + + +
+
+
+ +

Raises:

+ + +
+ + + + +
+
+
+
+11
+12
+13
+14
+15
+16
+17
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 11
+
+def insert(entity)
+  raise Exceptions::DuplicateEntityIdException, entity.id if exists?(entity.id)
+
+  all << entity
+  all_by_id[entity.id.to_s] = entity
+  entity
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Messages.html b/docs/docs/Inferno/Repositories/Messages.html new file mode 100644 index 000000000..5d65203c3 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Messages.html @@ -0,0 +1,227 @@ + + + + + + + Class: Inferno::Repositories::Messages + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Messages + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/messages.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, #create, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #messages_for_result(result_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+4
+5
+6
+7
+8
+9
+10
+11
+12
+
+
# File 'lib/inferno/repositories/messages.rb', line 4
+
+def messages_for_result(result_id)
+  self.class::Model
+    .order(:index)
+    .where(result_id:)
+    .to_a
+    .map!(&:to_json_data)
+    .each(&:deep_symbolize_keys!)
+    .map! { |result| build_entity(result) }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Messages/Model.html b/docs/docs/Inferno/Repositories/Messages/Model.html new file mode 100644 index 000000000..e2f7823a2 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Messages/Model.html @@ -0,0 +1,254 @@ + + + + + + + Class: Inferno::Repositories::Messages::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Messages::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/messages.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+17
+18
+19
+20
+
+
# File 'lib/inferno/repositories/messages.rb', line 17
+
+def before_create
+  self.id = SecureRandom.uuid
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+22
+23
+24
+25
+26
+27
+28
+
+
# File 'lib/inferno/repositories/messages.rb', line 22
+
+def validate
+  super
+  types = Entities::Message::TYPES
+  errors.add(:message, 'must be present') if message.blank?
+  errors.add(:type, 'must be present') if type.blank?
+  errors.add(:type, "'#{type}' is invalid. Must be one of: #{types.join(', ')}") unless types.include?(type)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Presets.html b/docs/docs/Inferno/Repositories/Presets.html new file mode 100644 index 000000000..d62d0e3ea --- /dev/null +++ b/docs/docs/Inferno/Repositories/Presets.html @@ -0,0 +1,304 @@ + + + + + + + Class: Inferno::Repositories::Presets + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Presets + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/presets.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the Preset entity.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, #insert

+ + + +
+

Instance Method Details

+ + +
+

+ + #insert_from_file(path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+
+
# File 'lib/inferno/repositories/presets.rb', line 10
+
+def insert_from_file(path)
+  raw_contents =
+    case path
+    when /\.json$/
+      File.read(path)
+    when /\.erb$/
+      ERB.new(File.read(path)).result
+    end
+
+  if Application['base_url'].start_with? 'https://inferno-qa.healthit.gov'
+    raw_contents.gsub!('https://inferno.healthit.gov', 'https://inferno-qa.healthit.gov')
+  end
+
+  preset_hash = JSON.parse(raw_contents)
+
+  preset_hash.deep_symbolize_keys!
+  preset_hash[:id] ||= SecureRandom.uuid
+  preset = Entities::Preset.new(preset_hash)
+
+  insert(preset)
+end
+
+
+ +
+

+ + #presets_for_suite(suite_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+32
+33
+34
+
+
# File 'lib/inferno/repositories/presets.rb', line 32
+
+def presets_for_suite(suite_id)
+  all.select { |preset| preset.test_suite_id.to_s == suite_id.to_s }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Repository.html b/docs/docs/Inferno/Repositories/Repository.html new file mode 100644 index 000000000..42bb726a1 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Repository.html @@ -0,0 +1,1115 @@ + + + + + + + Class: Inferno::Repositories::Repository + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Repository + Abstract + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable
+
+ + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/repository.rb
+
+ +
+ +

Overview

+
+
+ This class is abstract. +
+
+
+

Base class for repositories. Subclass and override methods as +needed.

+ + +
+
+
+ + +
+ + + + + + + + +

+ Class Method Summary + collapse +

+ +
    + +
  • + + + .db ⇒ Object + + + + + + + + + + + + + +

    Return the db connection for this repository.

    +
    + +
  • + + +
  • + + + .table_name ⇒ String + + + + + + + + + + + + + +

    Return the name of the database table for this repository.

    +
    + +
  • + + +
+ +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .dbObject + + + + + +

+
+

Return the db connection for this repository.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/repositories/repository.rb', line 13
+
+def self.db
+  Application['db.connection'][table_name]
+end
+
+
+ +
+

+ + .table_nameString + + + + + +

+
+

Return the name of the database table for this repository. Override if +the table name is not the snake case version of the name of the +repository class.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+22
+23
+24
+
+
# File 'lib/inferno/repositories/repository.rb', line 22
+
+def self.table_name
+  name.demodulize.underscore.to_sym
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #add_non_db_entities(hash) ⇒ Object + + + + + +

+ + + + +
+
+
+
+57
+58
+59
+60
+61
+62
+63
+64
+65
+
+
# File 'lib/inferno/repositories/repository.rb', line 57
+
+def add_non_db_entities(hash)
+  if hash.include? :test_id
+    hash[:test] = Tests.new.find(hash[:test_id])
+  elsif hash.include? :test_group_id
+    hash[:test_group] = TestGroups.new.find(hash[:test_group_id])
+  elsif hash.include? :test_suite_id
+    hash[:test_suite] = TestSuites.new.find(hash[:test_suite_id])
+  end
+end
+
+
+ +
+

+ + #build_entity(params) ⇒ Object + + + + + +

+
+

Creates an instance of the entity associated with this repository. +Override if any special logic is required to create the entity.

+ + +
+
+
+

Parameters:

+
    + +
  • + + params + + + (Hash) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Object) + + + + — +

    an instance of #entity_class

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+101
+102
+103
+104
+
+
# File 'lib/inferno/repositories/repository.rb', line 101
+
+def build_entity(params)
+  add_non_db_entities(params)
+  entity_class.new(params)
+end
+
+
+ +
+

+ + #create(params) ⇒ Inferno::Entities + + + + + +

+
+

Create a new record in the database.

+ + +
+
+
+ +
+

Examples:

+ + +
repo = Inferno::Repositories::SomeEntities.new
+begin
+  result = repo.create(key1: 'value1', key2: 'value2')
+rescue Sequel::ValidationFailed => e
+  # handle error
+end
+ +
+

Parameters:

+
    + +
  • + + params + + + (Hash) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Inferno::Entities) + + + + — +

    an instance of the entity for this repo

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+78
+79
+80
+81
+
+
# File 'lib/inferno/repositories/repository.rb', line 78
+
+def create(params)
+  result = self.class::Model.create(db_params(params))
+  build_entity(result.to_hash.merge(handle_non_db_params(params)))
+end
+
+
+ +
+

+ + #db_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+106
+107
+108
+
+
# File 'lib/inferno/repositories/repository.rb', line 106
+
+def db_params(params)
+  params.slice(*self.class::Model.columns)
+end
+
+
+ +
+

+ + #entity_classClass + + + + + +

+
+

Return the class of the entity which will be instantiated by a +repository. Override if the entity class is not in the +Inferno::Entities namespace.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Class) + + + +
  • + +
+ +
+ + + + +
+
+
+
+40
+41
+42
+
+
# File 'lib/inferno/repositories/repository.rb', line 40
+
+def entity_class
+  Entities.const_get(entity_class_name)
+end
+
+
+ +
+

+ + #entity_class_nameClass + + + + + +

+
+

Return the name of the entity class which will be instantiated by a +repository. Override if the entity class name is not the singular +version of the repository name.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Class) + + + +
  • + +
+ +
+ + + + +
+
+
+
+31
+32
+33
+
+
# File 'lib/inferno/repositories/repository.rb', line 31
+
+def entity_class_name
+  self.class.name.demodulize.singularize
+end
+
+
+ +
+

+ + #find(id) ⇒ Inferno::Entities + + + + + +

+
+

Find a database record by id, and instantiate an entity from that +record.

+ + +
+
+
+

Parameters:

+
    + +
  • + + id + + + (String) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Inferno::Entities) + + + + — +

    an instance of the class returned by +#entity_class

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+50
+51
+52
+53
+54
+55
+
+
# File 'lib/inferno/repositories/repository.rb', line 50
+
+def find(id)
+  result = self.class::Model.find(id:)
+  return result if result.nil?
+
+  build_entity(result.to_hash)
+end
+
+
+ +
+

+ + #handle_non_db_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+114
+115
+116
+
+
# File 'lib/inferno/repositories/repository.rb', line 114
+
+def handle_non_db_params(params)
+  non_db_params(params)
+end
+
+
+ +
+

+ + #non_db_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+110
+111
+112
+
+
# File 'lib/inferno/repositories/repository.rb', line 110
+
+def non_db_params(params)
+  params.except(*self.class::Model.columns)
+end
+
+
+ +
+

+ + #update(entity_id, params = {}) ⇒ Object + + + + + +

+
+

Update a record in the database.

+ + +
+
+
+ +
+

Examples:

+ + +
repo = Inferno::Repositories::SomeEntities.new
+result = repo.update(id, key1: 'value1', key2: 'value2')
+ +
+

Parameters:

+
    + +
  • + + entity_id + + + (String) + + + +
  • + +
  • + + params + + + (Hash) + + + (defaults to: {}) + + +
  • + +
+ + +
+ + + + +
+
+
+
+90
+91
+92
+93
+94
+
+
# File 'lib/inferno/repositories/repository.rb', line 90
+
+def update(entity_id, params = {})
+  self.class::Model
+    .find(id: entity_id)
+    .update(params.merge(updated_at: Time.now))
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Requests.html b/docs/docs/Inferno/Repositories/Requests.html new file mode 100644 index 000000000..b4a55dc98 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Requests.html @@ -0,0 +1,702 @@ + + + + + + + Class: Inferno::Repositories::Requests + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Requests + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/requests.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, db, #db_params, #entity_class, #entity_class_name, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #create(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
+
# File 'lib/inferno/repositories/requests.rb', line 9
+
+def create(params)
+  request = self.class::Model.create(db_params(params))
+
+  headers = create_headers(request, params)
+
+  params[:tags]&.each do |tag|
+    request.add_tag(tag)
+  end
+
+  build_entity(
+    request.to_hash
+      .merge(headers:)
+      .merge(non_db_params(params))
+  )
+end
+
+
+ +
+

+ + #create_headers(request, params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+
# File 'lib/inferno/repositories/requests.rb', line 25
+
+def create_headers(request, params)
+  request_headers = (params[:request_headers] || []).map do |header|
+    request.add_header(header.merge(request_id: request.index, type: 'request'))
+  end
+  response_headers = (params[:response_headers] || []).map do |header|
+    request.add_header(header.merge(request_id: request.index, type: 'response'))
+  end
+
+  (request_headers + response_headers).map { |header| headers_repo.build_entity(header.to_hash) }
+end
+
+
+ +
+

+ + #find(id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+
+
# File 'lib/inferno/repositories/requests.rb', line 36
+
+def find(id)
+  result =
+    self.class::Model
+      .where(id:)
+      .select(*entity_class::SUMMARY_FIELDS)
+      .to_a
+  return nil if result.blank?
+
+  build_entity(result.first.to_hash)
+end
+
+
+ +
+

+ + #find_full_request(id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+50
+51
+52
+53
+54
+55
+
+
# File 'lib/inferno/repositories/requests.rb', line 47
+
+def find_full_request(id)
+  result =
+    self.class::Model
+      .find(id:)
+      .to_json_data(json_serializer_options)
+      .deep_symbolize_keys!
+
+  build_entity(result)
+end
+
+
+ +
+

+ + #find_named_request(test_session_id, name) ⇒ Object + + + + + +

+ + + + +
+
+
+
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+
+
# File 'lib/inferno/repositories/requests.rb', line 57
+
+def find_named_request(test_session_id, name)
+  results =
+    self.class::Model
+      .where(test_session_id:, name: name.to_s)
+      .map { |model| model.to_json_data(json_serializer_options) }
+  return nil if results.blank?
+
+  result = results.reduce { |max, current| current['index'] > max['index'] ? current : max }
+  result.deep_symbolize_keys!
+
+  build_entity(result)
+end
+
+
+ +
+

+ + #json_serializer_optionsObject + + + + + +

+ + + + +
+
+
+
+93
+94
+95
+96
+97
+
+
# File 'lib/inferno/repositories/requests.rb', line 93
+
+def json_serializer_options
+  {
+    include: [:headers, :tags]
+  }
+end
+
+
+ +
+

+ + #requests_for_result(result_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+83
+84
+85
+86
+87
+88
+89
+90
+91
+
+
# File 'lib/inferno/repositories/requests.rb', line 83
+
+def requests_for_result(result_id)
+  self.class::Model
+    .order(:index)
+    .where(result_id:)
+    .select(*entity_class::SUMMARY_FIELDS)
+    .to_a
+    .map(&:to_hash)
+    .map! { |result| build_entity(result) }
+end
+
+
+ +
+

+ + #tagged_requests(test_session_id, tags) ⇒ Object + + + + + +

+ + + + +
+
+
+
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+
+
# File 'lib/inferno/repositories/requests.rb', line 70
+
+def tagged_requests(test_session_id, tags)
+  self.class::Model
+    .tagged_requests(test_session_id, tags)
+    .to_a
+    .map! do |request|
+      build_entity(
+        request
+          .to_json_data(json_serializer_options)
+          .deep_symbolize_keys!
+      )
+    end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Requests/Model.html b/docs/docs/Inferno/Repositories/Requests/Model.html new file mode 100644 index 000000000..1021e0afc --- /dev/null +++ b/docs/docs/Inferno/Repositories/Requests/Model.html @@ -0,0 +1,451 @@ + + + + + + + Class: Inferno::Repositories::Requests::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Requests::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/requests.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .tagged_requests(test_session_id, tags) ⇒ Object + + + + + +

+ + + + +
+
+
+
+170
+171
+172
+
+
# File 'lib/inferno/repositories/requests.rb', line 170
+
+def self.tagged_requests(test_session_id, tags)
+  fetch(tagged_requests_sql, test_session_id:, tags:, tag_count: tags.length)
+end
+
+
+ +
+

+ + .tagged_requests_sqlObject + + + + + +

+ + + + +
+
+
+
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+
+
# File 'lib/inferno/repositories/requests.rb', line 132
+
+def self.tagged_requests_sql
+  # Find all the requests for the current session which:
+  # - match all supplied tags
+  # - are the from the most recent test run for each runnable
+  <<~SQL.gsub(/\s+/, ' ').freeze
+    select final_requests.*
+    from (
+        select uncounted_requests.request_id request_id
+        from (
+                select r.id request_id, t.id tag_id from requests r
+                inner join requests_tags rt on r."index" = rt.requests_id
+                inner join tags t on rt.tags_id = t.id
+                where r.test_session_id = :test_session_id
+                and r.result_id in (
+                SELECT a.id FROM results a
+                        WHERE a.test_session_id = r.test_session_id
+                        AND a.id IN  (
+                        SELECT id
+                        FROM results b
+                        WHERE (b.test_session_id = a.test_session_id AND b.test_id = a.test_id) OR
+                                (b.test_session_id = a.test_session_id AND b.test_group_id = a.test_group_id) OR
+                                (b.test_session_id = a.test_session_id AND b.test_suite_id = a.test_suite_id)
+                        ORDER BY updated_at DESC
+                        LIMIT 1
+                        )
+                )
+                and t.name in :tags
+                group by r.id, t.id
+            ) as uncounted_requests
+            group by uncounted_requests.request_id
+            having count(*) = :tag_count
+        ) as matched_requests
+    inner join requests final_requests on final_requests.id = matched_requests.request_id
+    where final_requests.test_session_id = :test_session_id
+    order by final_requests."index"
+  SQL
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #add_tag(tag_name) ⇒ Object + + + + + +

+ + + + +
+
+
+
+123
+124
+125
+126
+127
+128
+129
+130
+
+
# File 'lib/inferno/repositories/requests.rb', line 123
+
+def add_tag(tag_name)
+  tag = Tags::Model.find_or_create(name: tag_name)
+
+  Inferno::Application['db.connection'][:requests_tags].insert(
+    tags_id: tag.id,
+    requests_id: index
+  )
+end
+
+
+ +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+115
+116
+117
+118
+119
+120
+121
+
+
# File 'lib/inferno/repositories/requests.rb', line 115
+
+def before_create
+  self.id = SecureRandom.uuid
+  time = Time.now
+  self.created_at ||= time
+  self.updated_at ||= time
+  super
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Results.html b/docs/docs/Inferno/Repositories/Results.html new file mode 100644 index 000000000..4cfd4a07a --- /dev/null +++ b/docs/docs/Inferno/Repositories/Results.html @@ -0,0 +1,819 @@ + + + + + + + Class: Inferno::Repositories::Results + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Results + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/results.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #build_entity(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+
+
# File 'lib/inferno/repositories/results.rb', line 55
+
+def build_entity(params)
+  runnable =
+    if params[:test_id]
+      { test: tests_repo.find(params[:test_id]) }
+    elsif params[:test_group_id]
+      { test_group: groups_repo.find(params[:test_group_id]) }
+    elsif params[:test_suite_id]
+      { test_suite: suites_repo.find(params[:test_suite_id]) }
+    else
+      {}
+    end
+  entity_class.new(params.merge(runnable))
+end
+
+
+ +
+

+ + #create(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+
# File 'lib/inferno/repositories/results.rb', line 14
+
+def create(params)
+  messages = params.delete(:messages) || []
+  requests = params.delete(:requests) || []
+  super(params).tap do |result|
+    result_model = self.class::Model.find(id: result.id)
+    messages.each { |message| messages_repo.create(message.merge(result_id: result.id)) }
+    requests.each do |request|
+      request_id =
+        if request.id.present?
+          request.id
+        else
+          requests_repo.create(request.to_hash.merge(result_id: result.id)).id
+        end
+      request_model = requests_repo.class::Model.find(id: request_id)
+      result_model.add_request(request_model)
+    end
+  end
+end
+
+
+ +
+

+ + #current_results_for_test_session(test_session_id) ⇒ Object + + + + + +

+
+

Get all of the current results for a test session

+ + +
+
+
+ + +
+ + + + +
+
+
+
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+
+
# File 'lib/inferno/repositories/results.rb', line 110
+
+def current_results_for_test_session(test_session_id)
+  self.class::Model
+    .current_results_for_test_session(test_session_id)
+    .eager(:messages)
+    .eager(requests: proc { |requests| requests.select(*Entities::Request::SUMMARY_FIELDS) })
+    .all
+    .map! do |result_hash|
+      build_entity(
+        result_hash
+          .to_json_data(json_serializer_options)
+          .deep_symbolize_keys!
+      )
+    end
+end
+
+
+ +
+

+ + #current_results_for_test_session_and_runnables(test_session_id, runnables) ⇒ Object + + + + + +

+
+

Get the current results for a list of runnables

+ + +
+
+
+ + +
+ + + + +
+
+
+
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+
+
# File 'lib/inferno/repositories/results.rb', line 126
+
+def current_results_for_test_session_and_runnables(test_session_id, runnables)
+  self.class::Model
+    .current_results_for_test_session_and_runnables(test_session_id, runnables)
+    .all
+    .map! do |result_hash|
+      build_entity(
+        result_hash
+          .to_json_data(json_serializer_options)
+          .deep_symbolize_keys!
+      )
+    end
+end
+
+
+ +
+

+ + #find_waiting_result(test_run_id:) ⇒ Object + + + + + +

+ + + + +
+
+
+
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+
+
# File 'lib/inferno/repositories/results.rb', line 94
+
+def find_waiting_result(test_run_id:)
+  result_hash =
+    Model
+      .where(test_run_id:, result: 'wait')
+      .where { test_id !~ nil }
+      .limit(1)
+      .to_a
+      .first
+      &.to_hash
+
+  return nil if result_hash.nil?
+
+  build_entity(result_hash)
+end
+
+
+ +
+

+ + #json_serializer_optionsObject + + + + + +

+ + + + +
+
+
+
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+
+
# File 'lib/inferno/repositories/results.rb', line 143
+
+def json_serializer_options
+  {
+    include: {
+      messages: {},
+      requests: {
+        only: Entities::Request::SUMMARY_FIELDS
+      }
+    }
+  }
+end
+
+
+ +
+

+ + #result_for_test_run(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+
+
# File 'lib/inferno/repositories/results.rb', line 69
+
+def result_for_test_run(params)
+  result_hash =
+    self.class::Model
+      .find(params)
+      &.to_hash
+
+  return nil if result_hash.nil?
+
+  build_entity(result_hash)
+end
+
+
+ +
+

+ + #test_run_results_after(test_run_id:, after:) ⇒ Object + + + + + +

+ + + + +
+
+
+
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+
+
# File 'lib/inferno/repositories/results.rb', line 80
+
+def test_run_results_after(test_run_id:, after:)
+  Model
+    .where(test_run_id:)
+    .where { updated_at >= after }
+    .to_a
+    .map! do |result_hash|
+    build_entity(
+      result_hash
+        .to_json_data(json_serializer_options)
+        .deep_symbolize_keys!
+    )
+  end
+end
+
+
+ +
+

+ + #update_result(result_id, result, result_message = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+139
+140
+141
+
+
# File 'lib/inferno/repositories/results.rb', line 139
+
+def update_result(result_id, result, result_message = nil)
+  update(result_id, result:, result_message:)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Results/Model.html b/docs/docs/Inferno/Repositories/Results/Model.html new file mode 100644 index 000000000..5fcd1cceb --- /dev/null +++ b/docs/docs/Inferno/Repositories/Results/Model.html @@ -0,0 +1,510 @@ + + + + + + + Class: Inferno::Repositories::Results::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Results::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
ValidateRunnableReference
+
+ + + + + + +
+
Defined in:
+
lib/inferno/repositories/results.rb
+
+ +
+ + + + +

Constant Summary

+ +

Constants included + from ValidateRunnableReference

+

ValidateRunnableReference::REFERENCE_KEYS

+ + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from ValidateRunnableReference

+

#check_runnable_reference, #runnable_reference_exists?

+ + +
+

Class Method Details

+ + +
+

+ + .current_results_for_test_session(test_session_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+200
+201
+202
+
+
# File 'lib/inferno/repositories/results.rb', line 200
+
+def self.current_results_for_test_session(test_session_id)
+  fetch(current_results_sql, test_session_id:)
+end
+
+
+ +
+

+ + .current_results_for_test_session_and_runnables(test_session_id, runnables) ⇒ Object + + + + + +

+ + + + +
+
+
+
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+
+
# File 'lib/inferno/repositories/results.rb', line 204
+
+def self.current_results_for_test_session_and_runnables(test_session_id, runnables)
+  test_ids = runnables.select { |runnable| runnable < Entities::Test }.map!(&:id)
+  test_group_ids = runnables.select { |runnable| runnable < Entities::TestGroup }.map!(&:id)
+  test_suite_ids = runnables.select { |runnable| runnable < Entities::TestSuite }.map!(&:id)
+
+  fetch(
+    current_results_sql(with_runnables_filter: true),
+    test_session_id:,
+    test_ids:,
+    test_group_ids:,
+    test_suite_ids:
+  )
+end
+
+
+ +
+

+ + .current_results_sql(with_runnables_filter: false) ⇒ Object + + + + + +

+ + + + +
+
+
+
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+
+
# File 'lib/inferno/repositories/results.rb', line 157
+
+def self.current_results_sql(with_runnables_filter: false)
+  query = <<~SQL.gsub(/\s+/, ' ').freeze
+    SELECT * FROM results a
+    WHERE test_session_id = :test_session_id
+  SQL
+  runnables_filter = <<~SQL.gsub(/\s+/, ' ').freeze
+    AND (test_id IN :test_ids OR test_group_id IN :test_group_ids OR test_suite_id IN :test_suite_ids)
+  SQL
+  subquery = <<~SQL.gsub(/\s+/, ' ').freeze
+    AND a.id IN  (
+      SELECT id
+      FROM results b
+      WHERE (b.test_session_id = a.test_session_id AND b.test_id = a.test_id) OR
+            (b.test_session_id = a.test_session_id AND b.test_group_id = a.test_group_id) OR
+            (b.test_session_id = a.test_session_id AND b.test_suite_id = a.test_suite_id)
+      ORDER BY updated_at DESC
+      LIMIT 1
+    )
+  SQL
+  return "#{query} #{runnables_filter} #{subquery}" if with_runnables_filter
+
+  "#{query} #{subquery}"
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+187
+188
+189
+190
+191
+192
+193
+
+
# File 'lib/inferno/repositories/results.rb', line 187
+
+def before_create
+  self.id = SecureRandom.uuid
+  time = Time.now
+  self.created_at ||= time
+  self.updated_at ||= time
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+195
+196
+197
+198
+
+
# File 'lib/inferno/repositories/results.rb', line 195
+
+def validate
+  super
+  errors.add(:result, "'#{result}' is not valid") unless Entities::Result::RESULT_OPTIONS.include?(result)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/SessionData.html b/docs/docs/Inferno/Repositories/SessionData.html new file mode 100644 index 000000000..87dfec7fd --- /dev/null +++ b/docs/docs/Inferno/Repositories/SessionData.html @@ -0,0 +1,776 @@ + + + + + + + Class: Inferno::Repositories::SessionData + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::SessionData + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/session_data.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, #create, db, #db_params, #entity_class, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #entity_class_nameObject + + + + + +

+ + + + +
+
+
+
+56
+57
+58
+
+
# File 'lib/inferno/repositories/session_data.rb', line 56
+
+def entity_class_name
+  'SessionData'
+end
+
+
+ +
+

+ + #get_all_from_session(test_session_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+
+
# File 'lib/inferno/repositories/session_data.rb', line 43
+
+def get_all_from_session(test_session_id)
+  self.class::Model
+    .where(test_session_id:)
+    .all
+    .map! do |session_data_hash|
+      build_entity(
+        session_data_hash
+          .to_json_data
+          .deep_symbolize_keys!
+      )
+    end
+end
+
+
+ +
+

+ + #load(test_session_id:, name:, type: 'text') ⇒ Object + + + + + +

+
+

rubocop:disable Metrics/CyclomaticComplexity

+ + +
+
+
+ + +
+ + + + +
+
+
+
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/repositories/session_data.rb', line 25
+
+def load(test_session_id:, name:, type: 'text') # rubocop:disable Metrics/CyclomaticComplexity
+  raw_value =
+    self.class::Model
+      .find(test_session_id:, name: name.to_s.downcase)
+      &.value
+
+  case type.to_s
+  when 'oauth_credentials'
+    DSL::OAuthCredentials.new(JSON.parse(raw_value || '{}'))
+  when 'checkbox'
+    JSON.parse(raw_value || '[]')
+  when 'auth_info'
+    DSL::AuthInfo.new(JSON.parse(raw_value || '{}'))
+  else
+    raw_value
+  end
+end
+
+
+ +
+

+ + #save(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
+
# File 'lib/inferno/repositories/session_data.rb', line 7
+
+def save(params)
+  name = params[:name].to_s.downcase
+  test_session_id = params[:test_session_id]
+
+  value = value_to_persist(params)
+
+  db
+    .insert_conflict(
+      target: :id,
+      update: { value: }
+    ).insert(
+      id: "#{test_session_id}_#{name}",
+      name:,
+      value:,
+      test_session_id:
+    )
+end
+
+
+ +
+

+ + #serialize_auth_info(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+
+
# File 'lib/inferno/repositories/session_data.rb', line 111
+
+def serialize_auth_info(params)
+  auth =
+    if params[:value].is_a? String
+      DSL::AuthInfo.new(JSON.parse(params[:value]))
+    elsif !params[:value].is_a? DSL::AuthInfo
+      raise Exceptions::BadSessionDataType.new(
+        params[:name],
+        DSL::AuthInfo.name,
+        params[:value].class
+      )
+    else
+      params[:value]
+    end
+
+  auth.name = params[:name]
+  auth.to_s
+end
+
+
+ +
+

+ + #serialize_checkbox_input(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+
+
# File 'lib/inferno/repositories/session_data.rb', line 77
+
+def serialize_checkbox_input(params)
+  if params[:value].is_a?(String)
+    params[:value]
+  elsif params[:value].nil?
+    '[]'
+  elsif params[:value].is_a?(Array)
+    params[:value].to_json
+  else
+    raise Exceptions::BadSessionDataType.new(
+      params[:name],
+      'JSON String or Array',
+      params[:value].class
+    )
+  end
+end
+
+
+ +
+

+ + #serialize_oauth_credentials_input(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+
+
# File 'lib/inferno/repositories/session_data.rb', line 93
+
+def serialize_oauth_credentials_input(params)
+  credentials =
+    if params[:value].is_a? String
+      DSL::OAuthCredentials.new(JSON.parse(params[:value]))
+    elsif !params[:value].is_a? DSL::OAuthCredentials
+      raise Exceptions::BadSessionDataType.new(
+        params[:name],
+        DSL::OAuthCredentials.name,
+        params[:value].class
+      )
+    else
+      params[:value]
+    end
+
+  credentials.name = params[:name]
+  credentials.to_s
+end
+
+
+ +
+

+ + #value_to_persist(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+
+
# File 'lib/inferno/repositories/session_data.rb', line 60
+
+def value_to_persist(params)
+  return nil if params[:value].blank?
+
+  case params[:type]&.to_s
+  when 'text', 'textarea', 'radio'
+    params[:value].to_s
+  when 'checkbox'
+    serialize_checkbox_input(params)
+  when 'oauth_credentials'
+    serialize_oauth_credentials_input(params)
+  when 'auth_info'
+    serialize_auth_info(params)
+  else
+    raise Exceptions::UnknownSessionDataType, params
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/SessionData/Model.html b/docs/docs/Inferno/Repositories/SessionData/Model.html new file mode 100644 index 000000000..deac5f1de --- /dev/null +++ b/docs/docs/Inferno/Repositories/SessionData/Model.html @@ -0,0 +1,121 @@ + + + + + + + Class: Inferno::Repositories::SessionData::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::SessionData::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/session_data.rb
+
+ +
+ + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Tags.html b/docs/docs/Inferno/Repositories/Tags.html new file mode 100644 index 000000000..49da4ad2b --- /dev/null +++ b/docs/docs/Inferno/Repositories/Tags.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::Tags + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Tags + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/tags.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, #create, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Tags/Model.html b/docs/docs/Inferno/Repositories/Tags/Model.html new file mode 100644 index 000000000..75bc2d279 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Tags/Model.html @@ -0,0 +1,193 @@ + + + + + + + Class: Inferno::Repositories::Tags::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Tags::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/tags.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+11
+12
+13
+14
+
+
# File 'lib/inferno/repositories/tags.rb', line 11
+
+def before_create
+  self.id = SecureRandom.uuid
+  super
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestGroups.html b/docs/docs/Inferno/Repositories/TestGroups.html new file mode 100644 index 000000000..2623aa437 --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestGroups.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::TestGroups + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestGroups + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_groups.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the TestGroup entity.

+ + +
+
+
+ + +
+ + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, #insert

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestKits.html b/docs/docs/Inferno/Repositories/TestKits.html new file mode 100644 index 000000000..4a88f629b --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestKits.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::TestKits + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestKits + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_kits.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the TestKit entity.

+ + +
+
+
+ + +
+ + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, #insert

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestRuns.html b/docs/docs/Inferno/Repositories/TestRuns.html new file mode 100644 index 000000000..bbbb5ab94 --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestRuns.html @@ -0,0 +1,927 @@ + + + + + + + Class: Inferno::Repositories::TestRuns + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestRuns + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_runs.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #create, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #active_test_run_for_session?(test_session_id) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+127
+128
+129
+130
+131
+132
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 127
+
+def active_test_run_for_session?(test_session_id)
+  self.class::Model
+    .where(test_session_id:)
+    .exclude(status: 'done')
+    .count.positive?
+end
+
+
+ +
+

+ + #build_entity(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+16
+17
+18
+19
+20
+21
+22
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 16
+
+def build_entity(params)
+  super.tap do |test_run|
+    test_run&.results&.map! do |result|
+      result.is_a?(Entities::Result) ? result : Entities::Result.new(result)
+    end
+  end
+end
+
+
+ +
+

+ + #find_latest_waiting_by_identifier(identifier) ⇒ Object + + + + + +

+ + + + +
+
+
+
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 35
+
+def find_latest_waiting_by_identifier(identifier)
+  test_run_hash =
+    self.class::Model
+      .where(status: 'waiting')
+      .where(identifier:)
+      .where { wait_timeout >= Time.now }
+      .order(Sequel.desc(:updated_at))
+      .limit(1)
+      .to_a
+      &.first
+      &.to_hash
+
+  return nil if test_run_hash.nil?
+
+  build_entity(test_run_hash)
+end
+
+
+ +
+

+ + #json_serializer_optionsObject + + + + + +

+ + + + +
+
+
+
+8
+9
+10
+11
+12
+13
+14
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 8
+
+def json_serializer_options
+  {
+    include: {
+      results: results_repo.json_serializer_options
+    }
+  }
+end
+
+
+ +
+

+ + #last_test_run(test_session_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 52
+
+def last_test_run(test_session_id)
+  test_run_hash =
+    self.class::Model
+      .where(test_session_id:)
+      .order(Sequel.desc(:updated_at))
+      .limit(1)
+      .to_a
+      .map { |record| record.to_json_data.deep_symbolize_keys! }
+      &.first
+      &.to_hash
+
+  return nil if test_run_hash.nil?
+
+  build_entity(test_run_hash)
+end
+
+
+ +
+

+ + #mark_as_cancelling(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+98
+99
+100
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 98
+
+def mark_as_cancelling(test_run_id)
+  update(test_run_id, status: 'cancelling')
+end
+
+
+ +
+

+ + #mark_as_done(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+76
+77
+78
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 76
+
+def mark_as_done(test_run_id)
+  update(test_run_id, status: 'done')
+end
+
+
+ +
+

+ + #mark_as_no_longer_waiting(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+89
+90
+91
+92
+93
+94
+95
+96
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 89
+
+def mark_as_no_longer_waiting(test_run_id)
+  update(
+    test_run_id,
+    status: 'queued',
+    identifier: nil,
+    wait_timeout: nil
+  )
+end
+
+
+ +
+

+ + #mark_as_running(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+72
+73
+74
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 72
+
+def mark_as_running(test_run_id)
+  update(test_run_id, status: 'running')
+end
+
+
+ +
+

+ + #mark_as_waiting(test_run_id, identifier, timeout) ⇒ Object + + + + + +

+ + + + +
+
+
+
+80
+81
+82
+83
+84
+85
+86
+87
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 80
+
+def mark_as_waiting(test_run_id, identifier, timeout)
+  update(
+    test_run_id,
+    status: 'waiting',
+    identifier:,
+    wait_timeout: Time.now + timeout.seconds
+  )
+end
+
+
+ +
+

+ + #results_for_test_run(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 24
+
+def results_for_test_run(test_run_id)
+  test_run_hash =
+    self.class::Model
+      .find(id: test_run_id)
+      .to_json_data(json_serializer_options)
+      .deep_symbolize_keys!
+
+  test_run_hash[:results]
+    .map! { |result| results_repo.build_entity(result) }
+end
+
+
+ +
+

+ + #status_for_test_run(id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+68
+69
+70
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 68
+
+def status_for_test_run(id)
+  self.class::Model.where(id:).get(:status)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestRuns/Model.html b/docs/docs/Inferno/Repositories/TestRuns/Model.html new file mode 100644 index 000000000..922057e23 --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestRuns/Model.html @@ -0,0 +1,280 @@ + + + + + + + Class: Inferno::Repositories::TestRuns::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestRuns::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
ValidateRunnableReference
+
+ + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_runs.rb
+
+ +
+ + + + +

Constant Summary

+ +

Constants included + from ValidateRunnableReference

+

ValidateRunnableReference::REFERENCE_KEYS

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from ValidateRunnableReference

+

#check_runnable_reference, #runnable_reference_exists?

+ + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+118
+119
+120
+121
+122
+123
+124
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 118
+
+def before_create
+  self.id = SecureRandom.uuid
+  time = Time.now
+  self.created_at ||= time
+  self.updated_at ||= time
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+111
+112
+113
+114
+115
+116
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 111
+
+def validate
+  super
+  if status.present? && !Entities::TestRun::STATUS_OPTIONS.include?(status) # rubocop:disable Style/GuardClause
+    errors.add(:status, "'#{status}' is not valid")
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestSessions.html b/docs/docs/Inferno/Repositories/TestSessions.html new file mode 100644 index 000000000..3ff4e6cba --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestSessions.html @@ -0,0 +1,499 @@ + + + + + + + Class: Inferno::Repositories::TestSessions + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestSessions + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_sessions.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the TestSession entity.

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #apply_preset(test_session, preset_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+50
+51
+52
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 47
+
+def apply_preset(test_session, preset_id)
+  preset = presets_repo.find(preset_id)
+  Utils::PresetProcessor.new(preset, test_session).processed_inputs.each do |input|
+    session_data_repo.save(input.merge(test_session_id: test_session.id))
+  end
+end
+
+
+ +
+

+ + #build_entity(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 54
+
+def build_entity(params)
+  suite_options = JSON.parse(params[:suite_options] || '[]').map do |suite_option_hash|
+    suite_option_hash.deep_symbolize_keys!
+    suite_option_hash[:id] = suite_option_hash[:id].to_sym
+    DSL::SuiteOption.new(suite_option_hash)
+  end
+
+  final_params = params.merge(suite_options:)
+  add_non_db_entities(final_params)
+  entity_class.new(final_params)
+end
+
+
+ +
+

+ + #create(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 24
+
+def create(params)
+  raw_suite_options = params[:suite_options]
+  suite_options =
+    if raw_suite_options.blank?
+      '[]'
+    else
+      JSON.generate(raw_suite_options.map(&:to_hash))
+    end
+
+  super(params.merge(suite_options:))
+end
+
+
+ +
+

+ + #json_serializer_optionsObject + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 15
+
+def json_serializer_options
+  {
+    include: {
+      results: results_repo.json_serializer_options,
+      test_runs: {}
+    }
+  }
+end
+
+
+ +
+

+ + #results_for_test_session(test_session_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 36
+
+def results_for_test_session(test_session_id)
+  test_session_hash =
+    self.class::Model
+      .find(id: test_session_id)
+      .to_json_data(json_serializer_options)
+      .deep_symbolize_keys!
+
+  test_session_hash[:results]
+    .map! { |result| results_repo.build_entity(result) }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestSessions/Model.html b/docs/docs/Inferno/Repositories/TestSessions/Model.html new file mode 100644 index 000000000..1fd5cd5f1 --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestSessions/Model.html @@ -0,0 +1,260 @@ + + + + + + + Class: Inferno::Repositories::TestSessions::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestSessions::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_sessions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+75
+76
+77
+78
+79
+80
+81
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 75
+
+def before_create
+  self.id = Base62.encode(SecureRandom.random_number(2**64))
+  time = Time.now
+  self.created_at ||= time
+  self.updated_at ||= time
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+83
+84
+85
+86
+87
+88
+89
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 83
+
+def validate
+  super
+  errors.add(:test_suite_id, 'cannot be empty') if test_suite_id.blank?
+  unless test_suites_repo.exists? test_suite_id # rubocop:disable Style/GuardClause
+    errors.add(:test_suite_id, "'#{test_suite_id}' is not valid")
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestSuites.html b/docs/docs/Inferno/Repositories/TestSuites.html new file mode 100644 index 000000000..dc7f5e38f --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestSuites.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::TestSuites + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestSuites + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_suites.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the TestSuite entity.

+ + +
+
+
+ + +
+ + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, #insert

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Tests.html b/docs/docs/Inferno/Repositories/Tests.html new file mode 100644 index 000000000..4c5ea2b17 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Tests.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::Tests + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Tests + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/tests.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the Test entity.

+ + +
+
+
+ + +
+ + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, #insert

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/ValidateRunnableReference.html b/docs/docs/Inferno/Repositories/ValidateRunnableReference.html new file mode 100644 index 000000000..7ba02bd88 --- /dev/null +++ b/docs/docs/Inferno/Repositories/ValidateRunnableReference.html @@ -0,0 +1,371 @@ + + + + + + + Module: Inferno::Repositories::ValidateRunnableReference + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Repositories::ValidateRunnableReference + + + +

+
+ + + + + + + + + +
+
Included in:
+
Results::Model, TestRuns::Model
+
+ + + +
+
Defined in:
+
lib/inferno/repositories/validate_runnable_reference.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
REFERENCE_KEYS = + +
+
[:test_id, :test_group_id, :test_suite_id].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #check_runnable_referenceObject + + + + + +

+ + + + +
+
+
+
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+
+
# File 'lib/inferno/repositories/validate_runnable_reference.rb', line 12
+
+def check_runnable_reference
+  present_keys = REFERENCE_KEYS.select { |reference_key| send(reference_key) }
+
+  if present_keys.length == 1
+    runnable_type = present_keys.first
+    id = values[runnable_type]
+    reference_exists = runnable_reference_exists?(runnable_type, id)
+    return if reference_exists
+
+    { key: runnable_type, message: "of #{id} does not exist" }
+  else
+    { key: :base, message: "must contain exactly one of 'test_id', 'test_group_id', or 'test_suite_id'" }
+  end
+end
+
+
+ +
+

+ + #runnable_reference_exists?(type, id) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+
+
# File 'lib/inferno/repositories/validate_runnable_reference.rb', line 27
+
+def runnable_reference_exists?(type, id)
+  repo =
+    case type
+    when :test_id
+      Inferno::Repositories::Tests.new
+    when :test_group_id
+      Inferno::Repositories::TestGroups.new
+    when :test_suite_id
+      Inferno::Repositories::TestSuites.new
+    end
+
+  repo.exists? id
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+
+
# File 'lib/inferno/repositories/validate_runnable_reference.rb', line 6
+
+def validate
+  super
+  reference_error_message = check_runnable_reference
+  errors.add(reference_error_message[:key], reference_error_message[:message]) if reference_error_message
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/ValidatorSessions.html b/docs/docs/Inferno/Repositories/ValidatorSessions.html new file mode 100644 index 000000000..5cf919b2a --- /dev/null +++ b/docs/docs/Inferno/Repositories/ValidatorSessions.html @@ -0,0 +1,338 @@ + + + + + + + Class: Inferno::Repositories::ValidatorSessions + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::ValidatorSessions + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/validator_sessions.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, #create, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #find_validator_session_id(test_suite_id, validator_name, suite_options) ⇒ Object + + + + + +

+ + + + +
+
+
+
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+
+
# File 'lib/inferno/repositories/validator_sessions.rb', line 39
+
+def find_validator_session_id(test_suite_id, validator_name, suite_options)
+  suite_options = suite_options.nil? ? '[]' : suite_options.sort.to_s
+  session = self.class::Model
+    .find(test_suite_id:, validator_name:, suite_options:)
+  return nil if session.nil?
+
+  time = Time.now
+  session.update(last_accessed: time)
+  session[:validator_session_id]
+end
+
+
+ +
+

+ + #save(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/repositories/validator_sessions.rb', line 7
+
+def save(params)
+  validator_session_id = params[:validator_session_id]
+  validator_name = params[:validator_name]
+  test_suite_id = params[:test_suite_id]
+  raw_suite_options = params[:suite_options]
+  time = Time.now
+
+  suite_options =
+    if raw_suite_options.blank?
+      '[]'
+    else
+      raw_suite_options.sort.to_s
+    end
+
+  db.insert_conflict(
+    target: [:test_suite_id,
+             :suite_options,
+             :validator_name],
+    update: { validator_session_id:,
+              test_suite_id:,
+              suite_options:,
+              validator_name: }
+  ).insert(
+    id: SecureRandom.uuid,
+    validator_session_id:,
+    test_suite_id:,
+    validator_name:,
+    suite_options:,
+    last_accessed: time
+  )
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/ValidatorSessions/Model.html b/docs/docs/Inferno/Repositories/ValidatorSessions/Model.html new file mode 100644 index 000000000..d2631c6d1 --- /dev/null +++ b/docs/docs/Inferno/Repositories/ValidatorSessions/Model.html @@ -0,0 +1,193 @@ + + + + + + + Class: Inferno::Repositories::ValidatorSessions::Model + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::ValidatorSessions::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/validator_sessions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_saveObject + + + + + +

+ + + + +
+
+
+
+51
+52
+53
+54
+
+
# File 'lib/inferno/repositories/validator_sessions.rb', line 51
+
+def before_save
+  time = Time.now
+  self.last_accessed ||= time
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/SpecSupport.html b/docs/docs/Inferno/SpecSupport.html new file mode 100644 index 000000000..2aab70b59 --- /dev/null +++ b/docs/docs/Inferno/SpecSupport.html @@ -0,0 +1,295 @@ + + + + + + + Module: Inferno::SpecSupport + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::SpecSupport + + + Private +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/spec_support.rb
+
+ +
+ +

Overview

+
+

+ This module is part of a private API. + You should avoid using this module if possible, as it may be removed or be changed in the future. +

+

This module provides constants so that unit tests in suite repositories can +load the factories defined in inferno.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
FACTORY_BOT_SUPPORT_PATH = +
+
+

+ This constant is part of a private API. + You should avoid using this constant if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+
+
File.expand_path('../../spec/support/factory_bot', __dir__).freeze
+ +
FACTORY_PATH = +
+
+

+ This constant is part of a private API. + You should avoid using this constant if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+
+
File.expand_path('../../spec/factories', __dir__).freeze
+ +
REQUEST_HELPER_PATH = +
+
+

+ This constant is part of a private API. + You should avoid using this constant if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+
+
File.expand_path('../../spec/request_helper', __dir__).freeze
+ +
RUNNABLE_HELPER_PATH = +
+
+

+ This constant is part of a private API. + You should avoid using this constant if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+
+
File.expand_path('../../spec/runnable_helper', __dir__).freeze
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .require_helpersObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+11
+12
+13
+14
+15
+
+
# File 'lib/inferno/spec_support.rb', line 11
+
+def self.require_helpers
+  require FACTORY_BOT_SUPPORT_PATH
+  require RUNNABLE_HELPER_PATH
+  require REQUEST_HELPER_PATH
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils.html b/docs/docs/Inferno/Utils.html new file mode 100644 index 000000000..99403a70c --- /dev/null +++ b/docs/docs/Inferno/Utils.html @@ -0,0 +1,119 @@ + + + + + + + Module: Inferno::Utils + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Utils + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/utils/migration.rb,
+ lib/inferno/utils/ig_downloader.rb,
lib/inferno/utils/static_assets.rb,
lib/inferno/utils/persist_inputs.rb,
lib/inferno/utils/verify_runnable.rb,
lib/inferno/utils/preset_processor.rb,
lib/inferno/utils/markdown_formatter.rb,
lib/inferno/utils/named_thor_actions.rb,
lib/inferno/utils/middleware/request_logger.rb,
lib/inferno/utils/preset_template_generator.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: IgDownloader, NamedThorActions + + + + Classes: Migration, PresetProcessor, PresetTemplateGenerator + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils/IgDownloader.html b/docs/docs/Inferno/Utils/IgDownloader.html new file mode 100644 index 000000000..a16fd270b --- /dev/null +++ b/docs/docs/Inferno/Utils/IgDownloader.html @@ -0,0 +1,477 @@ + + + + + + + Module: Inferno::Utils::IgDownloader + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Utils::IgDownloader + + + +

+
+ + + + + + + + + +
+
Included in:
+
CLI::Evaluate, CLI::New
+
+ + + +
+
Defined in:
+
lib/inferno/utils/ig_downloader.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
FHIR_PACKAGE_NAME_REG_EX = + +
+
/^[a-z][a-zA-Z0-9-]*\.([a-z][a-zA-Z0-9-]*\.?)*/
+ +
HTTP_URI_REG_EX = + +
+
%r{^https?://[^/?#]+[^?#]*}
+ +
FILE_URI_REG_EX = + +
+
%r{^file://(.+)}
+ +
HTTP_URI_END_REG_EX = + +
+
%r{[^/]*\.x?html?$}
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #ig_file(suffix = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/utils/ig_downloader.rb', line 13
+
+def ig_file(suffix = nil)
+  File.join(ig_path, suffix ? "package_#{suffix}.tgz" : 'package.tgz')
+end
+
+
+ +
+

+ + #ig_http_url(ig_page_url) ⇒ Object + + + + + +

+ + + + +
+
+
+
+48
+49
+50
+51
+52
+53
+54
+
+
# File 'lib/inferno/utils/ig_downloader.rb', line 48
+
+def ig_http_url(ig_page_url)
+  return ig_page_url if ig_page_url.end_with? 'package.tgz'
+
+  return "#{ig_page_url}package.tgz" if ig_page_url.end_with? '/'
+
+  ig_page_url.gsub(HTTP_URI_END_REG_EX, 'package.tgz')
+end
+
+
+ +
+

+ + #ig_pathObject + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/inferno/utils/ig_downloader.rb', line 9
+
+def ig_path
+  File.join('lib', library_name, 'igs')
+end
+
+
+ +
+

+ + #ig_registry_url(ig_npm_style) ⇒ Object + + + + + +

+ + + + +
+
+
+
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+
+
# File 'lib/inferno/utils/ig_downloader.rb', line 37
+
+def ig_registry_url(ig_npm_style)
+  unless ig_npm_style.include? '@'
+    raise StandardError, <<~NO_VERSION
+      No IG version specified for #{ig_npm_style}; you must specify one with '@'. I.e: hl7.fhir.us.core@6.1.0
+    NO_VERSION
+  end
+
+  package_name, version = ig_npm_style.split('@')
+  "https://packages.fhir.org/#{package_name}/-/#{package_name}-#{version}.tgz"
+end
+
+
+ +
+

+ + #load_ig(ig_input, idx = nil, thor_config = { verbose: true }, output_path = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+
+
# File 'lib/inferno/utils/ig_downloader.rb', line 17
+
+def load_ig(ig_input, idx = nil, thor_config = { verbose: true }, output_path = nil)
+  case ig_input
+  when FHIR_PACKAGE_NAME_REG_EX
+    uri = ig_registry_url(ig_input)
+  when HTTP_URI_REG_EX
+    uri = ig_http_url(ig_input)
+  when FILE_URI_REG_EX
+    uri = ig_input[7..]
+  else
+    raise StandardError, <<~FAILED_TO_LOAD
+      Could not find implementation guide: #{ig_input}
+    FAILED_TO_LOAD
+  end
+
+  destination = output_path || ig_file(idx)
+  # use Thor's get to support CLI options config
+  get(uri, destination, thor_config)
+  uri
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils/Migration.html b/docs/docs/Inferno/Utils/Migration.html new file mode 100644 index 000000000..c3bb50ccd --- /dev/null +++ b/docs/docs/Inferno/Utils/Migration.html @@ -0,0 +1,207 @@ + + + + + + + Class: Inferno::Utils::Migration + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Utils::Migration + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/utils/migration.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runObject + + + + + +

+ + + + +
+
+
+
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+
+
# File 'lib/inferno/utils/migration.rb', line 4
+
+def run
+  db = Inferno::Application['db.connection']
+  migration_path = File.join(Inferno::Application.root, 'lib', 'inferno', 'db', 'migrations')
+  Sequel::Migrator.run(db, migration_path)
+
+  if ENV['APP_ENV'] == 'development' # rubocop:disable Style/GuardClause
+    schema_path = File.join(Inferno::Application.root, 'lib', 'inferno', 'db', 'schema.rb')
+    db.extension :schema_dumper
+    File.open(schema_path, 'w') { |f| f.print(db.dump_schema_migration) }
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils/NamedThorActions.html b/docs/docs/Inferno/Utils/NamedThorActions.html new file mode 100644 index 000000000..2d3bf7e9c --- /dev/null +++ b/docs/docs/Inferno/Utils/NamedThorActions.html @@ -0,0 +1,514 @@ + + + + + + + Module: Inferno::Utils::NamedThorActions + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Utils::NamedThorActions + + + +

+
+ + + + + + + + + +
+
Included in:
+
CLI::New
+
+ + + +
+
Defined in:
+
lib/inferno/utils/named_thor_actions.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
INFLECTOR = + +
+
Dry::Inflector.new
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #human_nameObject + + + + + +

+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/inferno/utils/named_thor_actions.rb', line 20
+
+def human_name
+  INFLECTOR.humanize(INFLECTOR.underscore(name))
+end
+
+
+ +
+

+ + #library_nameObject + + + + + +

+ + + + +
+
+
+
+12
+13
+14
+
+
# File 'lib/inferno/utils/named_thor_actions.rb', line 12
+
+def library_name
+  INFLECTOR.underscore(name)
+end
+
+
+ +
+

+ + #module_nameObject + + + + + +

+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/inferno/utils/named_thor_actions.rb', line 16
+
+def module_name
+  INFLECTOR.camelize(name)
+end
+
+
+ +
+

+ + #root_nameObject + + + + + +

+ + + + +
+
+
+
+8
+9
+10
+
+
# File 'lib/inferno/utils/named_thor_actions.rb', line 8
+
+def root_name
+  INFLECTOR.dasherize(INFLECTOR.underscore(name))
+end
+
+
+ +
+

+ + #test_kit_idObject + + + + + +

+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/inferno/utils/named_thor_actions.rb', line 28
+
+def test_kit_id
+  library_name.delete_suffix('_test_kit')
+end
+
+
+ +
+

+ + #test_suite_idObject + + + + + +

+ + + + +
+
+
+
+32
+33
+34
+
+
# File 'lib/inferno/utils/named_thor_actions.rb', line 32
+
+def test_suite_id
+  test_kit_id
+end
+
+
+ +
+

+ + #title_nameObject + + + + + +

+ + + + +
+
+
+
+24
+25
+26
+
+
# File 'lib/inferno/utils/named_thor_actions.rb', line 24
+
+def title_name
+  human_name.split.map(&:capitalize).join(' ')
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils/PresetProcessor.html b/docs/docs/Inferno/Utils/PresetProcessor.html new file mode 100644 index 000000000..b3a7cd7fd --- /dev/null +++ b/docs/docs/Inferno/Utils/PresetProcessor.html @@ -0,0 +1,676 @@ + + + + + + + Class: Inferno::Utils::PresetProcessor + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Utils::PresetProcessor + + + Private +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/utils/preset_processor.rb
+
+ +
+ +

Overview

+
+

+ This class is part of a private API. + You should avoid using this class if possible, as it may be removed or be changed in the future. +

+

This class determines which values to use in a preset based on the suite +options chosen in a session.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(preset, session) ⇒ PresetProcessor + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+

Returns a new instance of PresetProcessor.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+9
+10
+11
+12
+13
+14
+15
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 9
+
+def initialize(preset, session)
+  self.preset = preset
+  self.session = session
+  self.suite = session.test_suite
+  self.suite_inputs = suite.available_inputs.transform_values(&:to_hash)
+  self.suite_options = session.suite_options
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #presetObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def preset
+  @preset
+end
+
+
+ + + +
+

+ + #sessionObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def session
+  @session
+end
+
+
+ + + +
+

+ + #suiteObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def suite
+  @suite
+end
+
+
+ + + +
+

+ + #suite_inputsObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def suite_inputs
+  @suite_inputs
+end
+
+
+ + + +
+

+ + #suite_optionsObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def suite_options
+  @suite_options
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #processed_inputsObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+

Returns the list of inputs which need to be persisted, with options +applied.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+19
+20
+21
+22
+23
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 19
+
+def processed_inputs
+  preset.inputs
+    .map { |input| input_for_options(input) }
+    .compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils/PresetTemplateGenerator.html b/docs/docs/Inferno/Utils/PresetTemplateGenerator.html new file mode 100644 index 000000000..1ef55345e --- /dev/null +++ b/docs/docs/Inferno/Utils/PresetTemplateGenerator.html @@ -0,0 +1,525 @@ + + + + + + + Class: Inferno::Utils::PresetTemplateGenerator + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Utils::PresetTemplateGenerator + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/utils/preset_template_generator.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #runnable ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute runnable.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(runnable) ⇒ PresetTemplateGenerator + + + + + +

+
+

Returns a new instance of PresetTemplateGenerator.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 6
+
+def initialize(runnable)
+  self.runnable = runnable
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #runnableObject + + + + + +

+
+

Returns the value of attribute runnable.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+4
+5
+6
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 4
+
+def runnable
+  @runnable
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #available_inputsObject + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 10
+
+def available_inputs
+  @available_inputs ||= runnable.available_inputs.transform_values(&:to_hash)
+end
+
+
+ +
+

+ + #generateObject + + + + + +

+ + + + +
+
+
+
+34
+35
+36
+37
+38
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 34
+
+def generate
+  .merge(
+    inputs:
+  )
+end
+
+
+ +
+

+ + #inputsObject + + + + + +

+ + + + +
+
+
+
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 14
+
+def inputs
+  # The rubocop rule is disabled because `each_value` returns the hash,
+  # while `values.each` will return the array of values. We want the array
+  # of values here.
+  available_inputs.values.map do |original_input|
+    {}.tap do |input|
+      input[:name] = original_input.delete(:name)
+      input[:value] = (original_input.delete(:default) if original_input.key? :default)
+      original_input.each { |key, value| input[:"_#{key}"] = value }
+    end
+  end
+end
+
+
+ +
+

+ + #metadataObject + + + + + +

+ + + + +
+
+
+
+27
+28
+29
+30
+31
+32
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 27
+
+def 
+  {
+    title: "Preset for #{runnable.title}",
+    id: nil
+  }.merge(runnable.reference_hash)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web.html b/docs/docs/Inferno/Web.html new file mode 100644 index 000000000..68746e4e5 --- /dev/null +++ b/docs/docs/Inferno/Web.html @@ -0,0 +1,228 @@ + + + + + + + Module: Inferno::Web + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/router.rb,
+ lib/inferno/apps/web/application.rb,
lib/inferno/apps/web/serializers/test.rb,
lib/inferno/apps/web/serializers/input.rb,
lib/inferno/apps/web/serializers/header.rb,
lib/inferno/apps/web/serializers/preset.rb,
lib/inferno/apps/web/serializers/result.rb,
lib/inferno/apps/web/serializers/message.rb,
lib/inferno/apps/web/serializers/request.rb,
lib/inferno/apps/web/serializers/test_run.rb,
lib/inferno/apps/web/controllers/controller.rb,
lib/inferno/apps/web/serializers/serializer.rb,
lib/inferno/apps/web/serializers/test_group.rb,
lib/inferno/apps/web/serializers/test_suite.rb,
lib/inferno/apps/web/serializers/session_data.rb,
lib/inferno/apps/web/serializers/suite_option.rb,
lib/inferno/apps/web/serializers/test_session.rb,
lib/inferno/apps/web/controllers/requests/show.rb,
lib/inferno/apps/web/controllers/test_runs/show.rb,
lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_suites/show.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/apps/web/controllers/test_sessions/show.rb,
lib/inferno/apps/web/serializers/markdown_extractor.rb,
lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/serializers/hash_value_extractor.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_session_form_post_controller.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Controllers, Serializers + + + + +

+ + +

+ Constant Summary + collapse +

+ +
+ +
Router = +
+
+

rubocop:disable Naming/ConstantName

+ + +
+
+
+ + +
+
+
if base_path.present?
+  Hanami::Router.new do
+    scope("#{base_path}/") do
+      get '/', to: ->(_env) { [200, { 'Content-Type' => 'text/html' }, [client_page]] }
+    end
+    scope(base_path, &route_block)
+  end
+else
+  Hanami::Router.new(&route_block)
+end
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .appObject + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+13
+14
+15
+
+
# File 'lib/inferno/apps/web/application.rb', line 10
+
+def self.app
+  Rack::Builder.new do
+    use Hanami::Middleware::BodyParser, :json
+    run Inferno::Web::Router
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers.html b/docs/docs/Inferno/Web/Controllers.html new file mode 100644 index 000000000..ff6e99f7b --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers.html @@ -0,0 +1,119 @@ + + + + + + + Module: Inferno::Web::Controllers + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/controller.rb,
+ lib/inferno/apps/web/controllers/requests/show.rb,
lib/inferno/apps/web/controllers/test_runs/show.rb,
lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_suites/show.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/apps/web/controllers/test_sessions/show.rb,
lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_session_form_post_controller.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Requests, TestRuns, TestSessions, TestSuites + + + + Classes: Controller, TestSessionFormPostController + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/Controller.html b/docs/docs/Inferno/Web/Controllers/Controller.html new file mode 100644 index 000000000..db3af2981 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/Controller.html @@ -0,0 +1,304 @@ + + + + + + + Class: Inferno::Web::Controllers::Controller + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::Controller + + + +

+
+ +
+
Inherits:
+
+ Hanami::Action + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/controller.rb
+
+ +
+ + + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .callObject + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/apps/web/controllers/controller.rb', line 7
+
+def self.call(...)
+  new.call(...)
+end
+
+
+ +
+

+ + .resource_classObject + + + + + +

+ + + + +
+
+
+
+30
+31
+32
+
+
# File 'lib/inferno/apps/web/controllers/controller.rb', line 30
+
+def self.resource_class
+  name.split('::')[-2].singularize
+end
+
+
+ +
+

+ + .resource_nameObject + + + + + +

+ + + + +
+
+
+
+26
+27
+28
+
+
# File 'lib/inferno/apps/web/controllers/controller.rb', line 26
+
+def self.resource_name
+  name.split('::')[-2].underscore
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/Requests.html b/docs/docs/Inferno/Web/Controllers/Requests.html new file mode 100644 index 000000000..fb1bb6e03 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/Requests.html @@ -0,0 +1,115 @@ + + + + + + + Module: Inferno::Web::Controllers::Requests + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::Requests + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/requests/show.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Show + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/Requests/Show.html b/docs/docs/Inferno/Web/Controllers/Requests/Show.html new file mode 100644 index 000000000..fc8724589 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/Requests/Show.html @@ -0,0 +1,213 @@ + + + + + + + Class: Inferno::Web::Controllers::Requests::Show + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::Requests::Show + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/requests/show.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/web/controllers/requests/show.rb', line 6
+
+def handle(req, res)
+  request = repo.find_full_request(req.params[:id])
+  halt 404 if request.nil?
+
+  res.body = serialize(request, view: :full)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns.html b/docs/docs/Inferno/Web/Controllers/TestRuns.html new file mode 100644 index 000000000..fc80be5c2 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns.html @@ -0,0 +1,119 @@ + + + + + + + Module: Inferno::Web::Controllers::TestRuns + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestRuns + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/show.rb,
+ lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Results + + + + Classes: Create, Destroy, Show + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Create.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Create.html new file mode 100644 index 000000000..fdbb2f94c --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Create.html @@ -0,0 +1,340 @@ + + + + + + + Class: Inferno::Web::Controllers::TestRuns::Create + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestRuns::Create + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/create.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
PARAMS = + +
+
[:test_session_id, :test_suite_id, :test_group_id, :test_id].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #create_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+50
+51
+52
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/create.rb', line 50
+
+def create_params(params)
+  params.to_h.slice(*PARAMS)
+end
+
+
+ +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/create.rb', line 20
+
+def handle(req, res)
+  test_session = test_sessions_repo.find(req.params[:test_session_id])
+
+  # if testsession.nil?
+  if test_runs_repo.active_test_run_for_session?(test_session.id)
+    halt 409, { error: 'Cannot run new test while another test run is in progress' }.to_json
+  end
+
+  verify_runnable(
+    repo.build_entity(create_params(req.params)).runnable,
+    req.params[:inputs],
+    test_session.suite_options
+  )
+
+  test_run = repo.create(create_params(req.params).merge(status: 'queued'))
+
+  res.body = serialize(test_run, suite_options: test_session.suite_options)
+
+  persist_inputs(session_data_repo, req.params, test_run)
+
+  Jobs.perform(Jobs::ExecuteTestRun, test_run.id)
+rescue Sequel::ValidationFailed, Sequel::ForeignKeyConstraintViolation,
+       Inferno::Exceptions::RequiredInputsNotFound,
+       Inferno::Exceptions::NotUserRunnableException => e
+  halt 422, { errors: e.message }.to_json
+rescue StandardError => e
+  Application['logger'].error(e.full_message)
+  halt 500, { errors: e.message }.to_json
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Destroy.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Destroy.html new file mode 100644 index 000000000..b06f0e437 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Destroy.html @@ -0,0 +1,245 @@ + + + + + + + Class: Inferno::Web::Controllers::TestRuns::Destroy + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestRuns::Destroy + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/destroy.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/destroy.rb', line 11
+
+def handle(req, res)
+  test_run = test_runs_repo.find(req.params[:id])
+
+  if test_run.nil? || ['done', 'cancelling'].include?(test_run.status)
+    # If it doesn't exist, already finished, or currently being cancelled
+    halt 204
+  end
+
+  test_run_is_waiting = (test_run.status == 'waiting')
+  test_runs_repo.mark_as_cancelling(req.params[:id])
+
+  if test_run_is_waiting
+    waiting_result = results_repo.find_waiting_result(test_run_id: test_run.id)
+    results_repo.update_result(waiting_result.id, 'cancel', 'Test cancelled by user')
+    Jobs.perform(Jobs::ResumeTestRun, test_run.id)
+  end
+
+  res.status = 204
+rescue StandardError => e
+  Application['logger'].error(e.full_message)
+  halt 500, { errors: e.message }.to_json
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Results.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Results.html new file mode 100644 index 000000000..ac1d25b37 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Results.html @@ -0,0 +1,115 @@ + + + + + + + Module: Inferno::Web::Controllers::TestRuns::Results + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestRuns::Results + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/results/index.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Index + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Results/Index.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Results/Index.html new file mode 100644 index 000000000..ac010e25c --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Results/Index.html @@ -0,0 +1,209 @@ + + + + + + + Class: Inferno::Web::Controllers::TestRuns::Results::Index + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestRuns::Results::Index + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/results/index.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/results/index.rb', line 9
+
+def handle(req, res)
+  results = test_runs_repo.results_for_test_run(req.params[:id])
+  res.body = serialize(results)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Show.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Show.html new file mode 100644 index 000000000..d30e96e30 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Show.html @@ -0,0 +1,235 @@ + + + + + + + Class: Inferno::Web::Controllers::TestRuns::Show + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestRuns::Show + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/show.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/show.rb', line 10
+
+def handle(req, res)
+  test_run = repo.find(req.params[:id])
+  halt 404 if test_run.nil?
+
+  if req.params[:include_results] == 'true'
+    results_repo = Inferno::Repositories::Results.new
+    test_run.results =
+      if req.params[:after].present?
+        results_repo.test_run_results_after(test_run_id: test_run.id, after: Time.parse(req.params[:after]))
+      else
+        repo.results_for_test_run(test_run.id)
+      end
+  end
+
+  test_session = test_sessions_repo.find(test_run.test_session_id)
+  res.body = serialize(test_run, suite_options: test_session.suite_options)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessionFormPostController.html b/docs/docs/Inferno/Web/Controllers/TestSessionFormPostController.html new file mode 100644 index 000000000..de8a9e194 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessionFormPostController.html @@ -0,0 +1,310 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessionFormPostController + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessionFormPostController + + + +

+
+ +
+
Inherits:
+
+ Hanami::Action + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_session_form_post_controller.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .callObject + + + + + +

+ + + + +
+
+
+
+5
+6
+7
+
+
# File 'lib/inferno/apps/web/controllers/test_session_form_post_controller.rb', line 5
+
+def self.call(...)
+  new.call(...)
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+
+
# File 'lib/inferno/apps/web/controllers/test_session_form_post_controller.rb', line 9
+
+def handle(req, res)
+  test_suite_id = req.params[:test_suite_id]
+
+  test_suite = Inferno::Repositories::TestSuites.new.find(test_suite_id)
+  halt 404, "Unable to find test suite with id #{test_suite_id}" if test_suite.nil?
+
+  params = { test_suite_id: }
+  suite_option_keys = test_suite.suite_options.map(&:id)
+  options = req.params.to_h.slice(*suite_option_keys)
+
+  params[:suite_options] = options.map { |key, value| { id: key, value: } } if options.present?
+
+  repo = Inferno::Repositories::TestSessions.new
+  session = repo.create(params)
+
+  preset_id = req.params[:preset_id]
+
+  if preset_id.present?
+    preset = Inferno::Repositories::Presets.new.find(preset_id)
+
+    halt 422, "Unable to find preset with id #{preset_id} for test suite #{test_suite_id}" if preset.nil?
+
+    repo.apply_preset(session, preset_id)
+  end
+
+  res.redirect_to "#{Inferno::Application['base_url']}/#{test_suite_id}/#{session.id}"
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions.html b/docs/docs/Inferno/Web/Controllers/TestSessions.html new file mode 100644 index 000000000..003cab354 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions.html @@ -0,0 +1,119 @@ + + + + + + + Module: Inferno::Web::Controllers::TestSessions + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestSessions + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/show.rb,
+ lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Results, SessionData + + + + Classes: ClientShow, Create, LastTestRun, Show + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/ClientShow.html b/docs/docs/Inferno/Web/Controllers/TestSessions/ClientShow.html new file mode 100644 index 000000000..7bdbebabe --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/ClientShow.html @@ -0,0 +1,263 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::ClientShow + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::ClientShow + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/client_show.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
CLIENT_PAGE = + +
+
ERB.new(
+  File.read(
+    File.join(
+      Inferno::Application.root, 'lib', 'inferno', 'apps', 'web', 'index.html.erb'
+    )
+  )
+).result.freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/client_show.rb', line 15
+
+def handle(req, res)
+  test_session_id = req.params[:id]
+  test_suite_id = req.params[:test_suite_id]
+
+  test_session = repo.find(test_session_id)
+  halt 404 if test_session.nil?
+
+  if test_suite_id.blank? || test_suite_id != test_session.test_suite_id
+    test_suite_id = test_session.test_suite_id
+
+    res.redirect_to "#{Inferno::Application['base_url']}/#{test_suite_id}/#{test_session_id}"
+  end
+
+  test_suite = Inferno::Repositories::TestSuites.new.find(test_suite_id)
+
+  halt 404 if test_suite.nil?
+
+  res.format = :html
+  res.body = CLIENT_PAGE
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/Create.html b/docs/docs/Inferno/Web/Controllers/TestSessions/Create.html new file mode 100644 index 000000000..b48bbf842 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/Create.html @@ -0,0 +1,300 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::Create + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::Create + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/create.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
PARAMS = + +
+
[:test_suite_id, :suite_options].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #create_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+27
+28
+29
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/create.rb', line 27
+
+def create_params(params)
+  params.slice(*PARAMS)
+end
+
+
+ +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/create.rb', line 11
+
+def handle(req, res)
+  params = req.params.to_h
+  params.merge!(JSON.parse(req.body.string).symbolize_keys) unless req.body.string.blank?
+
+  session = repo.create(create_params(params))
+
+  repo.apply_preset(session, params[:preset_id]) if params[:preset_id].present?
+
+  res.body = serialize(session)
+rescue Sequel::ValidationFailed, Sequel::ForeignKeyConstraintViolation => e
+  halt 422, { errors: e.message }.to_json
+rescue StandardError => e
+  Application['logger'].error(e.full_message)
+  halt 500, { errors: e.message }.to_json
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/LastTestRun.html b/docs/docs/Inferno/Web/Controllers/TestSessions/LastTestRun.html new file mode 100644 index 000000000..47e737b2c --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/LastTestRun.html @@ -0,0 +1,221 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::LastTestRun + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::LastTestRun + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb', line 8
+
+def handle(req, res)
+  test_run = test_runs_repo.last_test_run(req.params[:id])
+
+  res.body =
+    if test_run.nil?
+      nil
+    else
+      Inferno::Web::Serializers::TestRun.render(test_run)
+    end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/Results.html b/docs/docs/Inferno/Web/Controllers/TestSessions/Results.html new file mode 100644 index 000000000..e042d5986 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/Results.html @@ -0,0 +1,115 @@ + + + + + + + Module: Inferno::Web::Controllers::TestSessions::Results + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestSessions::Results + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/results/index.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Index + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/Results/Index.html b/docs/docs/Inferno/Web/Controllers/TestSessions/Results/Index.html new file mode 100644 index 000000000..4d6874a42 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/Results/Index.html @@ -0,0 +1,217 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::Results::Index + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::Results::Index + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/results/index.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+13
+14
+15
+16
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/results/index.rb', line 9
+
+def handle(req, res)
+  res.body =
+    if req.params[:all] == 'true'
+      serialize(test_sessions_repo.results_for_test_session(req.params[:id]))
+    else
+      serialize(repo.current_results_for_test_session(req.params[:id]))
+    end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData.html b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData.html new file mode 100644 index 000000000..d9f612841 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::Web::Controllers::TestSessions::SessionData + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestSessions::SessionData + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
+ lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: ApplyPreset, Index + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/ApplyPreset.html b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/ApplyPreset.html new file mode 100644 index 000000000..0ab05cb7b --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/ApplyPreset.html @@ -0,0 +1,309 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::SessionData::ApplyPreset + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::SessionData::ApplyPreset + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_name

+ + + +
+

Class Method Details

+ + +
+

+ + .resource_classObject + + + + + +

+ + + + +
+
+
+
+14
+15
+16
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb', line 14
+
+def self.resource_class
+  'SessionData'
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb', line 18
+
+def handle(req, res)
+  test_session_id = req.params[:id]
+  test_session = test_sessions_repo.find(test_session_id)
+
+  if test_session.nil?
+    Application[:logger].error("Unknown test session #{test_session_id}")
+    halt 404
+  end
+
+  preset_id = req.params[:preset_id]
+  preset = presets_repo.find(preset_id)
+
+  if preset.nil?
+    Application[:logger].error("Unknown preset #{preset_id}")
+    halt 404
+  end
+
+  test_sessions_repo.apply_preset(test_session, preset_id)
+  res.status = 200
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/Index.html b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/Index.html new file mode 100644 index 000000000..fd391873c --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/Index.html @@ -0,0 +1,275 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::SessionData::Index + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::SessionData::Index + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_name

+ + + +
+

Class Method Details

+ + +
+

+ + .resource_classObject + + + + + +

+ + + + +
+
+
+
+11
+12
+13
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb', line 11
+
+def self.resource_class
+  'SessionData'
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb', line 15
+
+def handle(req, res)
+  res.body = serialize(session_data_repo.get_all_from_session(req.params[:id]))
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/Show.html b/docs/docs/Inferno/Web/Controllers/TestSessions/Show.html new file mode 100644 index 000000000..718ddfb20 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/Show.html @@ -0,0 +1,213 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::Show + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::Show + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/show.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/show.rb', line 6
+
+def handle(req, res)
+  test_session = repo.find(req.params[:id])
+  halt 404 if test_session.nil?
+
+  res.body = serialize(test_session)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSuites.html b/docs/docs/Inferno/Web/Controllers/TestSuites.html new file mode 100644 index 000000000..2c75d906f --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSuites.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::Web::Controllers::TestSuites + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestSuites + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_suites/show.rb,
+ lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: CheckConfiguration, Index, Show + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSuites/CheckConfiguration.html b/docs/docs/Inferno/Web/Controllers/TestSuites/CheckConfiguration.html new file mode 100644 index 000000000..d00944000 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSuites/CheckConfiguration.html @@ -0,0 +1,215 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSuites::CheckConfiguration + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSuites::CheckConfiguration + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+12
+
+
# File 'lib/inferno/apps/web/controllers/test_suites/check_configuration.rb', line 6
+
+def handle(req, res)
+  test_suite = repo.find(req.params[:id])
+  halt 404 if test_suite.nil?
+
+  res.body =
+    Inferno::Web::Serializers::Message.render(test_suite.configuration_messages(force_recheck: true))
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSuites/Index.html b/docs/docs/Inferno/Web/Controllers/TestSuites/Index.html new file mode 100644 index 000000000..1bb64599d --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSuites/Index.html @@ -0,0 +1,207 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSuites::Index + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSuites::Index + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_suites/index.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(_req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/apps/web/controllers/test_suites/index.rb', line 6
+
+def handle(_req, res)
+  res.body = serialize(repo.all, view: :summary)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSuites/Show.html b/docs/docs/Inferno/Web/Controllers/TestSuites/Show.html new file mode 100644 index 000000000..7e44d9f8f --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSuites/Show.html @@ -0,0 +1,213 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSuites::Show + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSuites::Show + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_suites/show.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/web/controllers/test_suites/show.rb', line 6
+
+def handle(req, res)
+  test_suite = repo.find(req.params[:id])
+  halt 404 if test_suite.nil?
+
+  res.body = serialize(test_suite, view: :full)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers.html b/docs/docs/Inferno/Web/Serializers.html new file mode 100644 index 000000000..a77b47c2a --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::Web::Serializers + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Serializers + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test.rb,
+ lib/inferno/apps/web/serializers/input.rb,
lib/inferno/apps/web/serializers/header.rb,
lib/inferno/apps/web/serializers/preset.rb,
lib/inferno/apps/web/serializers/result.rb,
lib/inferno/apps/web/serializers/message.rb,
lib/inferno/apps/web/serializers/request.rb,
lib/inferno/apps/web/serializers/test_run.rb,
lib/inferno/apps/web/serializers/serializer.rb,
lib/inferno/apps/web/serializers/test_group.rb,
lib/inferno/apps/web/serializers/test_suite.rb,
lib/inferno/apps/web/serializers/session_data.rb,
lib/inferno/apps/web/serializers/suite_option.rb,
lib/inferno/apps/web/serializers/test_session.rb,
lib/inferno/apps/web/serializers/markdown_extractor.rb,
lib/inferno/apps/web/serializers/hash_value_extractor.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: HashValueExtractor, Header, Input, MarkdownExtractor, Message, Preset, Request, Result, Serializer, SessionData, SuiteOption, Test, TestGroup, TestRun, TestSession, TestSuite + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/HashValueExtractor.html b/docs/docs/Inferno/Web/Serializers/HashValueExtractor.html new file mode 100644 index 000000000..e1f15db5b --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/HashValueExtractor.html @@ -0,0 +1,194 @@ + + + + + + + Class: Inferno::Web::Serializers::HashValueExtractor + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::HashValueExtractor + + + +

+
+ +
+
Inherits:
+
+ Blueprinter::Extractor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/hash_value_extractor.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #extract(field_name, object, _local_options, _options) ⇒ Object + + + + + +

+ + + + +
+
+
+
+5
+6
+7
+
+
# File 'lib/inferno/apps/web/serializers/hash_value_extractor.rb', line 5
+
+def extract(field_name, object, _local_options, _options)
+  object.send(field_name).values
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Header.html b/docs/docs/Inferno/Web/Serializers/Header.html new file mode 100644 index 000000000..b2cc9eeba --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Header.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Header + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Header + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/header.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Input.html b/docs/docs/Inferno/Web/Serializers/Input.html new file mode 100644 index 000000000..a106ddb94 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Input.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Input + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Input + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/input.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/MarkdownExtractor.html b/docs/docs/Inferno/Web/Serializers/MarkdownExtractor.html new file mode 100644 index 000000000..55bad6d2d --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/MarkdownExtractor.html @@ -0,0 +1,200 @@ + + + + + + + Class: Inferno::Web::Serializers::MarkdownExtractor + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::MarkdownExtractor + + + +

+
+ +
+
Inherits:
+
+ Blueprinter::Extractor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/markdown_extractor.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #extract(field_name, object, _local_options, _options = {}) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/inferno/apps/web/serializers/markdown_extractor.rb', line 10
+
+def extract(field_name, object, _local_options, _options = {})
+  format_markdown(object.send(field_name))
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Message.html b/docs/docs/Inferno/Web/Serializers/Message.html new file mode 100644 index 000000000..26a216be3 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Message.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Message + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Message + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/message.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Preset.html b/docs/docs/Inferno/Web/Serializers/Preset.html new file mode 100644 index 000000000..ced9cb61e --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Preset.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Preset + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Preset + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/preset.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Request.html b/docs/docs/Inferno/Web/Serializers/Request.html new file mode 100644 index 000000000..642338f68 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Request.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Request + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Request + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/request.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Result.html b/docs/docs/Inferno/Web/Serializers/Result.html new file mode 100644 index 000000000..8a3a927bb --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Result.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Result + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Result + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/result.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Serializer.html b/docs/docs/Inferno/Web/Serializers/Serializer.html new file mode 100644 index 000000000..abd9d83a2 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Serializer.html @@ -0,0 +1,231 @@ + + + + + + + Class: Inferno::Web::Serializers::Serializer + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Serializer + + + +

+
+ +
+
Inherits:
+
+ Blueprinter::Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/serializer.rb
+
+ +
+ + + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .field_present?(field_name, result, options) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+8
+9
+10
+11
+12
+13
+14
+15
+
+
# File 'lib/inferno/apps/web/serializers/serializer.rb', line 8
+
+def self.field_present?(field_name, result, options)
+  name = options[:name] || field_name
+  if result.respond_to?(:[])
+    result[name].present?
+  else
+    result.send(name).present?
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/SessionData.html b/docs/docs/Inferno/Web/Serializers/SessionData.html new file mode 100644 index 000000000..ba6ca8c4f --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/SessionData.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::SessionData + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::SessionData + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/session_data.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/SuiteOption.html b/docs/docs/Inferno/Web/Serializers/SuiteOption.html new file mode 100644 index 000000000..16334d808 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/SuiteOption.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::SuiteOption + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::SuiteOption + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/suite_option.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Test.html b/docs/docs/Inferno/Web/Serializers/Test.html new file mode 100644 index 000000000..159a2aa34 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Test.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Test + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Test + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/TestGroup.html b/docs/docs/Inferno/Web/Serializers/TestGroup.html new file mode 100644 index 000000000..506f47c64 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/TestGroup.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::TestGroup + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::TestGroup + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test_group.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/TestRun.html b/docs/docs/Inferno/Web/Serializers/TestRun.html new file mode 100644 index 000000000..dfb8fb80f --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/TestRun.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::TestRun + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::TestRun + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test_run.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/TestSession.html b/docs/docs/Inferno/Web/Serializers/TestSession.html new file mode 100644 index 000000000..fcaabf139 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/TestSession.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::TestSession + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::TestSession + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test_session.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/TestSuite.html b/docs/docs/Inferno/Web/Serializers/TestSuite.html new file mode 100644 index 000000000..9b8110877 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/TestSuite.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::TestSuite + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::TestSuite + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test_suite.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/InfernoFHIRModelExtensions.html b/docs/docs/InfernoFHIRModelExtensions.html new file mode 100644 index 000000000..29a0514dc --- /dev/null +++ b/docs/docs/InfernoFHIRModelExtensions.html @@ -0,0 +1,393 @@ + + + + + + + Module: InfernoFHIRModelExtensions + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: InfernoFHIRModelExtensions + + + +

+
+ + + + + + + + + +
+
Included in:
+
FHIR::Model
+
+ + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ +

Overview

+
+

Extension to FHIR::Model. Prepending this into FHIR::Model (done below) +allows us to call super() on initialize when we overriding it, +while also defining new methods and attributes

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #source_hash ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute source_hash.

    +
    + +
  • + + +
  • + + + #source_text ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute source_text.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #source_hashObject + + + + + +

+
+

Returns the value of attribute source_hash.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 7
+
+def source_hash
+  @source_hash
+end
+
+
+ + + +
+

+ + #source_textObject + + + + + +

+
+

Returns the value of attribute source_text.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 7
+
+def source_text
+  @source_text
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #initialize(hash = {}) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 9
+
+def initialize(hash = {})
+  super
+  @source_hash = hash
+end
+
+
+ +
+

+ + #source_contentsObject + + + + + +

+ + + + +
+
+
+
+14
+15
+16
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 14
+
+def source_contents
+  @source_text || JSON.generate(@source_hash)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/InfernoJson.html b/docs/docs/InfernoJson.html new file mode 100644 index 000000000..d8e0c3f59 --- /dev/null +++ b/docs/docs/InfernoJson.html @@ -0,0 +1,195 @@ + + + + + + + Module: InfernoJson + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: InfernoJson + + + +

+
+ + + + + + + + + +
+
Included in:
+
FHIR::Json
+
+ + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ +

Overview

+
+

Extension to FHIR::Json. Prepending this into FHIR::Json (done below) +allows us to call super() on from_json

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #from_json(json) ⇒ Object + + + + + +

+ + + + +
+
+
+
+28
+29
+30
+31
+32
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 28
+
+def from_json(json)
+  resource = super
+  resource&.source_text = json
+  resource
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/InfernoXml.html b/docs/docs/InfernoXml.html new file mode 100644 index 000000000..cc8be46e4 --- /dev/null +++ b/docs/docs/InfernoXml.html @@ -0,0 +1,195 @@ + + + + + + + Module: InfernoXml + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: InfernoXml + + + +

+
+ + + + + + + + + +
+
Included in:
+
FHIR::Xml
+
+ + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ +

Overview

+
+

Extension to FHIR::Xml. Prepending this into FHIR::Xml (done below) +allows us to call super() on from_xml

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #from_xml(xml) ⇒ Object + + + + + +

+ + + + +
+
+
+
+38
+39
+40
+41
+42
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 38
+
+def from_xml(xml)
+  resource = super
+  resource&.source_text = xml
+  resource
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Rack.html b/docs/docs/Rack.html new file mode 100644 index 000000000..f33de1d24 --- /dev/null +++ b/docs/docs/Rack.html @@ -0,0 +1,127 @@ + + + + + + + Module: Rack + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Rack + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/rack.rb
+
+ +
+ +

Overview

+
+

Patch based on https://github.com/rack/rack/pull/1881 +This should be removed when/if this functionality makes its way into a rack +release (possible rack 3.1.0)

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + + + Classes: Request + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Rack/Request.html b/docs/docs/Rack/Request.html new file mode 100644 index 000000000..cbec4653f --- /dev/null +++ b/docs/docs/Rack/Request.html @@ -0,0 +1,201 @@ + + + + + + + Class: Rack::Request + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Rack::Request + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/rack.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Headers + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #headersObject + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/ext/rack.rb', line 6
+
+def headers
+  @headers ||= Headers.new(@env)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Rack/Request/Headers.html b/docs/docs/Rack/Request/Headers.html new file mode 100644 index 000000000..c1c88b823 --- /dev/null +++ b/docs/docs/Rack/Request/Headers.html @@ -0,0 +1,684 @@ + + + + + + + Class: Rack::Request::Headers + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Rack::Request::Headers + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/rack.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(env) ⇒ Headers + + + + + +

+
+

Returns a new instance of Headers.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+11
+12
+13
+
+
# File 'lib/inferno/ext/rack.rb', line 11
+
+def initialize(env)
+  @env = env
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #[](k) ⇒ Object + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+
+
# File 'lib/inferno/ext/rack.rb', line 15
+
+def [](k)
+  @env[header_to_env_key(k)]
+end
+
+
+ +
+

+ + #[]=(k, v) ⇒ Object + + + + + +

+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/ext/rack.rb', line 19
+
+def []=(k, v)
+  @env[header_to_env_key(k)] = v
+end
+
+
+ +
+

+ + #add(k, v) ⇒ Object + + + + + +

+ + + + +
+
+
+
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
+
# File 'lib/inferno/ext/rack.rb', line 23
+
+def add(k, v)
+  k = header_to_env_key(k)
+  case existing = @env[k]
+  when nil
+    @env[k] = v
+  when String
+    @env[k] = [existing, v]
+  when Array
+    existing << v
+  end
+end
+
+
+ +
+

+ + #delete(k) ⇒ Object + + + + + +

+ + + + +
+
+
+
+35
+36
+37
+
+
# File 'lib/inferno/ext/rack.rb', line 35
+
+def delete(k)
+  @env.delete(header_to_env_key(k))
+end
+
+
+ +
+

+ + #eachObject + + + + + +

+ + + + +
+
+
+
+39
+40
+41
+42
+43
+44
+45
+46
+
+
# File 'lib/inferno/ext/rack.rb', line 39
+
+def each
+  return to_enum(:each) unless block_given?
+
+  @env.each do |k, v|
+    next unless k = env_to_header_key(k)
+    yield k, v
+  end
+end
+
+
+ +
+

+ + #fetch(k, &block) ⇒ Object + + + + + +

+ + + + +
+
+
+
+48
+49
+50
+
+
# File 'lib/inferno/ext/rack.rb', line 48
+
+def fetch(k, &block)
+  @env.fetch(header_to_env_key(k), &block)
+end
+
+
+ +
+

+ + #has_key?(k) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+52
+53
+54
+
+
# File 'lib/inferno/ext/rack.rb', line 52
+
+def has_key?(k)
+  @env.has_key?(header_to_env_key(k))
+end
+
+
+ +
+

+ + #to_hObject + + + + + +

+ + + + +
+
+
+
+56
+57
+58
+59
+60
+
+
# File 'lib/inferno/ext/rack.rb', line 56
+
+def to_h
+  h = {}
+  each{|k, v| h[k] = v}
+  h
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/_index.html b/docs/docs/_index.html new file mode 100644 index 000000000..e10842d9b --- /dev/null +++ b/docs/docs/_index.html @@ -0,0 +1,1556 @@ + + + + + + + Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Documentation by YARD 0.9.37

+
+

Alphabetic Index

+ +

File Listing

+ + +
+

Namespace Listing A-Z

+ + + + + + + + +
+ + + + + + + + +
    +
  • C
  • +
      + +
    • + CLI + + (Inferno) + +
    • + +
    • + CancelException + + (Inferno::Exceptions) + +
    • + +
    • + CheckConfiguration + + (Inferno::Web::Controllers::TestSuites) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::FHIRClient) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::HTTPClient) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::FHIRValidation) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::RequestStorage) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::FhirpathEvaluation) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::FHIRResourceValidation) + +
    • + +
    • + Client + + (FHIR) + +
    • + +
    • + ClientShow + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + Config + + (Inferno::DSL::FHIREvaluation) + +
    • + +
    • + Configurable + + (Inferno::DSL) + +
    • + +
    • + Configuration + + (Inferno::DSL::Configurable) + +
    • + +
    • + Console + + (Inferno::CLI) + +
    • + +
    • + Controller + + (Inferno::Web::Controllers) + +
    • + +
    • + Controllers + + (Inferno::Web) + +
    • + +
    • + Create + + (Inferno::Web::Controllers::TestRuns) + +
    • + +
    • + Create + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    +
+ + + + + + + + + + + + + + +
+ + + + + +
    +
  • J
  • +
      + +
    • + JWKS + + (Inferno::DSL) + +
    • + +
    • + Jobs + + (Inferno) + +
    • + +
    • + Json + + (FHIR) + +
    • + +
    • + JsonParser + + (Hanami::Middleware::BodyParser) + +
    • + +
    +
+ + +
    +
  • L
  • +
      + +
    • + LastTestRun + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + Links + + (Inferno::DSL) + +
    • + +
    +
+ + +
    +
  • M
  • +
      + +
    • + Main + + (Inferno::CLI) + +
    • + +
    • + MarkdownExtractor + + (Inferno::Web::Serializers) + +
    • + +
    • + Message + + (Inferno::Entities) + +
    • + +
    • + Message + + (Inferno::Web::Serializers) + +
    • + +
    • + Messages + + (Inferno::Repositories) + +
    • + +
    • + Messages + + (Inferno::DSL) + +
    • + +
    • + Middleware + + (Hanami) + +
    • + +
    • + Migration + + (Inferno::Utils) + +
    • + +
    • + Migration + + (Inferno::CLI) + +
    • + +
    • + Model + + (FHIR) + +
    • + +
    • + Model + + (Inferno::Repositories::Tags) + +
    • + +
    • + Model + + (Inferno::Repositories::Headers) + +
    • + +
    • + Model + + (Inferno::Repositories::Results) + +
    • + +
    • + Model + + (Inferno::Repositories::Messages) + +
    • + +
    • + Model + + (Inferno::Repositories::Requests) + +
    • + +
    • + Model + + (Inferno::Repositories::TestRuns) + +
    • + +
    • + Model + + (Inferno::Repositories::SessionData) + +
    • + +
    • + Model + + (Inferno::Repositories::TestSessions) + +
    • + +
    • + Model + + (Inferno::Repositories::ValidatorSessions) + +
    • + +
    +
+ + + + + + + + + + + +
    +
  • R
  • +
      + +
    • + Rack + +
    • + +
    • + Repositories + + (Inferno) + +
    • + +
    • + Repository + + (Inferno::Repositories) + +
    • + +
    • + Request + + (Rack) + +
    • + +
    • + Request + + (Inferno::Entities) + +
    • + +
    • + Request + + (Inferno::Web::Serializers) + +
    • + +
    • + RequestStorage + + (Inferno::DSL) + +
    • + +
    • + Requests + + (Inferno::Repositories) + +
    • + +
    • + Requests + + (Inferno::Web::Controllers) + +
    • + +
    • + RequiredInputsNotFound + + (Inferno::Exceptions) + +
    • + +
    • + Result + + (Inferno::Entities) + +
    • + +
    • + Result + + (Inferno::Web::Serializers) + +
    • + +
    • + Results + + (Inferno::Repositories) + +
    • + +
    • + Results + + (Inferno::DSL) + +
    • + +
    • + Results + + (Inferno::Web::Controllers::TestRuns) + +
    • + +
    • + Results + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + ResumeTestRun + + (Inferno::Jobs) + +
    • + +
    • + Rule + + (Inferno::DSL::FHIREvaluation) + +
    • + +
    • + Runnable + + (Inferno::DSL) + +
    • + +
    +
+ + +
+ + +
    +
  • S
  • +
      + +
    • + Serializer + + (Inferno::Web::Serializers) + +
    • + +
    • + Serializers + + (Inferno::Web) + +
    • + +
    • + Services + + (Inferno::CLI) + +
    • + +
    • + SessionData + + (Inferno::Entities) + +
    • + +
    • + SessionData + + (Inferno::Repositories) + +
    • + +
    • + SessionData + + (Inferno::Web::Serializers) + +
    • + +
    • + SessionData + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + Show + + (Inferno::Web::Controllers::Requests) + +
    • + +
    • + Show + + (Inferno::Web::Controllers::TestRuns) + +
    • + +
    • + Show + + (Inferno::Web::Controllers::TestSuites) + +
    • + +
    • + Show + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + SkipException + + (Inferno::Exceptions) + +
    • + +
    • + SpecSupport + + (Inferno) + +
    • + +
    • + Suite + + (Inferno::CLI) + +
    • + +
    • + SuiteEndpoint + + (Inferno::DSL) + +
    • + +
    • + SuiteInputTemplate + + (Inferno::CLI) + +
    • + +
    • + SuiteOption + + (Inferno::DSL) + +
    • + +
    • + SuiteOption + + (Inferno::Web::Serializers) + +
    • + +
    • + Suites + + (Inferno::CLI) + +
    • + +
    +
+ + +
    +
  • T
  • +
      + +
    • + Tags + + (Inferno::Repositories) + +
    • + +
    • + Test + + (Inferno::Entities) + +
    • + +
    • + Test + + (Inferno::Web::Serializers) + +
    • + +
    • + TestGroup + + (Inferno::Entities) + +
    • + +
    • + TestGroup + + (Inferno::Web::Serializers) + +
    • + +
    • + TestGroups + + (Inferno::Repositories) + +
    • + +
    • + TestKit + + (Inferno::Entities) + +
    • + +
    • + TestKits + + (Inferno::Repositories) + +
    • + +
    • + TestResultException + + (Inferno::Exceptions) + +
    • + +
    • + TestRun + + (Inferno::Entities) + +
    • + +
    • + TestRun + + (Inferno::Web::Serializers) + +
    • + +
    • + TestRuns + + (Inferno::Repositories) + +
    • + +
    • + TestRuns + + (Inferno::Web::Controllers) + +
    • + +
    • + TestSession + + (Inferno::Entities) + +
    • + +
    • + TestSession + + (Inferno::Web::Serializers) + +
    • + +
    • + TestSessionFormPostController + + (Inferno::Web::Controllers) + +
    • + +
    • + TestSessions + + (Inferno::Repositories) + +
    • + +
    • + TestSessions + + (Inferno::Web::Controllers) + +
    • + +
    • + TestSuite + + (Inferno::Entities) + +
    • + +
    • + TestSuite + + (Inferno::Web::Serializers) + +
    • + +
    • + TestSuites + + (Inferno::Repositories) + +
    • + +
    • + TestSuites + + (Inferno::Web::Controllers) + +
    • + +
    • + Tests + + (Inferno::Repositories) + +
    • + +
    +
+ + + + + + + + +
    +
  • W
  • +
      + +
    • + WaitException + + (Inferno::Exceptions) + +
    • + +
    • + Web + + (Inferno) + +
    • + +
    +
+ + +
    +
  • X
  • +
      + +
    • + Xml + + (FHIR) + +
    • + +
    +
+ +
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/class_list.html b/docs/docs/class_list.html new file mode 100644 index 000000000..b673f1116 --- /dev/null +++ b/docs/docs/class_list.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + Class List + + + +
+
+

Class List

+ + + +
+ + +
+ + diff --git a/docs/docs/css/common.css b/docs/docs/css/common.css new file mode 100644 index 000000000..cf25c4523 --- /dev/null +++ b/docs/docs/css/common.css @@ -0,0 +1 @@ +/* Override this file with custom rules */ \ No newline at end of file diff --git a/docs/docs/css/full_list.css b/docs/docs/css/full_list.css new file mode 100644 index 000000000..6eef5e4a0 --- /dev/null +++ b/docs/docs/css/full_list.css @@ -0,0 +1,58 @@ +body { + margin: 0; + font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; + font-size: 13px; + height: 101%; + overflow-x: hidden; + background: #fafafa; +} + +h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } +.clear { clear: both; } +.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } +#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } +#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } +#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } +#full_list ul { padding: 0; } +#full_list li { padding: 0; margin: 0; list-style: none; } +#full_list li .item { padding: 5px 5px 5px 12px; } +#noresults { padding: 7px 12px; background: #fff; } +#content.insearch #noresults { margin-left: 7px; } +li.collapsed ul { display: none; } +li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } +li.collapsed a.toggle { cursor: default; background-position: top left; } +li { color: #666; cursor: pointer; } +li.deprecated { text-decoration: line-through; font-style: italic; } +li.odd { background: #f0f0f0; } +li.even { background: #fafafa; } +.item:hover { background: #ddd; } +li small:before { content: "("; } +li small:after { content: ")"; } +li small.search_info { display: none; } +a, a:visited { text-decoration: none; color: #05a; } +li.clicked > .item { background: #05a; color: #ccc; } +li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } +li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } +li.collapsed.clicked a.toggle { background-position: top right; } +#search input { border: 1px solid #bbb; border-radius: 3px; } +#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } +#full_list_nav a, #nav a:visited { color: #358; } +#full_list_nav a:hover { background: transparent; color: #5af; } +#full_list_nav span:after { content: ' | '; } +#full_list_nav span:last-child:after { content: ''; } + +#content h1 { margin-top: 0; } +li { white-space: nowrap; cursor: normal; } +li small { display: block; font-size: 0.8em; } +li small:before { content: ""; } +li small:after { content: ""; } +li small.search_info { display: none; } +#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; } +#content.insearch #search { background-position: center right; } +#search input { width: 110px; } + +#full_list.insearch ul { display: block; } +#full_list.insearch .item { display: none; } +#full_list.insearch .found { display: block; padding-left: 11px !important; } +#full_list.insearch li a.toggle { display: none; } +#full_list.insearch li small.search_info { display: block; } diff --git a/docs/docs/css/style.css b/docs/docs/css/style.css new file mode 100644 index 000000000..f169a6518 --- /dev/null +++ b/docs/docs/css/style.css @@ -0,0 +1,503 @@ +html { + width: 100%; + height: 100%; +} +body { + font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; + font-size: 13px; + width: 100%; + margin: 0; + padding: 0; + display: flex; + display: -webkit-flex; + display: -ms-flexbox; +} + +#nav { + position: relative; + width: 100%; + height: 100%; + border: 0; + border-right: 1px dotted #eee; + overflow: auto; +} +.nav_wrap { + margin: 0; + padding: 0; + width: 20%; + height: 100%; + position: relative; + display: flex; + display: -webkit-flex; + display: -ms-flexbox; + flex-shrink: 0; + -webkit-flex-shrink: 0; + -ms-flex: 1 0; +} +#resizer { + position: absolute; + right: -5px; + top: 0; + width: 10px; + height: 100%; + cursor: col-resize; + z-index: 9999; +} +#main { + flex: 5 1; + -webkit-flex: 5 1; + -ms-flex: 5 1; + outline: none; + position: relative; + background: #fff; + padding: 1.2em; + padding-top: 0.2em; + box-sizing: border-box; +} + +@media (max-width: 920px) { + .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } + #resizer { display: none; } + #nav { + z-index: 9999; + background: #fff; + display: none; + position: absolute; + top: 40px; + right: 12px; + width: 500px; + max-width: 80%; + height: 80%; + overflow-y: scroll; + border: 1px solid #999; + border-collapse: collapse; + box-shadow: -7px 5px 25px #aaa; + border-radius: 2px; + } +} + +@media (min-width: 920px) { + body { height: 100%; overflow: hidden; } + #main { height: 100%; overflow: auto; } + #search { display: none; } +} + +@media (max-width: 320px) { + body { height: 100%; overflow: hidden; overflow-wrap: break-word; } + #main { height: 100%; overflow: auto; } +} + +#main img { max-width: 100%; } +h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } +h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } +h1.title { margin-bottom: 10px; } +h1.alphaindex { margin-top: 0; font-size: 22px; } +h2 { + padding: 0; + padding-bottom: 3px; + border-bottom: 1px #aaa solid; + font-size: 1.4em; + margin: 1.8em 0 0.5em; + position: relative; +} +h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } +h2 small a { + display: block; + height: 20px; + border: 1px solid #aaa; + border-bottom: 0; + border-top-left-radius: 5px; + background: #f8f8f8; + position: relative; + padding: 2px 7px; +} +a { font-weight: 550; } +.clear { clear: both; } +.inline { display: inline; } +.inline p:first-child { display: inline; } +.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } +.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { + color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; + border-radius: 4px; +} +.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } +.docstring h1 { font-size: 1.2em; } +.docstring h2 { font-size: 1.1em; } +.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } +.summary_desc .object_link a, .docstring .object_link a { + font-family: monospace; font-size: 1.05em; + color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; + border-radius: 4px; +} +.rdoc-term { padding-right: 25px; font-weight: bold; } +.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } +.summary_desc pre.code .object_link a, .docstring pre.code .object_link a { + padding: 0px; background: inherit; color: inherit; border-radius: inherit; +} + +/* style for */ +#filecontents table, .docstring table { border-collapse: collapse; } +#filecontents table th, #filecontents table td, +.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } +#filecontents table tr:nth-child(odd), +.docstring table tr:nth-child(odd) { background: #eee; } +#filecontents table tr:nth-child(even), +.docstring table tr:nth-child(even) { background: #fff; } +#filecontents table th, .docstring table th { background: #fff; } + +/* style for
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/docs/docs/method_list.html b/docs/docs/method_list.html new file mode 100644 index 000000000..989385adf --- /dev/null +++ b/docs/docs/method_list.html @@ -0,0 +1,4774 @@ + + + + + + + + + + + + + + + + + + Method List + + + +
+
+

Method List

+ + + +
+ +
    + + +
  • +
    + #== + Inferno::Entities::Input +
    +
  • + + +
  • +
    + #[] + Rack::Request::Headers +
    +
  • + + +
  • +
    + #[]= + Rack::Request::Headers +
    +
  • + + +
  • +
    + #able_to_refresh? + FHIR::Client +
    +
  • + + +
  • +
    + #access_token + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #access_token + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #active_test_run_for_session? + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #add + Rack::Request::Headers +
    +
  • + + +
  • +
    + #add_link + Inferno::DSL::Links +
    +
  • + + +
  • +
    + #add_message + Inferno::DSL::Messages +
    +
  • + + +
  • +
    + #add_non_db_entities + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #add_result + Inferno::DSL::FHIREvaluation::EvaluationContext +
    +
  • + + +
  • +
    + #add_tag + Inferno::Repositories::Requests::Model +
    +
  • + + +
  • +
    + all + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + #all_selected_groups_and_tests + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + app + Inferno::Web +
    +
  • + + +
  • +
    + #apply_preset + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + #assert + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_resource_type + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_response_content_type + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_response_status + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_valid_bundle_entries + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_valid_http_uri + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_valid_json + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_valid_resource + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #auth_info + FHIR::Client +
    +
  • + + +
  • +
    + #auth_info + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #auth_request_method + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #auth_type + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #auth_url + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + authors + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #available_inputs + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + banner + Inferno::CLI::New +
    +
  • + + +
  • +
    + #bearer_token + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Tags::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Headers::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Messages::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Requests::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::TestRuns::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::TestSessions::Model +
    +
  • + + +
  • +
    + #before_save + Inferno::Repositories::ValidatorSessions::Model +
    +
  • + + +
  • +
    + #block + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + boot_full_inferno + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #build + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #build_entity + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #build_entity + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #build_entity + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #build_entity + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + call + Inferno::Web::Controllers::Controller +
    +
  • + + +
  • +
    + call + Inferno::Web::Controllers::TestSessionFormPostController +
    +
  • + + +
  • +
    + #call_fhirpath_service + Inferno::DSL::FhirpathEvaluation::Evaluator +
    +
  • + + +
  • +
    + #check + Inferno::DSL::FHIREvaluation::Rule +
    +
  • + + +
  • +
    + check_configuration + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #check_runnable_reference + Inferno::Repositories::ValidateRunnableReference +
    +
  • + + +
  • +
    + #cli_context + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #client + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #client + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #client_id + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #client_id + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #client_secret + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #client_secret + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #config + Inferno::DSL::Configurable +
    +
  • + + +
  • +
    + #config + Inferno::DSL::FHIREvaluation::EvaluationContext +
    +
  • + + +
  • +
    + #configuration + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #console + Inferno::CLI::Main +
    +
  • + + +
  • +
    + #create + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #create + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #create + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #create + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + #create_headers + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #create_params + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #create_params + Inferno::Web::Controllers::TestRuns::Create +
    +
  • + + +
  • +
    + #create_params + Inferno::Web::Controllers::TestSessions::Create +
    +
  • + + +
  • +
    + #create_test_kit + Inferno::CLI::New +
    +
  • + + +
  • +
    + #create_test_run + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #current_results_for_test_session + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + current_results_for_test_session + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + #current_results_for_test_session_and_runnables + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + current_results_for_test_session_and_runnables + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + current_results_sql + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + #data + Inferno::DSL::FHIREvaluation::Config +
    +
  • + + +
  • +
    + #data + Inferno::DSL::FHIREvaluation::EvaluationContext +
    +
  • + + +
  • +
    + db + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #db_params + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #delete + Rack::Request::Headers +
    +
  • + + +
  • +
    + #delete + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #describe + Inferno::CLI::Suite +
    +
  • + + +
  • +
    + #description + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #description + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + description + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #direction + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #dispatch_job + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #download_url + Inferno::DSL::Links +
    +
  • + + +
  • +
    + #each + Rack::Request::Headers +
    +
  • + + +
  • +
    + #encryption_algorithm + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #entity_class + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #entity_class_name + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #entity_class_name + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #evaluate + Inferno::CLI::Main +
    +
  • + + +
  • +
    + #evaluate + Inferno::CLI::Evaluate +
    +
  • + + +
  • +
    + #evaluate + Inferno::DSL::FHIREvaluation::Evaluator +
    +
  • + + +
  • +
    + #evaluate_fhirpath + Inferno::DSL::FhirpathEvaluation +
    +
  • + + +
  • +
    + #evaluate_fhirpath + Inferno::DSL::FhirpathEvaluation::Evaluator +
    +
  • + + +
  • +
    + #exclude_message + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #exclude_message + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #execute + Inferno::CLI::Main +
    +
  • + + +
  • +
    + #exists? + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + exit_on_failure? + Inferno::CLI::Main +
    +
  • + + +
  • +
    + #expires_in + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #expires_in + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #extract + Inferno::Web::Serializers::MarkdownExtractor +
    +
  • + + +
  • +
    + #extract + Inferno::Web::Serializers::HashValueExtractor +
    +
  • + + +
  • +
    + #extract_package_id + Inferno::Entities::IG +
    +
  • + + +
  • +
    + #fetch + Rack::Request::Headers +
    +
  • + + +
  • +
    + #fhir_client + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_client + Inferno::DSL::FHIRClient::ClassMethods +
    +
  • + + +
  • +
    + #fhir_create + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_delete + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_get_capability_statement + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_history + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_operation + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_patch + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_read + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_resource_validator + Inferno::DSL::FHIRResourceValidation::ClassMethods +
    +
  • + + +
  • +
    + #fhir_search + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_transaction + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_update + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_vread + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + field_present? + Inferno::Web::Serializers::Serializer +
    +
  • + + +
  • +
    + #find + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #find + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #find + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + #find_by_short_id + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #find_full_request + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #find_latest_waiting_by_identifier + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #find_named_request + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #find_validator + Inferno::DSL::FHIRValidation +
    +
  • + + +
  • +
    + #find_validator + Inferno::DSL::FHIRValidation::ClassMethods +
    +
  • + + +
  • +
    + #find_validator_session_id + Inferno::Repositories::ValidatorSessions +
    +
  • + + +
  • +
    + #find_waiting_result + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #format_tags + Inferno::Entities::Request +
    +
  • + + +
  • +
    + from_contents + Inferno::DSL::FHIREvaluation::DatasetLoader +
    +
  • + + +
  • +
    + from_directory + Inferno::Entities::IG +
    +
  • + + +
  • +
    + from_file + Inferno::Entities::IG +
    +
  • + + +
  • +
    + #from_json + InfernoJson +
    +
  • + + +
  • +
    + from_path + Inferno::DSL::FHIREvaluation::DatasetLoader +
    +
  • + + +
  • +
    + from_tgz + Inferno::Entities::IG +
    +
  • + + +
  • +
    + #from_xml + InfernoXml +
    +
  • + + +
  • +
    + #generate + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #get + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #get_all_from_session + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #get_ig + Inferno::CLI::Evaluate +
    +
  • + + +
  • +
    + group + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + group + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #groups + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + groups + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + groups + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::Requests::Show +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestRuns::Show +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestRuns::Create +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSuites::Show +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestRuns::Destroy +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSuites::Index +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::Show +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::Create +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestRuns::Results::Index +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::ClientShow +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::LastTestRun +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::Results::Index +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSuites::CheckConfiguration +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::SessionData::Index +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessionFormPostController +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::SessionData::ApplyPreset +
    +
  • + + +
  • +
    + #handle_non_db_params + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #handle_resource + Inferno::Entities::IG +
    +
  • + + +
  • +
    + #has_key? + Rack::Request::Headers +
    +
  • + + +
  • +
    + #headers + Rack::Request +
    +
  • + + +
  • +
    + #headers + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #headers + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #headers + Inferno::DSL::HTTPClientBuilder +
    +
  • + + +
  • +
    + #http_client + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #http_client + Inferno::DSL::HTTPClient::ClassMethods +
    +
  • + + +
  • +
    + #human_name + Inferno::Utils::NamedThorActions +
    +
  • + + +
  • +
    + #id + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #id + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #id + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + #id + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #id + Inferno::Entities::Request +
    +
  • + + +
  • +
    + id + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #id + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #id + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #identifier + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #ig + Inferno::DSL::FHIREvaluation::Evaluator +
    +
  • + + +
  • +
    + #ig + Inferno::DSL::FHIREvaluation::EvaluationContext +
    +
  • + + +
  • +
    + #ig_file + Inferno::Utils::IgDownloader +
    +
  • + + +
  • +
    + #ig_http_url + Inferno::Utils::IgDownloader +
    +
  • + + +
  • +
    + #ig_path + Inferno::Utils::IgDownloader +
    +
  • + + +
  • +
    + #ig_registry_url + Inferno::Utils::IgDownloader +
    +
  • + + +
  • +
    + #ig_url + Inferno::DSL::Links +
    +
  • + + +
  • +
    + #igs + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #in_user_package_cache? + Inferno::CLI::Evaluate +
    +
  • + + +
  • +
    + #index + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #index + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #info + Inferno::DSL::Messages +
    +
  • + + +
  • +
    + #initialize + Rack::Request::Headers +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::ParentNotLoadedException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::ValidatorNotFoundException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::FhirpathNotFoundException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::RequiredInputsNotFound +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::NotUserRunnableException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::UnknownAttributeException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::UnknownSessionDataType +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::BadSessionDataType +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::InvalidRunnableIdException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::DuplicateEntityIdException +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::IG +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Input +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Entity +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Preset +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #initialize + InfernoFHIRModelExtensions +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #initialize + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #initialize + Inferno::DSL::FHIREvaluation::Config +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::ValidatorSession +
    +
  • + + +
  • +
    + #initialize + Inferno::DSL::FHIREvaluation::Evaluator +
    +
  • + + +
  • +
    + #initialize + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #initialize + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #initialize + Inferno::DSL::FHIREvaluation::EvaluationContext +
    +
  • + + +
  • +
    + input + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #input + Inferno::DSL::InputOutputHandling +
    +
  • + + +
  • +
    + #input_instructions + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #input_json + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #input_order + Inferno::DSL::InputOutputHandling +
    +
  • + + +
  • +
    + #input_template + Inferno::CLI::Suite +
    +
  • + + +
  • +
    + #inputs + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #inputs + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #inputs + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #inputs_and_preset + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #insert + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + #insert_from_file + Inferno::Repositories::Presets +
    +
  • + + +
  • +
    + #issue_time + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #issue_type + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #json_serializer_options + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #json_serializer_options + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #json_serializer_options + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #json_serializer_options + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + jwks + Inferno::DSL::JWKS +
    +
  • + + +
  • +
    + #jwks + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + jwks_json + Inferno::DSL::JWKS +
    +
  • + + +
  • +
    + #kid + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #last_test_run + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + last_updated + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #library_name + Inferno::Utils::NamedThorActions +
    +
  • + + +
  • +
    + #links + Inferno::DSL::Links +
    +
  • + + +
  • +
    + #list_options + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + #load + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #load_ig + Inferno::Utils::IgDownloader +
    +
  • + + +
  • +
    + #load_preset_file_and_set_preset_id + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #load_tagged_requests + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + #logger + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #logs + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #make_response + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #makes_request + Inferno::DSL::RequestStorage::ClassMethods +
    +
  • + + +
  • +
    + #mark_as_cancelling + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #mark_as_done + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #mark_as_no_longer_waiting + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #mark_as_running + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #mark_as_waiting + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + maturity + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #message + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #message + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #messages + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #messages_for_result + Inferno::Repositories::Messages +
    +
  • + + +
  • +
    + #metadata + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #migrate + Inferno::CLI::Main +
    +
  • + + +
  • +
    + mime_types + Hanami::Middleware::BodyParser::JsonParser +
    +
  • + + +
  • +
    + #module_name + Inferno::Utils::NamedThorActions +
    +
  • + + +
  • +
    + #name + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #name + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #name + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #name + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #name + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #name + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #name + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #need_to_refresh? + FHIR::Client +
    +
  • + + +
  • +
    + #non_db_params + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #oauth_credentials + FHIR::Client +
    +
  • + + +
  • +
    + #oauth_credentials + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #omit + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #omit_if + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #optional + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #optional? + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #optional? + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #options + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #options + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + options + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #output + Inferno::Entities::Test +
    +
  • + + +
  • +
    + output + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #output + Inferno::DSL::InputOutputHandling +
    +
  • + + +
  • +
    + #output_json + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #output_results + Inferno::CLI::Evaluate +
    +
  • + + +
  • +
    + #outputs + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #outputter + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #pad + Inferno::CLI::Evaluate +
    +
  • + + +
  • +
    + #parent + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #pass + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #pass_if + Inferno::DSL::Results +
    +
  • + + +
  • +
    + perform + Inferno::Jobs +
    +
  • + + +
  • +
    + #perform + Inferno::Jobs::ResumeTestRun +
    +
  • + + +
  • +
    + #perform + Inferno::Jobs::ExecuteTestRun +
    +
  • + + +
  • +
    + #perform + Inferno::Jobs::InvokeValidatorSession +
    +
  • + + +
  • +
    + #perform_additional_validation + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #perform_additional_validation + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #persist_request? + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #pkce_code_challenge_method + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #pkce_support + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #post + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #preset + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #preset + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #presets_for_suite + Inferno::Repositories::Presets +
    +
  • + + +
  • +
    + #presets_repo + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #print + Inferno::CLI::Evaluate +
    +
  • + + +
  • +
    + #print_error_and_exit + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #print_help_and_exit + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #processed_inputs + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #pull + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #query_parameters + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #receives_request + Inferno::DSL::RequestStorage::ClassMethods +
    +
  • + + +
  • +
    + #redirect_url + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #refresh_token + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #refresh_token + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + repo + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #repo_symbol_to_array + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #report_issue_url + Inferno::DSL::Links +
    +
  • + + +
  • +
    + #req + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #request + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #request + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #request + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + #request? + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #request_body + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #request_header + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #request_headers + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #request_id + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #requested_scopes + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #requests + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #requests + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #requests + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + #requests_for_result + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #requests_repo + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + require_helpers + Inferno::SpecSupport +
    +
  • + + +
  • +
    + #required + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #required? + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #required? + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #required_suite_options + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #requirements + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #requirements + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #res + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #resource + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #resource + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + resource_class + Inferno::Web::Controllers::Controller +
    +
  • + + +
  • +
    + resource_class + Inferno::Web::Controllers::TestSessions::SessionData::Index +
    +
  • + + +
  • +
    + resource_class + Inferno::Web::Controllers::TestSessions::SessionData::ApplyPreset +
    +
  • + + +
  • +
    + #resource_is_valid? + Inferno::DSL::FHIRValidation +
    +
  • + + +
  • +
    + #resource_is_valid? + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #resource_is_valid? + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + resource_name + Inferno::Web::Controllers::Controller +
    +
  • + + +
  • +
    + #response + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #response + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #response + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + #response? + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #response_body + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #response_header + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #response_headers + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::AssertionException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::SkipException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::OmitException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::PassException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::WaitException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::CancelException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::ErrorInValidatorException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::ErrorInFhirpathException +
    +
  • + + +
  • +
    + #result + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #result + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #result + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #result_for_test_run + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #result_id + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #result_id + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #result_message + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #result_message + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #result_message + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #result_message + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #results + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #results + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #results + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #results + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #results + Inferno::DSL::FHIREvaluation::EvaluationContext +
    +
  • + + +
  • +
    + #results_for_test_run + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #results_for_test_session + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + #results_repo + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #results_repo + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #resume_test_route + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #root_name + Inferno::Utils::NamedThorActions +
    +
  • + + +
  • +
    + #route + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + routes + Inferno +
    +
  • + + +
  • +
    + #rule + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #run + Inferno::CLI::Suites +
    +
  • + + +
  • +
    + #run + Inferno::Utils::Migration +
    +
  • + + +
  • +
    + #run + Inferno::CLI::Console +
    +
  • + + +
  • +
    + #run + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #run + Inferno::CLI::Migration +
    +
  • + + +
  • +
    + #run + Inferno::CLI::SuiteInputTemplate +
    +
  • + + +
  • +
    + run_as_group + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + run_as_group? + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #run_one + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #runnable + Inferno::Entities::HasRunnable +
    +
  • + + +
  • +
    + #runnable + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #runnable + Inferno::DSL::HTTPClientBuilder +
    +
  • + + +
  • +
    + #runnable + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #runnable_id_key + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #runnable_reference_exists? + Inferno::Repositories::ValidateRunnableReference +
    +
  • + + +
  • +
    + #runnable_type + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #runnables_by_short_id + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #save + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #save + Inferno::Repositories::ValidatorSessions +
    +
  • + + +
  • +
    + #scratch + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #serialize_auth_info + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #serialize_checkbox_input + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #serialize_oauth_credentials_input + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #session + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #session_data_repo + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #session_id + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #severity + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #short_description + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + short_id + Inferno::Entities::Test +
    +
  • + + +
  • +
    + short_id + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #short_title + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #skip + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #skip_if + Inferno::DSL::Results +
    +
  • + + +
  • +
    + skip_item? + Inferno::Entities::IG +
    +
  • + + +
  • +
    + #sort_results + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #source_code_url + Inferno::DSL::Links +
    +
  • + + +
  • +
    + #source_contents + InfernoFHIRModelExtensions +
    +
  • + + +
  • +
    + #source_hash + InfernoFHIRModelExtensions +
    +
  • + + +
  • +
    + source_root + Inferno::CLI::New +
    +
  • + + +
  • +
    + #source_text + InfernoFHIRModelExtensions +
    +
  • + + +
  • +
    + #start + Inferno::CLI::Main +
    +
  • + + +
  • +
    + #start + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #status + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #status + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #status_for_test_run + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #stop + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #stream + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #suite + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #suite + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #suite_endpoint + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + suite_ids + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #suite_inputs + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + suite_option + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #suite_option_requirements + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #suite_options + Inferno::Entities::Test +
    +
  • + + +
  • +
    + suite_options + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #suite_options + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #suite_options + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #suite_options_hash + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + suite_summary + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #suites + Inferno::CLI::Main +
    +
  • + + +
  • +
    + suites + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + suppress_output + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + table_name + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #tagged_requests + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + tagged_requests + Inferno::Repositories::Requests::Model +
    +
  • + + +
  • +
    + tagged_requests_sql + Inferno::Repositories::Requests::Model +
    +
  • + + +
  • +
    + tags + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #tags + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #test + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + test + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #test_count + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_group + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_group + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_group_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_group_id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_groups_repo + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #test_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + test_kit + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #test_kit_id + Inferno::Utils::NamedThorActions +
    +
  • + + +
  • +
    + #test_run + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #test_run_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_run_identifier + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #test_run_results_after + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #test_runs + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #test_runs_repo + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #test_runs_repo + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #test_session + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #test_session + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #test_sessions_repo + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #test_suite + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_suite + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_suite + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #test_suite_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_suite_id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_suite_id + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #test_suite_id + Inferno::Utils::NamedThorActions +
    +
  • + + +
  • +
    + #test_suite_id + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #tests + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + tests + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #tests_repo + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #tests_repo + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #thor_hash_to_inputs_array + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #thor_hash_to_suite_options_array + Inferno::CLI::Execute +
    +
  • + + +
  • +
    + #threshold + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #title + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #title + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + title + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + #title_name + Inferno::Utils::NamedThorActions +
    +
  • + + +
  • +
    + #to_h + Rack::Request::Headers +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::Input +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::Entity +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #to_oo_issue + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + to_operation_outcome + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #to_s + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #token_retrieval_time + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #token_url + Inferno::DSL::AuthInfo +
    +
  • + + +
  • +
    + #token_url + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #type + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #type + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #update + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #update_result + Inferno::DSL::SuiteEndpoint +
    +
  • + + +
  • +
    + #update_result + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #url + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #url + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #url + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #url + Inferno::DSL::FhirpathEvaluation::Evaluator +
    +
  • + + +
  • +
    + #url + Inferno::DSL::HTTPClientBuilder +
    +
  • + + +
  • +
    + #url + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #user_package_cache + Inferno::CLI::Evaluate +
    +
  • + + +
  • +
    + #uses_request + Inferno::DSL::RequestStorage::ClassMethods +
    +
  • + + +
  • +
    + #validate + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::Headers::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::Messages::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::TestRuns::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::TestSessions::Model +
    +
  • + + +
  • +
    + #validate + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::ValidateRunnableReference +
    +
  • + + +
  • +
    + #validate_args + Inferno::CLI::Evaluate +
    +
  • + + +
  • +
    + #validator + Inferno::DSL::FHIRValidation::ClassMethods +
    +
  • + + +
  • +
    + #validator_session_repo + Inferno::DSL::FHIRResourceValidation::Validator +
    +
  • + + +
  • +
    + #value + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #value + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + #value + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #value + Inferno::DSL::FHIREvaluation::EvaluationResult +
    +
  • + + +
  • +
    + #value_to_persist + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #verb + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #version + Inferno::CLI::Main +
    +
  • + + +
  • +
    + version + Inferno::Entities::TestKit +
    +
  • + + +
  • +
    + version + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #wait + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #wait_timeout + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #waiting? + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #warning + Inferno::DSL::Messages +
    +
  • + + + +
+
+ + diff --git a/docs/docs/top-level-namespace.html b/docs/docs/top-level-namespace.html new file mode 100644 index 000000000..f078a0e15 --- /dev/null +++ b/docs/docs/top-level-namespace.html @@ -0,0 +1,110 @@ + + + + + + + Top Level Namespace + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Top Level Namespace + + + +

+
+ + + + + + + + + + + +
+ +

Defined Under Namespace

+

+ + + Modules: FHIR, Hanami, Inferno, InfernoFHIRModelExtensions, InfernoJson, InfernoXml, Rack + + + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file