debugtrace 1.0.0 → 1.0.1

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: 007becfaaebee62ef14be62da8bcff6530fd2ca3835c09e153254f9699b1ac7b
4
- data.tar.gz: 4bb241654f775b6891bc95234dad0b24f4caf0a770e56488521c10ce26e9d818
3
+ metadata.gz: 0e872094eb59159d108f2e52625b202800b7278dc17679fbae19e06d5a23d422
4
+ data.tar.gz: bca0f74ed3a13386f01d77b1ae07b2b204c6eb3c93b55d48478ac35d0745436b
5
5
  SHA512:
6
- metadata.gz: fd547264f234ca06406199fb09ea1e689366c5096e62565f1926b96a1f888ec15322f145991deb155ef0dd61f6fff96aedfa246bc6a3fe6f69e297ea93bda06d
7
- data.tar.gz: 6a0b7a8f3026dab44469ec6c5ab2bd2b1cace79e855dfc5165a2d35445ce4e2484d36283d5cf9d3a3e1bc99e17aff0b8e2d3ebc452683007ef76f397f79add11
6
+ metadata.gz: fcaafba29d038f8f15cbb6cfbb9936065ee352a7d71441a832e72b20ac97f149c5752121f74776d0ecaf79e491a556542af18cbf4b524000cc73243a419b4478
7
+ data.tar.gz: e56bf266a536877979e38a3492e192f270a38b4c92524f57b1991b4c3da8d15603f10cbefa3b9888d8711c642152ff3d6017a6003abcca3435c740208f8cbf52
@@ -12,8 +12,8 @@ module Common
12
12
  # @return [String] the value
13
13
  # @raise [TypeError] if the value is not an instance of the type or the subclass of the type
14
14
  def self.check_type(value_name, value, type)
15
- raise TypeError("Argument value_name (=#{value_name}) must be a String") unless value_name.is_a?(String)
16
- raise TypeError("Argument type (=#{type}) must be a Class") unless type.is_a?(Class)
15
+ raise TypeError, "Argument value_name (=#{value_name}) must be a String" unless value_name.is_a?(String)
16
+ raise TypeError, "Argument type (=#{type}) must be a Class" unless type.is_a?(Class)
17
17
 
18
18
  error = false
19
19
  if type == FalseClass || type == TrueClass
@@ -30,7 +30,7 @@ module Common
30
30
  top_type_name = type.name.slice(0).upcase
31
31
  a = top_type_name == 'A' || top_type_name == 'I' || top_type_name == 'U' ||
32
32
  top_type_name == 'E' || top_type_name == 'O' ? 'an' : 'a'
33
- raise TypeError("Argument #{value_name} (=#{value_string}) must be #{a} #{type}")
33
+ raise TypeError, "Argument #{value_name} (=#{value_string}) must be #{a} #{type}"
34
34
  end
35
35
  return value
36
36
  end
@@ -38,7 +38,7 @@ class Config
38
38
  #
39
39
  # @param config_path [String] path of the yml file
40
40
  def initialize(config_path)
41
- @config_path = Common.check_type('config_path', config_path, String)
41
+ @config_path = config_path
42
42
  if File.exist?(@config_path)
43
43
  @config = YAML.load_file(@config_path)
44
44
  else
@@ -11,7 +11,7 @@ class LoggerBase
11
11
  # @param message [String] The message to output
12
12
  # @raise [Exception] always
13
13
  def print(message)
14
- raise Exception.new('LoggerBase.print is an abstract method.')
14
+ raise Exception, 'LoggerBase.print is an abstract method.'
15
15
  end
16
16
 
17
17
  # Returns a string representation of this object.
@@ -2,5 +2,5 @@
2
2
  # (C) 2025 Masato Kokubo
3
3
 
4
4
  module DebugTrace
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
data/lib/debugtrace.rb CHANGED
@@ -52,7 +52,7 @@ module DebugTrace
52
52
  # Initialize this class
53
53
  def self.initialize()
54
54
  config_path = ENV['DEBUGTRACE_CONFIG']
55
- if config_path == ''
55
+ if config_path == nil || config_path.empty?
56
56
  config_path = './debugtrace.yml'
57
57
  end
58
58
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debugtrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masato Kokubo
OSZAR »