Class: Inferno::CLI::Main
- Inherits:
-
Thor
- Object
- Thor
- Inferno::CLI::Main
- 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` 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 END_OF_HELP
Class Method Summary collapse
-
.exit_on_failure? ⇒ Boolean
github.com/rails/thor/issues/244 - Make Thor exit(1) on Errors/Exceptions.
Instance Method Summary collapse
- #console ⇒ Object
- #execute ⇒ Object
- #migrate ⇒ Object
- #start ⇒ Object
- #suites ⇒ Object
- #version ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
github.com/rails/thor/issues/244 - Make Thor exit(1) on Errors/Exceptions
135 136 137 |
# File 'lib/inferno/apps/cli/main.rb', line 135 def self.exit_on_failure? true end |
Instance Method Details
#console ⇒ Object
14 15 16 17 |
# File 'lib/inferno/apps/cli/main.rb', line 14 def console Migration.new.run(Logger::INFO) Console.new.run end |
#execute ⇒ Object
129 130 131 132 |
# File 'lib/inferno/apps/cli/main.rb', line 129 def execute Execute.boot_full_inferno Execute.new.run() end |
#migrate ⇒ Object
20 21 22 |
# File 'lib/inferno/apps/cli/main.rb', line 20 def migrate Migration.new.run end |
#start ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/inferno/apps/cli/main.rb', line 29 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 [: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 |