Module: XcodeBuild::Reporting::BuildReporting

Included in:
XcodeBuild::Reporter
Defined in:
lib/xcode_build/reporting/build_reporting.rb

Defined Under Namespace

Classes: Build

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



6
7
8
9
10
# File 'lib/xcode_build/reporting/build_reporting.rb', line 6

def self.included(klass)
  klass.instance_eval do
    attr_reader :build
  end
end

Instance Method Details

#build_error_detected(params) ⇒ Object



27
28
29
# File 'lib/xcode_build/reporting/build_reporting.rb', line 27

def build_error_detected(params)
  @build.last_step.add_error(params)
end

#build_failedObject



36
37
38
39
# File 'lib/xcode_build/reporting/build_reporting.rb', line 36

def build_failed
  @build.failure!
  build_finished
end

#build_started(params) ⇒ Object



12
13
14
15
# File 'lib/xcode_build/reporting/build_reporting.rb', line 12

def build_started(params)
  @build = Build.new(params)
  notify :build_started, @build
end

#build_step(params) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/xcode_build/reporting/build_reporting.rb', line 17

def build_step(params)
  if @build.last_step
    notify :build_step_finished, @build.last_step
  end

  @build.add_step(params)

  notify :build_step_started, @build.last_step
end

#build_step_failed(params) ⇒ Object



41
42
43
44
45
# File 'lib/xcode_build/reporting/build_reporting.rb', line 41

def build_step_failed(params)
  if step = @build.step_with_params(params)
    step.failed = true
  end
end

#build_succeededObject



31
32
33
34
# File 'lib/xcode_build/reporting/build_reporting.rb', line 31

def build_succeeded
  @build.success!
  build_finished
end