blackstack-core 1.2.17 → 1.2.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/functions.rb +17 -10
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21f1505a48eddf72b71e67994ad8c4ee978b9ebefa6c21e13a98dab640436fa4
4
- data.tar.gz: 267f3225f76f481b534cdca45223e119421038a20bdc61fb0917dc442c4882c7
3
+ metadata.gz: cb2d649c204b634097c070c41b037cef451c4678df2db14a53fc543dee48f7bf
4
+ data.tar.gz: 3f0a5f1c243c94a93b966b922ee65c7555d8da2de4ad6d8ad8c04fd1765cb0d8
5
5
  SHA512:
6
- metadata.gz: 982ff25a2a8419a8e7c8ae5d323c603ee733ec66443a318c0c64206ef18be75248b11507fe268d017b4be38a710b702abea4e5a89449f042cbba1cebb4cb219b
7
- data.tar.gz: f8c0607bbf9420e2093d9d98d8f99b265f05b420cfc3af3f0491e1ac2f1529d7c07de1fe1338e45bfad7c4ebd6e1f604e3f39ef1ee94355ad05a273836acf9a2
6
+ metadata.gz: 1de5d75913eb20baab530abaed5f3f865cad983db46c07ef31f049db9d70fe3830ac7609c34a786266c3e1fb7ed9c88e6e40269a57de5a46f7a6897c844ec654
7
+ data.tar.gz: 244dace3ca33f7d2e0a6d7264e773ccd3be95f5698dba4496005d818bbc29f108d3584f7f6f52754962b11719a9548c0dcdc1e8324ce2b261123ba6609345457
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
@@ -42,11 +47,13 @@ module BlackStack
42
47
  api_url: ,
43
48
  api_version: '1.0',
44
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'] = Mass.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'] = Mass.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'] = Mass.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'] = Mass.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'] = Mass.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'] = Mass.backtrace
218
+ params['backtrace'] = BlackStack::API.backtrace
212
219
  ret = BlackStack::API.post(
213
220
  endpoint: "#{self.object_name}/upsert",
214
221
  params: params
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackstack-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.17
4
+ version: 1.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi