qdumpfs 1.8.2 → 1.9.0

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: 7ceb1f25cb5025a606c5507c7184eb17464f38b21878cb233719348bd5aab369
4
+ data.tar.gz: 31370e10bda2e023e862b5e06d41f93c4c738a69c4146f3dfa3f2022ba4bd69c
5
5
  SHA512:
6
- metadata.gz: 2c57a00118b6da4621fd3037c217969819c12103d3540851ca3ee3ea6ae1592229ca9453285055a8171e229a9c3e165a017b291f402e2142b3f07cec7a27a6f3
7
- data.tar.gz: 86bc15230254cb36a429d53dbb13f2e56a72b1f3cbf6caced5fbdf3c729c6bcf4720d4fd8ef9c009d95f32c66401fa4a70180d00da2820b7bc3626328ac43edf
6
+ metadata.gz: c5510e2e47588c732850e65a1dad47d6f90583d8ca946a0ce0b5318bf4941b753941d3d84cffcd1db3ee7d62de751dc05601165830618432101bcfe653df837c
7
+ data.tar.gz: 646d986c74e35668d1910405726acf19efd323a9c1f468f32bd2488e854a14904672cfd20306dc09f4f7e980f23fa76b26b2182dd22601b205e0da40ea39df85
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.0)
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 += block.size
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.0"
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.0
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