trace-util-adv 0.2.4 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/TODO.txt +18 -2
- data/VERSION +1 -1
- data/lib/appenders/appender.rb +1 -1
- data/lib/appenders/base_appender.rb +18 -20
- data/lib/appenders/include.rb +2 -2
- data/lib/appenders/types/html_appender.rb +1 -1
- data/lib/appenders/types/logger_appender.rb +1 -1
- data/lib/appenders/types/xml_appender.rb +1 -1
- data/lib/extensions/hash_extensions.rb +41 -19
- data/lib/extensions/hash_rule_extensions.rb +4 -0
- data/lib/extensions/symbol_extensions.rb +7 -5
- data/lib/filters/composite/composite_class_filter.rb +1 -0
- data/lib/filters/composite/composite_module_filter.rb +1 -0
- data/lib/filters/executor/filter_exec.rb +6 -2
- data/lib/filters/filter.rb +12 -17
- data/lib/filters/filter_factory.rb +1 -1
- data/lib/filters/filter_mappings.rb +4 -2
- data/lib/filters/include.rb +4 -8
- data/lib/filters/list/list_instance_var_filter.rb +1 -0
- data/lib/filters/name_filter.rb +13 -0
- data/lib/filters/simple/argument_filter.rb +2 -1
- data/lib/filters/simple/class_filter.rb +1 -1
- data/lib/filters/simple/instance_var_filter.rb +9 -6
- data/lib/filters/simple/method_filter.rb +1 -0
- data/lib/filters/simple/module_filter.rb +6 -3
- data/lib/rules/rule_match.rb +5 -4
- data/lib/targets/file_target.rb +11 -0
- data/lib/templates/base_template.rb +11 -12
- data/lib/templates/html_template.rb +35 -36
- data/lib/templates/string_template.rb +0 -1
- data/lib/templates/template_mappings.rb +4 -4
- data/lib/templates/xml_template.rb +0 -1
- data/lib/trace-util-adv.rb +36 -20
- data/lib/trace_calls/trace_ext.rb +4 -17
- data/test/action_handler/include.rb +4 -0
- data/test/action_handler/test_action_handler.rb +1 -2
- data/test/action_handler/test_create_action_handler.rb +6 -9
- data/test/appenders/include.rb +4 -0
- data/test/appenders/test_appender_templates.rb +57 -0
- data/test/appenders/test_create_appender.rb +9 -10
- data/test/extensions/include.rb +4 -0
- data/test/extensions/test_filters_creation.rb +4 -28
- data/test/extensions/test_hash_extensions.rb +44 -47
- data/test/extensions/test_hash_filter_extensions.rb +46 -29
- data/test/extensions/test_set_context.rb +9 -11
- data/test/extensions/test_string_extensions.rb +1 -3
- data/test/extensions/test_symbol_extensions.rb +2 -4
- data/test/filters/chain/test_filters_chain.rb +1 -51
- data/test/filters/composite/test_composite_class_filter.rb +1 -3
- data/test/filters/composite/test_composite_module_filter.rb +1 -3
- data/test/filters/composite/test_composite_var_filter.rb +8 -11
- data/test/filters/executor/test_filter_exec.rb +1 -3
- data/test/filters/include.rb +8 -0
- data/test/filters/msg_context/test_custom_filters.rb +13 -14
- data/test/filters/simple/test_base_filter.rb +8 -6
- data/test/filters/simple/test_class_filter.rb +1 -3
- data/test/filters/simple/test_instancevar_filter.rb +5 -9
- data/test/filters/simple/test_method_filter.rb +4 -9
- data/test/filters/simple/test_module_filter.rb +13 -10
- data/test/samples/sample_composite_filters.rb +15 -12
- data/test/targets/test_create_targets.rb +21 -0
- data/test/templates/include.rb +4 -0
- data/test/templates/test_create_templates.rb +23 -0
- data/test/templates/test_exec_templates.rb +6 -0
- data/test/trace_calls/include.rb +4 -0
- data/test/trace_calls/test_configure_.rb +17 -14
- data/test/trace_calls/tracing/test_html_tracing.rb +2 -3
- data/test/trace_calls/tracing/test_logger_tracing.rb +5 -4
- data/test/trace_calls/tracing/test_stream_tracing.rb +2 -3
- data/test/trace_calls/tracing/test_teamplate_log_tracing.rb +2 -3
- data/test/trace_calls/tracing/test_xml_tracing.rb +2 -3
- data/trace-util-adv.gemspec +14 -6
- metadata +13 -5
- data/test/appenders/test_appender_tracers.rb +0 -56
- data/test/tracers/test_create_tracers.rb +0 -46
- data/test/tracers/test_exec_tracers.rb +0 -11
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'extensions/core_extensions'
|
2
|
-
require 'filters/base_filters'
|
3
|
-
require 'rules/hash_rule_extensions'
|
4
|
-
require "test/unit"
|
5
|
-
|
6
|
-
|
7
|
-
class TestCreateTracers < Test::Unit::TestCase
|
8
|
-
|
9
|
-
def test_tracer
|
10
|
-
rule = {:tracer => :html}
|
11
|
-
result = rule.tracer
|
12
|
-
assert_equal result.class, Tracing::OutputTemplate::HtmlTrace, "Should result in HtmlTrace"
|
13
|
-
|
14
|
-
rule = {:tracer => :xml}
|
15
|
-
result = rule.tracer
|
16
|
-
assert_equal result.class, Tracing::OutputTemplate::XmlTrace, "Should result in XmlTrace"
|
17
|
-
|
18
|
-
rule = {:tracer => :string}
|
19
|
-
result = rule.tracer
|
20
|
-
assert_equal result.class, Tracing::OutputTemplate::StringTrace, "Should result in StringTrace"
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_create_xml_tracer
|
24
|
-
xml_tracer = {:type => :xml, :to_file => 'log_files/xml/traced.xml'}.tracer
|
25
|
-
assert_equal Tracing::XmlTracer, xml_tracer.class, "Should create instance of XmlTracer"
|
26
|
-
end
|
27
|
-
|
28
|
-
def test_create_html_tracer
|
29
|
-
html_tracer = {:type => :html, :default_path => 'log_files/html'}.tracer
|
30
|
-
assert_equal Tracing::HtmlTracer, html_tracer.class, "Should create instance of HtmlTracer"
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_create_log_tracer
|
34
|
-
log_tracer = {:type => :log, :default_path => 'log_files'}.tracer
|
35
|
-
assert_equal Tracing::LogTracer, log_tracer.class, "Should create instance of LogTracer"
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_create_log_tracer
|
39
|
-
stream_tracer = {:type => :stream, :stream => :STDOUT}.tracer
|
40
|
-
assert_equal Tracing::StreamTracer, log_tracer.class, "Should create instance of StreamTracer"
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
|
46
|
-
|