From 5aae40deb18dde3c85e6e3e1d634e07ed531d43d Mon Sep 17 00:00:00 2001 From: Marc Qualie Date: Sun, 6 Feb 2022 14:17:14 +0000 Subject: [PATCH] Fix namespace when included in rails (#100) --- CHANGELOG.md | 8 ++++++++ lib/diffcrypt/rails/encrypted_configuration.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 794cb54..cefe075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## Unreleased + +### Fixed + +- Broken namespace when saving credentials in rails + + + ## [0.6.0] - 2022-02-06 ### Added diff --git a/lib/diffcrypt/rails/encrypted_configuration.rb b/lib/diffcrypt/rails/encrypted_configuration.rb index f15ae74..63a3583 100644 --- a/lib/diffcrypt/rails/encrypted_configuration.rb +++ b/lib/diffcrypt/rails/encrypted_configuration.rb @@ -54,7 +54,7 @@ def read def write(contents, original_encrypted_contents = nil) deserialize(contents) - File.binwrite "#{content_path}.tmp", encrypt(contents, original_encrypted_contents) + ::File.binwrite "#{content_path}.tmp", encrypt(contents, original_encrypted_contents) ::FileUtils.mv "#{content_path}.tmp", content_path end