class PluginManager

Public Instance Methods

load_plugin_scripts(script_plugins, system_objects) { |{ :environment => environment }| ... } click to toggle source
# 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?() click to toggle source
# File lib/ceedling/plugin_manager.rb, line 35
def plugins_failed?
  return (@build_fail_registry.size > 0)
end
post_build() click to toggle source
# File lib/ceedling/plugin_manager.rb, line 85
def post_build; execute_plugins(:post_build); end
post_compile_execute(arg_hash) click to toggle source
# File lib/ceedling/plugin_manager.rb, line 66
def post_compile_execute(arg_hash); execute_plugins(:post_compile_execute, arg_hash); end
post_error() click to toggle source
# File lib/ceedling/plugin_manager.rb, line 86
def post_error; execute_plugins(:post_error); end
post_link_execute(arg_hash) click to toggle source
# 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) click to toggle source
# File lib/ceedling/plugin_manager.rb, line 60
def post_mock_generate(arg_hash); execute_plugins(:post_mock_generate, arg_hash); end
post_release() click to toggle source
# File lib/ceedling/plugin_manager.rb, line 82
def post_release; execute_plugins(:post_release); end
post_runner_generate(arg_hash) click to toggle source
# 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) click to toggle source
# File lib/ceedling/plugin_manager.rb, line 79
def post_test(test); execute_plugins(:post_test, test); end
post_test_fixture_execute(arg_hash) click to toggle source
# 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() click to toggle source
# File lib/ceedling/plugin_manager.rb, line 84
def pre_build; execute_plugins(:pre_build); end
pre_compile_execute(arg_hash) click to toggle source
# File lib/ceedling/plugin_manager.rb, line 65
def pre_compile_execute(arg_hash); execute_plugins(:pre_compile_execute, arg_hash); end
pre_mock_generate(arg_hash) click to toggle source

execute all plugin methods ####

# File lib/ceedling/plugin_manager.rb, line 59
def pre_mock_generate(arg_hash); execute_plugins(:pre_mock_generate, arg_hash); end
pre_release() click to toggle source
# File lib/ceedling/plugin_manager.rb, line 81
def pre_release; execute_plugins(:pre_release); end
pre_runner_generate(arg_hash) click to toggle source
# 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) click to toggle source
# File lib/ceedling/plugin_manager.rb, line 78
def pre_test(test); execute_plugins(:pre_test, test); end
pre_test_fixture_execute(arg_hash) click to toggle source
# 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() click to toggle source
register_build_failure(message) click to toggle source
# File lib/ceedling/plugin_manager.rb, line 53
def register_build_failure(message)
  @build_fail_registry << message if (message and not message.empty?)
end
setup() click to toggle source
# File lib/ceedling/plugin_manager.rb, line 7
def setup
  @build_fail_registry = []
  @plugin_objects = [] # so we can preserve order
end
summary() click to toggle source
# File lib/ceedling/plugin_manager.rb, line 88
def summary; execute_plugins(:summary); end