lucarecord 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/luca_record/version.rb +1 -1
- data/lib/luca_support/enc.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab8d42ca9b608b1523b0cf5cdf85ace0795c2852c0e7abb840c7ab63c6cf10d8
|
4
|
+
data.tar.gz: 7fbd74937cbcacf501a5be5296eaa586162a3646817cd46d6f973fe6740db93e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cef169faf34676d409b44d1b40ac5ae671f9e53ff0f4900ce42734a04ba98573ae906eb51cd95798bed89e2d74a4c5189e032b60ae390fdb442130572451278d
|
7
|
+
data.tar.gz: 61b8f6864ae81c2f7b90540e019be72f3be41b835274cca6fe84c9014d00126167b8d7d5b7fb08aa445fc5562fd4edf61a3fe359218d1e24b1a72b17133a9b3d
|
data/CHANGELOG.md
CHANGED
data/lib/luca_record/version.rb
CHANGED
data/lib/luca_support/enc.rb
CHANGED
@@ -13,8 +13,11 @@ module LucaSupport # :nodoc:
|
|
13
13
|
# TODO: check space in dir string
|
14
14
|
# TODO: check if origin exists
|
15
15
|
def encrypt(dir, iter: 10000, cleanup: false)
|
16
|
+
passopt = ENV['LUCA_ENC_PASSWORD'] ? "-pass pass:#{ENV['LUCA_ENC_PASSWORD']}" : ''
|
16
17
|
Dir.chdir(Pathname(CONST.pjdir) / 'data') do
|
17
|
-
|
18
|
+
abort "Directory #{dir} not found. exit..." unless Dir.exist?(dir)
|
19
|
+
|
20
|
+
system "tar czf - #{dir} | openssl enc -e -aes256 -iter #{iter} -out #{dir}.tar.gz #{passopt}"
|
18
21
|
return if ! cleanup
|
19
22
|
|
20
23
|
FileUtils.rm_rf dir
|
@@ -23,8 +26,11 @@ module LucaSupport # :nodoc:
|
|
23
26
|
|
24
27
|
# TODO: check space in dir string
|
25
28
|
def decrypt(dir, iter: 10000)
|
29
|
+
passopt = ENV['LUCA_ENC_PASSWORD'] ? "-pass pass:#{ENV['LUCA_ENC_PASSWORD']}" : ''
|
26
30
|
Dir.chdir(Pathname(CONST.pjdir) / 'data') do
|
27
|
-
|
31
|
+
abort "Archive #{dir}.tar.gz not found. exit..." unless File.exist?("#{dir}.tar.gz")
|
32
|
+
|
33
|
+
system "openssl enc -d -aes256 -iter #{iter} -in #{dir}.tar.gz #{passopt} | tar xz"
|
28
34
|
end
|
29
35
|
end
|
30
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucarecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuma Takahiro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|