qacloud 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/qacloud.rb +28 -24
  3. metadata +2 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76883711c4ab99be17d4ca2958dfd9e45d2a8b42
4
- data.tar.gz: 98e14cbfc52aef0914f689231b63b412b1eb7cb1
3
+ metadata.gz: aae475e5dae0de8f5e2efee97fd326a0517de88f
4
+ data.tar.gz: 55054e4f02869fe2c0173c4e923270e72e9026c7
5
5
  SHA512:
6
- metadata.gz: 4d99402baef63b0507b4c4718f1b85fd9eb9f7d9dd1ec736bee4a28edc2231698791bb10d7376e44972f52114a038b9203eb7d7a1ece1d586437f5ea59a4139c
7
- data.tar.gz: c51699393f0d85899e7f59f6705ef88f186f95a3019cc0939caf1ea315661a622c7d591adf03440ac3024bf592cf7c6597225ed083b6c353c43a1aef74def738
6
+ metadata.gz: 0e421f1466130774e22b9f1bb933f41b3d948529fb29d6b035a2ef116109c7ec20a8acc999b050826478e17ed0ee6702749197e565acb32eccbf7e3210961a29
7
+ data.tar.gz: 86780a485b811fb550999820e423a3614c570be1871784f920d645a9ffa288abdfe59a6a368c33c99826ff23a197950008a85c2b287cc8df6a7f80ddf23ddadd
data/lib/qacloud.rb CHANGED
@@ -2,10 +2,10 @@
2
2
  require 'rubygems'
3
3
  require 'httparty'
4
4
  require 'qacloud'
5
- require 'watir-webdriver'
5
+ require 'apisatqacloud'
6
+ # require 'watir-webdriver'
6
7
 
7
-
8
- # # get playlistID or playlistID CI id from args::
8
+ # get playlistID or playlistID CI id from args::
9
9
 
10
10
  # playlistID = ARGV[0]
11
11
  # tokenID = "your token id"
@@ -13,13 +13,12 @@ require 'watir-webdriver'
13
13
 
14
14
  def self.playlist(playlistID,tokenID)
15
15
 
16
- taskhash = GetFirstTask(playlistID,tokenID)
17
-
16
+ taskhash = Qacloud.GetFirstTask(playlistID,tokenID)
18
17
  if taskhash.code == 500 then
19
- puts "Getting Task ID:"
20
- taskhash = GetTaskid(playlistID,tokenID)
18
+ #puts "Getting Task ID:"
19
+ taskhash = Qacloud.GetTaskid(playlistID,tokenID)
21
20
  playlistID = taskhash["body"]["_id"]
22
- taskhash = GetFirstTask(playlistID,tokenID)
21
+ taskhash = Qacloud.GetFirstTask(playlistID,tokenID)
23
22
  end
24
23
 
25
24
  # collecting useful variables and values from taskhash:
@@ -45,8 +44,7 @@ def self.playlist(playlistID,tokenID)
45
44
  end
46
45
  require_relative "#{path}"
47
46
  dur1 = Time.now
48
- $task_name()
49
- dur2 = Time.now
47
+ $task_name
50
48
 
51
49
  rescue Exception => e
52
50
 
@@ -60,19 +58,21 @@ def self.playlist(playlistID,tokenID)
60
58
  result = "Exception occured, Checkpoint should have more info."
61
59
  checkpoint = "Error Message: #{@error_message} , Script Line Number: #{@error_line}"
62
60
  duration = dur2 - dur1
63
- taskhash = GetNextTask(task_id,tokenID,status,result,checkpoint,duration)
64
- $workflow_status = "finished"
61
+ # taskhash = Qacloud.GetNextTask(task_id,tokenID,status,result,checkpoint,duration)
62
+ # $workflow_status = "finished"
65
63
  # Take error image:
66
64
  # $browser.screenshot.save "#{dirname}/#{@error_line}.png"
65
+ else
66
+ dur2 = Time.now
67
+ status = $status
68
+ result = $result
69
+ checkpoint = $checkpoint
70
+ duration = dur2 - dur1
71
+
67
72
  end
68
-
69
- status = $status
70
- result = $result
71
- checkpoint = $checkpoint
72
- duration = dur2 - dur1
73
73
 
74
74
  while $workflow_status != "finished"
75
- taskhash = GetNextTask(task_id,token_id,status,result,checkpoint,duration)
75
+ taskhash = Qacloud.GetNextTask(task_id,token_id,status,result,checkpoint,duration)
76
76
  $workflow_name = taskhash["body"]["workflow_name"]
77
77
  $workflow_id = taskhash["body"]["workflow_id"]
78
78
  $task_name = taskhash["body"]["task_name"]
@@ -98,8 +98,8 @@ def self.playlist(playlistID,tokenID)
98
98
  end
99
99
  require_relative "#{path}"
100
100
  dur1 = Time.now
101
- $task_name()
102
- dur2 = Time.now
101
+ $task_name
102
+
103
103
  rescue Exception => e
104
104
  puts "Exception occured, Checkpoint should have more info."
105
105
  @erro_line = e.backtrace[0].split(":")
@@ -111,14 +111,18 @@ def self.playlist(playlistID,tokenID)
111
111
  result = "Exception occured, Checkpoint should have more info."
112
112
  checkpoint = "Error Message: #{@error_message} , Script Line Number: #{@error_line}"
113
113
  duration = dur2 - dur1
114
- taskhash = GetNextTask(task_id,tokenID,status,result,checkpoint,duration)
115
- $workflow_status = "finished"
114
+ # taskhash = Qacloud.GetNextTask(task_id,tokenID,status,result,checkpoint,duration)
115
+ # $workflow_status = "finished"
116
116
  # Take error image:
117
117
  # $browser.screenshot.save "#{dirname}/#{@error_line}.png"
118
- end
119
- tatus = $status
118
+
119
+ else
120
+ dur2 = Time.now
121
+ status = $status
120
122
  result = $result
121
123
  checkpoint = $checkpoint
122
124
  duration = dur2 - dur1
125
+
126
+ end
123
127
  end
124
128
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qacloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ravi Trivedi
@@ -9,21 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-10-30 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: apisatqacloud
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: 0.0.1
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: 0.0.1
12
+ dependencies: []
27
13
  description: Use this gem with playlist automation framework:.
28
14
  email:
29
15
  - testerravit@gmail.com