riess 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/Getting_started_example.rb +17 -0
- data/lib/actions.rb +53 -0
- data/lib/checks.rb +39 -0
- data/lib/exceptions.rb +12 -0
- data/lib/finders.rb +129 -0
- data/lib/helpers.rb +115 -0
- data/lib/html_action_modules.rb +88 -0
- data/lib/html_check_modules.rb +161 -0
- data/lib/html_object_factory.rb +33 -0
- data/lib/html_objects.rb +57 -0
- data/lib/ieparser_extension.rb +416 -0
- data/lib/key_codes.rb +123 -0
- data/lib/popup.rb +57 -0
- data/lib/riess.rb +111 -0
- data/lib/test_reporter.rb +113 -0
- data/riess_stable_testing_release_1-0.0.8.gemspec +22 -0
- data/vendor/log4r-1.0.5/doc/contact.html +166 -0
- data/vendor/log4r-1.0.5/doc/contribute.html +165 -0
- data/vendor/log4r-1.0.5/doc/images/crush/logo2.png +0 -0
- data/vendor/log4r-1.0.5/doc/images/log4r-logo.png +0 -0
- data/vendor/log4r-1.0.5/doc/images/logo2.png +0 -0
- data/vendor/log4r-1.0.5/doc/index.html +228 -0
- data/vendor/log4r-1.0.5/doc/license.html +200 -0
- data/vendor/log4r-1.0.5/doc/log4r.css +111 -0
- data/vendor/log4r-1.0.5/doc/manual.html +593 -0
- data/vendor/log4r-1.0.5/doc/rdoc/blank.html +2 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r.html +105 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/BasicFormatter.html +133 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/BasicFormatter.src/M000073.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/BasicFormatter.src/M000074.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/BasicFormatter.src/M000075.html +25 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/ConfigError.html +60 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.html +151 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000003.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000004.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000005.html +25 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000006.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000007.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/DateFileOutputter.html +84 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/DateFileOutputter.src/M000010.html +33 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/DefaultFormatter.html +62 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/EmailOutputter.html +123 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/EmailOutputter.src/M000047.html +32 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/EmailOutputter.src/M000048.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/FileOutputter.html +99 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/FileOutputter.src/M000011.html +45 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Formatter.html +91 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Formatter.src/M000076.html +17 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Formatter.src/M000077.html +17 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/IOOutputter.html +112 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/IOOutputter.src/M000049.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/IOOutputter.src/M000050.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/IOOutputter.src/M000051.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.html +116 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.src/M000032.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.src/M000033.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.src/M000034.html +24 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.src/M000035.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogEvent.html +132 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogEvent.src/M000001.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogServer.html +103 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogServer.src/M000044.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogServer.src/M000045.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.html +341 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000052.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000053.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000054.html +20 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000055.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000056.html +20 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000057.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000058.html +20 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000059.html +30 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000060.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000061.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000062.html +24 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000063.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000064.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000065.html +29 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000066.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000067.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000068.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/ObjectFormatter.html +85 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/ObjectFormatter.src/M000009.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.html +229 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000015.html +25 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000016.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000017.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000018.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000019.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000020.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000021.html +23 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000022.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000023.html +26 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000024.html +29 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000025.html +17 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/PatternFormatter.html +120 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/PatternFormatter.src/M000046.html +23 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RemoteOutputter.html +104 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RemoteOutputter.src/M000012.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RemoteOutputter.src/M000013.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RemoteOutputter.src/M000014.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RollingFileOutputter.html +111 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RollingFileOutputter.src/M000069.html +45 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.html +173 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000036.html +23 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000037.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000038.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000039.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000040.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000041.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000042.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000043.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SimpleFormatter.html +83 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SimpleFormatter.src/M000026.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/StderrOutputter.html +76 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/StderrOutputter.src/M000002.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/StdoutOutputter.html +76 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/StdoutOutputter.src/M000008.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SyslogOutputter.html +111 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SyslogOutputter.src/M000070.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SyslogOutputter.src/M000071.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SyslogOutputter.src/M000072.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.html +128 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000027.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000028.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000029.html +25 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000030.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000031.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/created.rid +1 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/configurator_rb.html +402 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/formatter/formatter_rb.html +152 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/formatter/patternformatter_rb.html +266 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/logger_rb.html +320 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/logserver_rb.html +191 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/outputter/datefileoutputter_rb.html +120 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/outputter/emailoutputter_rb.html +205 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/outputter/outputter_rb.html +254 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/outputter/syslogoutputter_rb.html +135 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/yamlconfigurator_rb.html +120 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r_rb.html +228 -0
- data/vendor/log4r-1.0.5/doc/rdoc/fr_class_index.html +59 -0
- data/vendor/log4r-1.0.5/doc/rdoc/fr_file_index.html +45 -0
- data/vendor/log4r-1.0.5/doc/rdoc/fr_method_index.html +111 -0
- data/vendor/log4r-1.0.5/doc/rdoc/index.html +26 -0
- data/vendor/log4r-1.0.5/doc/rdoc/rdoc-style.css +79 -0
- data/vendor/log4r-1.0.5/examples/README +19 -0
- data/vendor/log4r-1.0.5/examples/customlevels.rb +34 -0
- data/vendor/log4r-1.0.5/examples/fileroll.rb +40 -0
- data/vendor/log4r-1.0.5/examples/log4r_yaml.yaml +0 -0
- data/vendor/log4r-1.0.5/examples/logclient.rb +25 -0
- data/vendor/log4r-1.0.5/examples/logserver.rb +18 -0
- data/vendor/log4r-1.0.5/examples/moderate.xml +29 -0
- data/vendor/log4r-1.0.5/examples/moderateconfig.rb +66 -0
- data/vendor/log4r-1.0.5/examples/myformatter.rb +23 -0
- data/vendor/log4r-1.0.5/examples/outofthebox.rb +21 -0
- data/vendor/log4r-1.0.5/examples/rrconfig.xml +63 -0
- data/vendor/log4r-1.0.5/examples/rrsetup.rb +42 -0
- data/vendor/log4r-1.0.5/examples/simpleconfig.rb +39 -0
- data/vendor/log4r-1.0.5/examples/xmlconfig.rb +25 -0
- data/vendor/log4r-1.0.5/examples/yaml.rb +30 -0
- data/vendor/log4r-1.0.5/src/log4r.rb +20 -0
- data/vendor/log4r-1.0.5/src/log4r/base.rb +74 -0
- data/vendor/log4r-1.0.5/src/log4r/config.rb +9 -0
- data/vendor/log4r-1.0.5/src/log4r/configurator.rb +224 -0
- data/vendor/log4r-1.0.5/src/log4r/formatter/formatter.rb +105 -0
- data/vendor/log4r-1.0.5/src/log4r/formatter/patternformatter.rb +108 -0
- data/vendor/log4r-1.0.5/src/log4r/lib/drbloader.rb +52 -0
- data/vendor/log4r-1.0.5/src/log4r/lib/xmlloader.rb +24 -0
- data/vendor/log4r-1.0.5/src/log4r/logevent.rb +28 -0
- data/vendor/log4r-1.0.5/src/log4r/logger.rb +194 -0
- data/vendor/log4r-1.0.5/src/log4r/loggerfactory.rb +89 -0
- data/vendor/log4r-1.0.5/src/log4r/logserver.rb +28 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/consoleoutputters.rb +18 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/datefileoutputter.rb +110 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/emailoutputter.rb +115 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/fileoutputter.rb +49 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/iooutputter.rb +55 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/outputter.rb +132 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/outputterfactory.rb +59 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/remoteoutputter.rb +40 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/rollingfileoutputter.rb +126 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/staticoutputter.rb +30 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/syslogoutputter.rb +75 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/configurator +243 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/emailoutputter +103 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/formatter +39 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/log4r +89 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/logger +175 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/logserver +85 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/outputter +108 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/patternformatter +128 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/syslogoutputter +29 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/yamlconfigurator +20 -0
- data/vendor/log4r-1.0.5/src/log4r/repository.rb +65 -0
- data/vendor/log4r-1.0.5/src/log4r/staticlogger.rb +49 -0
- data/vendor/log4r-1.0.5/src/log4r/yamlconfigurator.rb +0 -0
- data/vendor/log4r-1.0.5/tests/include.rb +7 -0
- data/vendor/log4r-1.0.5/tests/runtest.rb +6 -0
- data/vendor/log4r-1.0.5/tests/testbase.rb +45 -0
- data/vendor/log4r-1.0.5/tests/testcustom.rb +33 -0
- data/vendor/log4r-1.0.5/tests/testdefault.rb +25 -0
- data/vendor/log4r-1.0.5/tests/testformatter.rb +29 -0
- data/vendor/log4r-1.0.5/tests/testlogger.rb +198 -0
- data/vendor/log4r-1.0.5/tests/testoutputter.rb +112 -0
- data/vendor/log4r-1.0.5/tests/testpatternformatter.rb +26 -0
- data/vendor/log4r-1.0.5/tests/testxmlconf.rb +51 -0
- data/vendor/log4r-1.0.5/tests/xml/testconf.xml +37 -0
- data/vendor/rspec-0.8.2/CHANGES +575 -0
- data/vendor/rspec-0.8.2/EXAMPLES.rd +81 -0
- data/vendor/rspec-0.8.2/MIT-LICENSE +20 -0
- data/vendor/rspec-0.8.2/README +57 -0
- data/vendor/rspec-0.8.2/RELEASE-PLAN +117 -0
- data/vendor/rspec-0.8.2/Rakefile +223 -0
- data/vendor/rspec-0.8.2/bin/spec +4 -0
- data/vendor/rspec-0.8.2/examples/auto_spec_name_generation_example.rb +18 -0
- data/vendor/rspec-0.8.2/examples/custom_expectation_matchers.rb +53 -0
- data/vendor/rspec-0.8.2/examples/custom_formatter.rb +11 -0
- data/vendor/rspec-0.8.2/examples/dynamic_spec.rb +9 -0
- data/vendor/rspec-0.8.2/examples/file_accessor.rb +18 -0
- data/vendor/rspec-0.8.2/examples/file_accessor_spec.rb +38 -0
- data/vendor/rspec-0.8.2/examples/greeter_spec.rb +30 -0
- data/vendor/rspec-0.8.2/examples/helper_method_example.rb +11 -0
- data/vendor/rspec-0.8.2/examples/io_processor.rb +8 -0
- data/vendor/rspec-0.8.2/examples/io_processor_spec.rb +21 -0
- data/vendor/rspec-0.8.2/examples/mocking_example.rb +27 -0
- data/vendor/rspec-0.8.2/examples/partial_mock_example.rb +28 -0
- data/vendor/rspec-0.8.2/examples/predicate_example.rb +27 -0
- data/vendor/rspec-0.8.2/examples/setup_teardown_example.rb +34 -0
- data/vendor/rspec-0.8.2/examples/spec_helper.rb +1 -0
- data/vendor/rspec-0.8.2/examples/stack.rb +36 -0
- data/vendor/rspec-0.8.2/examples/stack_spec.rb +113 -0
- data/vendor/rspec-0.8.2/examples/stubbing_example.rb +69 -0
- data/vendor/rspec-0.8.2/examples/test_case_spec.rb +63 -0
- data/vendor/rspec-0.8.2/lib/spec.rb +11 -0
- data/vendor/rspec-0.8.2/lib/spec/callback.rb +11 -0
- data/vendor/rspec-0.8.2/lib/spec/callback/callback_container.rb +60 -0
- data/vendor/rspec-0.8.2/lib/spec/callback/extensions/module.rb +24 -0
- data/vendor/rspec-0.8.2/lib/spec/callback/extensions/object.rb +37 -0
- data/vendor/rspec-0.8.2/lib/spec/deprecated.rb +3 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations.rb +59 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/differs/default.rb +62 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/errors.rb +6 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/extensions.rb +3 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/extensions/object.rb +109 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/extensions/proc.rb +57 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/extensions/string_and_symbol.rb +17 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/handler.rb +47 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should.rb +5 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/base.rb +64 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/change.rb +69 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/have.rb +128 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/not.rb +74 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/should.rb +81 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/sugar.rb +47 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers.rb +160 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/be.rb +161 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/be_close.rb +37 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/change.rb +120 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/eql.rb +43 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/equal.rb +43 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/has.rb +44 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/have.rb +140 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/include.rb +50 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/match.rb +41 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/raise_error.rb +100 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/respond_to.rb +35 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/satisfy.rb +47 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/throw_symbol.rb +75 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks.rb +232 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/argument_expectation.rb +132 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/error_generator.rb +85 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/errors.rb +10 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/extensions/object.rb +3 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/message_expectation.rb +231 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/methods.rb +40 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/mock.rb +26 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/mock_handler.rb +166 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/order_group.rb +29 -0
- data/vendor/rspec-0.8.2/lib/spec/rake/spectask.rb +173 -0
- data/vendor/rspec-0.8.2/lib/spec/rake/verify_rcov.rb +47 -0
- data/vendor/rspec-0.8.2/lib/spec/runner.rb +132 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/backtrace_tweaker.rb +55 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/command_line.rb +34 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/context.rb +154 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/context_eval.rb +142 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/context_runner.rb +55 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/drb_command_line.rb +21 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/execution_context.rb +17 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/extensions/kernel.rb +17 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/extensions/object.rb +32 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter.rb +5 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/base_text_formatter.rb +118 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/html_formatter.rb +219 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/progress_bar_formatter.rb +27 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/rdoc_formatter.rb +22 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/specdoc_formatter.rb +23 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/heckle_runner.rb +71 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/heckle_runner_win.rb +10 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/option_parser.rb +224 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/reporter.rb +105 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/spec_matcher.rb +25 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/spec_parser.rb +41 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/spec_should_raise_handler.rb +74 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/specification.rb +114 -0
- data/vendor/rspec-0.8.2/lib/spec/translator.rb +87 -0
- data/vendor/rspec-0.8.2/lib/spec/version.rb +30 -0
- data/vendor/rspec-0.8.2/spec/spec/callback/callback_container_spec.rb +27 -0
- data/vendor/rspec-0.8.2/spec/spec/callback/module_spec.rb +37 -0
- data/vendor/rspec-0.8.2/spec/spec/callback/object_spec.rb +90 -0
- data/vendor/rspec-0.8.2/spec/spec/callback/object_with_class_callback_spec.rb +19 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/differs/default_spec.rb +107 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/extensions/object_spec.rb +46 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/fail_with_spec.rb +71 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_==_spec.rb +19 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_=~_spec.rb +13 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_a_kind_of_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_an_instance_of_spec.rb +30 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_arbitrary_predicate_spec.rb +81 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_close_spec.rb +18 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_comparison_operator_spec.rb +44 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_false_spec.rb +39 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_true_spec.rb +27 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_change_spec.rb +184 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_eql_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_equal_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_have_at_least_spec.rb +53 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_have_at_most_spec.rb +45 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_have_key_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_have_spec.rb +64 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_include_spec.rb +59 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_match_spec.rb +25 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_==_spec.rb +15 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_be_a_kind_of_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_be_an_instance_of_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_be_arbitrary_predicate_spec.rb +68 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_be_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_change_spec.rb +24 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_eql_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_equal_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_have_key_spec.rb +15 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_include_spec.rb +58 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_match_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_raise_spec.rb +75 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_respond_to_spec.rb +15 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_throw_spec.rb +35 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_raise_spec.rb +66 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_respond_to_spec.rb +15 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_satisfy_spec.rb +35 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_throw_spec.rb +27 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/be_close_spec.rb +33 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/be_spec.rb +182 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/change_spec.rb +232 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/description_generation_spec.rb +147 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/eql_spec.rb +41 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/equal_spec.rb +41 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/handler_spec.rb +75 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/has_spec.rb +37 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/have_spec.rb +259 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/include_spec.rb +33 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/match_spec.rb +37 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/matcher_methods_spec.rb +85 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/raise_error_spec.rb +147 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/respond_to_spec.rb +30 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/satisfy_spec.rb +36 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/throw_symbol_spec.rb +59 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/any_number_of_times_spec.rb +34 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/argument_expectation_spec.rb +19 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/at_least_spec.rb +97 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/at_most_spec.rb +97 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/bug_report_7611_spec.rb +19 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/bug_report_7805_spec.rb +22 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/bug_report_8302_spec.rb +26 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +74 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/mock_ordering_spec.rb +80 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/mock_spec.rb +407 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/multiple_return_value_spec.rb +113 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/null_object_mock_spec.rb +40 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/once_counts_spec.rb +56 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/options_hash_spec.rb +31 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/partial_mock_spec.rb +52 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +64 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +92 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/precise_counts_spec.rb +56 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/record_messages_spec.rb +26 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/stub_spec.rb +159 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/twice_counts_spec.rb +67 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/command_line_spec.rb +32 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/context_matching_spec.rb +28 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/context_runner_spec.rb +100 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/context_spec.rb +405 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/drb_command_line_spec.rb +74 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/execution_context_spec.rb +52 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/html_formatter_spec.rb +40 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/progress_bar_formatter_dry_run_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/progress_bar_formatter_failure_dump_spec.rb +36 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +78 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/rdoc_formatter_dry_run_spec.rb +18 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/rdoc_formatter_spec.rb +41 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/specdoc_formatter_dry_run_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/specdoc_formatter_spec.rb +46 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/heckle_runner_spec.rb +63 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/heckler_spec.rb +14 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/kernel_ext_spec.rb +16 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +45 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/object_ext_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/option_parser_spec.rb +269 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +47 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/reporter_spec.rb +126 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/spec_matcher_spec.rb +107 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/spec_name_generation_spec.rb +102 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/spec_parser_spec.rb +37 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/specification_class_spec.rb +72 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/specification_instance_spec.rb +160 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/specification_should_raise_spec.rb +136 -0
- data/vendor/rspec-0.8.2/spec/spec/spec_classes.rb +102 -0
- data/vendor/rspec-0.8.2/spec/spec/translator_spec.rb +79 -0
- data/vendor/rspec-0.8.2/spec/spec_helper.rb +35 -0
- metadata +537 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# :include: rdoc/logserver
|
2
|
+
|
3
|
+
require 'log4r/logger'
|
4
|
+
require 'log4r/lib/drbloader'
|
5
|
+
|
6
|
+
module Log4r
|
7
|
+
# See log4r/logserver.rb
|
8
|
+
class LogServer < Logger
|
9
|
+
attr_reader :uri
|
10
|
+
|
11
|
+
# A valid ROMP uri must be specified.
|
12
|
+
def initialize(_fullname, _uri, _level=nil,
|
13
|
+
_additive=true, _trace=false, &accept)
|
14
|
+
super(_fullname, _level, _additive, _trace)
|
15
|
+
@uri = _uri
|
16
|
+
start_server(_uri, accept)
|
17
|
+
Logger.log_internal {"LogServer started at #{@uri}"}
|
18
|
+
end
|
19
|
+
|
20
|
+
if HAVE_ROMP
|
21
|
+
include ROMPServer
|
22
|
+
else
|
23
|
+
def initialize(*args)
|
24
|
+
raise RuntimeError, "LogServer not supported. ROMP is required", caller
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
require "log4r/outputter/iooutputter"
|
3
|
+
|
4
|
+
module Log4r
|
5
|
+
# Same as IOOutputter(name, $stdout)
|
6
|
+
class StdoutOutputter < IOOutputter
|
7
|
+
def initialize(_name, hash={})
|
8
|
+
super(_name, $stdout, hash)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Same as IOOutputter(name, $stderr)
|
13
|
+
class StderrOutputter < IOOutputter
|
14
|
+
def initialize(_name, hash={})
|
15
|
+
super(_name, $stderr, hash)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# = DateFileOutputter
|
2
|
+
#
|
3
|
+
# Subclass of FileOutputter that changes the log file daily. When a new
|
4
|
+
# day begins, a new file is created with the date included in the name.
|
5
|
+
#
|
6
|
+
# == Usage
|
7
|
+
#
|
8
|
+
# df_out = DateFileOutputter.new('name',
|
9
|
+
# :dirname="/tmp", :date_pattern=>"%m-%d"
|
10
|
+
# )
|
11
|
+
#
|
12
|
+
# == Rate of Change
|
13
|
+
#
|
14
|
+
# A new logfile is created whenever the current time as formatted by the date
|
15
|
+
# pattern no longer matches the previous time. (This is a simple String
|
16
|
+
# comparison.) So, in order to change the frequency of the rollover, just
|
17
|
+
# alter the date pattern to match how fast the files should be generated.
|
18
|
+
# For instance, to generate files by the minute,
|
19
|
+
#
|
20
|
+
# df_out.date_pattern = "%M"
|
21
|
+
#
|
22
|
+
# This causes the following files to show up one minute apart, asuming the
|
23
|
+
# script starts at the 4th minute of the hour:
|
24
|
+
#
|
25
|
+
# file_04.rb
|
26
|
+
# file_05.rb
|
27
|
+
# file_06.rb
|
28
|
+
# ...
|
29
|
+
#
|
30
|
+
# The only limitation of this approach is that the precise time cannot be
|
31
|
+
# recorded as the smallest time interval equals the rollover period for this
|
32
|
+
# system.
|
33
|
+
|
34
|
+
require "log4r/outputter/fileoutputter"
|
35
|
+
require "log4r/staticlogger"
|
36
|
+
|
37
|
+
module Log4r
|
38
|
+
|
39
|
+
# Additional hash arguments are:
|
40
|
+
#
|
41
|
+
# [<tt>:dirname</tt>] Directory of the log file
|
42
|
+
# [<tt>:date_pattern</tt>] Time.strftime format string (default is "%Y-%m-%d")
|
43
|
+
|
44
|
+
class DateFileOutputter < FileOutputter
|
45
|
+
DEFAULT_DATE_FMT = "%Y-%m-%d"
|
46
|
+
|
47
|
+
def initialize(_name, hash={})
|
48
|
+
@DatePattern = (hash[:date_pattern] or hash['date_pattern'] or
|
49
|
+
DEFAULT_DATE_FMT)
|
50
|
+
@DateStamp = Time.now.strftime( @DatePattern);
|
51
|
+
_dirname = (hash[:dirname] or hash['dirname'])
|
52
|
+
# hash[:dirname] masks hash[:filename]
|
53
|
+
if _dirname
|
54
|
+
if not FileTest.directory?( _dirname)
|
55
|
+
raise StandardError, "'#{_dirname}' must be a valid directory", caller
|
56
|
+
end
|
57
|
+
@filebase = File.basename( $0, '.rb') + ".log"
|
58
|
+
else
|
59
|
+
@filebase = File.basename((hash[:filename] or hash['filename'] or ""))
|
60
|
+
end
|
61
|
+
hash['filename'] = File.join(_dirname,
|
62
|
+
@filebase.sub(/(\.\w*)$/, "_#{@DateStamp}" + '\1'))
|
63
|
+
super(_name, hash)
|
64
|
+
end
|
65
|
+
|
66
|
+
#######
|
67
|
+
private
|
68
|
+
#######
|
69
|
+
|
70
|
+
# perform the write
|
71
|
+
def write(data)
|
72
|
+
change if requiresChange
|
73
|
+
super
|
74
|
+
end
|
75
|
+
|
76
|
+
# construct a new filename from the DateStamp
|
77
|
+
def makeNewFilename
|
78
|
+
@DateStamp = Time.now.strftime( @DatePattern);
|
79
|
+
@filename = File.join(File.dirname(@filename),
|
80
|
+
@filebase.sub(/(\.\w*)$/, "_#{@DateStamp}" + '\1'))
|
81
|
+
end
|
82
|
+
|
83
|
+
# does the file require a change?
|
84
|
+
def requiresChange
|
85
|
+
_DateStamp = Time.now.strftime( @DatePattern);
|
86
|
+
if not _DateStamp == @DateStamp
|
87
|
+
@DateStamp = _DateStamp
|
88
|
+
return true
|
89
|
+
end
|
90
|
+
false
|
91
|
+
end
|
92
|
+
|
93
|
+
# change the file
|
94
|
+
def change
|
95
|
+
begin
|
96
|
+
@out.close
|
97
|
+
rescue
|
98
|
+
Logger.log_internal {
|
99
|
+
"DateFileOutputter '#{@name}' could not close #{@filename}"
|
100
|
+
}
|
101
|
+
end
|
102
|
+
makeNewFilename
|
103
|
+
@out = File.new(@filename, (@trunc ? "w" : "a"))
|
104
|
+
Logger.log_internal {
|
105
|
+
"DateFileOutputter '#{@name}' now writing to #{@filename}"
|
106
|
+
}
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
@@ -0,0 +1,115 @@
|
|
1
|
+
# :include: ../rdoc/emailoutputter
|
2
|
+
|
3
|
+
require 'log4r/outputter/outputter'
|
4
|
+
require 'log4r/staticlogger'
|
5
|
+
require 'net/smtp'
|
6
|
+
|
7
|
+
module Log4r
|
8
|
+
|
9
|
+
class EmailOutputter < Outputter
|
10
|
+
attr_reader :server, :port, :domain, :acct, :authtype, :subject
|
11
|
+
|
12
|
+
def initialize(_name, hash={})
|
13
|
+
super(_name, hash)
|
14
|
+
validate(hash)
|
15
|
+
@buff = []
|
16
|
+
begin
|
17
|
+
@smtp = Net::SMTP.start(*@params)
|
18
|
+
Logger.log_internal {
|
19
|
+
"EmailOutputter '#{@name}' running SMTP client on #{@server}:#{@port}"
|
20
|
+
}
|
21
|
+
rescue Exception => e
|
22
|
+
Logger.log_internal(-2) {
|
23
|
+
"EmailOutputter '#{@name}' failed to start SMTP client!"
|
24
|
+
}
|
25
|
+
Logger.log_internal {e}
|
26
|
+
self.level = OFF
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# send out an email with the current buffer
|
31
|
+
def flush
|
32
|
+
synch { send_mail }
|
33
|
+
Logger.log_internal {"Flushed EmailOutputter '#{@name}'"}
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def validate(hash)
|
39
|
+
@buffsize = (hash[:buffsize] or hash['buffsize'] or 100).to_i
|
40
|
+
@formatfirst = Log4rTools.decode_bool(hash, :formatfirst, false)
|
41
|
+
decode_immediate_at(hash)
|
42
|
+
validate_smtp_params(hash)
|
43
|
+
end
|
44
|
+
|
45
|
+
def decode_immediate_at(hash)
|
46
|
+
@immediate = Hash.new
|
47
|
+
_at = (hash[:immediate_at] or hash['immediate_at'])
|
48
|
+
return if _at.nil?
|
49
|
+
Log4rTools.comma_split(_at).each {|lname|
|
50
|
+
level = LNAMES.index(lname)
|
51
|
+
if level.nil?
|
52
|
+
Logger.log_internal(-2) do
|
53
|
+
"EmailOutputter: skipping bad immediate_at level name '#{lname}'"
|
54
|
+
end
|
55
|
+
next
|
56
|
+
end
|
57
|
+
@immediate[level] = true
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def validate_smtp_params(hash)
|
62
|
+
@from = (hash[:from] or hash['from'])
|
63
|
+
raise ArgumentError, "Must specify from address" if @from.nil?
|
64
|
+
_to = (hash[:to] or hash['to'] or "")
|
65
|
+
@to = Log4rTools.comma_split(_to)
|
66
|
+
raise ArgumentError, "Must specify recepients" if @to.empty?
|
67
|
+
@server = (hash[:server] or hash['server'] or 'localhost')
|
68
|
+
@port = (hash[:port] or hash['port'] or 25).to_i
|
69
|
+
@domain = (hash[:domain] or hash['domain'] or ENV['HOSTNAME'])
|
70
|
+
@acct = (hash[:acct] or hash['acct'])
|
71
|
+
@passwd = (hash[:passwd] or hash['passwd'])
|
72
|
+
@authtype = (hash[:authtype] or hash['authtype'] or :cram_md5).to_s.intern
|
73
|
+
@subject = (hash[:subject] or hash['subject'] or "Message of #{$0}")
|
74
|
+
@params = [@server, @port, @domain, @acct, @passwd, @authtype]
|
75
|
+
end
|
76
|
+
|
77
|
+
def canonical_log(event)
|
78
|
+
synch {
|
79
|
+
@buff.push case @formatfirst
|
80
|
+
when true then @formatter.format event
|
81
|
+
else event
|
82
|
+
end
|
83
|
+
send_mail if @buff.size >= @buffsize or @immediate[event.level]
|
84
|
+
}
|
85
|
+
end
|
86
|
+
|
87
|
+
def send_mail
|
88
|
+
msg =
|
89
|
+
case @formatfirst
|
90
|
+
when true then @buff.join
|
91
|
+
else @buff.collect{|e| @formatter.format e}.join
|
92
|
+
end
|
93
|
+
|
94
|
+
### build a mail header for RFC 822
|
95
|
+
rfc822msg =
|
96
|
+
"From: #{@from}\n" +
|
97
|
+
"To: #{@to}\n" +
|
98
|
+
"Subject: #{@subject}\n" +
|
99
|
+
"Date: #{Time.now.strftime( "%a, %d %b %Y %H:%M:%S %z %Z")}\n" +
|
100
|
+
"Message-Id: <#{"%.8f" % Time.now.to_f}@#{@domain}>\n\n" +
|
101
|
+
"#{msg}"
|
102
|
+
|
103
|
+
### send email
|
104
|
+
begin @smtp.sendmail(rfc822msg, @from, @to)
|
105
|
+
rescue Exception => e
|
106
|
+
Logger.log_internal(-2) {
|
107
|
+
"EmailOutputter '#{@name}' couldn't send email!"
|
108
|
+
}
|
109
|
+
Logger.log_internal {e}
|
110
|
+
self.level = OFF
|
111
|
+
ensure @buff.clear
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
# Version:: $Id: fileoutputter.rb,v 1.5 2003/09/12 23:55:43 fando Exp $
|
3
|
+
|
4
|
+
require "log4r/outputter/iooutputter"
|
5
|
+
require "log4r/staticlogger"
|
6
|
+
|
7
|
+
module Log4r
|
8
|
+
|
9
|
+
# Convenience wrapper for File. Additional hash arguments are:
|
10
|
+
#
|
11
|
+
# [<tt>:filename</tt>] Name of the file to log to.
|
12
|
+
# [<tt>:trunc</tt>] Truncate the file?
|
13
|
+
class FileOutputter < IOOutputter
|
14
|
+
attr_reader :trunc, :filename
|
15
|
+
|
16
|
+
def initialize(_name, hash={})
|
17
|
+
super(_name, nil, hash)
|
18
|
+
|
19
|
+
@trunc = Log4rTools.decode_bool(hash, :trunc, true)
|
20
|
+
_filename = (hash[:filename] or hash['filename'])
|
21
|
+
|
22
|
+
if _filename.class != String
|
23
|
+
raise TypeError, "Argument 'filename' must be a String", caller
|
24
|
+
end
|
25
|
+
|
26
|
+
# file validation
|
27
|
+
if FileTest.exist?( _filename )
|
28
|
+
if not FileTest.file?( _filename )
|
29
|
+
raise StandardError, "'#{_filename}' is not a regular file", caller
|
30
|
+
elsif not FileTest.writable?( _filename )
|
31
|
+
raise StandardError, "'#{_filename}' is not writable!", caller
|
32
|
+
end
|
33
|
+
else # ensure directory is writable
|
34
|
+
dir = File.dirname( _filename )
|
35
|
+
if not FileTest.writable?( dir )
|
36
|
+
raise StandardError, "'#{dir}' is not writable!"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
@filename = _filename
|
41
|
+
@out = File.new(@filename, (@trunc ? "w" : "a"))
|
42
|
+
Logger.log_internal {
|
43
|
+
"FileOutputter '#{@name}' writing to #{@filename}"
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
require "log4r/outputter/outputter"
|
3
|
+
require "log4r/staticlogger"
|
4
|
+
|
5
|
+
module Log4r
|
6
|
+
|
7
|
+
##
|
8
|
+
# IO Outputter invokes print then flush on the wrapped IO
|
9
|
+
# object. If the IO stream dies, IOOutputter sets itself to OFF
|
10
|
+
# and the system continues on its merry way.
|
11
|
+
#
|
12
|
+
# To find out why an IO stream died, create a logger named 'log4r'
|
13
|
+
# and look at the output.
|
14
|
+
|
15
|
+
class IOOutputter < Outputter
|
16
|
+
|
17
|
+
# IOOutputter needs an IO object to write to.
|
18
|
+
def initialize(_name, _out, hash={})
|
19
|
+
super(_name, hash)
|
20
|
+
@out = _out
|
21
|
+
end
|
22
|
+
|
23
|
+
def closed?
|
24
|
+
@out.closed?
|
25
|
+
end
|
26
|
+
|
27
|
+
# Close the IO and sets level to OFF
|
28
|
+
def close
|
29
|
+
@out.close unless @out.nil?
|
30
|
+
@level = OFF
|
31
|
+
OutputterFactory.create_methods(self)
|
32
|
+
Logger.log_internal {"Outputter '#{@name}' closed IO and set to OFF"}
|
33
|
+
end
|
34
|
+
|
35
|
+
#######
|
36
|
+
private
|
37
|
+
#######
|
38
|
+
|
39
|
+
# perform the write
|
40
|
+
def write(data)
|
41
|
+
begin
|
42
|
+
@out.print data
|
43
|
+
@out.flush
|
44
|
+
rescue IOError => ioe # recover from this instead of crash
|
45
|
+
Logger.log_internal {"IOError in Outputter '#{@name}'!"}
|
46
|
+
Logger.log_internal {ioe}
|
47
|
+
close
|
48
|
+
rescue NameError => ne
|
49
|
+
Logger.log_internal {"Outputter '#{@name}' IO is #{@out.class}!"}
|
50
|
+
Logger.log_internal {ne}
|
51
|
+
close
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
# :include: ../rdoc/outputter
|
2
|
+
#
|
3
|
+
# == Other Info
|
4
|
+
#
|
5
|
+
# Version:: $Id: outputter.rb,v 1.6 2003/09/12 23:55:43 fando Exp $
|
6
|
+
# Author:: Leon Torres <leon@ugcs.caltech.edu>
|
7
|
+
|
8
|
+
require "thread"
|
9
|
+
|
10
|
+
require "log4r/outputter/outputterfactory"
|
11
|
+
require "log4r/formatter/formatter"
|
12
|
+
require "log4r/staticlogger"
|
13
|
+
|
14
|
+
module Log4r
|
15
|
+
|
16
|
+
class Outputter
|
17
|
+
attr_reader :name, :level, :formatter
|
18
|
+
@@outputters = Hash.new
|
19
|
+
|
20
|
+
# An Outputter needs a name. RootLogger will be loaded if not already
|
21
|
+
# done. The hash arguments are as follows:
|
22
|
+
#
|
23
|
+
# [<tt>:level</tt>] Logger level. Optional, defaults to root level
|
24
|
+
# [<tt>:formatter</tt>] A Formatter. Defaults to DefaultFormatter
|
25
|
+
|
26
|
+
def initialize(_name, hash={})
|
27
|
+
if _name.nil?
|
28
|
+
raise ArgumentError, "Bad arguments. Name and IO expected.", caller
|
29
|
+
end
|
30
|
+
@name = _name
|
31
|
+
validate_hash(hash)
|
32
|
+
@@outputters[@name] = self
|
33
|
+
end
|
34
|
+
|
35
|
+
# dynamically change the level
|
36
|
+
def level=(_level)
|
37
|
+
Log4rTools.validate_level(_level)
|
38
|
+
@level = _level
|
39
|
+
OutputterFactory.create_methods(self)
|
40
|
+
Logger.log_internal {"Outputter '#{@name}' level is #{LNAMES[_level]}"}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Set the levels to log. All others will be ignored
|
44
|
+
def only_at(*levels)
|
45
|
+
raise ArgumentError, "Gimme some levels!", caller if levels.empty?
|
46
|
+
raise ArgumentError, "Can't log only_at ALL", caller if levels.include? ALL
|
47
|
+
levels.each {|level| Log4rTools.validate_level(level)}
|
48
|
+
@level = levels.sort.first
|
49
|
+
OutputterFactory.create_methods self, levels
|
50
|
+
Logger.log_internal {
|
51
|
+
"Outputter '#{@name}' writes only on " +\
|
52
|
+
levels.collect{|l| LNAMES[l]}.join(", ")
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Dynamically change the formatter. You can just specify a Class
|
57
|
+
# object and the formatter will invoke +new+ or +instance+
|
58
|
+
# on it as appropriate.
|
59
|
+
|
60
|
+
def formatter=(_formatter)
|
61
|
+
if _formatter.kind_of?(Formatter)
|
62
|
+
@formatter = _formatter
|
63
|
+
elsif _formatter.kind_of?(Class) and _formatter <= Formatter
|
64
|
+
if _formatter.respond_to? :instance
|
65
|
+
@formatter = _formatter.instance
|
66
|
+
else
|
67
|
+
@formatter = _formatter.new
|
68
|
+
end
|
69
|
+
else
|
70
|
+
raise TypeError, "Argument was not a Formatter!", caller
|
71
|
+
end
|
72
|
+
Logger.log_internal {"Outputter '#{@name}' using #{@formatter.class}"}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Call flush to force an outputter to write out any buffered
|
76
|
+
# log events. Similar to IO#flush, so use in a similar fashion.
|
77
|
+
|
78
|
+
def flush
|
79
|
+
end
|
80
|
+
|
81
|
+
#########
|
82
|
+
protected
|
83
|
+
#########
|
84
|
+
|
85
|
+
# Validates the common hash arguments. For now, that would be
|
86
|
+
# +:level+, +:formatter+ and the string equivalents
|
87
|
+
def validate_hash(hash)
|
88
|
+
@mutex = Mutex.new
|
89
|
+
# default to root level and DefaultFormatter
|
90
|
+
if hash.empty?
|
91
|
+
self.level = Logger.root.level
|
92
|
+
@formatter = DefaultFormatter.new
|
93
|
+
return
|
94
|
+
end
|
95
|
+
self.level = (hash[:level] or hash['level'] or Logger.root.level)
|
96
|
+
self.formatter = (hash[:formatter] or hash['formatter'] or DefaultFormatter.new)
|
97
|
+
end
|
98
|
+
|
99
|
+
#######
|
100
|
+
private
|
101
|
+
#######
|
102
|
+
|
103
|
+
# This method handles all log events passed to a typical Outputter.
|
104
|
+
# Overload this to change the overall behavior of an outputter. Make
|
105
|
+
# sure that the new behavior is thread safe.
|
106
|
+
|
107
|
+
def canonical_log(logevent)
|
108
|
+
synch { write(format(logevent)) }
|
109
|
+
end
|
110
|
+
|
111
|
+
# Common method to format data. All it does is call the resident
|
112
|
+
# formatter's format method. If a different formatting behavior is
|
113
|
+
# needed, then overload this method.
|
114
|
+
|
115
|
+
def format(logevent)
|
116
|
+
# @formatter is guaranteed to be DefaultFormatter if no Formatter
|
117
|
+
# was specified
|
118
|
+
@formatter.format(logevent)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Abstract method to actually write the data to a destination.
|
122
|
+
# Custom outputters should overload this to specify how the
|
123
|
+
# formatted data should be written and to where.
|
124
|
+
|
125
|
+
def write(data)
|
126
|
+
end
|
127
|
+
|
128
|
+
def synch; @mutex.synchronize { yield } end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
end
|