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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/functions.rb +18 -11
  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: 66675342db4268cdaddc78276980841dccb9eff8265bb96b7de997835c96f0cd
4
+ data.tar.gz: 8d6f686276c52c6bdfe1030c6b82c541a48a01a5a0798a880affb8fe0a78ed20
5
5
  SHA512:
6
- metadata.gz: 982ff25a2a8419a8e7c8ae5d323c603ee733ec66443a318c0c64206ef18be75248b11507fe268d017b4be38a710b702abea4e5a89449f042cbba1cebb4cb219b
7
- data.tar.gz: f8c0607bbf9420e2093d9d98d8f99b265f05b420cfc3af3f0491e1ac2f1529d7c07de1fe1338e45bfad7c4ebd6e1f604e3f39ef1ee94355ad05a273836acf9a2
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'] = 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.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi