Class: NeetoCompliance::SemaphoreciConfigVerifier

Inherits:
Base
  • Object
show all
Defined in:
lib/neeto_compliance/verifiers/semaphoreci_config_verifier.rb

Instance Method Summary collapse

Methods inherited from Base

#app_is_exception?, #app_name, #apps_exception_list, #audit, #auto_correct!, #error_message, #print_description, #process, #verifier_name

Instance Method Details

#autofix_commandObject



19
20
21
# File 'lib/neeto_compliance/verifiers/semaphoreci_config_verifier.rb', line 19

def autofix_command
  "echo \"#{common_semaphore_config.to_yaml[4..-2]}\" > #{local_copy}"
end

#autofix_suggestionObject



23
24
25
# File 'lib/neeto_compliance/verifiers/semaphoreci_config_verifier.rb', line 23

def autofix_suggestion
  "ā†’ cp #{commons_copy} #{local_copy}\nā†’ And append the following configs\n #{app_specific_configs[app_name].to_yaml}".yellow
end

#commons_copyObject



11
12
13
# File 'lib/neeto_compliance/verifiers/semaphoreci_config_verifier.rb', line 11

def commons_copy
  NeetoCompliance::NeetoCommons.path.join "common_files/semaphore/semaphore.yml"
end

#local_copyObject



7
8
9
# File 'lib/neeto_compliance/verifiers/semaphoreci_config_verifier.rb', line 7

def local_copy
  ".semaphore/semaphore.yml"
end

#semaphore_config_valid?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/neeto_compliance/verifiers/semaphoreci_config_verifier.rb', line 15

def semaphore_config_valid?
  deep_hash_comp(local_semaphore_config, common_semaphore_config)
end

#valid?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/neeto_compliance/verifiers/semaphoreci_config_verifier.rb', line 27

def valid?
  semaphore_config_valid?
end