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.
Files changed (76) hide show
  1. data/TODO.txt +18 -2
  2. data/VERSION +1 -1
  3. data/lib/appenders/appender.rb +1 -1
  4. data/lib/appenders/base_appender.rb +18 -20
  5. data/lib/appenders/include.rb +2 -2
  6. data/lib/appenders/types/html_appender.rb +1 -1
  7. data/lib/appenders/types/logger_appender.rb +1 -1
  8. data/lib/appenders/types/xml_appender.rb +1 -1
  9. data/lib/extensions/hash_extensions.rb +41 -19
  10. data/lib/extensions/hash_rule_extensions.rb +4 -0
  11. data/lib/extensions/symbol_extensions.rb +7 -5
  12. data/lib/filters/composite/composite_class_filter.rb +1 -0
  13. data/lib/filters/composite/composite_module_filter.rb +1 -0
  14. data/lib/filters/executor/filter_exec.rb +6 -2
  15. data/lib/filters/filter.rb +12 -17
  16. data/lib/filters/filter_factory.rb +1 -1
  17. data/lib/filters/filter_mappings.rb +4 -2
  18. data/lib/filters/include.rb +4 -8
  19. data/lib/filters/list/list_instance_var_filter.rb +1 -0
  20. data/lib/filters/name_filter.rb +13 -0
  21. data/lib/filters/simple/argument_filter.rb +2 -1
  22. data/lib/filters/simple/class_filter.rb +1 -1
  23. data/lib/filters/simple/instance_var_filter.rb +9 -6
  24. data/lib/filters/simple/method_filter.rb +1 -0
  25. data/lib/filters/simple/module_filter.rb +6 -3
  26. data/lib/rules/rule_match.rb +5 -4
  27. data/lib/targets/file_target.rb +11 -0
  28. data/lib/templates/base_template.rb +11 -12
  29. data/lib/templates/html_template.rb +35 -36
  30. data/lib/templates/string_template.rb +0 -1
  31. data/lib/templates/template_mappings.rb +4 -4
  32. data/lib/templates/xml_template.rb +0 -1
  33. data/lib/trace-util-adv.rb +36 -20
  34. data/lib/trace_calls/trace_ext.rb +4 -17
  35. data/test/action_handler/include.rb +4 -0
  36. data/test/action_handler/test_action_handler.rb +1 -2
  37. data/test/action_handler/test_create_action_handler.rb +6 -9
  38. data/test/appenders/include.rb +4 -0
  39. data/test/appenders/test_appender_templates.rb +57 -0
  40. data/test/appenders/test_create_appender.rb +9 -10
  41. data/test/extensions/include.rb +4 -0
  42. data/test/extensions/test_filters_creation.rb +4 -28
  43. data/test/extensions/test_hash_extensions.rb +44 -47
  44. data/test/extensions/test_hash_filter_extensions.rb +46 -29
  45. data/test/extensions/test_set_context.rb +9 -11
  46. data/test/extensions/test_string_extensions.rb +1 -3
  47. data/test/extensions/test_symbol_extensions.rb +2 -4
  48. data/test/filters/chain/test_filters_chain.rb +1 -51
  49. data/test/filters/composite/test_composite_class_filter.rb +1 -3
  50. data/test/filters/composite/test_composite_module_filter.rb +1 -3
  51. data/test/filters/composite/test_composite_var_filter.rb +8 -11
  52. data/test/filters/executor/test_filter_exec.rb +1 -3
  53. data/test/filters/include.rb +8 -0
  54. data/test/filters/msg_context/test_custom_filters.rb +13 -14
  55. data/test/filters/simple/test_base_filter.rb +8 -6
  56. data/test/filters/simple/test_class_filter.rb +1 -3
  57. data/test/filters/simple/test_instancevar_filter.rb +5 -9
  58. data/test/filters/simple/test_method_filter.rb +4 -9
  59. data/test/filters/simple/test_module_filter.rb +13 -10
  60. data/test/samples/sample_composite_filters.rb +15 -12
  61. data/test/targets/test_create_targets.rb +21 -0
  62. data/test/templates/include.rb +4 -0
  63. data/test/templates/test_create_templates.rb +23 -0
  64. data/test/templates/test_exec_templates.rb +6 -0
  65. data/test/trace_calls/include.rb +4 -0
  66. data/test/trace_calls/test_configure_.rb +17 -14
  67. data/test/trace_calls/tracing/test_html_tracing.rb +2 -3
  68. data/test/trace_calls/tracing/test_logger_tracing.rb +5 -4
  69. data/test/trace_calls/tracing/test_stream_tracing.rb +2 -3
  70. data/test/trace_calls/tracing/test_teamplate_log_tracing.rb +2 -3
  71. data/test/trace_calls/tracing/test_xml_tracing.rb +2 -3
  72. data/trace-util-adv.gemspec +14 -6
  73. metadata +13 -5
  74. data/test/appenders/test_appender_tracers.rb +0 -56
  75. data/test/tracers/test_create_tracers.rb +0 -46
  76. 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
-
@@ -1,11 +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 TestExecuteTracers < Test::Unit::TestCase
8
-
9
-
10
-
11
- end