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-2025 Yegor Bugayenko
- License
-
MIT
Instance Attribute Summary collapse
-
#contexts ⇒ String
Liquibase contexts to apply.
-
#liquibase_version ⇒ String
Liquibase version to use.
-
#master ⇒ String
Path to Liquibase master XML file.
-
#name ⇒ Symbol
Task name.
-
#postgresql_version ⇒ String
PostgreSQL JDBC driver version to use.
-
#quiet ⇒ Boolean
Whether to suppress output.
-
#yaml ⇒ String+
Path to YAML file with PostgreSQL connection details.
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.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/pgtk/liquibase_task.rb', line 51 def initialize(*args, &task_block) super() @name = args.shift || :liquibase @quiet = false @contexts = '' @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
#contexts ⇒ String
Liquibase contexts to apply
45 46 47 |
# File 'lib/pgtk/liquibase_task.rb', line 45 def contexts @contexts end |
#liquibase_version ⇒ String
Liquibase version to use
37 38 39 |
# File 'lib/pgtk/liquibase_task.rb', line 37 def liquibase_version @liquibase_version end |
#master ⇒ String
Path to Liquibase master XML file
25 26 27 |
# File 'lib/pgtk/liquibase_task.rb', line 25 def master @master end |
#name ⇒ Symbol
Task name
21 22 23 |
# File 'lib/pgtk/liquibase_task.rb', line 21 def name @name end |
#postgresql_version ⇒ String
PostgreSQL JDBC driver version to use
41 42 43 |
# File 'lib/pgtk/liquibase_task.rb', line 41 def postgresql_version @postgresql_version end |
#quiet ⇒ Boolean
Whether to suppress output
33 34 35 |
# File 'lib/pgtk/liquibase_task.rb', line 33 def quiet @quiet end |
#yaml ⇒ String+
Path to YAML file with PostgreSQL connection details
29 30 31 |
# File 'lib/pgtk/liquibase_task.rb', line 29 def yaml @yaml end |