mustard_client 0.1.46 → 0.1.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/MustardClient/executions.rb +38 -4
- data/lib/MustardClient/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1df2808b3e0f96fc4b3a9fc598125a382c83a68
|
4
|
+
data.tar.gz: 506aefd4dbd34893f9897f33eff74e5baf5a1050
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e62d96c9002cb904eb4d1f96050368f07bb11c98e146f72b5ea1b4b8ef6904b78e5f9484c23969c5b91d6148740af25996b158630e819b5a76ca90951691aee
|
7
|
+
data.tar.gz: 205dffb0ea62ec88b9755998a84b9c63ecbbc1d4d3cbae63bdf2e7ffd6340a95628d1d3252832f969d789cc3ef5a301f175064d1ef1f4ca04a476ca649e42442
|
@@ -133,14 +133,38 @@ module MustardClient
|
|
133
133
|
|
134
134
|
end
|
135
135
|
|
136
|
-
def next_test execution_id,
|
136
|
+
def next_test execution_id, keywords: []
|
137
|
+
|
138
|
+
keywords = parse_keywords keywords unless keywords.blank?
|
137
139
|
|
138
140
|
command = {}
|
139
141
|
command[:method] = :get
|
140
|
-
|
141
|
-
|
142
|
-
else
|
142
|
+
|
143
|
+
if keywords.blank?
|
143
144
|
command[:route] = @mustard_url + "/executions/#{execution_id}/next_test"
|
145
|
+
else
|
146
|
+
keywords_string = keywords.map{|keyword| "keywords[]=#{keyword.upcase}"}.join('&')
|
147
|
+
command[:route] = @mustard_url + "/executions/#{execution_id}/next_test?#{keywords_string}"
|
148
|
+
end
|
149
|
+
|
150
|
+
command[:headers] = {'User-Token' => @user_token}
|
151
|
+
|
152
|
+
execute(command)
|
153
|
+
|
154
|
+
end
|
155
|
+
|
156
|
+
def incomplete_tests execution_id, keywords: []
|
157
|
+
|
158
|
+
keywords = parse_keywords keywords unless keywords.blank?
|
159
|
+
|
160
|
+
command = {}
|
161
|
+
command[:method] = :get
|
162
|
+
|
163
|
+
if keywords.blank?
|
164
|
+
command[:route] = @mustard_url + "/executions/#{execution_id}/incomplete_tests"
|
165
|
+
else
|
166
|
+
keywords_string = keywords.map{|keyword| "keywords[]=#{keyword.upcase}"}.join('&')
|
167
|
+
command[:route] = @mustard_url + "/executions/#{execution_id}/next_test?#{keywords_string}"
|
144
168
|
end
|
145
169
|
|
146
170
|
command[:headers] = {'User-Token' => @user_token}
|
@@ -150,4 +174,14 @@ module MustardClient
|
|
150
174
|
end
|
151
175
|
|
152
176
|
end
|
177
|
+
|
178
|
+
private
|
179
|
+
|
180
|
+
def parse_keywords keyword
|
181
|
+
if keyword.kind_of? Array
|
182
|
+
return keyword
|
183
|
+
else
|
184
|
+
return [keyword]
|
185
|
+
end
|
186
|
+
end
|
153
187
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mustard_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|