Class: Pgtk::LiquibaseTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Pgtk::LiquibaseTask
- 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
-
#liquibase_version ⇒ Object
Returns the value of attribute liquibase_version.
-
#master ⇒ Object
Returns the value of attribute master.
-
#name ⇒ Object
Returns the value of attribute name.
-
#postgresql_version ⇒ Object
Returns the value of attribute postgresql_version.
-
#quiet ⇒ Object
Returns the value of attribute quiet.
-
#yaml ⇒ Object
Returns the value of attribute yaml.
Instance Method Summary collapse
-
#initialize(*args, &task_block) ⇒ LiquibaseTask
constructor
A new instance of LiquibaseTask.
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_version ⇒ Object
Returns the value of attribute liquibase_version.
36 37 38 |
# File 'lib/pgtk/liquibase_task.rb', line 36 def liquibase_version @liquibase_version end |
#master ⇒ Object
Returns the value of attribute master.
36 37 38 |
# File 'lib/pgtk/liquibase_task.rb', line 36 def master @master end |
#name ⇒ Object
Returns the value of attribute name.
36 37 38 |
# File 'lib/pgtk/liquibase_task.rb', line 36 def name @name end |
#postgresql_version ⇒ Object
Returns the value of attribute postgresql_version.
36 37 38 |
# File 'lib/pgtk/liquibase_task.rb', line 36 def postgresql_version @postgresql_version end |
#quiet ⇒ Object
Returns the value of attribute quiet.
36 37 38 |
# File 'lib/pgtk/liquibase_task.rb', line 36 def quiet @quiet end |
#yaml ⇒ Object
Returns the value of attribute yaml.
36 37 38 |
# File 'lib/pgtk/liquibase_task.rb', line 36 def yaml @yaml end |