pantheios-ruby 0.22.2 → 0.22.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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +26 -0
  3. data/NEWS.md +1 -0
  4. data/TODO.md +5 -2
  5. data/examples/coloured_console_log_service.rb +1 -1
  6. data/examples/multiple_modules.rb +36 -36
  7. data/examples/simple_logging.rb +1 -1
  8. data/examples/threshold_front_end.rb +1 -1
  9. data/lib/pantheios/api.rb +154 -153
  10. data/lib/pantheios/application_layer/stock_severity_levels.rb +108 -108
  11. data/lib/pantheios/application_layer.rb +5 -5
  12. data/lib/pantheios/core.rb +415 -414
  13. data/lib/pantheios/front_ends/threshold_front_end.rb +79 -79
  14. data/lib/pantheios/globals.rb +43 -43
  15. data/lib/pantheios/services/coloured_console_log_service.rb +94 -94
  16. data/lib/pantheios/services/common/console.rb +57 -57
  17. data/lib/pantheios/services/multiplexing_log_service.rb +149 -148
  18. data/lib/pantheios/services/null_log_service.rb +9 -9
  19. data/lib/pantheios/services/simple_console_log_service.rb +18 -18
  20. data/lib/pantheios/services/simple_file_log_service.rb +110 -111
  21. data/lib/pantheios/services/standard_log_service_adapter.rb +117 -117
  22. data/lib/pantheios/util/process_util.rb +24 -24
  23. data/lib/pantheios/util/reflection_util.rb +13 -13
  24. data/lib/pantheios/util/thread_util.rb +49 -49
  25. data/lib/pantheios/util/version_util.rb +33 -33
  26. data/lib/pantheios/version.rb +12 -12
  27. data/lib/pantheios.rb +11 -11
  28. data/test/performance/test_perf_simple_statements.rb +58 -58
  29. data/test/performance/test_perf_trace_variants.rb +43 -57
  30. data/test/scratch/log_rolling_by_period_daily.rb +3 -3
  31. data/test/scratch/log_rolling_by_size_and_depth.rb +3 -3
  32. data/test/scratch/log_using_blocks.rb +12 -12
  33. data/test/scratch/multiplexing_log_service.rb +32 -32
  34. data/test/unit/application_layer/tc_param_name_list.rb +13 -13
  35. data/test/unit/application_layer/tc_stock_severity_levels.rb +102 -102
  36. data/test/unit/core/tc_core_1.rb +24 -24
  37. data/test/unit/front_ends/tc_threshold_front_end.rb +65 -65
  38. data/test/unit/services/tc_multiplexing_log_service.rb +79 -79
  39. data/test/unit/services/tc_null_log_service.rb +42 -42
  40. data/test/unit/services/tc_simple_console_log_service.rb +70 -70
  41. data/test/unit/services/tc_simple_file_log_service.rb +146 -146
  42. data/test/unit/services/tc_standard_log_service_adapter.rb +94 -96
  43. data/test/unit/util/tc_process_util.rb +6 -6
  44. data/test/unit/util/tc_reflection_util.rb +20 -20
  45. data/test/unit/util/tc_thread_util.rb +46 -46
  46. data/test/unit/util/tc_version_util.rb +47 -47
  47. metadata +6 -6
@@ -18,151 +18,149 @@ require 'stringio'
18
18
 
19
19
  class Test_StandardLogservice < Test::Unit::TestCase
20
20
 
21
- include ::Pantheios::Services
21
+ include ::Pantheios::Services
22
22
 
23
- STOCK_SEVERITY_LEVEL_VALUES = ::Pantheios::ApplicationLayer::StockSeverityLevels::STOCK_SEVERITY_LEVEL_VALUES
23
+ STOCK_SEVERITY_LEVEL_VALUES = ::Pantheios::ApplicationLayer::StockSeverityLevels::STOCK_SEVERITY_LEVEL_VALUES
24
24
 
25
- def test_StandardLogServiceAdapter_type_exists
25
+ def test_StandardLogServiceAdapter_type_exists
26
26
 
27
- assert defined? StandardLogServiceAdapter
28
- end
27
+ assert defined? StandardLogServiceAdapter
28
+ end
29
29
 
30
- if defined?(StandardLogServiceAdapter)
30
+ if defined?(StandardLogServiceAdapter)
31
31
 
32
- def test_StandardLogServiceAdapter_type_is_a_class
32
+ def test_StandardLogServiceAdapter_type_is_a_class
33
33
 
34
- assert_kind_of(::Class, StandardLogServiceAdapter)
35
- end
34
+ assert_kind_of(::Class, StandardLogServiceAdapter)
35
+ end
36
36
 
37
- def test_StandardLogServiceAdapter_type_has_expected_instance_methods
37
+ def test_StandardLogServiceAdapter_type_has_expected_instance_methods
38
38
 
39
- assert_type_has_instance_methods StandardLogServiceAdapter, [ :severity_logged?, :log ]
40
- end
39
+ assert_type_has_instance_methods StandardLogServiceAdapter, [ :severity_logged?, :log ]
40
+ end
41
41
 
42
- def test_severity_logged
42
+ def test_severity_logged
43
43
 
44
- logdev = StringIO.new
45
- logger = ::Logger.new logdev
44
+ logdev = StringIO.new
45
+ logger = ::Logger.new logdev
46
46
 
47
- svc = StandardLogServiceAdapter.new logger
47
+ svc = StandardLogServiceAdapter.new logger
48
48
 
49
- logger.level = ::Logger::WARN
49
+ logger.level = ::Logger::WARN
50
50
 
51
- assert_false svc.severity_logged?(:debug4)
52
- assert_false svc.severity_logged?(:debug3)
53
- assert_false svc.severity_logged?(:debug2)
54
- assert_false svc.severity_logged?(:debug1)
55
- assert_false svc.severity_logged?(:debug0)
56
- assert_false svc.severity_logged?(:informational)
57
- assert_false svc.severity_logged?(:notice)
58
- assert_true svc.severity_logged?(:warning)
59
- assert_true svc.severity_logged?(:failure)
60
- assert_true svc.severity_logged?(:critical)
61
- assert_true svc.severity_logged?(:alert)
62
- assert_true svc.severity_logged?(:violation)
51
+ assert_false svc.severity_logged?(:debug4)
52
+ assert_false svc.severity_logged?(:debug3)
53
+ assert_false svc.severity_logged?(:debug2)
54
+ assert_false svc.severity_logged?(:debug1)
55
+ assert_false svc.severity_logged?(:debug0)
56
+ assert_false svc.severity_logged?(:informational)
57
+ assert_false svc.severity_logged?(:notice)
58
+ assert_true svc.severity_logged?(:warning)
59
+ assert_true svc.severity_logged?(:failure)
60
+ assert_true svc.severity_logged?(:critical)
61
+ assert_true svc.severity_logged?(:alert)
62
+ assert_true svc.severity_logged?(:violation)
63
63
 
64
- assert_true svc.severity_logged?(nil)
64
+ assert_true svc.severity_logged?(nil)
65
65
 
66
- assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug4])
67
- assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug3])
68
- assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug2])
69
- assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug1])
70
- assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug0])
71
- assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:informational])
72
- assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:notice])
73
- assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:warning])
74
- assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:failure])
75
- assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:critical])
76
- assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:alert])
77
- assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:violation])
78
- end
66
+ assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug4])
67
+ assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug3])
68
+ assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug2])
69
+ assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug1])
70
+ assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:debug0])
71
+ assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:informational])
72
+ assert_false svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:notice])
73
+ assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:warning])
74
+ assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:failure])
75
+ assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:critical])
76
+ assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:alert])
77
+ assert_true svc.severity_logged?(STOCK_SEVERITY_LEVEL_VALUES[:violation])
78
+ end
79
79
 
80
- def test_selected_log_with_default_format
80
+ def test_selected_log_with_default_format
81
81
 
82
- logdev = StringIO.new
83
- logger = ::Logger.new logdev
82
+ logdev = StringIO.new
83
+ logger = ::Logger.new logdev
84
84
 
85
- svc = StandardLogServiceAdapter.new logger
85
+ svc = StandardLogServiceAdapter.new logger
86
86
 
87
- logger.level = ::Logger::WARN
87
+ logger.level = ::Logger::WARN
88
88
 
89
- t = Time.now
90
- pid = Process.pid
91
- prname = ::Pantheios::Util::ProcessUtil.derive_process_name
89
+ t = Time.now
90
+ prname = ::Pantheios::Util::ProcessUtil.derive_process_name
92
91
 
93
- [ :notice, :warning, :critical ].each do |level|
92
+ [ :notice, :warning, :critical ].each do |level|
94
93
 
95
- svc.log level, t, nil, "a message at #{level}" if svc.severity_logged? level
96
- end
94
+ svc.log level, t, nil, "a message at #{level}" if svc.severity_logged? level
95
+ end
97
96
 
98
- svc.flush if svc.respond_to? :flush
97
+ svc.flush if svc.respond_to? :flush
99
98
 
100
- res = logdev.string.split /\n/
99
+ res = logdev.string.split(/\n/)
101
100
 
102
- assert_equal 2, res.size
101
+ assert_equal 2, res.size
103
102
 
104
- assert_match /W\s*,\s*\[.*##{pid}\s*\]\s*WARN\s*--\s*#{prname}\s*:\s*a message at warning/, res[0]
105
- assert_match /E\s*,\s*\[.*##{pid}\s*\]\s*ERROR\s*--\s*#{prname}\s*:\s*a message at critical/, res[1]
106
- end
103
+ assert_match(/W\s*,\s*\[.*##{Process.pid}\s*\]\s*WARN\s*--\s*#{prname}\s*:\s*a message at warning/, res[0])
104
+ assert_match(/E\s*,\s*\[.*##{Process.pid}\s*\]\s*ERROR\s*--\s*#{prname}\s*:\s*a message at critical/, res[1])
105
+ end
107
106
 
108
- def test_selected_log_with_blank_format
107
+ def test_selected_log_with_blank_format
109
108
 
110
- logdev = StringIO.new
111
- logger = ::Logger.new logdev
109
+ logdev = StringIO.new
110
+ logger = ::Logger.new logdev
112
111
 
113
- svc = StandardLogServiceAdapter.new logger, format: :simple
112
+ svc = StandardLogServiceAdapter.new logger, format: :simple
114
113
 
115
- logger.level = ::Logger::WARN
114
+ logger.level = ::Logger::WARN
116
115
 
117
- t = Time.now
116
+ t = Time.now
118
117
 
119
- [ :notice, :warning, :critical ].each do |level|
118
+ [ :notice, :warning, :critical ].each do |level|
120
119
 
121
- svc.log level, t, nil, "a message at #{level}" if svc.severity_logged? level
122
- end
120
+ svc.log level, t, nil, "a message at #{level}" if svc.severity_logged? level
121
+ end
123
122
 
124
- svc.flush if svc.respond_to? :flush
123
+ svc.flush if svc.respond_to? :flush
125
124
 
126
- res = logdev.string.split /\n/
125
+ res = logdev.string.split(/\n/)
127
126
 
128
- assert_equal 2, res.size
127
+ assert_equal 2, res.size
129
128
 
130
- assert_equal 'a message at warning', res[0]
131
- assert_equal 'a message at critical', res[1]
132
- end
129
+ assert_equal 'a message at warning', res[0]
130
+ assert_equal 'a message at critical', res[1]
131
+ end
133
132
 
134
- def test_selected_log_with_standard_format
133
+ def test_selected_log_with_standard_format
135
134
 
136
- logdev = StringIO.new
137
- logger = ::Logger.new logdev
135
+ logdev = StringIO.new
136
+ logger = ::Logger.new logdev
138
137
 
139
- svc = StandardLogServiceAdapter.new logger, format: :standard
138
+ svc = StandardLogServiceAdapter.new logger, format: :standard
140
139
 
141
- logger.level = ::Logger::WARN
140
+ logger.level = ::Logger::WARN
142
141
 
143
- t = Time.now
144
- pid = Process.pid
145
- tid = Thread.current.object_id
146
- prname = ::Pantheios::Util::ProcessUtil.derive_process_name
147
- ts = t.strftime '%Y-%m-%d %H:%M:%S.%6N'
142
+ t = Time.now
143
+ tid = Thread.current.object_id
144
+ prname = ::Pantheios::Util::ProcessUtil.derive_process_name
145
+ ts = t.strftime '%Y-%m-%d %H:%M:%S.%6N'
148
146
 
149
- [ :notice, :warning, :critical ].each do |level|
147
+ [ :notice, :warning, :critical ].each do |level|
150
148
 
151
- pref = "[#{prname} #{tid} #{ts} #{level}]"
149
+ pref = "[#{prname} #{tid} #{ts} #{level}]"
152
150
 
153
- svc.log level, t, pref, "a message at #{level}" if svc.severity_logged? level
154
- end
151
+ svc.log level, t, pref, "a message at #{level}" if svc.severity_logged? level
152
+ end
155
153
 
156
- svc.flush if svc.respond_to? :flush
154
+ svc.flush if svc.respond_to? :flush
157
155
 
158
- res = logdev.string.split /\n/
156
+ res = logdev.string.split(/\n/)
159
157
 
160
- assert_equal 2, res.size
158
+ assert_equal 2, res.size
161
159
 
162
- assert_match /\s*\[\s*#{prname} #{tid} #{ts} warning\s*\]\s*a message at warning/, res[0]
163
- assert_match /\s*\[\s*#{prname} #{tid} #{ts} critical\s*\]\s*a message at critical/, res[1]
164
- end
165
- end
160
+ assert_match(/\s*\[\s*#{prname} #{tid} #{ts} warning\s*\]\s*a message at warning/, res[0])
161
+ assert_match(/\s*\[\s*#{prname} #{tid} #{ts} critical\s*\]\s*a message at critical/, res[1])
162
+ end
163
+ end
166
164
  end
167
165
 
168
166
 
@@ -10,15 +10,15 @@ require 'test/unit'
10
10
 
11
11
  class Test_ProcessUtil_set_thread_name < Test::Unit::TestCase
12
12
 
13
- PU = ::Pantheios::Util::ProcessUtil
13
+ PU = ::Pantheios::Util::ProcessUtil
14
14
 
15
- def test_derive_process_name
15
+ def test_derive_process_name
16
16
 
17
- assert_equal 'abc', PU.derive_process_name('abc')
17
+ assert_equal 'abc', PU.derive_process_name('abc')
18
18
 
19
- assert_equal 'abc', PU.derive_process_name('abc.rb')
19
+ assert_equal 'abc', PU.derive_process_name('abc.rb')
20
20
 
21
- assert_equal 'abc', PU.derive_process_name('abc.rb')
22
- end
21
+ assert_equal 'abc', PU.derive_process_name('abc.rb')
22
+ end
23
23
  end
24
24
 
@@ -10,45 +10,45 @@ require 'test/unit'
10
10
 
11
11
  class Test_ReflectionUtil_set_thread_name < Test::Unit::TestCase
12
12
 
13
- class Grandparent; end
13
+ class Grandparent; end
14
14
 
15
- class Parent < Grandparent; end
15
+ class Parent < Grandparent; end
16
16
 
17
- class Child < Parent; end
17
+ class Child < Parent; end
18
18
 
19
19
 
20
- class Basic_Grandparent < BasicObject; end
20
+ class Basic_Grandparent < BasicObject; end
21
21
 
22
- class Basic_Parent < Basic_Grandparent; end
22
+ class Basic_Parent < Basic_Grandparent; end
23
23
 
24
- class Basic_Child < Basic_Parent; end
24
+ class Basic_Child < Basic_Parent; end
25
25
 
26
26
 
27
- RU = ::Pantheios::Util::ReflectionUtil
27
+ RU = ::Pantheios::Util::ReflectionUtil
28
28
 
29
- def test_non_root_classes_end_cases
29
+ def test_non_root_classes_end_cases
30
30
 
31
- assert_empty RU.non_root_classes(nil)
31
+ assert_empty RU.non_root_classes(nil)
32
32
 
33
- assert_empty RU.non_root_classes(::Object)
33
+ assert_empty RU.non_root_classes(::Object)
34
34
 
35
- assert_equal [ ::Regexp ], RU.non_root_classes(//)
35
+ assert_equal [ ::Regexp ], RU.non_root_classes(//)
36
36
 
37
- assert_equal [ ::String ], RU.non_root_classes('')
37
+ assert_equal [ ::String ], RU.non_root_classes('')
38
38
 
39
- assert_equal [ ::String ], RU.non_root_classes(::String)
39
+ assert_equal [ ::String ], RU.non_root_classes(::String)
40
40
 
41
- assert_equal [ Grandparent ], RU.non_root_classes(Grandparent)
41
+ assert_equal [ Grandparent ], RU.non_root_classes(Grandparent)
42
42
 
43
- assert_equal [ Parent, Grandparent ], RU.non_root_classes(Parent)
43
+ assert_equal [ Parent, Grandparent ], RU.non_root_classes(Parent)
44
44
 
45
- assert_equal [ Child, Parent, Grandparent ], RU.non_root_classes(Child)
45
+ assert_equal [ Child, Parent, Grandparent ], RU.non_root_classes(Child)
46
46
 
47
- assert_equal [ Basic_Grandparent ], RU.non_root_classes(Basic_Grandparent)
47
+ assert_equal [ Basic_Grandparent ], RU.non_root_classes(Basic_Grandparent)
48
48
 
49
- assert_equal [ Basic_Parent, Basic_Grandparent ], RU.non_root_classes(Basic_Parent)
49
+ assert_equal [ Basic_Parent, Basic_Grandparent ], RU.non_root_classes(Basic_Parent)
50
50
 
51
- assert_equal [ Basic_Child, Basic_Parent, Basic_Grandparent ], RU.non_root_classes(Basic_Child)
52
- end
51
+ assert_equal [ Basic_Child, Basic_Parent, Basic_Grandparent ], RU.non_root_classes(Basic_Child)
52
+ end
53
53
  end
54
54
 
@@ -10,91 +10,91 @@ require 'test/unit'
10
10
 
11
11
  class Test_ThreadUtil_set_thread_name < Test::Unit::TestCase
12
12
 
13
- TU = ::Pantheios::Util::ThreadUtil
13
+ TU = ::Pantheios::Util::ThreadUtil
14
14
 
15
- def test_new_Thread_does_not_have_attribute
15
+ def test_new_Thread_does_not_have_attribute
16
16
 
17
- t = Thread.new {}
17
+ t = Thread.new {}
18
18
 
19
- assert_not t.respond_to? :thread_name
20
- end
19
+ assert_not t.respond_to? :thread_name
20
+ end
21
21
 
22
- def test_new_Thread_can_accept_attribute
22
+ def test_new_Thread_can_accept_attribute
23
23
 
24
- t = Thread.new {}
24
+ t = Thread.new {}
25
25
 
26
- assert_not t.respond_to? :thread_name
26
+ assert_not t.respond_to? :thread_name
27
27
 
28
- TU.set_thread_name t, ''
28
+ TU.set_thread_name t, ''
29
29
 
30
- assert_true t.respond_to? :thread_name
30
+ assert_true t.respond_to? :thread_name
31
31
 
32
- assert_equal '', t.thread_name
33
- end
32
+ assert_equal '', t.thread_name
33
+ end
34
34
 
35
- def test_attribute_can_be_changed
35
+ def test_attribute_can_be_changed
36
36
 
37
- t = Thread.new {}
37
+ t = Thread.new {}
38
38
 
39
- TU.set_thread_name t, 'name-1'
39
+ TU.set_thread_name t, 'name-1'
40
40
 
41
- assert_equal 'name-1', t.thread_name
41
+ assert_equal 'name-1', t.thread_name
42
42
 
43
- TU.set_thread_name t, 'name-2'
43
+ TU.set_thread_name t, 'name-2'
44
44
 
45
- assert_equal 'name-2', t.thread_name
46
- end
45
+ assert_equal 'name-2', t.thread_name
46
+ end
47
47
  end
48
48
 
49
49
  class Test_parameter_checks_as_included_module < Test::Unit::TestCase
50
50
 
51
- class NonThread1
51
+ class NonThread1
52
52
 
53
- include ::Pantheios::Util::ThreadUtil::ThreadName
54
- end
53
+ include ::Pantheios::Util::ThreadUtil::ThreadName
54
+ end
55
55
 
56
- class Thread1 < Thread
56
+ class Thread1 < Thread
57
57
 
58
- include ::Pantheios::Util::ThreadUtil::ThreadName
58
+ include ::Pantheios::Util::ThreadUtil::ThreadName
59
59
 
60
- def initialize
60
+ def initialize
61
61
 
62
- super
63
- end
64
- end
62
+ super
63
+ end
64
+ end
65
65
 
66
66
 
67
- def test_NonThread1_1
67
+ def test_NonThread1_1
68
68
 
69
- t = NonThread1.new
69
+ t = NonThread1.new
70
70
 
71
- assert_equal Thread.current.to_s, t.thread_name
72
- end
71
+ assert_equal Thread.current.to_s, t.thread_name
72
+ end
73
73
 
74
- def test_NonThread1_2
74
+ def test_NonThread1_2
75
75
 
76
- t = NonThread1.new
76
+ t = NonThread1.new
77
77
 
78
- t.thread_name = 'the-thread'
78
+ t.thread_name = 'the-thread'
79
79
 
80
- assert_equal 'the-thread', t.thread_name
81
- end
80
+ assert_equal 'the-thread', t.thread_name
81
+ end
82
82
 
83
83
 
84
- def test_Thread1_1
84
+ def test_Thread1_1
85
85
 
86
- t = Thread1.new {}
86
+ t = Thread1.new {}
87
87
 
88
- assert_equal t.to_s, t.thread_name
89
- end
88
+ assert_equal t.to_s, t.thread_name
89
+ end
90
90
 
91
- def test_Thread1_2
91
+ def test_Thread1_2
92
92
 
93
- t = Thread1.new {}
93
+ t = Thread1.new {}
94
94
 
95
- t.thread_name = 'another-thread'
95
+ t.thread_name = 'another-thread'
96
96
 
97
- assert_equal 'another-thread', t.thread_name
98
- end
97
+ assert_equal 'another-thread', t.thread_name
98
+ end
99
99
  end
100
100
 
@@ -10,71 +10,71 @@ require 'test/unit'
10
10
 
11
11
  class Test_VersionUtil_version_compare < Test::Unit::TestCase
12
12
 
13
- VU = ::Pantheios::Util::VersionUtil
13
+ VU = ::Pantheios::Util::VersionUtil
14
14
 
15
- def test_equal_strings
15
+ def test_equal_strings
16
16
 
17
- assert_equal 0, VU.version_compare('1.0.0', '1.0.0')
18
- assert_equal 0, VU.version_compare('1.2.3', '1.2.3')
19
- assert_equal 0, VU.version_compare('1.2', '1.2')
20
- assert_equal 0, VU.version_compare('1', '1')
21
- end
17
+ assert_equal 0, VU.version_compare('1.0.0', '1.0.0')
18
+ assert_equal 0, VU.version_compare('1.2.3', '1.2.3')
19
+ assert_equal 0, VU.version_compare('1.2', '1.2')
20
+ assert_equal 0, VU.version_compare('1', '1')
21
+ end
22
22
 
23
- def test_unequal_strings
23
+ def test_unequal_strings
24
24
 
25
- assert_not_equal 0, VU.version_compare('1.0.0', '1.0.1')
26
- assert_not_equal 0, VU.version_compare('1.2.3', '1.3.3')
27
- assert_not_equal 0, VU.version_compare('1.2.3', '1.3')
28
- assert_not_equal 0, VU.version_compare('1.2', '2.2')
29
- assert_not_equal 0, VU.version_compare('1', '2')
30
- assert_not_equal 0, VU.version_compare('1.2.3.4.5.6.7.8.9', '2')
25
+ assert_not_equal 0, VU.version_compare('1.0.0', '1.0.1')
26
+ assert_not_equal 0, VU.version_compare('1.2.3', '1.3.3')
27
+ assert_not_equal 0, VU.version_compare('1.2.3', '1.3')
28
+ assert_not_equal 0, VU.version_compare('1.2', '2.2')
29
+ assert_not_equal 0, VU.version_compare('1', '2')
30
+ assert_not_equal 0, VU.version_compare('1.2.3.4.5.6.7.8.9', '2')
31
31
 
32
- assert VU.version_compare('1.0.0', '1.0.1') < 0
33
- assert VU.version_compare('0.0.9', '1.0.0') < 0
32
+ assert VU.version_compare('1.0.0', '1.0.1') < 0
33
+ assert VU.version_compare('0.0.9', '1.0.0') < 0
34
34
 
35
- assert VU.version_compare('1.0.1', '1.0.0') > 0
36
- assert VU.version_compare('1.0.0', '0.0.9') > 0
37
- end
35
+ assert VU.version_compare('1.0.1', '1.0.0') > 0
36
+ assert VU.version_compare('1.0.0', '0.0.9') > 0
37
+ end
38
38
 
39
- def test_equal_arrays
39
+ def test_equal_arrays
40
40
 
41
- assert_equal 0, VU.version_compare([ 1, 0, 0 ], [ 1, 0, 0 ])
42
- assert_equal 0, VU.version_compare([ 1, 2, 3 ], [ 1, 2, 3 ])
43
- assert_equal 0, VU.version_compare([ 1, 2 ], [ 1, 2 ])
44
- assert_equal 0, VU.version_compare([ 1 ], [ 1 ])
45
- end
41
+ assert_equal 0, VU.version_compare([ 1, 0, 0 ], [ 1, 0, 0 ])
42
+ assert_equal 0, VU.version_compare([ 1, 2, 3 ], [ 1, 2, 3 ])
43
+ assert_equal 0, VU.version_compare([ 1, 2 ], [ 1, 2 ])
44
+ assert_equal 0, VU.version_compare([ 1 ], [ 1 ])
45
+ end
46
46
 
47
- def test_unequal_arrays
47
+ def test_unequal_arrays
48
48
 
49
- assert_not_equal 0, VU.version_compare([ 1, 0, 0 ], [ 1, 0, 1 ])
50
- assert_not_equal 0, VU.version_compare([ 1, 2, 3 ], [ 1, 3, 3 ])
51
- assert_not_equal 0, VU.version_compare([ 1, 2, 3 ], [ 1, 3 ])
52
- assert_not_equal 0, VU.version_compare([ 1, 2 ], [ 2, 2 ])
53
- assert_not_equal 0, VU.version_compare([ 1 ], [ 2 ])
54
- assert_not_equal 0, VU.version_compare([ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ 2 ])
49
+ assert_not_equal 0, VU.version_compare([ 1, 0, 0 ], [ 1, 0, 1 ])
50
+ assert_not_equal 0, VU.version_compare([ 1, 2, 3 ], [ 1, 3, 3 ])
51
+ assert_not_equal 0, VU.version_compare([ 1, 2, 3 ], [ 1, 3 ])
52
+ assert_not_equal 0, VU.version_compare([ 1, 2 ], [ 2, 2 ])
53
+ assert_not_equal 0, VU.version_compare([ 1 ], [ 2 ])
54
+ assert_not_equal 0, VU.version_compare([ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ 2 ])
55
55
 
56
- assert VU.version_compare([ 1, 0, 0 ], [ 1, 0, 1 ]) < 0
57
- assert VU.version_compare([ 0, 0, 9 ], [ 1, 0, 0 ]) < 0
56
+ assert VU.version_compare([ 1, 0, 0 ], [ 1, 0, 1 ]) < 0
57
+ assert VU.version_compare([ 0, 0, 9 ], [ 1, 0, 0 ]) < 0
58
58
 
59
- assert VU.version_compare([ 1, 0, 1 ], [ 1, 0, 0 ]) > 0
60
- assert VU.version_compare([ 1, 0, 0 ], [ 0, 0, 9 ]) > 0
61
- end
59
+ assert VU.version_compare([ 1, 0, 1 ], [ 1, 0, 0 ]) > 0
60
+ assert VU.version_compare([ 1, 0, 0 ], [ 0, 0, 9 ]) > 0
61
+ end
62
62
 
63
63
 
64
- def test_equal_heterogenous_types
64
+ def test_equal_heterogenous_types
65
65
 
66
- assert_equal 0, VU.version_compare('1.0.0', [ 1, 0, 0 ])
67
- assert_equal 0, VU.version_compare([ 1, 0, 0 ], '1.0.0')
66
+ assert_equal 0, VU.version_compare('1.0.0', [ 1, 0, 0 ])
67
+ assert_equal 0, VU.version_compare([ 1, 0, 0 ], '1.0.0')
68
68
 
69
- assert_equal 0, VU.version_compare('1.2.3', [ 1, 2, 3 ])
70
- assert_equal 0, VU.version_compare([ 1, 2, 3 ], '1.2.3')
69
+ assert_equal 0, VU.version_compare('1.2.3', [ 1, 2, 3 ])
70
+ assert_equal 0, VU.version_compare([ 1, 2, 3 ], '1.2.3')
71
71
 
72
- assert_equal 0, VU.version_compare('1.2', [ 1, 2 ])
73
- assert_equal 0, VU.version_compare([ 1, 2 ], '1.2')
72
+ assert_equal 0, VU.version_compare('1.2', [ 1, 2 ])
73
+ assert_equal 0, VU.version_compare([ 1, 2 ], '1.2')
74
74
 
75
- assert_equal 0, VU.version_compare('1', [ 1 ])
76
- assert_equal 0, VU.version_compare([ 1 ], '1')
77
- end
75
+ assert_equal 0, VU.version_compare('1', [ 1 ])
76
+ assert_equal 0, VU.version_compare([ 1 ], '1')
77
+ end
78
78
 
79
79
  end
80
80
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pantheios-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.2
4
+ version: 0.22.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Wilson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-27 00:00:00.000000000 Z
11
+ date: 2026-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xqsr3
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.39.5
19
+ version: 0.39.10
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '1.0'
22
+ version: '1'
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.39.5
29
+ version: 0.39.10
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '1.0'
32
+ version: '1'
33
33
  description: 'A Ruby version of the popular C++ (and .NET) logging API library
34
34
 
35
35
  '