qabot 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qabot.rb +19 -2
- 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: 47a06138bf298d030e59629154fe482d9c68d0de
|
4
|
+
data.tar.gz: 68617cdb61d308b46f605a05288e3a66318855af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b7d1cbffd42761f432e25e0c2166a1e87170e57e7c894a928a8631552325a815b1b7b272a4f629cf8e6e862184cb6a2b32453c74836b7430b33e6afed7eb969
|
7
|
+
data.tar.gz: c562d5ea57372264cea22ed9b98bc080c6ebe86c587c9a76220c6c26ae1d178cf0a53c28934187b375682fed3a30c8595f25c815221f796bd414182b05b6de12
|
data/lib/qabot.rb
CHANGED
@@ -22,6 +22,15 @@ module BlackStack
|
|
22
22
|
GREATER_OR_EQUAL = 2
|
23
23
|
|
24
24
|
@@flags_descriptors = []
|
25
|
+
@@qabot_api_url = nil
|
26
|
+
|
27
|
+
def self.set_qabot_api_url(url)
|
28
|
+
@@qabot_api_url = url
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.qabot_api_url()
|
32
|
+
@@qabot_api_url
|
33
|
+
end
|
25
34
|
|
26
35
|
def self.require_db_classes()
|
27
36
|
# CRM classes
|
@@ -213,9 +222,12 @@ module BlackStack
|
|
213
222
|
@@flags_descriptors
|
214
223
|
end # def self.add_flag
|
215
224
|
|
216
|
-
def self.run_all()
|
225
|
+
def self.run_all(logger=nil)
|
226
|
+
logger = BlackStack::DummyLogger.new(nil) if logger.nil?
|
217
227
|
@@flags_descriptors.each do |h|
|
228
|
+
logger.logs "Running flag: #{h[:name]}..."
|
218
229
|
BlackStack::QABot.run(h)
|
230
|
+
logger.done
|
219
231
|
end
|
220
232
|
end
|
221
233
|
|
@@ -240,7 +252,12 @@ module BlackStack
|
|
240
252
|
|
241
253
|
# submit a flag descriptor to the server, via REST-API.
|
242
254
|
def self.push(h)
|
243
|
-
|
255
|
+
# get defined URL for the REST-API
|
256
|
+
api_url = BlackStack::QABot::qabot_api_url
|
257
|
+
# if the URL for the REST-API is not defined, grab it from the Pampa process where this is running
|
258
|
+
api_url = "#{CS_HOME_PAGE_PROTOCOL}://#{PROCESS.division.home.app_url}:#{PROCESS.division.home.app_port}" if api_url.nil?
|
259
|
+
# do the API call
|
260
|
+
url = "#{api_url}/api.1.1.0/qabot/push.json"
|
244
261
|
api_key = BlackStack::Pampa::api_key
|
245
262
|
BlackStack::Netting::api_call( url, {:api_key => api_key}.merge(h) )
|
246
263
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qabot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|