Sha256: b866272ce8957c98c2e0a031107ed4fe0460e799237690ec635a35377bf88adf
Contents?: true
Size: 421 Bytes
Versions: 2
Compression:
Stored size: 421 Bytes
Contents
require 'nokogiri' module Billd class Build def initialize status @status = status end def name Nokogiri.parse(@status).children.attribute('name').value end def outcome outcome = :success! outcome = :failure! if @status[%Q{lastBuildStatus="Failure"}] outcome = :building! if @status[%Q{activity="Building"}] outcome end def to_s "#{name}: #{outcome.to_s.capitalize}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
billd-0.0.3 | lib/billd/build.rb |
billd-0.0.2 | lib/billd/build.rb |