Permalink
Browse files

Rename PluginOrchestrator to PluginRunner

Test plan:
- Unit tests pass

Change-Id: I38f73612d0a541dc2031885b9be8a55b23c5a1d3
  • Loading branch information...
1 parent 96f1192 commit 1ef58a41591ad697b6508f3dd042e4eaba70faeb mpage committed Oct 24, 2011
@@ -1,8 +1,8 @@
require 'vcap/stager/constants'
require 'vcap/stager/config'
require 'vcap/stager/plugin_action_proxy'
-require 'vcap/stager/plugin_orchestrator'
-require 'vcap/stager/plugin_orchestrator_error'
+require 'vcap/stager/plugin_runner'
+require 'vcap/stager/plugin_runner_error'
require 'vcap/stager/plugin_registry'
require 'vcap/stager/task'
require 'vcap/stager/task_error'
@@ -1,8 +0,0 @@
-module VCAP
- module Stager
- class PluginOrchestratorError < StandardError; end
- class MissingFrameworkPluginError < PluginOrchestratorError; end
- class DuplicateFrameworkPluginError < PluginOrchestratorError; end
- class UnknownPluginTypeError < PluginOrchestratorError; end
- end
-end
@@ -1,13 +1,12 @@
require 'fileutils'
require 'rubygems'
-
require 'vcap/cloud_controller/ipc'
require 'vcap/logging'
require 'vcap/stager/constants'
require 'vcap/stager/droplet'
require 'vcap/stager/plugin_action_proxy'
-require 'vcap/stager/plugin_orchestrator_error'
+require 'vcap/stager/plugin_runner_error'
require 'vcap/stager/plugin_registry'
module VCAP
@@ -17,7 +16,7 @@ module Stager
# Responsible for orchestrating the execution of all staging plugins selected
# by the user.
-class VCAP::Stager::PluginOrchestrator
+class VCAP::Stager::PluginRunner
# @param source_dir String Directory containing application source
# @param dest_dir String Directory where the staged droplet should live
# @param app_properties
@@ -0,0 +1,8 @@
+module VCAP
+ module Stager
+ class PluginRunnerError < StandardError; end
+ class MissingFrameworkPluginError < PluginRunnerError; end
+ class DuplicateFrameworkPluginError < PluginRunnerError; end
+ class UnknownPluginTypeError < PluginRunnerError; end
+ end
+end
@@ -3,7 +3,7 @@
require 'fileutils'
require 'tmpdir'
-describe VCAP::Stager::PluginOrchestrator do
+describe VCAP::Stager::PluginRunner do
describe '#run_plugins' do
before :each do
@src_dir = Dir.mktmpdir
@@ -37,14 +37,14 @@
it 'should raise an error for unknown plugins' do
@app_props['plugins'] = [{'gem' => {'name' => 'invalid_gem'}}]
- orch = VCAP::Stager::PluginOrchestrator.new(@src_dir, @dst_dir, @app_props, @cc_info)
+ orch = VCAP::Stager::PluginRunner.new(@src_dir, @dst_dir, @app_props, @cc_info)
expect do
orch.run_plugins
end.to raise_error(LoadError)
end
it 'should raise an error if no framework plugin is supplied' do
- orch = VCAP::Stager::PluginOrchestrator.new(@src_dir, @dst_dir, @app_props, @cc_info)
+ orch = VCAP::Stager::PluginRunner.new(@src_dir, @dst_dir, @app_props, @cc_info)
expect do
orch.run_plugins
end.to raise_error(VCAP::Stager::MissingFrameworkPluginError)
@@ -56,7 +56,7 @@
p = create_mock_plugin("plugin_#{i}", :framework)
VCAP::Stager::PluginRegistry.register_plugin(p)
end
- orch = VCAP::Stager::PluginOrchestrator.new(@src_dir, @dst_dir, @app_props, @cc_info)
+ orch = VCAP::Stager::PluginRunner.new(@src_dir, @dst_dir, @app_props, @cc_info)
expect do
orch.run_plugins
end.to raise_error(VCAP::Stager::DuplicateFrameworkPluginError)
@@ -65,7 +65,7 @@
it 'should raise an error if a plugin of unknown type is supplied' do
p = create_mock_plugin(:plugin0, :invalid_plugin_type)
VCAP::Stager::PluginRegistry.register_plugin(p)
- orch = VCAP::Stager::PluginOrchestrator.new(@src_dir, @dst_dir, @app_props, @cc_info)
+ orch = VCAP::Stager::PluginRunner.new(@src_dir, @dst_dir, @app_props, @cc_info)
expect do
orch.run_plugins
end.to raise_error(VCAP::Stager::UnknownPluginTypeError)
@@ -78,7 +78,7 @@
p.should_receive(:stage).with(any_args())
VCAP::Stager::PluginRegistry.register_plugin(p)
end
- orch = VCAP::Stager::PluginOrchestrator.new(@src_dir, @dst_dir, @app_props, @cc_info)
+ orch = VCAP::Stager::PluginRunner.new(@src_dir, @dst_dir, @app_props, @cc_info)
orch.run_plugins
end
end

0 comments on commit 1ef58a4

Please sign in to comment.