Class: Mu::Homepage
Constant Summary
Constants included from Helper
Instance Attribute Summary collapse
-
#cookie ⇒ Object
Returns the value of attribute cookie.
-
#docroot ⇒ Object
Returns the value of attribute docroot.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#posted_uuid ⇒ Object
Returns the value of attribute posted_uuid.
-
#results ⇒ Object
Returns the value of attribute results.
-
#session_id ⇒ Object
Returns the value of attribute session_id.
-
#testsuite ⇒ Object
Returns the value of attribute testsuite.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#all ⇒ Object
returns all homepage elements.
-
#initialize(host = ENV['MU_IP'], username = ENV['MU_ADMIN_USER'], password = ENV['MU_ADMIN_PASS']) ⇒ Homepage
constructor
A new instance of Homepage.
-
#latest_test ⇒ Object
returns the latest test.
-
#queue_test ⇒ Object
returns queued tests.
-
#recent ⇒ Object
returns recent homepage activity.
-
#status ⇒ Object
returns homepage status.
Methods included from Helper
#ask, #bin2hex, #error, #escape, #format_float, #get_file_as_string_array, #make_xml, #msg, #shift, #to_boolean
Constructor Details
#initialize(host = ENV['MU_IP'], username = ENV['MU_ADMIN_USER'], password = ENV['MU_ADMIN_PASS']) ⇒ Homepage
Returns a new instance of Homepage.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/mu/api/homepage.rb', line 7 def initialize(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS']) @host = host @username = username @password = password @docroot = "/api/v5/homepage/" @cookie = "" @response = nil @http = HttpHelper.new(@host, @username, @password, @docroot) msg "Created Homepage object to :#{@host}", Logger::DEBUG end |
Instance Attribute Details
#cookie ⇒ Object
Returns the value of attribute cookie.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def @cookie end |
#docroot ⇒ Object
Returns the value of attribute docroot.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def docroot @docroot end |
#errors ⇒ Object
Returns the value of attribute errors.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def errors @errors end |
#failed ⇒ Object
Returns the value of attribute failed.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def failed @failed end |
#host ⇒ Object
Returns the value of attribute host.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def host @host end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def password @password end |
#posted_uuid ⇒ Object
Returns the value of attribute posted_uuid.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def posted_uuid @posted_uuid end |
#results ⇒ Object
Returns the value of attribute results.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def results @results end |
#session_id ⇒ Object
Returns the value of attribute session_id.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def session_id @session_id end |
#testsuite ⇒ Object
Returns the value of attribute testsuite.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def testsuite @testsuite end |
#username ⇒ Object
Returns the value of attribute username.
5 6 7 |
# File 'lib/mu/api/homepage.rb', line 5 def username @username end |
Instance Method Details
#all ⇒ Object
returns all homepage elements
19 20 21 22 23 |
# File 'lib/mu/api/homepage.rb', line 19 def all response = @http.get("all/") msg response, Logger::DEBUG return response end |
#latest_test ⇒ Object
returns the latest test
40 41 42 43 44 |
# File 'lib/mu/api/homepage.rb', line 40 def latest_test response = @http.get("test/latest/") msg response, Logger::DEBUG return response end |
#queue_test ⇒ Object
returns queued tests
47 48 49 50 51 |
# File 'lib/mu/api/homepage.rb', line 47 def queue_test response = @http.get("test/queue/") msg response, Logger::DEBUG return response end |
#recent ⇒ Object
returns recent homepage activity
26 27 28 29 30 |
# File 'lib/mu/api/homepage.rb', line 26 def recent response = @http.get("recent/") msg response, Logger::DEBUG return response end |
#status ⇒ Object
returns homepage status
33 34 35 36 37 |
# File 'lib/mu/api/homepage.rb', line 33 def status response = @http.get("status/") msg response, Logger::DEBUG return response end |