Class: Pgtk::LiquibaseTask

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

Overview

Liquibase rake task.

Author

Yegor Bugayenko ([email protected])

Copyright

Copyright © 2019-2024 Yegor Bugayenko

License

MIT

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &task_block) ⇒ LiquibaseTask

Returns a new instance of LiquibaseTask.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/pgtk/liquibase_task.rb', line 37

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

Instance Attribute Details

#liquibase_versionObject

Returns the value of attribute liquibase_version.



35
36
37
# File 'lib/pgtk/liquibase_task.rb', line 35

def liquibase_version
  @liquibase_version
end

#masterObject

Returns the value of attribute master.



35
36
37
# File 'lib/pgtk/liquibase_task.rb', line 35

def master
  @master
end

#nameObject

Returns the value of attribute name.



35
36
37
# File 'lib/pgtk/liquibase_task.rb', line 35

def name
  @name
end

#postgresql_versionObject

Returns the value of attribute postgresql_version.



35
36
37
# File 'lib/pgtk/liquibase_task.rb', line 35

def postgresql_version
  @postgresql_version
end

#quietObject

Returns the value of attribute quiet.



35
36
37
# File 'lib/pgtk/liquibase_task.rb', line 35

def quiet
  @quiet
end

#yamlObject

Returns the value of attribute yaml.



35
36
37
# File 'lib/pgtk/liquibase_task.rb', line 35

def yaml
  @yaml
end