Class: Extension::Command::Check
- Inherits:
-
ExtensionCommand
- Object
- CLI::Kit::BaseCommand
- ShopifyCLI::Command
- ShopifyCLI::Command::SubCommand
- ExtensionCommand
- Extension::Command::Check
- Defined in:
- lib/project_types/extension/commands/check.rb
Defined Under Namespace
Classes: CheckOptions
Instance Attribute Summary
Attributes inherited from ShopifyCLI::Command
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize ⇒ Check
constructor
A new instance of Check.
Methods inherited from ExtensionCommand
#project, #specification_handler
Methods inherited from ShopifyCLI::Command::SubCommand
Methods inherited from ShopifyCLI::Command
call, call_help, check_node_version, check_ruby_version, check_version, options, prerequisite_task, recommend_default_node_range, recommend_default_ruby_range, recommend_node, recommend_ruby, run_prerequisites, subcommand, subcommand_registry
Methods included from ShopifyCLI::Feature::Set
Constructor Details
#initialize ⇒ Check
Returns a new instance of Check.
25 26 27 28 29 30 31 |
# File 'lib/project_types/extension/commands/check.rb', line 25 def initialize(*) super if project.specification_identifier == "THEME_APP_EXTENSION" @theme_check = ThemeCheck::Cli.new self. = CheckOptions.new(@ctx, @theme_check) end end |
Class Method Details
.help ⇒ Object
46 47 48 |
# File 'lib/project_types/extension/commands/check.rb', line 46 def self.help ShopifyCLI::Context.("check.help", ShopifyCLI::TOOL_NAME) end |
Instance Method Details
#call ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/project_types/extension/commands/check.rb', line 33 def call(*) if project.specification_identifier == "THEME_APP_EXTENSION" begin @theme_check.run! rescue ThemeCheck::Cli::Abort, ThemeCheck::ThemeCheckError => e raise ShopifyCLI::Abort, ShopifyCLI::Context.("theme.check.error", e.) end else @ctx.abort(@ctx.("check.unsupported", project.specification_identifier)) end end |