Class: Fluence::Ci::Tools::CLI
- Inherits:
-
Thor
- Object
- Thor
- Fluence::Ci::Tools::CLI
- Defined in:
- lib/fluence/ci/tools/cli.rb
Overview
Thor CLI exposed via exe/fluence-ci. Every method of
Steps is exposed as a top-level Thor
command so the CLI surface mirrors the catalog 1-1: adding a
new step group to the mixin makes it appear here automatically.
Every keyword argument of a Steps method is auto-exposed as a
CLI option of the same name: --report (the boolean used by
every group), --paths "app lib" for codequality,
--command "my-runner" for tests, etc. Adding a kwarg to a
Steps method makes it appear as a CLI flag with no edit here.
Plus two utility commands:
* `install` — generate `lib/tasks/fluence_ci.rake` (gem)
* `version` — print the gem version
Constant Summary collapse
- TEMPLATES =
File.('../../../generators/fluence_ci/templates', __dir__)
- BOOLEAN_KWARGS =
Steps kwargs that map to a Thor boolean flag rather than a string. Extend this when a new boolean kwarg is added to a Steps method (Ruby's reflection doesn't expose default values, so the type can't be auto-derived from
instance_method(...).parameters). %i[report build].freeze
Class Method Summary collapse
-
.exit_on_failure? ⇒ Boolean
Tell Thor to exit non-zero when a
Thor::Erroris raised instead of just printing the message and returning 0.
Instance Method Summary collapse
-
#install ⇒ void
Copy the gem rake-task template into the consumer at
lib/tasks/fluence_ci.rake. -
#version ⇒ void
Print the gem version to stdout.
Class Method Details
.exit_on_failure? ⇒ Boolean
Tell Thor to exit non-zero when a Thor::Error is raised
instead of just printing the message and returning 0.
Instance Method Details
#install ⇒ void
This method returns an undefined value.
Copy the gem rake-task template into the consumer at
lib/tasks/fluence_ci.rake.
#version ⇒ void
This method returns an undefined value.
Print the gem version to stdout.