Class: Pgtk::LiquibaseTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/pgtk/liquibase_task.rb

Overview

Liquibase rake task.

Author

Yegor Bugayenko (yegor256@gmail.com)

Copyright

Copyright © 2019-2026 Yegor Bugayenko

License

MIT

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) {|Pgtk::LiquibaseTask, Object| ... } ⇒ LiquibaseTask

Initialize a new Liquibase task.

Parameters:

  • args (Array)

    Task arguments

Yields:



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/pgtk/liquibase_task.rb', line 28

def initialize(*args, &task_block)
  super()
  @docker ||= :maybe
  @name = args.shift || :liquibase
  @quiet = false
  @contexts = ''
  @liquibase = '3.2.2'
  @postgresql = '42.7.0'
  desc('Deploy Liquibase changes to the running PostgreSQL server') unless ::Rake.application.last_description
  task(name, *args) do |_, task_args|
    RakeFileUtils.verbose(true) do
      yield(*[self, task_args].slice(0, task_block.arity)) if block_given?
      run
    end
  end
end

Instance Attribute Details

#contextsObject

Returns the value of attribute contexts.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def contexts
  @contexts
end

#dockerObject

Returns the value of attribute docker.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def docker
  @docker
end

#liquibaseObject

Returns the value of attribute liquibase.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def liquibase
  @liquibase
end

#masterObject

Returns the value of attribute master.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def master
  @master
end

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def name
  @name
end

#postgresqlObject

Returns the value of attribute postgresql.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def postgresql
  @postgresql
end

#quietObject

Returns the value of attribute quiet.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def quiet
  @quiet
end

#schemaObject

Returns the value of attribute schema.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def schema
  @schema
end

#yamlObject

Returns the value of attribute yaml.



22
23
24
# File 'lib/pgtk/liquibase_task.rb', line 22

def yaml
  @yaml
end