Building 70 Projects ranging from beginner to advanced so anyone can β learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company π
Go aicertificationcloud-engineeringcybercybersecuritycybersecurity-analystcybersecurity-certificationcybersecurity-certificationscybersecurity-educationcybersecurity-jobscybersecurity-portfoliocybersecurity-projectscybersecurity-toolsgrchackinglearningpentestingproject-repositoryprojetcspython
fix(env_file): rename _s -> s on commit/rollback_apply to match parent
CarterPerez-dev225716d14008
diff --git a/PROJECTS/intermediate/credential-rotation-enforcer/src/cre/rotators/env_file.cr b/PROJECTS/intermediate/credential-rotation-enforcer/src/cre/rotators/env_file.crindex e0c28410..e349ea17 100644--- a/PROJECTS/intermediate/credential-rotation-enforcer/src/cre/rotators/env_file.cr+++ b/PROJECTS/intermediate/credential-rotation-enforcer/src/cre/rotators/env_file.cr@@ -62,14 +62,16 @@ module CRE::Rotatorscontent.includes?(expected_line) && content.bytesize > 0end- def commit(c : Domain::Credential, _s : Domain::NewSecret) : Nil+ def commit(c : Domain::Credential, s : Domain::NewSecret) : Nil+ _ = spath = c.tag("path").not_nil!pending_path = "#{path}.pending"raise RotatorError.new("pending file missing at commit time: #{pending_path}") unless File.exists?(pending_path)File.rename(pending_path, path)end- def rollback_apply(c : Domain::Credential, _s : Domain::NewSecret) : Nil+ def rollback_apply(c : Domain::Credential, s : Domain::NewSecret) : Nil+ _ = spath = c.tag("path").not_nil!pending_path = "#{path}.pending"File.delete(pending_path) if File.exists?(pending_path)