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 (yegor256@gmail.com)
- Copyright
-
Copyright © 2019-2026 Yegor Bugayenko
- License
-
MIT
Instance Attribute Summary collapse
-
#contexts ⇒ Object
Returns the value of attribute contexts.
-
#docker ⇒ Object
Returns the value of attribute docker.
-
#liquibase ⇒ Object
Returns the value of attribute liquibase.
-
#master ⇒ Object
Returns the value of attribute master.
-
#name ⇒ Object
Returns the value of attribute name.
-
#postgresql ⇒ Object
Returns the value of attribute postgresql.
-
#quiet ⇒ Object
Returns the value of attribute quiet.
-
#schema ⇒ Object
Returns the value of attribute schema.
-
#yaml ⇒ Object
Returns the value of attribute yaml.
Instance Method Summary collapse
-
#initialize(*args) {|Pgtk::LiquibaseTask, Object| ... } ⇒ LiquibaseTask
constructor
Initialize a new Liquibase task.
Constructor Details
#initialize(*args) {|Pgtk::LiquibaseTask, Object| ... } ⇒ LiquibaseTask
Initialize a new Liquibase task.
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
#contexts ⇒ Object
Returns the value of attribute contexts.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def contexts @contexts end |
#docker ⇒ Object
Returns the value of attribute docker.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def docker @docker end |
#liquibase ⇒ Object
Returns the value of attribute liquibase.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def liquibase @liquibase end |
#master ⇒ Object
Returns the value of attribute master.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def master @master end |
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def name @name end |
#postgresql ⇒ Object
Returns the value of attribute postgresql.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def postgresql @postgresql end |
#quiet ⇒ Object
Returns the value of attribute quiet.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def quiet @quiet end |
#schema ⇒ Object
Returns the value of attribute schema.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def schema @schema end |
#yaml ⇒ Object
Returns the value of attribute yaml.
22 23 24 |
# File 'lib/pgtk/liquibase_task.rb', line 22 def yaml @yaml end |