redcar 0.3.1dev → 0.3.2dev
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +34 -1
- data/README.md +2 -1
- data/ROADMAP.md +13 -45
- data/Rakefile +15 -14
- data/bin/redcar +4 -1
- data/lib/plugin_manager/README.md +61 -0
- data/lib/plugin_manager/Rakefile +55 -0
- data/lib/plugin_manager/bin/plugin_manager +4 -0
- data/lib/plugin_manager/lib/plugin_manager.rb +107 -0
- data/lib/plugin_manager/lib/plugin_manager/definition_builder.rb +37 -0
- data/lib/plugin_manager/lib/plugin_manager/plugin.rb +9 -0
- data/lib/plugin_manager/lib/plugin_manager/plugin_definition.rb +50 -0
- data/lib/plugin_manager/plugin_manager.gemspec +33 -0
- data/lib/plugin_manager/spec/fixtures/error_in_definition/core/plugin.rb +2 -0
- data/lib/plugin_manager/spec/fixtures/error_in_plugin/core/core.rb +4 -0
- data/lib/plugin_manager/spec/fixtures/error_in_plugin/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/example/core/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/example/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/example/debug/debug.rb +6 -0
- data/lib/plugin_manager/spec/fixtures/example/debug/plugin.rb +8 -0
- data/lib/plugin_manager/spec/fixtures/example/extras/extras.rb +6 -0
- data/lib/plugin_manager/spec/fixtures/example/extras/plugin.rb +8 -0
- data/lib/plugin_manager/spec/fixtures/two_versions1/core/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/two_versions1/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/two_versions1/core2/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/two_versions1/core2/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/two_versions2/core/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/two_versions2/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/two_versions2/core2/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/two_versions2/core2/plugin.rb +8 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/core/core.rb +10 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/debug/debug.rb +6 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/debug/plugin.rb +8 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/core/core.rb +10 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/debug/debug.rb +6 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/debug/plugin.rb +8 -0
- data/lib/plugin_manager/spec/plugin_manager_spec.rb +208 -0
- data/lib/plugin_manager/spec/spec_helper.rb +3 -0
- data/lib/redcar.rb +8 -3
- data/lib/redcar/boot.rb +59 -56
- data/lib/redcar/installer.rb +1 -1
- data/lib/redcar/instance_exec.rb +25 -0
- data/lib/redcar/runner.rb +5 -1
- data/lib/redcar/usage.rb +5 -1
- data/plugins/application/icons/close.png +0 -0
- data/plugins/application/lib/application.rb +61 -28
- data/plugins/application/lib/application/clipboard.rb +71 -0
- data/plugins/application/lib/application/dialog.rb +63 -0
- data/plugins/application/lib/application/menu.rb +32 -1
- data/plugins/application/lib/application/menu/builder.rb +10 -4
- data/plugins/application/lib/application/menu/item.rb +16 -3
- data/plugins/application/lib/application/notebook.rb +5 -0
- data/plugins/application/lib/application/speedbar.rb +73 -0
- data/plugins/application/lib/application/window.rb +25 -0
- data/plugins/application/plugin.rb +8 -0
- data/plugins/application/spec/application/clipboard_spec.rb +36 -0
- data/plugins/application/spec/application/menu_spec.rb +73 -1
- data/plugins/application/spec/application/speedbar_spec.rb +46 -0
- data/plugins/application/spec/spec_helper.rb +1 -1
- data/plugins/application_swt/lib/application_swt.rb +18 -11
- data/plugins/application_swt/lib/application_swt/clipboard.rb +42 -0
- data/plugins/application_swt/lib/application_swt/dialog_adapter.rb +68 -0
- data/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb +1 -1
- data/plugins/application_swt/lib/application_swt/html_tab.rb +32 -0
- data/plugins/application_swt/lib/application_swt/menu.rb +57 -21
- data/plugins/application_swt/lib/application_swt/menu/binding_translator.rb +39 -2
- data/plugins/application_swt/lib/application_swt/notebook.rb +5 -0
- data/plugins/application_swt/lib/application_swt/speedbar.rb +187 -0
- data/plugins/application_swt/lib/application_swt/swt_wrapper.rb +24 -1
- data/plugins/application_swt/lib/application_swt/window.rb +33 -3
- data/plugins/application_swt/plugin.rb +8 -0
- data/plugins/application_swt/spec/spec_helper.rb +1 -1
- data/plugins/auto_completer/features/auto_complete.feature +65 -0
- data/plugins/auto_completer/features/step_definitions/auto_complete_steps.rb +4 -0
- data/plugins/auto_completer/features/support/env.rb +4 -0
- data/plugins/auto_completer/lib/auto_completer.rb +99 -0
- data/plugins/auto_completer/lib/auto_completer/document_controller.rb +52 -0
- data/plugins/auto_completer/lib/auto_completer/word_iterator.rb +48 -0
- data/plugins/auto_completer/lib/auto_completer/word_list.rb +40 -0
- data/plugins/auto_completer/plugin.rb +10 -0
- data/plugins/auto_indenter/lib/auto_indenter.rb +1 -1
- data/plugins/auto_indenter/lib/auto_indenter/document_controller.rb +1 -1
- data/plugins/auto_indenter/plugin.rb +8 -0
- data/plugins/core/lib/core.rb +6 -30
- data/plugins/core/lib/core/gui.rb +7 -2
- data/plugins/core/lib/core/logger.rb +7 -4
- data/plugins/core/lib/core/plugin/storage.rb +15 -5
- data/plugins/core/plugin.rb +7 -0
- data/plugins/core/spec/core/storage_spec.rb +0 -9
- data/plugins/edit_view/features/cut_and_paste.feature +45 -0
- data/plugins/edit_view/features/step_definitions/editing_steps.rb +22 -0
- data/plugins/edit_view/features/step_definitions/key_steps.rb +1 -1
- data/plugins/edit_view/features/step_definitions/notebook_steps.rb +1 -1
- data/plugins/edit_view/features/step_definitions/tab_steps.rb +2 -0
- data/plugins/edit_view/features/step_definitions/window_steps.rb +1 -1
- data/plugins/edit_view/features/support/env.rb +2 -2
- data/plugins/edit_view/lib/edit_view.rb +24 -13
- data/plugins/edit_view/lib/edit_view/document.rb +233 -15
- data/plugins/edit_view/lib/edit_view/edit_tab.rb +2 -2
- data/plugins/edit_view/plugin.rb +9 -0
- data/plugins/edit_view/spec/spec_helper.rb +1 -1
- data/plugins/edit_view_swt/lib/edit_view_swt.rb +37 -8
- data/plugins/edit_view_swt/lib/edit_view_swt/document.rb +59 -24
- data/plugins/edit_view_swt/lib/edit_view_swt/word_movement.rb +66 -0
- data/plugins/edit_view_swt/plugin.rb +9 -0
- data/plugins/edit_view_swt/spec/edit_view_swt/word_movement_spec.rb +29 -0
- data/plugins/edit_view_swt/spec/spec_helper.rb +6 -0
- data/plugins/html_view/assets/blueprint/ie.css +35 -0
- data/plugins/html_view/assets/blueprint/print.css +29 -0
- data/plugins/html_view/assets/blueprint/screen.css +257 -0
- data/plugins/html_view/assets/blueprint/src/forms.css +65 -0
- data/plugins/html_view/assets/blueprint/src/grid.css +281 -0
- data/plugins/html_view/assets/blueprint/src/grid.png +0 -0
- data/plugins/html_view/assets/blueprint/src/ie.css +76 -0
- data/plugins/html_view/assets/blueprint/src/print.css +85 -0
- data/plugins/html_view/assets/blueprint/src/reset.css +38 -0
- data/plugins/html_view/assets/blueprint/src/typography.css +106 -0
- data/plugins/html_view/assets/jquery-1.4.min.js +151 -0
- data/plugins/html_view/assets/redcar.css +12 -0
- data/plugins/html_view/lib/html_controller.rb +5 -0
- data/plugins/html_view/lib/html_view.rb +47 -0
- data/plugins/html_view/lib/html_view/html_tab.rb +16 -0
- data/plugins/html_view/plugin.rb +12 -0
- data/plugins/my_plugin/lib/my_plugin.rb +55 -0
- data/plugins/my_plugin/plugin.rb +8 -0
- data/plugins/plugin_manager_ui/lib/plugin_manager_ui.rb +62 -0
- data/plugins/plugin_manager_ui/plugin.rb +12 -0
- data/plugins/plugin_manager_ui/views/index.html.erb +31 -0
- data/plugins/project/lib/project.rb +27 -13
- data/plugins/project/lib/project/find_file_dialog.rb +25 -19
- data/plugins/project/plugin.rb +8 -0
- data/plugins/project/spec/spec_helper.rb +1 -1
- data/plugins/redcar/plugin.rb +13 -0
- data/plugins/redcar/redcar.rb +249 -8
- data/plugins/repl/lib/repl.rb +22 -14
- data/plugins/repl/plugin.rb +8 -0
- data/plugins/repl/spec/spec_helper.rb +1 -1
- data/plugins/tree/plugin.rb +9 -0
- data/plugins/tree/spec/spec_helper.rb +1 -1
- data/plugins/tree_view_swt/plugin.rb +9 -0
- data/textmate/Bundles/Apache.tmbundle/Syntaxes/Apache.plist +544 -0
- data/textmate/Bundles/Apache.tmbundle/Syntaxes/mod_perl.tmLanguage +120 -0
- data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___HTML__.plist +88 -0
- data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Markdown__.plist +89 -0
- data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Text__.plist +74 -0
- data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Textile__.plist +74 -0
- data/textmate/Bundles/Bundle Development.tmbundle/Syntaxes/LanguageGrammar.tmLanguage +1829 -0
- data/textmate/Bundles/C Sharp.tmbundle/Syntaxes/Build.tmLanguage +142 -0
- data/textmate/Bundles/C Sharp.tmbundle/Syntaxes/C__.tmLanguage +524 -0
- data/textmate/Bundles/C++ Qt.tmbundle/Syntaxes/Qt_C____.tmLanguage +62 -0
- data/textmate/Bundles/C++ Qt.tmbundle/Syntaxes/qmake_Project.tmLanguage +308 -0
- data/textmate/Bundles/C.tmbundle/Syntaxes/C.plist +90 -48
- data/textmate/Bundles/Clojure.tmbundle/Syntaxes/Clojure.tmLanguage +427 -0
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/Cucumber_Plain_Text_Feature.tmLanguage +106 -13
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/Cucumber_Steps.tmLanguage +177 -2
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/plaintext_template.erb +109 -17
- data/textmate/Bundles/D.tmbundle/Syntaxes/D.tmLanguage +908 -0
- data/textmate/Bundles/Diff.tmbundle/Syntaxes/Diff.plist +229 -0
- data/textmate/Bundles/DokuWiki.tmbundle/Syntaxes/DokuWiki.tmLanguage +649 -0
- data/textmate/Bundles/F-Script.tmbundle/Syntaxes/F__Script.plist +219 -0
- data/textmate/Bundles/Haskell.tmbundle/Syntaxes/Haskell.plist +646 -0
- data/textmate/Bundles/Haskell.tmbundle/Syntaxes/Literate_Haskell.plist +90 -0
- data/textmate/Bundles/Io.tmbundle/Syntaxes/Io.plist +225 -0
- data/textmate/Bundles/JSON.tmbundle/Syntaxes/JSON.tmLanguage +285 -0
- data/textmate/Bundles/JavaScript Prototype & Script_aculo_us.tmbundle/Syntaxes/JavaScript____Prototype.tmLanguage +193 -0
- data/textmate/Bundles/JavaScript Prototype & Script_aculo_us.tmbundle/Syntaxes/JavaScript____Prototype_Bracketed.tmLanguage +394 -0
- data/textmate/Bundles/JavaScript jQuery.tmbundle/Syntaxes/jQuery___JavaScript__.tmLanguage +440 -0
- data/textmate/Bundles/JavaScript.tmbundle/Syntaxes/JavaScript.plist +712 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/Bibtex.plist +406 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX.plist +1601 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Beamer.plist +106 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Log.plist +141 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Memoir.tmLanguage +165 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/TeX.plist +246 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/TeX_Math.plist +132 -0
- data/textmate/Bundles/Lisp.tmbundle/Syntaxes/Lisp.plist +160 -0
- data/textmate/Bundles/Makefile.tmbundle/Syntaxes/Makefile.plist +103 -0
- data/textmate/Bundles/Markdown.tmbundle/Syntaxes/Markdown.plist +1192 -0
- data/textmate/Bundles/Markdown.tmbundle/Syntaxes/MultiMarkdown.tmLanguage +80 -0
- data/textmate/Bundles/PHP.tmbundle/Syntaxes/PHP.plist +3481 -0
- data/textmate/Bundles/Perl HTML-Template.tmbundle/Syntaxes/Perl_HTML__Template.tmLanguage +217 -0
- data/textmate/Bundles/Perl Template Toolkit.tmbundle/Syntaxes/HTML___Template_Toolkit__.tmLanguage +339 -0
- data/textmate/Bundles/Postscript.tmbundle/Syntaxes/Postscript.tmLanguage +321 -0
- data/textmate/Bundles/Processing.tmbundle/Syntaxes/Processing.plist +296 -0
- data/textmate/Bundles/Property List.tmbundle/Syntaxes/Property_List.tmLanguage +1650 -0
- data/textmate/Bundles/Python Django Templates.tmbundle/Syntaxes/HTML___Django__.tmLanguage +104 -0
- data/textmate/Bundles/Python Django.tmbundle/Syntaxes/Python_Django.tmLanguage +57 -0
- data/textmate/Bundles/Python.tmbundle/Syntaxes/Python.tmLanguage +3016 -0
- data/textmate/Bundles/Python.tmbundle/Syntaxes/Regular_Expressions___Python__.tmLanguage +299 -0
- data/textmate/Bundles/Rez.tmbundle/Syntaxes/Rez.plist +219 -0
- data/textmate/Bundles/Ruby Haml.tmbundle/Syntaxes/Ruby_Haml.tmLanguage +403 -0
- data/textmate/Bundles/Ruby RSpec.tmbundle/Syntaxes/RSpec.tmLanguage +142 -0
- data/textmate/Bundles/Ruby.tmbundle/Syntaxes/Ruby.plist +139 -49
- data/textmate/Bundles/SQL.tmbundle/Syntaxes/SQL.plist +705 -0
- data/textmate/Bundles/SSH-Config.tmbundle/Syntaxes/SSH__Config.tmLanguage +88 -0
- data/textmate/Bundles/Scala.tmbundle/Syntaxes/Scala.tmLanguage +609 -0
- data/textmate/Bundles/Scala.tmbundle/Syntaxes/Scala_Properties.tmLanguage +54 -0
- data/textmate/Bundles/ShellScript.tmbundle/Syntaxes/Shell__Unix__Generic.plist +1855 -0
- data/textmate/Bundles/Tabular.tmbundle/Syntaxes/CSV.tmLanguage +178 -0
- data/textmate/Bundles/Tabular.tmbundle/Syntaxes/TSV.tmLanguage +135 -0
- data/textmate/Bundles/TextMate.tmbundle/Syntaxes/Regular_Expressions___Oniguruma__.tmLanguage +295 -0
- data/textmate/Bundles/TextMate.tmbundle/Syntaxes/Release_Notes.tmLanguage +126 -0
- data/textmate/Bundles/Textile.tmbundle/Syntaxes/Textile.plist +490 -0
- data/textmate/Bundles/Thrift.tmbundle/Syntaxes/Thrift.tmLanguage +1024 -0
- data/textmate/Bundles/XML.tmbundle/Syntaxes/XML.plist +576 -0
- data/textmate/Bundles/XML.tmbundle/Syntaxes/XSL.plist +157 -0
- data/textmate/Bundles/YAML.tmbundle/Syntaxes/YAML.plist +466 -0
- data/textmate/Themes/Django.tmTheme +436 -0
- metadata +371 -325
- data/config/default.yaml +0 -15
- data/lib/freebase2/README.txt +0 -47
- data/lib/freebase2/bin/default.yaml +0 -15
- data/lib/freebase2/bin/install.rb +0 -42
- data/lib/freebase2/bin/run.rb +0 -48
- data/lib/freebase2/lib/freebase/configuration.rb +0 -535
- data/lib/freebase2/lib/freebase/core.rb +0 -197
- data/lib/freebase2/lib/freebase/databus.rb +0 -1128
- data/lib/freebase2/lib/freebase/freebase.rb +0 -60
- data/lib/freebase2/lib/freebase/logger.rb +0 -117
- data/lib/freebase2/lib/freebase/plugin.rb +0 -384
- data/lib/freebase2/lib/freebase/properties.rb +0 -130
- data/lib/freebase2/lib/freebase/readers.rb +0 -328
- data/lib/freebase2/notes +0 -61
- data/lib/freebase2/plugins/raa_webrick/httpd.rb +0 -125
- data/lib/freebase2/plugins/raa_webrick/plugin.yaml +0 -7
- data/lib/freebase2/plugins/raa_webrick/web_root/test.html +0 -5
- data/lib/freebase2/plugins/raa_webrick/webserver.yaml +0 -6
- data/lib/freebase2/plugins/raa_xmlrpc4r/plugin.xml +0 -8
- data/lib/freebase2/plugins/raa_xmlrpc4r/rpcd.rb +0 -54
- data/lib/freebase2/regress/README +0 -1
- data/lib/little_plugger/History.txt +0 -20
- data/lib/little_plugger/Rakefile +0 -34
- data/lib/little_plugger/lib/little-plugger.rb +0 -323
- data/lib/little_plugger/spec/little-plugger_spec.rb +0 -26
- data/lib/little_plugger/spec/spec_helper.rb +0 -16
- data/lib/logging/History.txt +0 -240
- data/lib/logging/Rakefile +0 -37
- data/lib/logging/data/bad_logging_1.rb +0 -13
- data/lib/logging/data/bad_logging_2.rb +0 -21
- data/lib/logging/data/logging.rb +0 -42
- data/lib/logging/data/logging.yaml +0 -63
- data/lib/logging/data/simple_logging.rb +0 -13
- data/lib/logging/examples/appenders.rb +0 -47
- data/lib/logging/examples/classes.rb +0 -41
- data/lib/logging/examples/consolidation.rb +0 -83
- data/lib/logging/examples/formatting.rb +0 -51
- data/lib/logging/examples/hierarchies.rb +0 -73
- data/lib/logging/examples/layouts.rb +0 -48
- data/lib/logging/examples/loggers.rb +0 -29
- data/lib/logging/examples/names.rb +0 -43
- data/lib/logging/examples/simple.rb +0 -17
- data/lib/logging/lib/logging.rb +0 -501
- data/lib/logging/lib/logging/appender.rb +0 -251
- data/lib/logging/lib/logging/appenders.rb +0 -131
- data/lib/logging/lib/logging/appenders/buffering.rb +0 -168
- data/lib/logging/lib/logging/appenders/console.rb +0 -60
- data/lib/logging/lib/logging/appenders/email.rb +0 -75
- data/lib/logging/lib/logging/appenders/file.rb +0 -58
- data/lib/logging/lib/logging/appenders/growl.rb +0 -197
- data/lib/logging/lib/logging/appenders/io.rb +0 -69
- data/lib/logging/lib/logging/appenders/rolling_file.rb +0 -293
- data/lib/logging/lib/logging/appenders/string_io.rb +0 -68
- data/lib/logging/lib/logging/appenders/syslog.rb +0 -194
- data/lib/logging/lib/logging/config/configurator.rb +0 -188
- data/lib/logging/lib/logging/config/yaml_configurator.rb +0 -191
- data/lib/logging/lib/logging/layout.rb +0 -117
- data/lib/logging/lib/logging/layouts.rb +0 -47
- data/lib/logging/lib/logging/layouts/basic.rb +0 -32
- data/lib/logging/lib/logging/layouts/parseable.rb +0 -211
- data/lib/logging/lib/logging/layouts/pattern.rb +0 -311
- data/lib/logging/lib/logging/log_event.rb +0 -45
- data/lib/logging/lib/logging/logger.rb +0 -503
- data/lib/logging/lib/logging/repository.rb +0 -232
- data/lib/logging/lib/logging/root_logger.rb +0 -61
- data/lib/logging/lib/logging/stats.rb +0 -278
- data/lib/logging/lib/logging/utils.rb +0 -153
- data/lib/logging/lib/spec/logging_helper.rb +0 -34
- data/lib/logging/test/appenders/test_buffered_io.rb +0 -176
- data/lib/logging/test/appenders/test_console.rb +0 -66
- data/lib/logging/test/appenders/test_email.rb +0 -170
- data/lib/logging/test/appenders/test_file.rb +0 -95
- data/lib/logging/test/appenders/test_growl.rb +0 -127
- data/lib/logging/test/appenders/test_io.rb +0 -129
- data/lib/logging/test/appenders/test_rolling_file.rb +0 -200
- data/lib/logging/test/appenders/test_syslog.rb +0 -194
- data/lib/logging/test/benchmark.rb +0 -86
- data/lib/logging/test/config/test_configurator.rb +0 -70
- data/lib/logging/test/config/test_yaml_configurator.rb +0 -40
- data/lib/logging/test/layouts/test_basic.rb +0 -42
- data/lib/logging/test/layouts/test_json.rb +0 -112
- data/lib/logging/test/layouts/test_pattern.rb +0 -198
- data/lib/logging/test/layouts/test_yaml.rb +0 -121
- data/lib/logging/test/setup.rb +0 -44
- data/lib/logging/test/test_appender.rb +0 -152
- data/lib/logging/test/test_consolidate.rb +0 -46
- data/lib/logging/test/test_layout.rb +0 -110
- data/lib/logging/test/test_log_event.rb +0 -80
- data/lib/logging/test/test_logger.rb +0 -699
- data/lib/logging/test/test_logging.rb +0 -267
- data/lib/logging/test/test_repository.rb +0 -158
- data/lib/logging/test/test_root_logger.rb +0 -81
- data/lib/logging/test/test_stats.rb +0 -274
- data/lib/logging/test/test_utils.rb +0 -116
- data/plugins/application/plugin.yaml +0 -11
- data/plugins/application_swt/plugin.yaml +0 -11
- data/plugins/auto_indenter/plugin.yaml +0 -12
- data/plugins/core/plugin.yaml +0 -7
- data/plugins/edit_view/plugin.yaml +0 -14
- data/plugins/edit_view_swt/plugin.yaml +0 -14
- data/plugins/project/plugin.yaml +0 -12
- data/plugins/redcar/plugin.yaml +0 -18
- data/plugins/repl/plugin.yaml +0 -12
- data/plugins/tree/plugin.yaml +0 -14
- data/plugins/tree_view_swt/plugin.yaml +0 -14
@@ -1,153 +0,0 @@
|
|
1
|
-
|
2
|
-
# --------------------------------------------------------------------------
|
3
|
-
class Hash
|
4
|
-
|
5
|
-
# call-seq:
|
6
|
-
# getopt( key, default = nil, :as => class )
|
7
|
-
#
|
8
|
-
# Returns the value associated with the _key_. If the has does not contain
|
9
|
-
# the _key_, then the _default_ value is returned.
|
10
|
-
#
|
11
|
-
# Optionally, the value can be converted into to an instance of the given
|
12
|
-
# _class_. The supported classes are:
|
13
|
-
#
|
14
|
-
# Integer
|
15
|
-
# Float
|
16
|
-
# Array
|
17
|
-
# String
|
18
|
-
# Symbol
|
19
|
-
#
|
20
|
-
# If the value is +nil+, then no converstion will be performed.
|
21
|
-
#
|
22
|
-
def getopt( *args )
|
23
|
-
opts = args.last.instance_of?(Hash) ? args.pop : {}
|
24
|
-
key, default = args
|
25
|
-
|
26
|
-
val = if has_key?(key); self[key]
|
27
|
-
elsif has_key?(key.to_s); self[key.to_s]
|
28
|
-
elsif has_key?(key.to_s.intern); self[key.to_s.intern]
|
29
|
-
else default end
|
30
|
-
|
31
|
-
return if val.nil?
|
32
|
-
return val unless opts.has_key?(:as)
|
33
|
-
|
34
|
-
case opts[:as].name.intern
|
35
|
-
when :Integer; Integer(val)
|
36
|
-
when :Float; Float(val)
|
37
|
-
when :Array; Array(val)
|
38
|
-
when :String; String(val)
|
39
|
-
when :Symbol; String(val).intern
|
40
|
-
else val end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
# --------------------------------------------------------------------------
|
45
|
-
class String
|
46
|
-
|
47
|
-
# call-seq:
|
48
|
-
# reduce( width, ellipses = '...' ) #=> string
|
49
|
-
#
|
50
|
-
# Reduce the size of the current string to the given _width_ by removing
|
51
|
-
# characters from the middle of the string and replacing them with
|
52
|
-
# _ellipses_. If the _width_ is greater than the length of the string, the
|
53
|
-
# string is returned unchanged. If the _width_ is less than the length of
|
54
|
-
# the _ellipses_, then the _ellipses_ are returned.
|
55
|
-
#
|
56
|
-
def reduce( width, ellipses = '...')
|
57
|
-
raise ArgumentError, "width cannot be negative: #{width}" if width < 0
|
58
|
-
|
59
|
-
return self if length <= width
|
60
|
-
|
61
|
-
remove = length - width + ellipses.length
|
62
|
-
return ellipses.dup if remove >= length
|
63
|
-
|
64
|
-
left_end = (length + 1 - remove) / 2
|
65
|
-
right_start = left_end + remove
|
66
|
-
|
67
|
-
left = self[0,left_end]
|
68
|
-
right = self[right_start,length-right_start]
|
69
|
-
|
70
|
-
left << ellipses << right
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
# --------------------------------------------------------------------------
|
75
|
-
class Module
|
76
|
-
|
77
|
-
# call-seq:
|
78
|
-
# logger_name #=> string
|
79
|
-
#
|
80
|
-
# Returns a predictable logger name for the current module or class. If
|
81
|
-
# used within an anonymous class, the first non-anonymous class name will
|
82
|
-
# be used as the logger name. If used within a meta-class, the name of the
|
83
|
-
# actual class will be used as the logger name. If used within an
|
84
|
-
# anonymous module, the string 'anonymous' will be returned.
|
85
|
-
#
|
86
|
-
def logger_name
|
87
|
-
return name unless name.nil? or name.empty?
|
88
|
-
|
89
|
-
# check if this is a metaclass (or eigenclass)
|
90
|
-
if ancestors.include? Class
|
91
|
-
inspect =~ %r/#<Class:([^#>]+)>/
|
92
|
-
return $1
|
93
|
-
end
|
94
|
-
|
95
|
-
# see if we have a superclass
|
96
|
-
if respond_to? :superclass
|
97
|
-
return superclass.logger_name
|
98
|
-
end
|
99
|
-
|
100
|
-
# we are an anonymous module
|
101
|
-
::Logging.log_internal(-2) {
|
102
|
-
'cannot return a predictable, unique name for anonymous modules'
|
103
|
-
}
|
104
|
-
return 'anonymous'
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
# --------------------------------------------------------------------------
|
109
|
-
module Kernel
|
110
|
-
|
111
|
-
# call-seq:
|
112
|
-
# require?( string )
|
113
|
-
#
|
114
|
-
# Attempt to the load the library named _string_ using the standard
|
115
|
-
# Kernel#require method. Returns +true+ if the library was successfully
|
116
|
-
# loaded. Returns +false+ if the library could not be loaded. This method
|
117
|
-
# will never raise an exception.
|
118
|
-
#
|
119
|
-
def require?( string )
|
120
|
-
require string
|
121
|
-
return true
|
122
|
-
rescue LoadError
|
123
|
-
return false
|
124
|
-
end
|
125
|
-
end # module Kernel
|
126
|
-
|
127
|
-
# --------------------------------------------------------------------------
|
128
|
-
class ReentrantMutex < Mutex
|
129
|
-
|
130
|
-
def initialize
|
131
|
-
super
|
132
|
-
@locker = nil
|
133
|
-
end
|
134
|
-
|
135
|
-
alias :original_synchronize :synchronize
|
136
|
-
|
137
|
-
def synchronize
|
138
|
-
if @locker == Thread.current
|
139
|
-
yield
|
140
|
-
else
|
141
|
-
original_synchronize {
|
142
|
-
begin
|
143
|
-
@locker = Thread.current
|
144
|
-
yield
|
145
|
-
ensure
|
146
|
-
@locker = nil
|
147
|
-
end
|
148
|
-
}
|
149
|
-
end
|
150
|
-
end
|
151
|
-
end # class ReentrantMutex
|
152
|
-
|
153
|
-
# EOF
|
@@ -1,34 +0,0 @@
|
|
1
|
-
|
2
|
-
module Spec
|
3
|
-
module LoggingHelper
|
4
|
-
|
5
|
-
# Capture log messages from the Logging framework and make them
|
6
|
-
# available via a @log_output instance variable. The @log_output
|
7
|
-
# supports a readline method to access the log messags.
|
8
|
-
#
|
9
|
-
def capture_log_messages( opts = {} )
|
10
|
-
from = opts.getopt(:from, 'root')
|
11
|
-
to = opts.getopt(:to, '__rspec__')
|
12
|
-
exclusive = opts.getopt(:exclusive, true)
|
13
|
-
|
14
|
-
appender = Logging::Appenders[to] || Logging::Appenders::StringIo.new(to)
|
15
|
-
logger = Logging::Logger[from]
|
16
|
-
if exclusive
|
17
|
-
logger.appenders = appender
|
18
|
-
else
|
19
|
-
logger.add_appenders(appender)
|
20
|
-
end
|
21
|
-
|
22
|
-
before(:all) do
|
23
|
-
@log_output = Logging::Appenders[to]
|
24
|
-
end
|
25
|
-
|
26
|
-
before(:each) do
|
27
|
-
@log_output.reset
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
end # module LoggingHelper
|
32
|
-
end # module Spec
|
33
|
-
|
34
|
-
# EOF
|
@@ -1,176 +0,0 @@
|
|
1
|
-
|
2
|
-
require File.join(File.dirname(__FILE__), %w[.. setup])
|
3
|
-
|
4
|
-
module TestLogging
|
5
|
-
module TestAppenders
|
6
|
-
|
7
|
-
class TestBufferedIO < Test::Unit::TestCase
|
8
|
-
include LoggingTestCase
|
9
|
-
|
10
|
-
def setup
|
11
|
-
super
|
12
|
-
@appender = Logging.appenders.string_io(
|
13
|
-
'test_appender', :auto_flushing => 3, :immediate_at => :error
|
14
|
-
)
|
15
|
-
@appender.clear
|
16
|
-
@sio = @appender.sio
|
17
|
-
@levels = Logging::LEVELS
|
18
|
-
begin readline rescue EOFError end
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_append
|
22
|
-
event = Logging::LogEvent.new('TestLogger', @levels['warn'],
|
23
|
-
[1, 2, 3, 4], false)
|
24
|
-
@appender.append event
|
25
|
-
assert_nil(readline)
|
26
|
-
|
27
|
-
@appender.append event
|
28
|
-
assert_nil(readline)
|
29
|
-
|
30
|
-
event.level = @levels['debug']
|
31
|
-
event.data = 'the big log message'
|
32
|
-
@appender.append event
|
33
|
-
|
34
|
-
assert_equal " WARN TestLogger : <Array> #{[1, 2, 3, 4]}\n", readline
|
35
|
-
assert_equal " WARN TestLogger : <Array> #{[1, 2, 3, 4]}\n", readline
|
36
|
-
assert_equal "DEBUG TestLogger : the big log message\n", readline
|
37
|
-
assert_nil(readline)
|
38
|
-
|
39
|
-
@appender.close
|
40
|
-
assert_raise(RuntimeError) {@appender.append event}
|
41
|
-
end
|
42
|
-
|
43
|
-
def test_append_error
|
44
|
-
# setup an internal logger to capture error messages from the IO
|
45
|
-
# appender
|
46
|
-
log = Logging.appenders.string_io('__internal_io')
|
47
|
-
Logging.logger[Logging].add_appenders(log)
|
48
|
-
Logging.logger[Logging].level = 'all'
|
49
|
-
|
50
|
-
|
51
|
-
# close the string IO object so we get an error
|
52
|
-
@sio.close
|
53
|
-
event = Logging::LogEvent.new('TestLogger', @levels['warn'],
|
54
|
-
[1, 2, 3, 4], false)
|
55
|
-
@appender.append event
|
56
|
-
assert_nil(log.readline)
|
57
|
-
|
58
|
-
@appender.append event
|
59
|
-
assert_nil(log.readline)
|
60
|
-
|
61
|
-
@appender.append event
|
62
|
-
assert_equal "INFO Logging : appender \"test_appender\" has been disabled", log.readline.strip
|
63
|
-
assert_equal "ERROR Logging : <IOError> not opened for writing", log.readline.strip
|
64
|
-
|
65
|
-
assert_equal false, @appender.closed?
|
66
|
-
assert_equal 5, @appender.level
|
67
|
-
end
|
68
|
-
|
69
|
-
def test_auto_flushing
|
70
|
-
assert_raise(ArgumentError) {
|
71
|
-
@appender.auto_flushing = Object.new
|
72
|
-
}
|
73
|
-
|
74
|
-
assert_raise(ArgumentError) {
|
75
|
-
@appender.auto_flushing = -1
|
76
|
-
}
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_close
|
80
|
-
assert_equal false, @sio.closed?
|
81
|
-
assert_equal false, @appender.closed?
|
82
|
-
|
83
|
-
@appender.close
|
84
|
-
assert_equal true, @sio.closed?
|
85
|
-
assert_equal true, @appender.closed?
|
86
|
-
|
87
|
-
[STDIN, STDERR, STDOUT].each do |io|
|
88
|
-
@appender = Logging.appenders.io('test', io)
|
89
|
-
@appender.close
|
90
|
-
assert_equal false, io.closed?
|
91
|
-
assert_equal true, @appender.closed?
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
def test_concat
|
96
|
-
@appender << "this is a test message\n"
|
97
|
-
assert_nil(readline)
|
98
|
-
|
99
|
-
@appender << "this is another message\n"
|
100
|
-
assert_nil(readline)
|
101
|
-
|
102
|
-
@appender << "some other line\n"
|
103
|
-
|
104
|
-
assert_equal "this is a test message\n", readline
|
105
|
-
assert_equal "this is another message\n", readline
|
106
|
-
assert_equal "some other line\n", readline
|
107
|
-
assert_nil(readline)
|
108
|
-
|
109
|
-
@appender.close
|
110
|
-
assert_raise(RuntimeError) {@appender << 'message'}
|
111
|
-
end
|
112
|
-
|
113
|
-
def test_concat_error
|
114
|
-
# setup an internal logger to capture error messages from the IO
|
115
|
-
# appender
|
116
|
-
log = Logging.appenders.string_io('__internal_io')
|
117
|
-
Logging.logger[Logging].add_appenders(log)
|
118
|
-
Logging.logger[Logging].level = 'all'
|
119
|
-
|
120
|
-
# close the string IO object so we get an error
|
121
|
-
@sio.close
|
122
|
-
@appender << 'oopsy'
|
123
|
-
assert_nil(log.readline)
|
124
|
-
|
125
|
-
@appender << 'whoopsy'
|
126
|
-
assert_nil(log.readline)
|
127
|
-
|
128
|
-
@appender << 'pooh'
|
129
|
-
assert_equal "INFO Logging : appender \"test_appender\" has been disabled", log.readline.strip
|
130
|
-
assert_equal "ERROR Logging : <IOError> not opened for writing", log.readline.strip
|
131
|
-
|
132
|
-
# and the appender does not close itself
|
133
|
-
assert_equal false, @appender.closed?
|
134
|
-
assert_equal 5, @appender.level
|
135
|
-
end
|
136
|
-
|
137
|
-
def test_flush
|
138
|
-
ary = []
|
139
|
-
@sio.instance_variable_set :@ary, ary
|
140
|
-
def @sio.flush() @ary << :flush end
|
141
|
-
|
142
|
-
@appender << "this is a test message\n"
|
143
|
-
assert_nil(readline)
|
144
|
-
|
145
|
-
@appender.flush
|
146
|
-
assert_equal :flush, ary.pop
|
147
|
-
assert_equal "this is a test message\n", readline
|
148
|
-
assert_nil(readline)
|
149
|
-
end
|
150
|
-
|
151
|
-
def test_immediate_at
|
152
|
-
event = Logging::LogEvent.new('TestLogger', @levels['warn'],
|
153
|
-
[1, 2, 3, 4], false)
|
154
|
-
@appender.append event
|
155
|
-
assert_nil(readline)
|
156
|
-
|
157
|
-
event.level = @levels['error']
|
158
|
-
event.data = 'an error message'
|
159
|
-
@appender.append event
|
160
|
-
|
161
|
-
assert_equal " WARN TestLogger : <Array> #{[1, 2, 3, 4]}\n", readline
|
162
|
-
assert_equal "ERROR TestLogger : an error message\n", readline
|
163
|
-
assert_nil(readline)
|
164
|
-
end
|
165
|
-
|
166
|
-
private
|
167
|
-
def readline
|
168
|
-
@appender.readline
|
169
|
-
end
|
170
|
-
|
171
|
-
end # class TestBufferedIO
|
172
|
-
|
173
|
-
end # module TestAppenders
|
174
|
-
end # module TestLogging
|
175
|
-
|
176
|
-
# EOF
|
@@ -1,66 +0,0 @@
|
|
1
|
-
|
2
|
-
require File.join(File.dirname(__FILE__), %w[.. setup])
|
3
|
-
|
4
|
-
module TestLogging
|
5
|
-
module TestAppenders
|
6
|
-
|
7
|
-
class TestStdout < Test::Unit::TestCase
|
8
|
-
include LoggingTestCase
|
9
|
-
|
10
|
-
def test_initialize
|
11
|
-
Logging::Repository.instance
|
12
|
-
|
13
|
-
appender = Logging.appenders.stdout
|
14
|
-
assert_equal 'stdout', appender.name
|
15
|
-
assert_same STDOUT, appender.instance_variable_get(:@io)
|
16
|
-
|
17
|
-
appender.close
|
18
|
-
assert_equal true, appender.closed?
|
19
|
-
assert_equal false, STDOUT.closed?
|
20
|
-
|
21
|
-
appender = Logging.appenders.stdout('foo')
|
22
|
-
assert_equal 'foo', appender.name
|
23
|
-
|
24
|
-
appender = Logging.appenders.stdout(:level => :warn)
|
25
|
-
assert_equal 'stdout', appender.name
|
26
|
-
assert_equal 2, appender.level
|
27
|
-
|
28
|
-
appender = Logging.appenders.stdout('bar', :level => :error)
|
29
|
-
assert_equal 'bar', appender.name
|
30
|
-
assert_equal 3, appender.level
|
31
|
-
end
|
32
|
-
|
33
|
-
end # class TestStdout
|
34
|
-
|
35
|
-
class TestStderr < Test::Unit::TestCase
|
36
|
-
include LoggingTestCase
|
37
|
-
|
38
|
-
def test_initialize
|
39
|
-
Logging::Repository.instance
|
40
|
-
|
41
|
-
appender = Logging.appenders.stderr
|
42
|
-
assert_equal 'stderr', appender.name
|
43
|
-
assert_same STDERR, appender.instance_variable_get(:@io)
|
44
|
-
|
45
|
-
appender.close
|
46
|
-
assert_equal true, appender.closed?
|
47
|
-
assert_equal false, STDERR.closed?
|
48
|
-
|
49
|
-
appender = Logging.appenders.stderr('foo')
|
50
|
-
assert_equal 'foo', appender.name
|
51
|
-
|
52
|
-
appender = Logging.appenders.stderr(:level => :warn)
|
53
|
-
assert_equal 'stderr', appender.name
|
54
|
-
assert_equal 2, appender.level
|
55
|
-
|
56
|
-
appender = Logging.appenders.stderr('bar', :level => :error)
|
57
|
-
assert_equal 'bar', appender.name
|
58
|
-
assert_equal 3, appender.level
|
59
|
-
end
|
60
|
-
|
61
|
-
end # class TestStderr
|
62
|
-
|
63
|
-
end # module TestAppenders
|
64
|
-
end # module TestLogging
|
65
|
-
|
66
|
-
# EOF
|
@@ -1,170 +0,0 @@
|
|
1
|
-
|
2
|
-
require File.join(File.dirname(__FILE__), %w[.. setup])
|
3
|
-
require 'flexmock'
|
4
|
-
|
5
|
-
module TestLogging
|
6
|
-
module TestAppenders
|
7
|
-
|
8
|
-
class TestEmail < Test::Unit::TestCase
|
9
|
-
include FlexMock::TestCase
|
10
|
-
include LoggingTestCase
|
11
|
-
|
12
|
-
def setup
|
13
|
-
super
|
14
|
-
|
15
|
-
flexmock(Net::SMTP).new_instances do |m|
|
16
|
-
m.should_receive(:start).at_least.once.with(
|
17
|
-
'test.logging', 'test', 'test', :cram_md5, Proc).and_yield(m)
|
18
|
-
m.should_receive(:sendmail).at_least.once.with(String, 'me', ['you'])
|
19
|
-
end
|
20
|
-
|
21
|
-
@appender = Logging.appenders.email('email',
|
22
|
-
'from' => 'me', 'to' => 'you',
|
23
|
-
:buffer_size => '3', :immediate_at => 'error, fatal',
|
24
|
-
:domain => 'test.logging', :acct => 'test', :passwd => 'test'
|
25
|
-
)
|
26
|
-
@levels = Logging::LEVELS
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_initialize
|
30
|
-
assert_raise(ArgumentError, 'Must specify from address') {
|
31
|
-
Logging.appenders.email('email')
|
32
|
-
}
|
33
|
-
assert_raise(ArgumentError, 'Must specify to address') {
|
34
|
-
Logging.appenders.email('email', :from => 'me')
|
35
|
-
}
|
36
|
-
assert_nothing_raised {
|
37
|
-
Logging.appenders.email('email', :from => 'me', :to => 'you')
|
38
|
-
}
|
39
|
-
|
40
|
-
appender = Logging.appenders.email('email',
|
41
|
-
'from' => 'me', 'to' => 'you'
|
42
|
-
)
|
43
|
-
|
44
|
-
assert_equal(100, appender.auto_flushing)
|
45
|
-
assert_equal([], appender.instance_variable_get(:@immediate))
|
46
|
-
assert_equal('localhost', appender.server)
|
47
|
-
assert_equal(25, appender.port)
|
48
|
-
|
49
|
-
domain = ENV['HOSTNAME'] || 'localhost.localdomain'
|
50
|
-
assert_equal(domain, appender.domain)
|
51
|
-
assert_equal(nil, appender.acct)
|
52
|
-
assert_equal(:cram_md5, appender.authtype)
|
53
|
-
assert_equal("Message of #{$0}", appender.subject)
|
54
|
-
|
55
|
-
appender = Logging.appenders.email('email',
|
56
|
-
'from' => 'lbrinn@gmail.com', 'to' => 'everyone',
|
57
|
-
:buffsize => '1000', :immediate_at => 'error, fatal',
|
58
|
-
:server => 'smtp.google.com', :port => '443',
|
59
|
-
:domain => 'google.com', :acct => 'lbrinn',
|
60
|
-
:passwd => '1234', :authtype => 'tls',
|
61
|
-
:subject => "I'm rich and you're not"
|
62
|
-
)
|
63
|
-
|
64
|
-
assert_equal('lbrinn@gmail.com', appender.instance_variable_get(:@from))
|
65
|
-
assert_equal(['everyone'], appender.instance_variable_get(:@to))
|
66
|
-
assert_equal(1000, appender.auto_flushing)
|
67
|
-
assert_equal('1234', appender.instance_variable_get(:@passwd))
|
68
|
-
assert_equal([nil, nil, nil, true, true],
|
69
|
-
appender.instance_variable_get(:@immediate))
|
70
|
-
assert_equal('smtp.google.com', appender.server)
|
71
|
-
assert_equal(443, appender.port)
|
72
|
-
assert_equal('google.com', appender.domain)
|
73
|
-
assert_equal('lbrinn', appender.acct)
|
74
|
-
assert_equal(:tls, appender.authtype)
|
75
|
-
assert_equal("I'm rich and you're not", appender.subject)
|
76
|
-
|
77
|
-
appender = Logging.appenders.email('email',
|
78
|
-
'from' => 'me', 'to' => 'you', :auto_flushing => 42
|
79
|
-
)
|
80
|
-
assert_equal(42, appender.auto_flushing)
|
81
|
-
end
|
82
|
-
|
83
|
-
def test_append
|
84
|
-
# with auto_flushing enabled, mail will be sent each time a log event
|
85
|
-
# occurs
|
86
|
-
@appender.auto_flushing = true
|
87
|
-
event = Logging::LogEvent.new('TestLogger', @levels['warn'],
|
88
|
-
[1, 2, 3, 4], false)
|
89
|
-
@appender.append event
|
90
|
-
assert_not_equal(@levels.length, @appender.level)
|
91
|
-
assert_equal(0, @appender.buffer.length)
|
92
|
-
|
93
|
-
# increase the buffer size and log a few events
|
94
|
-
@appender.auto_flushing = 3
|
95
|
-
@appender.append event
|
96
|
-
@appender.append event
|
97
|
-
assert_equal(2, @appender.buffer.length)
|
98
|
-
|
99
|
-
@appender.append event
|
100
|
-
assert_not_equal(@levels.length, @appender.level)
|
101
|
-
assert_equal(0, @appender.buffer.length)
|
102
|
-
|
103
|
-
# error and fatal messages should be send immediately (no buffering)
|
104
|
-
error = Logging::LogEvent.new('ErrLogger', @levels['error'],
|
105
|
-
'error message', false)
|
106
|
-
fatal = Logging::LogEvent.new('FatalLogger', @levels['fatal'],
|
107
|
-
'fatal message', false)
|
108
|
-
|
109
|
-
@appender.append event
|
110
|
-
@appender.append fatal
|
111
|
-
assert_not_equal(@levels.length, @appender.level)
|
112
|
-
assert_equal(0, @appender.buffer.length)
|
113
|
-
|
114
|
-
@appender.append error
|
115
|
-
assert_not_equal(@levels.length, @appender.level)
|
116
|
-
assert_equal(0, @appender.buffer.length)
|
117
|
-
|
118
|
-
@appender.append event
|
119
|
-
assert_equal(1, @appender.buffer.length)
|
120
|
-
end
|
121
|
-
|
122
|
-
def test_concat
|
123
|
-
# with auto_flushing enabled, mail will be sent each time a log event
|
124
|
-
# occurs
|
125
|
-
@appender.auto_flushing = true
|
126
|
-
@appender << 'test message'
|
127
|
-
assert_not_equal(@levels.length, @appender.level)
|
128
|
-
assert_equal(0, @appender.buffer.length)
|
129
|
-
|
130
|
-
# increase the buffer size and log a few events
|
131
|
-
@appender.auto_flushing = 3
|
132
|
-
@appender << 'another test message'
|
133
|
-
@appender << 'a second test message'
|
134
|
-
assert_equal(2, @appender.buffer.length)
|
135
|
-
|
136
|
-
@appender << 'a third test message'
|
137
|
-
assert_not_equal(@levels.length, @appender.level)
|
138
|
-
assert_equal(0, @appender.buffer.length)
|
139
|
-
end
|
140
|
-
|
141
|
-
def test_flush
|
142
|
-
event = Logging::LogEvent.new('TestLogger', @levels['info'],
|
143
|
-
[1, 2, 3, 4], false)
|
144
|
-
@appender.append event
|
145
|
-
@appender << 'test message'
|
146
|
-
assert_equal(2, @appender.buffer.length)
|
147
|
-
|
148
|
-
@appender.flush
|
149
|
-
assert_not_equal(@levels.length, @appender.level)
|
150
|
-
assert_equal(0, @appender.buffer.length)
|
151
|
-
end
|
152
|
-
|
153
|
-
def test_close
|
154
|
-
event = Logging::LogEvent.new('TestLogger', @levels['info'],
|
155
|
-
[1, 2, 3, 4], false)
|
156
|
-
@appender.append event
|
157
|
-
@appender << 'test message'
|
158
|
-
assert_equal(2, @appender.buffer.length)
|
159
|
-
|
160
|
-
@appender.close
|
161
|
-
assert_not_equal(@levels.length, @appender.level)
|
162
|
-
assert_equal(0, @appender.buffer.length)
|
163
|
-
assert(@appender.closed?)
|
164
|
-
end
|
165
|
-
|
166
|
-
end # class TestEmail
|
167
|
-
end # module TestLogging
|
168
|
-
end # module TestAppenders
|
169
|
-
|
170
|
-
# EOF
|