diskcatalog 1.2.2 → 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: 26a374df61fddd36c051c3267e53b0e3f09a035cbc618dbbbf0e722ff9307cfd
4
- data.tar.gz: b36e80b8eecae674c36e10fefbd4c06dd8f4b5b5f495fc58294f0c7126385e1f
3
+ metadata.gz: 924717b99bcbe0a071819b38a67893a99dcdbed0cb0c4fc6f3e48309838f3614
4
+ data.tar.gz: e72b0379e4348cf604e285e91f5ee5728855ab15d693302889c6f2524d485798
5
5
  SHA512:
6
- metadata.gz: 86a9b0c5acd35dff29f4a8ca7b9d2ca81663a884d3bfd6ea13aa6565197716c20214890736e27261ac418ba27b8fe69d8293b37b3f7e217a40b7861bb9a4b9d1
7
- data.tar.gz: 0e215f7367b9f8b3641aa7856bbeaa79e2b2ab2c741ea3fd1d0a26659036fa4ae166bbfae8609d1778a3e473f3b1d0d7d02e30e548cc22fae0bf70d6b06e8951
6
+ metadata.gz: 86112b38aab32e6cfce76f94d1e9a737fdaf0915d40b2693c4198d05f5d813c98303bd9f44fa7b71229862ceb8ba9d8ad3f19370f9b434198842c61d8e4aa8b4
7
+ data.tar.gz: 10b5729e36cfb3f3317b909d892e66dc39a2da63e6600778923218e8c211b374b2e9defb511fd92c50f78f7ff27e5bf629210e360d3c8b58cfea949013f23a5f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- diskcatalog (1.2.2)
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.2"
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
@@ -236,14 +237,14 @@ module Diskcatalog
236
237
  opt.on('-d', '--debug', 'debug message') {|v| opts[:d] = v}
237
238
  opt.parse!(argv)
238
239
  config = load_yaml(opts[:c])
239
- option = SearchOption.new(opts, argv, config)
240
240
  begin
241
+ option = SearchOption.new(opts, argv, config)
241
242
  command = SearchCommand.new(option)
242
243
  command.run
243
244
  rescue => e
244
245
  puts e.message
245
- if option.debug
246
- p e.backtrace
246
+ if opts[:d]
247
+ puts e.backtrace
247
248
  end
248
249
  puts opt.help
249
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.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - src