Class: FluentMigratorRunner
- Inherits:
-
Object
- Object
- FluentMigratorRunner
- Includes:
- Albacore::RunCommand, Albacore::Task
- Defined in:
- lib/albacore/fluentmigratorrunner.rb
Constant Summary collapse
- TaskName =
:fluentmigrator
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#output ⇒ Object
Returns the value of attribute output.
-
#output_filename ⇒ Object
Returns the value of attribute output_filename.
-
#preview ⇒ Object
Returns the value of attribute preview.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#script_directory ⇒ Object
Returns the value of attribute script_directory.
-
#show_help ⇒ Object
Returns the value of attribute show_help.
-
#steps ⇒ Object
Returns the value of attribute steps.
-
#target ⇒ Object
Returns the value of attribute target.
-
#task ⇒ Object
Returns the value of attribute task.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes included from Albacore::RunCommand
Attributes included from Logging
Instance Method Summary collapse
- #execute ⇒ Object
- #get_command_line ⇒ Object
- #get_command_parameters ⇒ Object
-
#initialize(command = nil) ⇒ FluentMigratorRunner
constructor
A new instance of FluentMigratorRunner.
Methods included from Albacore::RunCommand
Methods included from AttrMethods
Methods included from Albacore::Task
clean_dirname, create_rake_task, include_config, included
Methods included from UpdateAttributes
Methods included from YAMLConfig
#configure, #load_config_by_task_name
Methods included from Logging
#create_logger, #log_device=, #log_level, #log_level=
Methods included from Failure
Constructor Details
#initialize(command = nil) ⇒ FluentMigratorRunner
Returns a new instance of FluentMigratorRunner.
10 11 12 13 14 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 10 def initialize(command=nil) super() update_attributes Albacore.configuration.fluentmigrator.to_hash @command = command unless command.nil? end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def connection @connection end |
#namespace ⇒ Object
Returns the value of attribute namespace.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def namespace @namespace end |
#output ⇒ Object
Returns the value of attribute output.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def output @output end |
#output_filename ⇒ Object
Returns the value of attribute output_filename.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def output_filename @output_filename end |
#preview ⇒ Object
Returns the value of attribute preview.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def preview @preview end |
#profile ⇒ Object
Returns the value of attribute profile.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def profile @profile end |
#provider ⇒ Object
Returns the value of attribute provider.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def provider @provider end |
#script_directory ⇒ Object
Returns the value of attribute script_directory.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def script_directory @script_directory end |
#show_help ⇒ Object
Returns the value of attribute show_help.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def show_help @show_help end |
#steps ⇒ Object
Returns the value of attribute steps.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def steps @steps end |
#target ⇒ Object
Returns the value of attribute target.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def target @target end |
#task ⇒ Object
Returns the value of attribute task.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def task @task end |
#timeout ⇒ Object
Returns the value of attribute timeout.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def timeout @timeout end |
#verbose ⇒ Object
Returns the value of attribute verbose.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def verbose @verbose end |
#version ⇒ Object
Returns the value of attribute version.
8 9 10 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 8 def version @version end |
Instance Method Details
#execute ⇒ Object
45 46 47 48 49 50 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 45 def execute() result = run_command "FluentMigrator", get_command_parameters = "FluentMigrator failed. See build log for detail." if !result end |
#get_command_line ⇒ Object
16 17 18 19 20 21 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 16 def get_command_line commandline = "#{@command}" commandline << get_command_parameters @logger.debug "Build FuentMigrator Test Runner Command Line: " + commandline commandline end |
#get_command_parameters ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/albacore/fluentmigratorrunner.rb', line 23 def get_command_parameters if @show_help params = " /?" else params = " /target=\"#{@target}\"" params << " /provider=#{@provider}" params << " /connection=\"#{@connection}\"" params << " /ns=#{@namespace}" unless @namespace.nil? params << " /out" if @output == true params << " /outfile=\"#{@output_filename}\"" unless @output_filename.nil? params << " /preview" if @preview == true params << " /steps=#{@steps}" unless @steps.nil? params << " /task=#{@task}" unless @task.nil? params << " /version=#{@version}" unless @version.nil? params << " /verbose=#{@verbose}" if @verbose == true params << " /wd=\"#{@script_directory}\"" unless @script_directory.nil? params << " /profile=#{@profile}" unless @profile.nil? params << " /timeout=#{@timeout}" unless @timeout.nil? end params end |