smapisatqacloud 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/smapisatqacloud.rb +49 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 035b9c25ae768e95594064d182ea766fd457172d
|
4
|
+
data.tar.gz: 8da170fbc86ad7d4452045590db796387ea44011
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c81d3df18d2308750ac1838775939c64eecc2ee1676783e6f50d8204ddfff64444b76b590c242d472af46a0ed448bfcf3da3501e274c1d2b30de7706dd37bdd2
|
7
|
+
data.tar.gz: 0e2c0c47746a714742fd188cbb53b8313fed32b24166fc3c83a812f103d5fdc3416117a8c6260ef0ce2385db81be001221977f75468926d133df8c052f304b5d
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# play framework gem:
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'httparty'
|
5
|
+
|
6
|
+
class Qacloud
|
7
|
+
|
8
|
+
|
9
|
+
include HTTParty
|
10
|
+
format :json
|
11
|
+
default_params :output => 'json'
|
12
|
+
base_uri 'http://72.32.26.25/api/tests/'
|
13
|
+
|
14
|
+
|
15
|
+
def self.GetTaskid(task_id)
|
16
|
+
|
17
|
+
return post("/#{task_id}" ,
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
def self.GetFirstTask(task_id)
|
23
|
+
|
24
|
+
return put("/#{task_id}/run" ,
|
25
|
+
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.GetNextTask(task_id,status,result,checkpoint,duration)
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
return put("/#{task_id}/next",
|
34
|
+
|
35
|
+
:body => {
|
36
|
+
|
37
|
+
'status' => status,
|
38
|
+
'result' => result,
|
39
|
+
'checkpoint' => checkpoint,
|
40
|
+
'date' => Time.now.to_i * 1000,
|
41
|
+
'duration' => duration * 1000
|
42
|
+
|
43
|
+
|
44
|
+
})
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: smapisatqacloud
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ravi Trivedi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Use this gem qacloud.
|
14
|
+
email:
|
15
|
+
- testerravit@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/smapisatqacloud.rb
|
21
|
+
homepage: http://qacloud.io
|
22
|
+
licenses: []
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.2.2
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: qacloud
|
44
|
+
test_files: []
|