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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c66790a692cd160c66dd12bfc25f6fdba9b4039bccf8ffab53dd488ef450adaf
4
- data.tar.gz: 8aef14d9eff6091a6b003113a707cf73a6016fcd80ae8a73f2d0115498af0797
3
+ metadata.gz: 924717b99bcbe0a071819b38a67893a99dcdbed0cb0c4fc6f3e48309838f3614
4
+ data.tar.gz: e72b0379e4348cf604e285e91f5ee5728855ab15d693302889c6f2524d485798
5
5
  SHA512:
6
- metadata.gz: 32196c77bf1e17792f6ba06c16578d77cf02d8553719931eba98a27806882c0381f79b0e765e3693cd4f9f8d63e91e48d801f961ea85feab85fa5d9105830834
7
- data.tar.gz: f099226645be2a1323d7dbe8c27e4cd95e2f7f16b42d367511f5f84cc2e8e95a9eca440443b06c17ad1a8e327606bd86a96a06a2563f1a8c331434f0b183c577
6
+ metadata.gz: 86112b38aab32e6cfce76f94d1e9a737fdaf0915d40b2693c4198d05f5d813c98303bd9f44fa7b71229862ceb8ba9d8ad3f19370f9b434198842c61d8e4aa8b4
7
+ data.tar.gz: 10b5729e36cfb3f3317b909d892e66dc39a2da63e6600778923218e8c211b374b2e9defb511fd92c50f78f7ff27e5bf629210e360d3c8b58cfea949013f23a5f
@@ -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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- diskcatalog (1.2.1)
4
+ diskcatalog (1.2.3)
5
5
  sys-filesystem
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Diskcatalog
4
- VERSION = "1.2.1"
4
+ VERSION = "1.2.3"
5
5
  end
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 option.debug
245
- p e.backtrace
246
+ if opts[:d]
247
+ puts e.backtrace
246
248
  end
247
249
  puts opt.help
248
250
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diskcatalog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - src