Module: HybridPlatformsConductor::HpcPlugins::Test::OrphanFiles::ConfigDslExtension

Defined in:
lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb

Overview

Config DSL extension for this test plugin

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ignored_orphan_files_pathsObject (readonly)

List of paths to ignore info. Each info has the following properties:

  • nodes_selectors_stack (Array<Object>): Stack of nodes selectors impacted by this rule

  • ignored_paths (Array<String>): List of paths to ignore.

Array< Hash<Symbol, Object> >



19
20
21
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb', line 19

def ignored_orphan_files_paths
  @ignored_orphan_files_paths
end

Instance Method Details

#ignore_orphan_files_from(paths_to_ignore) ⇒ Object

Ignore a list of paths for orphan files testing

Parameters
  • paths_to_ignore (String or Array<String>): List of paths to ignore



34
35
36
37
38
39
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb', line 34

def ignore_orphan_files_from(paths_to_ignore)
  @ignored_orphan_files_paths << {
    ignored_paths: paths_to_ignore.is_a?(Array) ? paths_to_ignore : [paths_to_ignore],
    nodes_selectors_stack: current_nodes_selectors_stack,
  }
end

#init_orphan_files_testObject

Initialize the DSL



22
23
24
25
26
27
28
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb', line 22

def init_orphan_files_test
  # List of paths to ignore info. Each info has the following properties:
  # * *nodes_selectors_stack* (Array<Object>): Stack of nodes selectors impacted by this rule
  # * *ignored_paths* (Array<String>): List of paths to ignore.
  # Array< Hash<Symbol, Object> >
  @ignored_orphan_files_paths = []
end