CiHelper 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 552b3f86b048155b318564a7c0f8f1a0d7f29d99
4
- data.tar.gz: 021e1fc98fd6f9cc251d3c7b952020c3f93cddac
3
+ metadata.gz: 8dbf0ce4cef1b71178f07093db7577826ccf2124
4
+ data.tar.gz: 2c05652c6fb93e36579f000be90f2a47180158ff
5
5
  SHA512:
6
- metadata.gz: 80f619e46206226cef2be4f7c31ebc2c2cbd1f298a67b56ec553b0ced50de685a6a927c475724547c64592ed9c8d4c0b3626c07843e1cc01cd6559c237fd44c7
7
- data.tar.gz: eaf0311b741bf17c71505d1e9dbf3d8efc15248b8a76279850c9fb54558cb4e83349facb1b08fadf804c8721b0a843f09617645f56b41148679ae96ea057f607
6
+ metadata.gz: dcdd3c6d60d6c1fa40594de53a2578dc2734c9212a9bcfa940cf774634527de6e5a2c06285fff3ecdcb171544210f1f167c55ae5cec8dfbf174d879d30fc03e2
7
+ data.tar.gz: 327d20140817d150234d153831f23b1e55fd62757428e7a0a36be594c930ec6f1f1968a34efbbc843fe84152bf7a2558a5bfd7ffa2a5ff511c06bca19d04669d
@@ -5,9 +5,9 @@ class CiProcedure
5
5
 
6
6
  CI_LOGIN_URL = 'http://ci.raamsys.co.uk/login?from=%2F'
7
7
  CI_DOMAIN = 'http://ci.raamsys.co.uk/'
8
- attr_accessor :result, :issue_page
8
+ attr_accessor :result, :issue_page, :console_page
9
9
  attr_reader :account, :password, :mechanize,
10
- :console_page, :raam_page, :main_page,
10
+ :raam_page, :main_page,
11
11
  :matching_strategy
12
12
 
13
13
 
@@ -28,8 +28,8 @@ class CiProcedure
28
28
  end
29
29
 
30
30
  def re_get_console_output
31
- @issue_page = go_to_issue
32
- @console_page = go_to_console_output
31
+ self.issue_page = go_to_issue
32
+ self.console_page = go_to_console_output
33
33
  get_console_output
34
34
  end
35
35
 
@@ -25,6 +25,7 @@ class IssueMonitor
25
25
  end
26
26
 
27
27
  def success?
28
+ parse_output(ci_procedure.get_console_output)
28
29
  finish_test? ? status[0].match('success') : false
29
30
  end
30
31
 
@@ -44,8 +45,10 @@ class IssueMonitor
44
45
 
45
46
  def content
46
47
  Result.new(success?, fail_examples,
47
- "#{ci_procedure.console_page.uri.host}/#{ci_procedure.console_page.uri.request_uri}", ci_procedure.issue_number,
48
- ci_procedure.branch_name, ci_procedure.commit_hash)
48
+ "#{ci_procedure.console_page.uri.host}/#{ci_procedure.console_page.uri.request_uri}",
49
+ ci_procedure.issue_number,
50
+ ci_procedure.branch_name,
51
+ ci_procedure.commit_hash)
49
52
  end
50
53
 
51
54
  private
@@ -3,7 +3,7 @@ require 'byebug'
3
3
  # TODO: need to refactor this class
4
4
  class MainProcess
5
5
 
6
- USER_CONFIG = Struct.new(:ci_ac,:ci_pass, :bit_ac, :bit_pass)
6
+ USER_CONFIG = Struct.new(:ci_ac, :ci_pass, :bit_ac, :bit_pass)
7
7
 
8
8
  attr_accessor :config
9
9
 
@@ -19,7 +19,7 @@ class MainProcess
19
19
  @issue_is_queued_in_ci = false
20
20
  puts 'Please Input your next ticked number or commit hash to specifiy the multi test result in the CI'
21
21
  match_strategy = gets.chop
22
- issue_monitor = IssueMonitor.new(config.ci_ac, config.ci_pass, match_strategy)
22
+ issue_monitor = IssueMonitor.new(config.ci_ac, config.ci_pass, match_strategy)
23
23
 
24
24
  unless issue_monitor.goto_monitor_page # no issue pull request found
25
25
  # ask user to wait this issue or not
@@ -37,7 +37,7 @@ class MainProcess
37
37
  if issue_monitor.success?
38
38
  result = issue_monitor.content
39
39
  puts " Console link: #{result.console_link}"
40
- bit_bucket_client = BitBucketProcedure.new(config.bit_ac,config.bit_pass)
40
+ bit_bucket_client = BitBucketProcedure.new(config.bit_ac, config.bit_pass)
41
41
  bit_bucket_client.create_pull_request(issue_monitor.content)
42
42
  else
43
43
 
@@ -1,3 +1,3 @@
1
1
  module CiHelper
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: CiHelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alan Yu