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.



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

def initialize(*args, &task_block)
  super()
  @name = args.shift || :liquibase
  @quiet = 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.



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

def liquibase_version
  @liquibase_version
end

#masterObject

Returns the value of attribute master.



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

def master
  @master
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#postgresql_versionObject

Returns the value of attribute postgresql_version.



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

def postgresql_version
  @postgresql_version
end

#quietObject

Returns the value of attribute quiet.



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

def quiet
  @quiet
end

#yamlObject

Returns the value of attribute yaml.



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

def yaml
  @yaml
end