Class: PluginManager
Instance Method Summary collapse
- #load_plugin_scripts(script_plugins, system_objects) {|{ :environment => environment }| ... } ⇒ Object
- #plugins_failed? ⇒ Boolean
- #post_build ⇒ Object
- #post_compile_execute(arg_hash) ⇒ Object
- #post_error ⇒ Object
- #post_link_execute(arg_hash) ⇒ Object
- #post_mock_generate(arg_hash) ⇒ Object
- #post_release ⇒ Object
- #post_runner_generate(arg_hash) ⇒ Object
- #post_test(test) ⇒ Object
- #post_test_fixture_execute(arg_hash) ⇒ Object
- #pre_build ⇒ Object
- #pre_compile_execute(arg_hash) ⇒ Object
- #pre_link_execute(arg_hash) ⇒ Object
-
#pre_mock_generate(arg_hash) ⇒ Object
execute all plugin methods ####.
- #pre_release ⇒ Object
- #pre_runner_generate(arg_hash) ⇒ Object
- #pre_test(test) ⇒ Object
- #pre_test_fixture_execute(arg_hash) ⇒ Object
- #print_plugin_failures ⇒ Object
- #register_build_failure(message) ⇒ Object
- #setup ⇒ Object
- #summary ⇒ Object
Instance Method Details
#load_plugin_scripts(script_plugins, system_objects) {|{ :environment => environment }| ... } ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ceedling/plugin_manager.rb', line 12 def load_plugin_scripts(script_plugins, system_objects) environment = [] script_plugins.each do |plugin| # protect against instantiating object multiple times due to processing config multiple times (option files, etc) next if (@plugin_manager_helper.include?(@plugin_objects, plugin)) begin @system_wrapper.require_file( "#{plugin}.rb" ) object = @plugin_manager_helper.instantiate_plugin_script( camelize(plugin), system_objects, plugin ) @plugin_objects << object environment += object.environment # add plugins to hash of all system objects system_objects[plugin.downcase.to_sym] = object rescue puts "Exception raised while trying to load plugin: #{plugin}" raise end end yield( { :environment => environment } ) if (environment.size > 0) end |
#plugins_failed? ⇒ Boolean
35 36 37 |
# File 'lib/ceedling/plugin_manager.rb', line 35 def plugins_failed? return (@build_fail_registry.size > 0) end |
#post_build ⇒ Object
85 |
# File 'lib/ceedling/plugin_manager.rb', line 85 def post_build; execute_plugins(:post_build); end |
#post_compile_execute(arg_hash) ⇒ Object
66 |
# File 'lib/ceedling/plugin_manager.rb', line 66 def post_compile_execute(arg_hash); execute_plugins(:post_compile_execute, arg_hash); end |
#post_error ⇒ Object
86 |
# File 'lib/ceedling/plugin_manager.rb', line 86 def post_error; execute_plugins(:post_error); end |
#post_link_execute(arg_hash) ⇒ Object
69 |
# File 'lib/ceedling/plugin_manager.rb', line 69 def post_link_execute(arg_hash); execute_plugins(:post_link_execute, arg_hash); end |
#post_mock_generate(arg_hash) ⇒ Object
60 |
# File 'lib/ceedling/plugin_manager.rb', line 60 def post_mock_generate(arg_hash); execute_plugins(:post_mock_generate, arg_hash); end |
#post_release ⇒ Object
82 |
# File 'lib/ceedling/plugin_manager.rb', line 82 def post_release; execute_plugins(:post_release); end |
#post_runner_generate(arg_hash) ⇒ Object
63 |
# File 'lib/ceedling/plugin_manager.rb', line 63 def post_runner_generate(arg_hash); execute_plugins(:post_runner_generate, arg_hash); end |
#post_test(test) ⇒ Object
79 |
# File 'lib/ceedling/plugin_manager.rb', line 79 def post_test(test); execute_plugins(:post_test, test); end |
#post_test_fixture_execute(arg_hash) ⇒ Object
72 73 74 75 76 |
# File 'lib/ceedling/plugin_manager.rb', line 72 def post_test_fixture_execute(arg_hash) # special arbitration: raw test results are printed or taken over by plugins handling the job @streaminator.stdout_puts(arg_hash[:shell_result][:output]) if (@configurator.plugins_display_raw_test_results) execute_plugins(:post_test_fixture_execute, arg_hash) end |
#pre_build ⇒ Object
84 |
# File 'lib/ceedling/plugin_manager.rb', line 84 def pre_build; execute_plugins(:pre_build); end |
#pre_compile_execute(arg_hash) ⇒ Object
65 |
# File 'lib/ceedling/plugin_manager.rb', line 65 def pre_compile_execute(arg_hash); execute_plugins(:pre_compile_execute, arg_hash); end |
#pre_link_execute(arg_hash) ⇒ Object
68 |
# File 'lib/ceedling/plugin_manager.rb', line 68 def pre_link_execute(arg_hash); execute_plugins(:pre_link_execute, arg_hash); end |
#pre_mock_generate(arg_hash) ⇒ Object
execute all plugin methods ####
59 |
# File 'lib/ceedling/plugin_manager.rb', line 59 def pre_mock_generate(arg_hash); execute_plugins(:pre_mock_generate, arg_hash); end |
#pre_release ⇒ Object
81 |
# File 'lib/ceedling/plugin_manager.rb', line 81 def pre_release; execute_plugins(:pre_release); end |
#pre_runner_generate(arg_hash) ⇒ Object
62 |
# File 'lib/ceedling/plugin_manager.rb', line 62 def pre_runner_generate(arg_hash); execute_plugins(:pre_runner_generate, arg_hash); end |
#pre_test(test) ⇒ Object
78 |
# File 'lib/ceedling/plugin_manager.rb', line 78 def pre_test(test); execute_plugins(:pre_test, test); end |
#pre_test_fixture_execute(arg_hash) ⇒ Object
71 |
# File 'lib/ceedling/plugin_manager.rb', line 71 def pre_test_fixture_execute(arg_hash); execute_plugins(:pre_test_fixture_execute, arg_hash); end |
#print_plugin_failures ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ceedling/plugin_manager.rb', line 39 def print_plugin_failures if (@build_fail_registry.size > 0) report = @reportinator.('BUILD FAILURE SUMMARY') @build_fail_registry.each do |failure| report += "#{' - ' if (@build_fail_registry.size > 1)}#{failure}\n" end report += "\n" @streaminator.stderr_puts(report, Verbosity::ERRORS) end end |
#register_build_failure(message) ⇒ Object
53 54 55 |
# File 'lib/ceedling/plugin_manager.rb', line 53 def register_build_failure() @build_fail_registry << if ( and not .empty?) end |
#setup ⇒ Object
7 8 9 10 |
# File 'lib/ceedling/plugin_manager.rb', line 7 def setup @build_fail_registry = [] @plugin_objects = [] # so we can preserve order end |
#summary ⇒ Object
88 |
# File 'lib/ceedling/plugin_manager.rb', line 88 def summary; execute_plugins(:summary); end |