Class: Pgtk::LiquicheckTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/pgtk/liquicheck_task.rb

Overview

Liquicheck rake task for check Liquibase XML files.

Author

Yegor Bugayenko (yegor256@gmail.com)

Copyright

Copyright © 2019-2026 Yegor Bugayenko

License

MIT

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &task_block) ⇒ LiquicheckTask

Returns a new instance of LiquicheckTask.



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/pgtk/liquicheck_task.rb', line 17

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.verbose(true) do
      yield(*[self, task_args].slice(0, task_block.arity)) if block_given?
      run
    end
  end
end

Instance Attribute Details

#dirObject

Returns the value of attribute dir.



15
16
17
# File 'lib/pgtk/liquicheck_task.rb', line 15

def dir
  @dir
end

#nameObject

Returns the value of attribute name.



15
16
17
# File 'lib/pgtk/liquicheck_task.rb', line 15

def name
  @name
end

#patternObject

Returns the value of attribute pattern.



15
16
17
# File 'lib/pgtk/liquicheck_task.rb', line 15

def pattern
  @pattern
end