Sha256: 112264268469f5310bff59a8be56919763a8c079544dc59d8ff698901fc32577
Contents?: true
Size: 1014 Bytes
Versions: 5
Compression:
Stored size: 1014 Bytes
Contents
class DummyManager attr_reader :builder, :scm, :setup_script_output DummyScm = Struct.new(:last_commit_message, :current_revision, :last_author) DummyBuilder = Struct.new(:output) def initialize(last_commit_message, output, current_revision, last_author) @scm = DummyScm.new(last_commit_message, current_revision, last_author) @builder = DummyBuilder.new(output) end end class DummyStatus attr_reader :previous_brokeness, :current_brokeness def initialize(param) @hash = param @current_build_successful = @hash['state'] @previous_build_successful = @hash['previous_build'] || false @previous_brokeness = @hash['previous_brokeness'] || '' @current_brokeness = @hash['current_brokeness'] || '' end def current_state if @current_build_successful if @previous_build_sucessful.nil? :setup else @previous_build_successful ? :successful : :revival end else @previous_build_successful ? :failed : :broken end end end
Version data entries
5 entries across 5 versions & 2 rubygems