Class: Vizcore::CLISupport::PluginChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/vizcore/cli/plugin_checker.rb

Overview

Performs local smoke checks for a Vizcore plugin scaffold.

Defined Under Namespace

Classes: Check, Report

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ PluginChecker

Returns a new instance of PluginChecker.

Parameters:

  • root (String, Pathname)


23
24
25
# File 'lib/vizcore/cli/plugin_checker.rb', line 23

def initialize(root)
  @root = Pathname.new(root).expand_path
end

Instance Method Details

#callReport

Returns:



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/vizcore/cli/plugin_checker.rb', line 28

def call
  return Report.new(checks: [fail_check("Plugin root", "directory not found: #{@root}")]) unless @root.directory?

  Report.new(
    checks: [
      ruby_layer_check,
      frontend_asset_check,
      example_scene_check
    ]
  )
end