diff options
| author | Paul Bütow <paul@uranus.lan.buetow.org> | 2018-09-02 18:33:38 +0100 |
|---|---|---|
| committer | Paul Bütow <paul@uranus.lan.buetow.org> | 2018-09-02 18:33:38 +0100 |
| commit | 030e014769f6423f901f33f23a3e949b76aa3e42 (patch) | |
| tree | 8afd2b38ef5e1cfad0d69c5179067454136d6da5 | |
| parent | 7050182d32cea58440b240cbcb2dc5cd1264e0ea (diff) | |
can edit
| -rwxr-xr-x | geheim.rb | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -182,6 +182,11 @@ class GeheimData < CommitFile end end + def import(source_file:) + puts "Importing #{source_file} to #{@data_path}" + @data = File.read(source_file) + end + def commit(force: false) commit_content(file: @data_path, content: encrypt(plain: @data), force: force) end @@ -270,7 +275,10 @@ class Geheim destination_file = File.basename(index.description) data = index.get_data data.export(destination_file: destination_file) - shred_file(file: edit_exported(file: destination_file)) + edited_file = edit_exported(file: destination_file) + data.import(source_file: edited_file) + data.commit(force: true) + shred_file(file: edited_file) end end end |
