Class: Pgtk::LiquicheckTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Pgtk::LiquicheckTask
- Defined in:
- lib/pgtk/liquicheck_task.rb
Overview
Liquicheck rake task for check Liquibase XML files.
- Author
-
Yegor Bugayenko ([email protected])
- Copyright
-
Copyright © 2019-2025 Yegor Bugayenko
- License
-
MIT
Instance Attribute Summary collapse
-
#dir ⇒ String
Base directory where Liquibase XML files will be stored.
-
#name ⇒ Symbol
Task name.
-
#pattern ⇒ String
Migration XML files pattern.
Instance Method Summary collapse
-
#initialize(*args, &task_block) ⇒ LiquicheckTask
constructor
A new instance of LiquicheckTask.
Constructor Details
#initialize(*args, &task_block) ⇒ LiquicheckTask
Returns a new instance of LiquicheckTask.
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/pgtk/liquicheck_task.rb', line 27 def initialize(*args, &task_block) super() @name = args.shift || :liquicheck @dir = 'liquibase' @pattern = '*/*.xml' desc 'Check the quality of Liquibase XML files' 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
#dir ⇒ String
Base directory where Liquibase XML files will be stored
21 22 23 |
# File 'lib/pgtk/liquicheck_task.rb', line 21 def dir @dir end |
#name ⇒ Symbol
Task name
17 18 19 |
# File 'lib/pgtk/liquicheck_task.rb', line 17 def name @name end |
#pattern ⇒ String
Migration XML files pattern
25 26 27 |
# File 'lib/pgtk/liquicheck_task.rb', line 25 def pattern @pattern end |