Class: ArduinoBuildNotifier::CruiseControlBuild
- Inherits:
-
Object
- Object
- ArduinoBuildNotifier::CruiseControlBuild
- Defined in:
- lib/arduino_build_notifier/cruise_control_build.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(url, project, auth = {}) ⇒ CruiseControlBuild
constructor
A new instance of CruiseControlBuild.
- #request_status ⇒ Object
Constructor Details
#initialize(url, project, auth = {}) ⇒ CruiseControlBuild
Returns a new instance of CruiseControlBuild.
8 9 10 11 12 |
# File 'lib/arduino_build_notifier/cruise_control_build.rb', line 8 def initialize(url, project, auth = {}) @url = "#{url}/XmlStatusReport.aspx" @project = project @auth = auth end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/arduino_build_notifier/cruise_control_build.rb', line 6 def status @status end |
Instance Method Details
#request_status ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/arduino_build_notifier/cruise_control_build.rb', line 14 def request_status begin response = HTTParty.get @url, basic_auth: @auth response = parse(response) set_status(response) rescue @status = :error end end |