Class: Pgtk::LiquibaseTask

Inherits:
Rake::TaskLib
  • Object
show all
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

Instance Method Summary collapse

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

#masterObject

Returns the value of attribute master.



36
37
38
# File 'lib/pgtk/liquibase_task.rb', line 36

def master
  @master
end

#nameObject

Returns the value of attribute name.



35
36
37
# File 'lib/pgtk/liquibase_task.rb', line 35

def name
  @name
end

#quietObject

Returns the value of attribute quiet.



38
39
40
# File 'lib/pgtk/liquibase_task.rb', line 38

def quiet
  @quiet
end

#yamlObject

Returns the value of attribute yaml.



37
38
39
# File 'lib/pgtk/liquibase_task.rb', line 37

def yaml
  @yaml
end