Class: CruiseStatus
- Inherits:
-
Object
- Object
- CruiseStatus
- Defined in:
- lib/cruisestatus.rb,
lib/cruisestatus/version.rb,
lib/cruisestatus/feed_parser.rb,
lib/cruisestatus/cruise_rb_parser.rb,
lib/cruisestatus/run_code_run_parser.rb
Overview
Defined Under Namespace
Modules: Version Classes: Command, CruiseRbParser, FeedParser, RunCodeRunParser
Instance Attribute Summary collapse
-
#feed_url ⇒ Object
Returns the value of attribute feed_url.
Class Method Summary collapse
-
.check(feed_url) ⇒ Object
Check the given cruise feed and return true if all builds have passed.
Instance Method Summary collapse
-
#check ⇒ Object
Update build status.
- #failure_message ⇒ Object
-
#failures ⇒ Object
A list of failing builds.
-
#initialize(feed_url) ⇒ CruiseStatus
constructor
- feed_url
-
URL pointing to a cruise.rb RSS feed.
-
#pass? ⇒ Boolean
True if all builds described by the feed are passing.
Constructor Details
#initialize(feed_url) ⇒ CruiseStatus
- feed_url
-
URL pointing to a cruise.rb RSS feed. Example: “my.cruise.com/projects.rss” or: “my.cruise.com/projects/myproject.rss”“
22 23 24 25 |
# File 'lib/cruisestatus.rb', line 22 def initialize( feed_url ) self.feed_url = feed_url check end |
Instance Attribute Details
#feed_url ⇒ Object
Returns the value of attribute feed_url.
15 16 17 |
# File 'lib/cruisestatus.rb', line 15 def feed_url @feed_url end |
Class Method Details
.check(feed_url) ⇒ Object
Check the given cruise feed and return true if all builds have passed. Returns false otherwise.
29 30 31 |
# File 'lib/cruisestatus.rb', line 29 def self.check( feed_url ) new( feed_url ).pass? end |
Instance Method Details
#check ⇒ Object
Update build status
35 36 37 |
# File 'lib/cruisestatus.rb', line 35 def check @feed_parser.check end |
#failure_message ⇒ Object
51 52 53 |
# File 'lib/cruisestatus.rb', line 51 def self.failures.join ", " end |
#failures ⇒ Object
A list of failing builds. Empty if all builds passed.
47 48 49 |
# File 'lib/cruisestatus.rb', line 47 def failures @feed_parser.failures end |
#pass? ⇒ Boolean
True if all builds described by the feed are passing.
41 42 43 |
# File 'lib/cruisestatus.rb', line 41 def pass? @feed_parser.failures.empty? end |