td-client 0.8.16 → 0.8.17
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5 -0
- data/lib/td/client.rb +2 -2
- data/lib/td/client/api.rb +3 -2
- data/lib/td/client/version.rb +1 -1
- metadata +8 -8
data/ChangeLog
CHANGED
data/lib/td/client.rb
CHANGED
@@ -110,8 +110,8 @@ class Client
|
|
110
110
|
end
|
111
111
|
|
112
112
|
# => [Job]
|
113
|
-
def jobs(from=nil, to=nil)
|
114
|
-
result = @api.list_jobs(from, to)
|
113
|
+
def jobs(from=nil, to=nil, status=nil)
|
114
|
+
result = @api.list_jobs(from, to, status)
|
115
115
|
result.map {|job_id,type,status,query,start_at,end_at,result_url|
|
116
116
|
Job.new(self, job_id, type, query, status, nil, nil, start_at, end_at, nil, result_url)
|
117
117
|
}
|
data/lib/td/client/api.rb
CHANGED
@@ -65,7 +65,7 @@ class API
|
|
65
65
|
raise "Name must be 3 to 32 characters, got #{name.length} characters."
|
66
66
|
end
|
67
67
|
unless name =~ /^([a-z0-9_]+)$/
|
68
|
-
raise "Name must consist only of alphabets, numbers
|
68
|
+
raise "Name must consist only of lower-case alphabets, numbers and '_'."
|
69
69
|
end
|
70
70
|
name
|
71
71
|
end
|
@@ -271,10 +271,11 @@ class API
|
|
271
271
|
##
|
272
272
|
|
273
273
|
# => [(jobId:String, type:Symbol, status:String, start_at:String, end_at:String, result_url:String)]
|
274
|
-
def list_jobs(from=0, to=nil)
|
274
|
+
def list_jobs(from=0, to=nil, status=nil)
|
275
275
|
params = {}
|
276
276
|
params['from'] = from.to_s if from
|
277
277
|
params['to'] = to.to_s if to
|
278
|
+
params['status'] = status.to_s if status
|
278
279
|
code, body, res = get("/v3/job/list", params)
|
279
280
|
if code != "200"
|
280
281
|
raise_error("List jobs failed", res)
|
data/lib/td/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.17
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-11 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|
16
|
-
requirement: &
|
16
|
+
requirement: &70183080337620 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.4.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70183080337620
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
27
|
-
requirement: &
|
27
|
+
requirement: &70183080336900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.4.3
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70183080336900
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70183080336060 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 2.8.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70183080336060
|
47
47
|
description:
|
48
48
|
email:
|
49
49
|
executables: []
|