pantheios-ruby 0.13.4 → 0.20.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +31 -0
- data/README.md +5 -0
- data/examples/simple_logging.md +65 -0
- data/examples/simple_logging.rb +35 -0
- data/lib/pantheios/api.rb +8 -8
- data/lib/pantheios/application_layer/stock_severity_levels.rb +3 -3
- data/lib/pantheios/core.rb +113 -15
- data/lib/pantheios/globals.rb +22 -3
- data/lib/pantheios/services.rb +3 -0
- data/lib/pantheios/services/multiplexing_log_service.rb +239 -0
- data/lib/pantheios/services/null_log_service.rb +2 -2
- data/lib/pantheios/services/simple_console_log_service.rb +7 -6
- data/lib/pantheios/services/simple_file_log_service.rb +230 -0
- data/lib/pantheios/util/process_util.rb +32 -4
- data/lib/pantheios/util/reflection_util.rb +34 -0
- data/lib/pantheios/version.rb +3 -3
- data/test/performance/test_perf_simple_statements.rb +40 -7
- data/test/scratch/log_files/placeholder +0 -0
- data/test/scratch/log_rolling_by_period_daily.rb +43 -0
- data/test/scratch/log_rolling_by_size_and_depth.rb +43 -0
- data/test/scratch/log_using_blocks.rb +8 -1
- data/test/scratch/multiplexing_log_service.rb +109 -0
- data/test/unit/core/tc_core_1.rb +54 -0
- data/test/unit/core/ts_all.rb +12 -0
- data/test/unit/services/tc_multiplexing_log_service.rb +144 -0
- data/test/unit/services/tc_simple_console_log_service.rb +3 -3
- data/test/unit/services/tc_simple_file_log_service.rb +252 -0
- data/test/unit/util/tc_process_util.rb +24 -0
- data/test/unit/util/tc_reflection_util.rb +54 -0
- metadata +33 -21
@@ -0,0 +1,54 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$:.unshift File.join(File.dirname(__FILE__), '../../..', 'lib')
|
4
|
+
|
5
|
+
require 'pantheios/util/reflection_util'
|
6
|
+
|
7
|
+
require 'xqsr3/extensions/test/unit'
|
8
|
+
|
9
|
+
require 'test/unit'
|
10
|
+
|
11
|
+
class Test_ReflectionUtil_set_thread_name < Test::Unit::TestCase
|
12
|
+
|
13
|
+
class Grandparent; end
|
14
|
+
|
15
|
+
class Parent < Grandparent; end
|
16
|
+
|
17
|
+
class Child < Parent; end
|
18
|
+
|
19
|
+
|
20
|
+
class Basic_Grandparent < BasicObject; end
|
21
|
+
|
22
|
+
class Basic_Parent < Basic_Grandparent; end
|
23
|
+
|
24
|
+
class Basic_Child < Basic_Parent; end
|
25
|
+
|
26
|
+
|
27
|
+
RU = ::Pantheios::Util::ReflectionUtil
|
28
|
+
|
29
|
+
def test_non_root_classes_end_cases
|
30
|
+
|
31
|
+
assert_empty RU.non_root_classes(nil)
|
32
|
+
|
33
|
+
assert_empty RU.non_root_classes(::Object)
|
34
|
+
|
35
|
+
assert_equal [ ::Regexp ], RU.non_root_classes(//)
|
36
|
+
|
37
|
+
assert_equal [ ::String ], RU.non_root_classes('')
|
38
|
+
|
39
|
+
assert_equal [ ::String ], RU.non_root_classes(::String)
|
40
|
+
|
41
|
+
assert_equal [ Grandparent ], RU.non_root_classes(Grandparent)
|
42
|
+
|
43
|
+
assert_equal [ Parent, Grandparent ], RU.non_root_classes(Parent)
|
44
|
+
|
45
|
+
assert_equal [ Child, Parent, Grandparent ], RU.non_root_classes(Child)
|
46
|
+
|
47
|
+
assert_equal [ Basic_Grandparent ], RU.non_root_classes(Basic_Grandparent)
|
48
|
+
|
49
|
+
assert_equal [ Basic_Parent, Basic_Grandparent ], RU.non_root_classes(Basic_Parent)
|
50
|
+
|
51
|
+
assert_equal [ Basic_Child, Basic_Parent, Basic_Grandparent ], RU.non_root_classes(Basic_Child)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
metadata
CHANGED
@@ -1,42 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pantheios-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xqsr3
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
20
|
-
- - <
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '1.0'
|
19
|
+
version: '0.31'
|
23
20
|
type: :development
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.21.1
|
30
|
-
- - <
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
33
|
-
description:
|
34
|
-
|
26
|
+
version: '0.31'
|
27
|
+
description: 'A Ruby version of the popular C++ (and .NET) logging API library
|
28
|
+
|
29
|
+
'
|
35
30
|
email: matthew@synesis.com.au
|
36
31
|
executables: []
|
37
32
|
extensions: []
|
38
33
|
extra_rdoc_files: []
|
39
34
|
files:
|
35
|
+
- LICENSE
|
36
|
+
- README.md
|
37
|
+
- examples/simple_logging.md
|
38
|
+
- examples/simple_logging.rb
|
40
39
|
- lib/pantheios.rb
|
41
40
|
- lib/pantheios/api.rb
|
42
41
|
- lib/pantheios/application_layer.rb
|
@@ -44,31 +43,45 @@ files:
|
|
44
43
|
- lib/pantheios/application_layer/stock_severity_levels.rb
|
45
44
|
- lib/pantheios/core.rb
|
46
45
|
- lib/pantheios/globals.rb
|
46
|
+
- lib/pantheios/services.rb
|
47
|
+
- lib/pantheios/services/multiplexing_log_service.rb
|
47
48
|
- lib/pantheios/services/null_log_service.rb
|
48
49
|
- lib/pantheios/services/simple_console_log_service.rb
|
50
|
+
- lib/pantheios/services/simple_file_log_service.rb
|
49
51
|
- lib/pantheios/services/standard_log_service_adapter.rb
|
50
52
|
- lib/pantheios/util.rb
|
51
53
|
- lib/pantheios/util/process_util.rb
|
54
|
+
- lib/pantheios/util/reflection_util.rb
|
52
55
|
- lib/pantheios/util/thread_util.rb
|
53
56
|
- lib/pantheios/util/version_util.rb
|
54
57
|
- lib/pantheios/version.rb
|
55
58
|
- test/performance/test_perf_simple_statements.rb
|
56
59
|
- test/performance/test_perf_trace_variants.rb
|
60
|
+
- test/scratch/log_files/placeholder
|
61
|
+
- test/scratch/log_rolling_by_period_daily.rb
|
62
|
+
- test/scratch/log_rolling_by_size_and_depth.rb
|
57
63
|
- test/scratch/log_using_blocks.rb
|
64
|
+
- test/scratch/multiplexing_log_service.rb
|
58
65
|
- test/unit/application_layer/tc_param_name_list.rb
|
59
66
|
- test/unit/application_layer/tc_stock_severity_levels.rb
|
60
67
|
- test/unit/application_layer/ts_all.rb
|
68
|
+
- test/unit/core/tc_core_1.rb
|
69
|
+
- test/unit/core/ts_all.rb
|
70
|
+
- test/unit/services/tc_multiplexing_log_service.rb
|
61
71
|
- test/unit/services/tc_null_log_service.rb
|
62
72
|
- test/unit/services/tc_simple_console_log_service.rb
|
73
|
+
- test/unit/services/tc_simple_file_log_service.rb
|
63
74
|
- test/unit/services/tc_standard_log_service_adapter.rb
|
64
75
|
- test/unit/services/ts_all.rb
|
65
76
|
- test/unit/ts_all.rb
|
77
|
+
- test/unit/util/tc_process_util.rb
|
78
|
+
- test/unit/util/tc_reflection_util.rb
|
66
79
|
- test/unit/util/tc_thread_util.rb
|
67
80
|
- test/unit/util/tc_version_util.rb
|
68
81
|
- test/unit/util/ts_all.rb
|
69
|
-
homepage: http://
|
82
|
+
homepage: http://github.com/synesissoftware/Pantheios.Ruby
|
70
83
|
licenses:
|
71
|
-
-
|
84
|
+
- BSD-3-Clause
|
72
85
|
metadata: {}
|
73
86
|
post_install_message:
|
74
87
|
rdoc_options: []
|
@@ -76,19 +89,18 @@ require_paths:
|
|
76
89
|
- lib
|
77
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
91
|
requirements:
|
79
|
-
- -
|
92
|
+
- - ">="
|
80
93
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
94
|
+
version: '2'
|
82
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
96
|
requirements:
|
84
|
-
- -
|
97
|
+
- - ">="
|
85
98
|
- !ruby/object:Gem::Version
|
86
99
|
version: '0'
|
87
100
|
requirements: []
|
88
101
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.
|
102
|
+
rubygems_version: 2.5.2.3
|
90
103
|
signing_key:
|
91
104
|
specification_version: 4
|
92
105
|
summary: Pantheios.Ruby
|
93
106
|
test_files: []
|
94
|
-
has_rdoc:
|