diskcatalog 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.idea/diskcatalog.iml +1 -0
- data/Gemfile.lock +1 -1
- data/lib/diskcatalog/version.rb +1 -1
- data/lib/diskcatalog.rb +6 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 924717b99bcbe0a071819b38a67893a99dcdbed0cb0c4fc6f3e48309838f3614
|
4
|
+
data.tar.gz: e72b0379e4348cf604e285e91f5ee5728855ab15d693302889c6f2524d485798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86112b38aab32e6cfce76f94d1e9a737fdaf0915d40b2693c4198d05f5d813c98303bd9f44fa7b71229862ceb8ba9d8ad3f19370f9b434198842c61d8e4aa8b4
|
7
|
+
data.tar.gz: 10b5729e36cfb3f3317b909d892e66dc39a2da63e6600778923218e8c211b374b2e9defb511fd92c50f78f7ff27e5bf629210e360d3c8b58cfea949013f23a5f
|
data/.idea/diskcatalog.iml
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
9
|
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
10
|
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
+
<excludeFolder url="file://$MODULE_DIR$/vendor/bundle/ruby/3.2.0/cache" />
|
11
12
|
</content>
|
12
13
|
<orderEntry type="inheritedJdk" />
|
13
14
|
<orderEntry type="sourceFolder" forTests="false" />
|
data/Gemfile.lock
CHANGED
data/lib/diskcatalog/version.rb
CHANGED
data/lib/diskcatalog.rb
CHANGED
@@ -93,6 +93,7 @@ module Diskcatalog
|
|
93
93
|
if argv.size > 0
|
94
94
|
@search = argv[0]
|
95
95
|
end
|
96
|
+
raise "SEARCH is not specified" unless @search
|
96
97
|
end
|
97
98
|
attr_reader :search
|
98
99
|
end
|
@@ -225,7 +226,7 @@ module Diskcatalog
|
|
225
226
|
opts = {}
|
226
227
|
opt = OptionParser.new(argv)
|
227
228
|
opt.version = VERSION
|
228
|
-
opt.banner = "Usage: #{opt.program_name} [options] <directory>"
|
229
|
+
opt.banner = "Usage: #{opt.program_name} [options] SEARCH <directory>"
|
229
230
|
opt.separator('Options')
|
230
231
|
opt.on_head('-h', '--help', 'show this message') do |v|
|
231
232
|
puts opt.help
|
@@ -233,16 +234,17 @@ module Diskcatalog
|
|
233
234
|
end
|
234
235
|
opt.on('-v', '--verbose', 'verbose message') {|v| opts[:v] = v}
|
235
236
|
opt.on('--config=CONFIGFILE', 'Config file') {|v| opts[:c] = v }
|
237
|
+
opt.on('-d', '--debug', 'debug message') {|v| opts[:d] = v}
|
236
238
|
opt.parse!(argv)
|
237
239
|
config = load_yaml(opts[:c])
|
238
|
-
option = SearchOption.new(opts, argv, config)
|
239
240
|
begin
|
241
|
+
option = SearchOption.new(opts, argv, config)
|
240
242
|
command = SearchCommand.new(option)
|
241
243
|
command.run
|
242
244
|
rescue => e
|
243
245
|
puts e.message
|
244
|
-
if
|
245
|
-
|
246
|
+
if opts[:d]
|
247
|
+
puts e.backtrace
|
246
248
|
end
|
247
249
|
puts opt.help
|
248
250
|
end
|