qdumpfs 1.8.2 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdc68ddb0a3016a375adc9e55b92547ea98f9bf1af05bc5fed20a6dbe8cb26e1
4
- data.tar.gz: c20bd623f45e39e22c05dd5b7e314f0b24799d567a8d5ac21e94cf9b06e93400
3
+ metadata.gz: fc77dcb0cc06a9f0bd3c05042fa61088e5babf3d5a70fdfa4b1788a6ae4e076e
4
+ data.tar.gz: e4923e91396f39f7311d8ceb3c1f1128bbbc606a76c55fd84a0753f10341505e
5
5
  SHA512:
6
- metadata.gz: 2c57a00118b6da4621fd3037c217969819c12103d3540851ca3ee3ea6ae1592229ca9453285055a8171e229a9c3e165a017b291f402e2142b3f07cec7a27a6f3
7
- data.tar.gz: 86bc15230254cb36a429d53dbb13f2e56a72b1f3cbf6caced5fbdf3c729c6bcf4720d4fd8ef9c009d95f32c66401fa4a70180d00da2820b7bc3626328ac43edf
6
+ metadata.gz: 311b46a74804b78ba6627130a7e2e400dfc0a3e16bfdcd197f6b9406d3f90802117999a5d6d851881b4664e78e213d117ef07a0842757d629b349ad55f271883
7
+ data.tar.gz: 05c44d7d33a0649cf63a751ec5e12fe0e64030678e52a2774b6d6e4802ce6e8bee12f9742c03d3c16fd6ec26a9fad34ce420ec1a55103fe930b9d0e8e8038ea9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qdumpfs (1.8.2)
4
+ qdumpfs (1.9.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -121,11 +121,17 @@ module Qdumpfs
121
121
  @cmd = @opts[:c] || 'backup'
122
122
 
123
123
  # @logger = NullLogger.new
124
- logfile = 'qdumpfs.log'
125
- #ログディレクトリの作成
126
- @logdir = @opts[:logdir] || Dir.pwd
124
+ if @opts[:logpath]
125
+ @logpath = @opts[:logpath]
126
+ @logdir = File.dirname(@logpath)
127
+ else
128
+ logname = @opts[:logname] || 'qdumpfs.log'
129
+ #ログディレクトリの作成
130
+ @logdir = @opts[:logdir] || Dir.pwd
131
+ @logpath = File.join(@logdir, logname)
132
+ end
133
+
127
134
  Dir.mkdir(@logdir) unless FileTest.directory?(@logdir)
128
- @logpath = File.join(@logdir, logfile)
129
135
  @logger = SimpleLogger.new(@logpath)
130
136
 
131
137
  verifyfile = 'verify.txt'
data/lib/qdumpfs/util.rb CHANGED
@@ -133,6 +133,8 @@ module QdumpfsUtils
133
133
  FileUtils.cp(src, dest)
134
134
  unless FileTest.file?(dest)
135
135
  raise "copy_file fails #{dest}"
136
+ else
137
+ @write_bytes += File.size(src)
136
138
  end
137
139
  end
138
140
 
@@ -1,4 +1,4 @@
1
1
  module Qdumpfs
2
- VERSION = "1.8.2"
2
+ VERSION = "1.9.1"
3
3
  end
4
4
 
data/lib/qdumpfs.rb CHANGED
@@ -40,6 +40,8 @@ module Qdumpfs
40
40
  opt.on('-l HOURS', '--limit=HOURS', 'limit hours') {|v| opts[:limit] = v}
41
41
  opt.on('-k KEEPARG', '--keep=KEEPARG', 'ex: --keep 100Y12M12W30D (100years, 12months, 12weeks, 30days, default)') {|v| opts[:keep] = v}
42
42
  opt.on('--logdir=LOGDIR', 'logdir') {|v| opts[:logdir] = v}
43
+ opt.on('--logname=LOGNAME', 'logname') {|v| opts[:logname] = v}
44
+ opt.on('--logpath=LOGPATH', 'logpath') {|v| opts[:logpath] = v}
43
45
  opt.on('--delete-from=YYYYMMDD', 'delete backup from YYYY/MM/DD') {|v|
44
46
  opts[:delete_from] = Date.parse(v)
45
47
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qdumpfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - src
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-07 00:00:00.000000000 Z
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler