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 Yegor Bugayenko
- License
-
MIT
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
-
#name ⇒ Object
Returns the value of attribute name.
-
#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.
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/pgtk/liquibase_task.rb', line 40 def initialize(*args, &task_block) @name = args.shift || :liquibase @quite = false unless ::Rake.application.last_description desc 'Deploy Liquibase changes to the running PostgreSQL server' end 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
#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.
35 36 37 |
# File 'lib/pgtk/liquibase_task.rb', line 35 def name @name end |
#quiet ⇒ Object
Returns the value of attribute quiet.
38 39 40 |
# File 'lib/pgtk/liquibase_task.rb', line 38 def quiet @quiet end |
#yaml ⇒ Object
Returns the value of attribute yaml.
37 38 39 |
# File 'lib/pgtk/liquibase_task.rb', line 37 def yaml @yaml end |