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
@@ -16,118 +16,118 @@ require 'stringio'
16
16
 
17
17
  class Test_SimpleConsoleLogservice < Test::Unit::TestCase
18
18
 
19
- include ::Pantheios::Services
19
+ include ::Pantheios::Services
20
20
 
21
- def test_SimpleConsoleLogService_type_exists
21
+ def test_SimpleConsoleLogService_type_exists
22
22
 
23
- assert defined? SimpleConsoleLogService
24
- end
23
+ assert defined? SimpleConsoleLogService
24
+ end
25
25
 
26
- if defined?(SimpleConsoleLogService)
26
+ if defined?(SimpleConsoleLogService)
27
27
 
28
- def self.log_and_get_streams sev, msg, pref = nil, t = nil
28
+ def self.log_and_get_streams sev, msg, pref = nil, t = nil
29
29
 
30
- prev_stdout, prev_stderr = $stdout, $stderr
30
+ prev_stdout, prev_stderr = $stdout, $stderr
31
31
 
32
- begin
32
+ begin
33
33
 
34
- $stdout = StringIO.new
35
- $stderr = StringIO.new
34
+ $stdout = StringIO.new
35
+ $stderr = StringIO.new
36
36
 
37
- svc = SimpleConsoleLogService.new
38
- t ||= Time.now
37
+ svc = SimpleConsoleLogService.new
38
+ t ||= Time.now
39
39
 
40
- svc.log sev, t, pref, msg
40
+ svc.log sev, t, pref, msg
41
41
 
42
- [ $stdout.string, $stderr.string ]
43
- ensure
42
+ [ $stdout.string, $stderr.string ]
43
+ ensure
44
44
 
45
- $stdout, $stderr = prev_stdout, prev_stderr
46
- end
47
- end
45
+ $stdout, $stderr = prev_stdout, prev_stderr
46
+ end
47
+ end
48
48
 
49
- def test_SimpleConsoleLogService_type_is_a_class
49
+ def test_SimpleConsoleLogService_type_is_a_class
50
50
 
51
- assert_kind_of(::Class, SimpleConsoleLogService)
52
- end
51
+ assert_kind_of(::Class, SimpleConsoleLogService)
52
+ end
53
53
 
54
- def test_SimpleConsoleLogService_type_has_expected_instance_methods
54
+ def test_SimpleConsoleLogService_type_has_expected_instance_methods
55
55
 
56
- assert_type_has_instance_methods SimpleConsoleLogService, [ :severity_logged?, :log ]
57
- end
56
+ assert_type_has_instance_methods SimpleConsoleLogService, [ :severity_logged?, :log ]
57
+ end
58
58
 
59
- def test_severity_logged_false_with_large_range_of_integers
59
+ def test_severity_logged_false_with_large_range_of_integers
60
60
 
61
- svc = SimpleConsoleLogService.new
61
+ svc = SimpleConsoleLogService.new
62
62
 
63
- (-10000 .. 10000).each do |sev|
63
+ (-10000 .. 10000).each do |sev|
64
64
 
65
- assert_true(svc.severity_logged?(sev), "severity '#{sev}' (#{sev.class}) was not logged")
66
- end
67
- end
65
+ assert_true(svc.severity_logged?(sev), "severity '#{sev}' (#{sev.class}) was not logged")
66
+ end
67
+ end
68
68
 
69
- def test_severity_logged_false_with_stock_severity_levels
69
+ def test_severity_logged_false_with_stock_severity_levels
70
70
 
71
- svc = SimpleConsoleLogService.new
71
+ svc = SimpleConsoleLogService.new
72
72
 
73
- ::Pantheios::ApplicationLayer::StockSeverityLevels::STOCK_SEVERITY_LEVELS.each do |sev|
73
+ ::Pantheios::ApplicationLayer::StockSeverityLevels::STOCK_SEVERITY_LEVELS.each do |sev|
74
74
 
75
- assert_true(svc.severity_logged?(sev), "severity '#{sev}' (#{sev.class}) was not logged")
76
- end
77
- end
75
+ assert_true(svc.severity_logged?(sev), "severity '#{sev}' (#{sev.class}) was not logged")
76
+ end
77
+ end
78
78
 
79
- def test_log_writes_to_standard_streams
79
+ def test_log_writes_to_standard_streams
80
80
 
81
- prev_stdout, prev_stderr = $stdout, $stderr
81
+ prev_stdout, prev_stderr = $stdout, $stderr
82
82
 
83
- begin
83
+ begin
84
84
 
85
- $stdout = StringIO.new
86
- $stderr = StringIO.new
85
+ $stdout = StringIO.new
86
+ $stderr = StringIO.new
87
87
 
88
- svc = SimpleConsoleLogService.new
89
- t = Time.now
88
+ svc = SimpleConsoleLogService.new
89
+ t = Time.now
90
90
 
91
- (-1000..1000).each do |sev|
91
+ (-1000..1000).each do |sev|
92
92
 
93
- svc.log sev, t, 'some-prefix', 'some-message'
94
- end
93
+ svc.log sev, t, 'some-prefix', 'some-message'
94
+ end
95
95
 
96
- stdout_s = $stdout.string
97
- stderr_s = $stderr.string
96
+ stdout_s = $stdout.string
97
+ stderr_s = $stderr.string
98
98
 
99
- assert_empty stdout_s, "SimpleConsoleLogService has written to $stdout!"
100
- assert_not_empty stderr_s, "SimpleConsoleLogService has not written to $stderr!"
101
- ensure
99
+ assert_empty stdout_s, "SimpleConsoleLogService has written to $stdout!"
100
+ assert_not_empty stderr_s, "SimpleConsoleLogService has not written to $stderr!"
101
+ ensure
102
102
 
103
- $stdout, $stderr = prev_stdout, prev_stderr
104
- end
105
- end
103
+ $stdout, $stderr = prev_stdout, prev_stderr
104
+ end
105
+ end
106
106
 
107
- def test_writing_to_streams_based_on_severities
107
+ def test_writing_to_streams_based_on_severities
108
108
 
109
- r = nil
109
+ r = nil
110
110
 
111
- stderr_levels = %w{ violation emergency alert critical failure warning warn }.map { |s| s.to_sym }
112
- stdout_levels = %w{ notice informational info debug0 debug1 debug2 debug3 debug4 trace }.map { |s| s.to_sym }
111
+ stderr_levels = %w{ violation emergency alert critical failure warning warn }.map { |s| s.to_sym }
112
+ stdout_levels = %w{ notice informational info debug0 debug1 debug2 debug3 debug4 trace }.map { |s| s.to_sym }
113
113
 
114
- stderr_levels.each do |sev|
114
+ stderr_levels.each do |sev|
115
115
 
116
- r = self.class.log_and_get_streams sev, 'msg'
116
+ r = self.class.log_and_get_streams sev, 'msg'
117
117
 
118
- assert_empty r[0], "SimpleConsoleLogService wrote unexpectedly to $stdout for severity #{sev}"
119
- assert_not_empty r[1], "SimpleConsoleLogService failed to write to $stderr for severity #{sev}"
120
- end
118
+ assert_empty r[0], "SimpleConsoleLogService wrote unexpectedly to $stdout for severity #{sev}"
119
+ assert_not_empty r[1], "SimpleConsoleLogService failed to write to $stderr for severity #{sev}"
120
+ end
121
121
 
122
- stdout_levels.each do |sev|
122
+ stdout_levels.each do |sev|
123
123
 
124
- r = self.class.log_and_get_streams sev, 'msg'
124
+ r = self.class.log_and_get_streams sev, 'msg'
125
125
 
126
- assert_empty r[0], "SimpleConsoleLogService wrote to $stdout for severity #{sev}"
127
- assert_not_empty r[1], "SimpleConsoleLogService failed to write to $stderr for severity #{sev}"
128
- end
129
- end
130
- end
126
+ assert_empty r[0], "SimpleConsoleLogService wrote to $stdout for severity #{sev}"
127
+ assert_not_empty r[1], "SimpleConsoleLogService failed to write to $stderr for severity #{sev}"
128
+ end
129
+ end
130
+ end
131
131
  end
132
132
 
133
133
 
@@ -17,236 +17,236 @@ require 'tempfile'
17
17
 
18
18
  class Test_SimpleFileLogservice < Test::Unit::TestCase
19
19
 
20
- include ::Pantheios::Services
20
+ include ::Pantheios::Services
21
21
 
22
- def test_SimpleFileLogService_type_exists
22
+ def test_SimpleFileLogService_type_exists
23
23
 
24
- assert defined? SimpleFileLogService
25
- end
24
+ assert defined? SimpleFileLogService
25
+ end
26
26
 
27
- if defined?(SimpleFileLogService)
27
+ if defined?(SimpleFileLogService)
28
28
 
29
- def self.log_to_StringIO_and_get_output messages, def_sev, def_pref = nil, def_t = nil, **options
29
+ def self.log_to_StringIO_and_get_output messages, def_sev, def_pref = nil, def_t = nil, **options
30
30
 
31
- def_t ||= Time.now
32
- def_pref ||= "[prog, thread, #{def_t}]: "
31
+ def_t ||= Time.now
32
+ def_pref ||= "[prog, thread, #{def_t}]: "
33
33
 
34
- stream = StringIO.new
34
+ stream = StringIO.new
35
35
 
36
- svc = SimpleFileLogService.new stream, **options
36
+ svc = SimpleFileLogService.new stream, **options
37
37
 
38
- messages.each do |message|
38
+ messages.each do |message|
39
39
 
40
- ar = ::Array === message ? message : [ message ]
40
+ ar = ::Array === message ? message : [ message ]
41
41
 
42
- msg = ar[0]
43
- sev = ar[1] || def_sev
44
- pref = ar[2] || def_pref
45
- t = ar[3] || def_t
42
+ msg = ar[0]
43
+ sev = ar[1] || def_sev
44
+ pref = ar[2] || def_pref
45
+ t = ar[3] || def_t
46
46
 
47
- svc.log sev, t, pref, msg
48
- end
47
+ svc.log sev, t, pref, msg
48
+ end
49
49
 
50
- stream.string
51
- end
50
+ stream.string
51
+ end
52
52
 
53
- def self.log_to_Tempfile_and_get_output messages, def_sev, def_pref = nil, def_t = nil, **options
53
+ def self.log_to_Tempfile_and_get_output messages, def_sev, def_pref = nil, def_t = nil, **options
54
54
 
55
- def_t ||= Time.now
56
- def_pref ||= "[prog, thread, #{def_t}]: "
55
+ def_t ||= Time.now
56
+ def_pref ||= "[prog, thread, #{def_t}]: "
57
57
 
58
- tf = Tempfile.new 'Pantheios.Ruby.Tempfile'
58
+ tf = Tempfile.new 'Pantheios.Ruby.Tempfile'
59
59
 
60
- begin
60
+ begin
61
61
 
62
- svc = SimpleFileLogService.new tf, **options
62
+ svc = SimpleFileLogService.new tf, **options
63
63
 
64
- messages.each do |message|
64
+ messages.each do |message|
65
65
 
66
- ar = ::Array === message ? message : [ message ]
66
+ ar = ::Array === message ? message : [ message ]
67
67
 
68
- msg = ar[0]
69
- sev = ar[1] || def_sev
70
- pref = ar[2] || def_pref
71
- t = ar[3] || def_t
68
+ msg = ar[0]
69
+ sev = ar[1] || def_sev
70
+ pref = ar[2] || def_pref
71
+ t = ar[3] || def_t
72
72
 
73
- svc.log sev, t, pref, msg
74
- end
73
+ svc.log sev, t, pref, msg
74
+ end
75
75
 
76
- tf.rewind
76
+ tf.rewind
77
77
 
78
- return tf.read
79
- ensure
78
+ return tf.read
79
+ ensure
80
80
 
81
- tf.close
82
- tf.unlink
83
- end
84
- end
81
+ tf.close
82
+ tf.unlink
83
+ end
84
+ end
85
85
 
86
- def self.log_to_Tempfile_path_and_get_output messages, def_sev, def_pref = nil, def_t = nil, **options
86
+ def self.log_to_Tempfile_path_and_get_output messages, def_sev, def_pref = nil, def_t = nil, **options
87
87
 
88
- def_t ||= Time.now
89
- def_pref ||= "[prog, thread, #{def_t}]: "
88
+ def_t ||= Time.now
89
+ def_pref ||= "[prog, thread, #{def_t}]: "
90
90
 
91
- tf = Tempfile.new 'Pantheios.Ruby.Tempfile'
91
+ tf = Tempfile.new 'Pantheios.Ruby.Tempfile'
92
92
 
93
- begin
93
+ begin
94
94
 
95
- svc = SimpleFileLogService.new tf.path, **options
95
+ svc = SimpleFileLogService.new tf.path, **options
96
96
 
97
- messages.each do |message|
97
+ messages.each do |message|
98
98
 
99
- ar = ::Array === message ? message : [ message ]
99
+ ar = ::Array === message ? message : [ message ]
100
100
 
101
- msg = ar[0]
102
- sev = ar[1] || def_sev
103
- pref = ar[2] || def_pref
104
- t = ar[3] || def_t
101
+ msg = ar[0]
102
+ sev = ar[1] || def_sev
103
+ pref = ar[2] || def_pref
104
+ t = ar[3] || def_t
105
105
 
106
- svc.log sev, t, pref, msg
107
- end
106
+ svc.log sev, t, pref, msg
107
+ end
108
108
 
109
- tf.rewind
109
+ tf.rewind
110
110
 
111
- return tf.read
112
- ensure
111
+ return tf.read
112
+ ensure
113
113
 
114
- tf.close
115
- tf.unlink
116
- end
117
- end
114
+ tf.close
115
+ tf.unlink
116
+ end
117
+ end
118
118
 
119
- def test_SimpleFileLogService_type_is_a_class
119
+ def test_SimpleFileLogService_type_is_a_class
120
120
 
121
- assert_kind_of(::Class, SimpleFileLogService)
122
- end
121
+ assert_kind_of(::Class, SimpleFileLogService)
122
+ end
123
123
 
124
- def test_SimpleFileLogService_type_has_expected_instance_methods
124
+ def test_SimpleFileLogService_type_has_expected_instance_methods
125
125
 
126
- assert_type_has_instance_methods SimpleFileLogService, [ :severity_logged?, :log ]
127
- end
126
+ assert_type_has_instance_methods SimpleFileLogService, [ :severity_logged?, :log ]
127
+ end
128
128
 
129
- def test_ctor_failures_with_invalid_log_file_or_path
129
+ def test_ctor_failures_with_invalid_log_file_or_path
130
130
 
131
- assert_raise_with_message(::ArgumentError, /log_file_or_path.*not.*nil/) { SimpleFileLogService.new nil }
131
+ assert_raise_with_message(::ArgumentError, /log_file_or_path.*not.*nil/) { SimpleFileLogService.new nil }
132
132
 
133
- assert_raise_with_message(::TypeError, [ /log_file_or_path.*must be/, /::File/, /::IO/, /::String/, /::StringIO/ ]) { SimpleFileLogService.new // }
134
- end
133
+ assert_raise_with_message(::TypeError, [ /log_file_or_path.*must be/, /::File/, /::IO/, /::String/, /::StringIO/ ]) { SimpleFileLogService.new(//) }
134
+ end
135
135
 
136
- def test_ctor_failures_with_invalid_options
136
+ def test_ctor_failures_with_invalid_options
137
137
 
138
- assert_raise_with_message(::ArgumentError, /:roll_depth.*non.*negative.*integer/) { SimpleFileLogService.new '/dev/null', roll_depth: true }
139
- assert_raise_with_message(::ArgumentError, /:roll_depth.*non.*negative.*integer/) { SimpleFileLogService.new '/dev/null', roll_depth: -1 }
138
+ assert_raise_with_message(::ArgumentError, /:roll_depth.*non.*negative.*integer/) { SimpleFileLogService.new '/dev/null', roll_depth: true }
139
+ assert_raise_with_message(::ArgumentError, /:roll_depth.*non.*negative.*integer/) { SimpleFileLogService.new '/dev/null', roll_depth: -1 }
140
140
 
141
- assert_raise_with_message(::ArgumentError, /:roll_size.*non.*negative.*integer/) { SimpleFileLogService.new '/dev/null', roll_size: true }
142
- assert_raise_with_message(::ArgumentError, /:roll_size.*non.*negative.*integer/) { SimpleFileLogService.new '/dev/null', roll_size: -1 }
143
- end
141
+ assert_raise_with_message(::ArgumentError, /:roll_size.*non.*negative.*integer/) { SimpleFileLogService.new '/dev/null', roll_size: true }
142
+ assert_raise_with_message(::ArgumentError, /:roll_size.*non.*negative.*integer/) { SimpleFileLogService.new '/dev/null', roll_size: -1 }
143
+ end
144
144
 
145
- def test_severity_logged_false_with_large_range_of_integers
145
+ def test_severity_logged_false_with_large_range_of_integers
146
146
 
147
- output = StringIO.new
147
+ output = StringIO.new
148
148
 
149
- svc = SimpleFileLogService.new output
149
+ svc = SimpleFileLogService.new output
150
150
 
151
- (-10000 .. 10000).each do |sev|
151
+ (-10000 .. 10000).each do |sev|
152
152
 
153
- assert_true(svc.severity_logged?(sev), "severity '#{sev}' (#{sev.class}) was not logged")
154
- end
155
- end
153
+ assert_true(svc.severity_logged?(sev), "severity '#{sev}' (#{sev.class}) was not logged")
154
+ end
155
+ end
156
156
 
157
- def test_simple_logging_with_StringIO_1
157
+ def test_simple_logging_with_StringIO_1
158
158
 
159
- message = 'msg'
159
+ message = 'msg'
160
160
 
161
- output = self.class.log_to_StringIO_and_get_output [ message ], :notice, nil, nil
161
+ output = self.class.log_to_StringIO_and_get_output [ message ], :notice, nil, nil
162
162
 
163
- lines = output.split /\n/
163
+ lines = output.split(/\n/)
164
164
 
165
- assert_not_empty lines
166
- assert_equal 1, lines.size
167
- assert_match /msg$/, lines[0]
168
- end
165
+ assert_not_empty lines
166
+ assert_equal 1, lines.size
167
+ assert_match(/msg$/, lines[0])
168
+ end
169
169
 
170
- def test_simple_logging_with_StringIO_2
170
+ def test_simple_logging_with_StringIO_2
171
171
 
172
- msgs = [
172
+ msgs = [
173
173
 
174
- [ 'msg-1' ],
175
- [ 'msg-2' ],
176
- ]
174
+ [ 'msg-1' ],
175
+ [ 'msg-2' ],
176
+ ]
177
177
 
178
- output = self.class.log_to_StringIO_and_get_output msgs, :notice, nil, nil
178
+ output = self.class.log_to_StringIO_and_get_output msgs, :notice, nil, nil
179
179
 
180
- lines = output.split /\n/
180
+ lines = output.split(/\n/)
181
181
 
182
- assert_not_empty lines
183
- assert_equal 2, lines.size
184
- assert_match /msg-1$/, lines[0]
185
- assert_match /msg-2$/, lines[1]
186
- end
182
+ assert_not_empty lines
183
+ assert_equal 2, lines.size
184
+ assert_match(/msg-1$/, lines[0])
185
+ assert_match(/msg-2$/, lines[1])
186
+ end
187
187
 
188
- def test_simple_logging_with_Tempfile_1
188
+ def test_simple_logging_with_Tempfile_1
189
189
 
190
- message = 'msg'
190
+ message = 'msg'
191
191
 
192
- output = self.class.log_to_Tempfile_and_get_output [ message ], :notice, nil, nil
192
+ output = self.class.log_to_Tempfile_and_get_output [ message ], :notice, nil, nil
193
193
 
194
- lines = output.split /\n/
194
+ lines = output.split(/\n/)
195
195
 
196
- assert_not_empty lines
197
- assert_equal 1, lines.size
198
- assert_match /msg$/, lines[0]
199
- end
196
+ assert_not_empty lines
197
+ assert_equal 1, lines.size
198
+ assert_match(/msg$/, lines[0])
199
+ end
200
200
 
201
- def test_simple_logging_with_Tempfile_2
201
+ def test_simple_logging_with_Tempfile_2
202
202
 
203
- msgs = [
203
+ msgs = [
204
204
 
205
- [ 'msg-1' ],
206
- [ 'msg-2' ],
207
- ]
205
+ [ 'msg-1' ],
206
+ [ 'msg-2' ],
207
+ ]
208
208
 
209
- output = self.class.log_to_Tempfile_and_get_output msgs, :notice, nil, nil
209
+ output = self.class.log_to_Tempfile_and_get_output msgs, :notice, nil, nil
210
210
 
211
- lines = output.split /\n/
211
+ lines = output.split(/\n/)
212
212
 
213
- assert_not_empty lines
214
- assert_equal 2, lines.size
215
- assert_match /msg-1$/, lines[0]
216
- assert_match /msg-2$/, lines[1]
217
- end
213
+ assert_not_empty lines
214
+ assert_equal 2, lines.size
215
+ assert_match(/msg-1$/, lines[0])
216
+ assert_match(/msg-2$/, lines[1])
217
+ end
218
218
 
219
- def test_simple_logging_with_Tempfile_path_1
219
+ def test_simple_logging_with_Tempfile_path_1
220
220
 
221
- message = 'msg'
221
+ message = 'msg'
222
222
 
223
- output = self.class.log_to_Tempfile_path_and_get_output [ message ], :notice, nil, nil
223
+ output = self.class.log_to_Tempfile_path_and_get_output [ message ], :notice, nil, nil
224
224
 
225
- lines = output.split /\n/
225
+ lines = output.split(/\n/)
226
226
 
227
- assert_not_empty lines
228
- assert_equal 1, lines.size
229
- assert_match /msg$/, lines[0]
230
- end
227
+ assert_not_empty lines
228
+ assert_equal 1, lines.size
229
+ assert_match(/msg$/, lines[0])
230
+ end
231
231
 
232
- def test_simple_logging_with_Tempfile_path_2
232
+ def test_simple_logging_with_Tempfile_path_2
233
233
 
234
- msgs = [
234
+ msgs = [
235
235
 
236
- [ 'msg-1' ],
237
- [ 'msg-2' ],
238
- ]
236
+ [ 'msg-1' ],
237
+ [ 'msg-2' ],
238
+ ]
239
239
 
240
- output = self.class.log_to_Tempfile_path_and_get_output msgs, :notice, nil, nil
240
+ output = self.class.log_to_Tempfile_path_and_get_output msgs, :notice, nil, nil
241
241
 
242
- lines = output.split /\n/
242
+ lines = output.split(/\n/)
243
243
 
244
- assert_not_empty lines
245
- assert_equal 2, lines.size
246
- assert_match /msg-1$/, lines[0]
247
- assert_match /msg-2$/, lines[1]
248
- end
249
- end
244
+ assert_not_empty lines
245
+ assert_equal 2, lines.size
246
+ assert_match(/msg-1$/, lines[0])
247
+ assert_match(/msg-2$/, lines[1])
248
+ end
249
+ end
250
250
  end
251
251
 
252
252