blackstack-core 1.2.17 → 1.2.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/functions.rb +18 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66675342db4268cdaddc78276980841dccb9eff8265bb96b7de997835c96f0cd
|
4
|
+
data.tar.gz: 8d6f686276c52c6bdfe1030c6b82c541a48a01a5a0798a880affb8fe0a78ed20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8278fca0b354085f38a9d822c49b4b4086339e6f1ac52de2d2bd5f5f70089f7cf2fe234d01f20d6cd384f91eb14f45a30f6b390f79688abd77e0855fe4063199
|
7
|
+
data.tar.gz: b387460d7c6fec97ac127a86aaf63a831a43c54de5b7764500444c607755adeb62dadc47b7a26c01821f998edc3bd98d08486d8e1192b543abba33a810cf8a2a
|
data/lib/functions.rb
CHANGED
@@ -11,6 +11,7 @@ module BlackStack
|
|
11
11
|
@@api_url = nil
|
12
12
|
@@api_port = nil
|
13
13
|
@@api_version = '1.0'
|
14
|
+
@@backtrace = false
|
14
15
|
@@classes = {}
|
15
16
|
|
16
17
|
def self.api_key
|
@@ -21,14 +22,18 @@ module BlackStack
|
|
21
22
|
@@api_url
|
22
23
|
end
|
23
24
|
|
24
|
-
def self.api_version
|
25
|
-
@@api_version
|
26
|
-
end # def self.api_version
|
27
|
-
|
28
25
|
def self.api_port
|
29
26
|
@@api_port
|
30
27
|
end # def self.api_port
|
31
28
|
|
29
|
+
def self.api_version
|
30
|
+
@@api_version
|
31
|
+
end # def self.api_version
|
32
|
+
|
33
|
+
def self.backtrace
|
34
|
+
@@backtrace
|
35
|
+
end # def self.backtrace
|
36
|
+
|
32
37
|
def self.api_url()
|
33
38
|
"#{BlackStack::API.api_protocol}://#{BlackStack::API.api_domain}:#{BlackStack::API.api_port}"
|
34
39
|
end
|
@@ -41,12 +46,14 @@ module BlackStack
|
|
41
46
|
api_key: ,
|
42
47
|
api_url: ,
|
43
48
|
api_version: '1.0',
|
44
|
-
api_port: nil
|
49
|
+
api_port: nil,
|
50
|
+
backtrace: false
|
45
51
|
)
|
46
52
|
@@api_key = api_key
|
47
53
|
@@api_url = api_url
|
48
54
|
@@api_version = api_version
|
49
55
|
@@api_port = api_port
|
56
|
+
@@backtrace = backtrace
|
50
57
|
end # def self.set_client
|
51
58
|
|
52
59
|
def self.set_server(
|
@@ -125,7 +132,7 @@ module BlackStack
|
|
125
132
|
params['page'] = page
|
126
133
|
params['limit'] = limit
|
127
134
|
params['filters'] = filters
|
128
|
-
params['backtrace'] =
|
135
|
+
params['backtrace'] = BlackStack::API.backtrace
|
129
136
|
# call the API
|
130
137
|
ret = BlackStack::API.post(
|
131
138
|
endpoint: "#{self.object_name}/page",
|
@@ -142,7 +149,7 @@ module BlackStack
|
|
142
149
|
#
|
143
150
|
def self.count
|
144
151
|
params = {}
|
145
|
-
params['backtrace'] =
|
152
|
+
params['backtrace'] = BlackStack::API.backtrace
|
146
153
|
ret = BlackStack::API.post(
|
147
154
|
endpoint: "#{self.object_name}/count",
|
148
155
|
params: params
|
@@ -159,7 +166,7 @@ module BlackStack
|
|
159
166
|
def self.get(id)
|
160
167
|
params = {}
|
161
168
|
params['id'] = id
|
162
|
-
params['backtrace'] =
|
169
|
+
params['backtrace'] = BlackStack::API.backtrace
|
163
170
|
ret = BlackStack::API.post(
|
164
171
|
endpoint: "#{self.object_name}/get",
|
165
172
|
params: params
|
@@ -173,7 +180,7 @@ module BlackStack
|
|
173
180
|
def self.update(desc)
|
174
181
|
params = {}
|
175
182
|
params['desc'] = desc
|
176
|
-
params['backtrace'] =
|
183
|
+
params['backtrace'] = BlackStack::API.backtrace
|
177
184
|
ret = BlackStack::API.post(
|
178
185
|
endpoint: "#{self.object_name}/update",
|
179
186
|
params: params
|
@@ -193,7 +200,7 @@ module BlackStack
|
|
193
200
|
def self.insert(desc)
|
194
201
|
params = {}
|
195
202
|
params['desc'] = desc
|
196
|
-
params['backtrace'] =
|
203
|
+
params['backtrace'] = BlackStack::API.backtrace
|
197
204
|
ret = BlackStack::API.post(
|
198
205
|
endpoint: "#{self.object_name}/insert",
|
199
206
|
params: params
|
@@ -208,7 +215,7 @@ module BlackStack
|
|
208
215
|
def self.upsert(desc)
|
209
216
|
params = {}
|
210
217
|
params['desc'] = desc
|
211
|
-
params['backtrace'] =
|
218
|
+
params['backtrace'] = BlackStack::API.backtrace
|
212
219
|
ret = BlackStack::API.post(
|
213
220
|
endpoint: "#{self.object_name}/upsert",
|
214
221
|
params: params
|