Class: Rake::Funnel::Integration::ProgressReport

Inherits:
Object
  • Object
show all
Defined in:
lib/rake/funnel/integration/progress_report.rb

Direct Known Subclasses

TeamCity::ProgressReport

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ ProgressReport

Returns a new instance of ProgressReport.

Yields:

  • (_self)

Yield Parameters:



9
10
11
12
13
14
15
16
17
# File 'lib/rake/funnel/integration/progress_report.rb', line 9

def initialize
  task_starting do |task, _args|
    puts "\n[#{task.name}]".bold.cyan unless Rake::Funnel::Integration::TeamCity.running?
  end

  yield self if block_given?

  patch.apply!
end

Instance Attribute Details

#finishedObject (readonly)

Returns the value of attribute finished.



7
8
9
# File 'lib/rake/funnel/integration/progress_report.rb', line 7

def finished
  @finished
end

#startingObject (readonly)

Returns the value of attribute starting.



7
8
9
# File 'lib/rake/funnel/integration/progress_report.rb', line 7

def starting
  @starting
end

Instance Method Details

#disable!Object



27
28
29
# File 'lib/rake/funnel/integration/progress_report.rb', line 27

def disable!
  patch.revert!
end

#task_finished(&block) ⇒ Object



23
24
25
# File 'lib/rake/funnel/integration/progress_report.rb', line 23

def task_finished(&block)
  @finished = block
end

#task_starting(&block) ⇒ Object



19
20
21
# File 'lib/rake/funnel/integration/progress_report.rb', line 19

def task_starting(&block)
  @starting = block
end