Class: CiHelper::CiProcedure
- Inherits:
-
Object
- Object
- CiHelper::CiProcedure
- Defined in:
- lib/ci_helper/ci_procedure.rb
Defined Under Namespace
Classes: Result
Constant Summary collapse
- CI_LOGIN_URL =
this class hardcoding the procedure to the result page
'http://ci.raamsys.co.uk/login?from=%2F'
- CI_DOMAIN =
'http://ci.raamsys.co.uk/'
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#console_page ⇒ Object
Returns the value of attribute console_page.
-
#issue_page ⇒ Object
Returns the value of attribute issue_page.
-
#main_page ⇒ Object
readonly
Returns the value of attribute main_page.
-
#matching_strategy ⇒ Object
Returns the value of attribute matching_strategy.
-
#mechanize ⇒ Object
readonly
Returns the value of attribute mechanize.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#raam_page ⇒ Object
Returns the value of attribute raam_page.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
- #branch_name ⇒ Object
- #commit_hash ⇒ Object
- #get_console_output ⇒ Object
-
#initialize(account, password) ⇒ CiProcedure
constructor
A new instance of CiProcedure.
- #issue_number ⇒ Object
- #re_get_console_output ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(account, password) ⇒ CiProcedure
Returns a new instance of CiProcedure.
16 17 18 19 20 |
# File 'lib/ci_helper/ci_procedure.rb', line 16 def initialize(account, password) @account = account @password = password @mechanize = Mechanize.new end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
11 12 13 |
# File 'lib/ci_helper/ci_procedure.rb', line 11 def account @account end |
#console_page ⇒ Object
Returns the value of attribute console_page.
10 11 12 |
# File 'lib/ci_helper/ci_procedure.rb', line 10 def console_page @console_page end |
#issue_page ⇒ Object
Returns the value of attribute issue_page.
10 11 12 |
# File 'lib/ci_helper/ci_procedure.rb', line 10 def issue_page @issue_page end |
#main_page ⇒ Object (readonly)
Returns the value of attribute main_page.
11 12 13 |
# File 'lib/ci_helper/ci_procedure.rb', line 11 def main_page @main_page end |
#matching_strategy ⇒ Object
Returns the value of attribute matching_strategy.
10 11 12 |
# File 'lib/ci_helper/ci_procedure.rb', line 10 def matching_strategy @matching_strategy end |
#mechanize ⇒ Object (readonly)
Returns the value of attribute mechanize.
11 12 13 |
# File 'lib/ci_helper/ci_procedure.rb', line 11 def mechanize @mechanize end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
11 12 13 |
# File 'lib/ci_helper/ci_procedure.rb', line 11 def password @password end |
#raam_page ⇒ Object
Returns the value of attribute raam_page.
10 11 12 |
# File 'lib/ci_helper/ci_procedure.rb', line 10 def raam_page @raam_page end |
#result ⇒ Object
Returns the value of attribute result.
10 11 12 |
# File 'lib/ci_helper/ci_procedure.rb', line 10 def result @result end |
Instance Method Details
#branch_name ⇒ Object
44 45 46 |
# File 'lib/ci_helper/ci_procedure.rb', line 44 def branch_name issue_link.text.split(' ')[1] end |
#commit_hash ⇒ Object
48 49 50 |
# File 'lib/ci_helper/ci_procedure.rb', line 48 def commit_hash issue_link.text.split(' ')[2] end |
#get_console_output ⇒ Object
36 37 38 |
# File 'lib/ci_helper/ci_procedure.rb', line 36 def get_console_output console_page.search("pre.console-output").text end |
#issue_number ⇒ Object
40 41 42 |
# File 'lib/ci_helper/ci_procedure.rb', line 40 def issue_number branch_name[1..4] end |
#re_get_console_output ⇒ Object
29 30 31 32 33 34 |
# File 'lib/ci_helper/ci_procedure.rb', line 29 def re_get_console_output self.raam_page = go_to_pull_request_page self.issue_page = go_to_issue self.console_page = go_to_console_output get_console_output end |
#run ⇒ Object
22 23 24 25 26 27 |
# File 'lib/ci_helper/ci_procedure.rb', line 22 def run @main_page = login @raam_page = go_to_pull_request_page @issue_page = go_to_issue @console_page = go_to_console_output end |