Class: Physique::FluentMigratorConfig

Inherits:
Object
  • Object
show all
Extended by:
Albacore::ConfigDSL
Includes:
Albacore::Logging
Defined in:
lib/physique/task_builders/fluent_migrator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFluentMigratorConfig

Returns a new instance of FluentMigratorConfig.



19
20
21
22
# File 'lib/physique/task_builders/fluent_migrator.rb', line 19

def initialize
  @lang = :cs
  @scripts_dir = '_Scripts'
end

Instance Attribute Details

#dialect=(value) ⇒ Object (writeonly)

Programming language of the db project



12
13
14
# File 'lib/physique/task_builders/fluent_migrator.rb', line 12

def dialect=(value)
  @dialect = value
end

#instance=(value) ⇒ Object (writeonly)

Programming language of the db project



12
13
14
# File 'lib/physique/task_builders/fluent_migrator.rb', line 12

def instance=(value)
  @instance = value
end

#lang=(value) ⇒ Object (writeonly)

Programming language of the db project



12
13
14
# File 'lib/physique/task_builders/fluent_migrator.rb', line 12

def lang=(value)
  @lang = value
end

#name=(value) ⇒ Object (writeonly)

Programming language of the db project



12
13
14
# File 'lib/physique/task_builders/fluent_migrator.rb', line 12

def name=(value)
  @name = value
end

#scripts_dir=(value) ⇒ Object (writeonly)

Programming language of the db project



12
13
14
# File 'lib/physique/task_builders/fluent_migrator.rb', line 12

def scripts_dir=(value)
  @scripts_dir = value
end

#task_alias=(value) ⇒ Object (writeonly)

Programming language of the db project



12
13
14
# File 'lib/physique/task_builders/fluent_migrator.rb', line 12

def task_alias=(value)
  @task_alias = value
end

Instance Method Details

#optsObject



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/physique/task_builders/fluent_migrator.rb', line 24

def opts
  validate_config

  Map.new({
    lang: @lang,
    instance: @instance,
    name: @name,
    scripts_dir: @scripts_dir,
    dialect: @dialect,
    project_file: Physique::ProjectPathResolver.resolve(@project, @lang),
    task_alias: (@task_alias || @name),
  })
end