Class: Builtins::Envdiff
Constant Summary
Constants inherited
from Builtin
Builtin::BUILTIN_DIR
Instance Attribute Summary
Attributes inherited from Builtin
#args, #config
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Builtin
class_for, #initialize
Constructor Details
This class inherits a constructor from Builtin
Class Method Details
.description ⇒ Object
6
7
8
|
# File 'lib/builtins/envdiff.rb', line 6
def description
"compares keys present in config and secrets between different environments"
end
|
Instance Method Details
#run ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/builtins/envdiff.rb', line 11
def run
check_args
if source_only_keys.empty? && dest_only_keys.empty?
Output.out("Environments '#{source_env}' and '#{dest_env}' define the same #{source_keys.length} key(s).")
return
end
output_key_summary(source_only_keys, source_env, dest_env) if source_only_keys.any?
output_key_summary(dest_only_keys, dest_env, source_env) if dest_only_keys.any?
true
end
|