Class: Pipeline::Scanner

Inherits:
Object
  • Object
show all
Defined in:
lib/pipeline/scanner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeScanner

Pass in path to the root of the Rails application



10
11
12
13
# File 'lib/pipeline/scanner.rb', line 10

def initialize
  @stage = :wait
  @stages = [ :wait, :mount, :file, :code, :live, :done]
end

Instance Attribute Details

#mounterObject (readonly)

Returns the value of attribute mounter.



7
8
9
# File 'lib/pipeline/scanner.rb', line 7

def mounter
  @mounter
end

#trackerObject (readonly)

Returns the value of attribute tracker.



6
7
8
# File 'lib/pipeline/scanner.rb', line 6

def tracker
  @tracker
end

Instance Method Details

#process(target, tracker) ⇒ Object

Process everything in the Rails application



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/pipeline/scanner.rb', line 16

def process target, tracker
  @stages.each do |stage|
    Pipeline.notify "Running tasks in stage: #{stage}"
    @stage = stage
    begin
       Pipeline::Tasks.run_tasks(target, stage, tracker)
    rescue Exception => e
      Pipeline.warn e.message
      raise e
    end
  end
end