blackstack-core 1.2.16 → 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 -15
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adc18115deed231dca18ea1f2b4d33ae28c13cad49bcf0e31de86f1ca31a2f0d
4
- data.tar.gz: 1d56c4a2343240ff77716a6a7ea5a8a92e5811180158a09f20235887079f7f36
3
+ metadata.gz: cb2d649c204b634097c070c41b037cef451c4678df2db14a53fc543dee48f7bf
4
+ data.tar.gz: 3f0a5f1c243c94a93b966b922ee65c7555d8da2de4ad6d8ad8c04fd1765cb0d8
5
5
  SHA512:
6
- metadata.gz: 2b386f7ef47e29f1dbe0e73f49a2e5ee404d71db92c51dfeb5eb599cb2909be3dd7264f70fbc34cf2e57c186410ea8cd90fea5af81b8df99215b20867ed08651
7
- data.tar.gz: a07ee4d466e602e7e5b6aa6a274eb38266bcb01347ff45fa32c58ac5d2985c61a29a3ca4e8f9a708f89594a82b6a50968b6c8ffe5bd95dd407f11295fe04f26f
6
+ metadata.gz: 1de5d75913eb20baab530abaed5f3f865cad983db46c07ef31f049db9d70fe3830ac7609c34a786266c3e1fb7ed9c88e6e40269a57de5a46f7a6897c844ec654
7
+ data.tar.gz: 244dace3ca33f7d2e0a6d7264e773ccd3be95f5698dba4496005d818bbc29f108d3584f7f6f52754962b11719a9548c0dcdc1e8324ce2b261123ba6609345457
data/lib/functions.rb CHANGED
@@ -6,12 +6,12 @@ module BlackStack
6
6
  File.exists?('./.sandbox')
7
7
  end
8
8
 
9
- module BlackStack
10
9
  module API
11
10
  @@api_key = nil
12
11
  @@api_url = nil
13
12
  @@api_port = nil
14
13
  @@api_version = '1.0'
14
+ @@backtrace = false
15
15
  @@classes = {}
16
16
 
17
17
  def self.api_key
@@ -22,14 +22,18 @@ module BlackStack
22
22
  @@api_url
23
23
  end
24
24
 
25
- def self.api_version
26
- @@api_version
27
- end # def self.api_version
28
-
29
25
  def self.api_port
30
26
  @@api_port
31
27
  end # def self.api_port
32
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
+
33
37
  def self.api_url()
34
38
  "#{BlackStack::API.api_protocol}://#{BlackStack::API.api_domain}:#{BlackStack::API.api_port}"
35
39
  end
@@ -43,11 +47,13 @@ module BlackStack
43
47
  api_url: ,
44
48
  api_version: '1.0',
45
49
  api_port: nil
50
+ backtrace: false
46
51
  )
47
52
  @@api_key = api_key
48
53
  @@api_url = api_url
49
54
  @@api_version = api_version
50
55
  @@api_port = api_port
56
+ @@backtrace = backtrace
51
57
  end # def self.set_client
52
58
 
53
59
  def self.set_server(
@@ -78,10 +84,7 @@ module BlackStack
78
84
  end # def self.post
79
85
 
80
86
  end # module API
81
- end # module Mass
82
-
83
87
 
84
- module BlackStack
85
88
  # Base class.
86
89
  # List of methods you have to overload if you develop a profile type.
87
90
  #
@@ -129,7 +132,7 @@ module BlackStack
129
132
  params['page'] = page
130
133
  params['limit'] = limit
131
134
  params['filters'] = filters
132
- params['backtrace'] = Mass.backtrace
135
+ params['backtrace'] = BlackStack::API.backtrace
133
136
  # call the API
134
137
  ret = BlackStack::API.post(
135
138
  endpoint: "#{self.object_name}/page",
@@ -146,7 +149,7 @@ module BlackStack
146
149
  #
147
150
  def self.count
148
151
  params = {}
149
- params['backtrace'] = Mass.backtrace
152
+ params['backtrace'] = BlackStack::API.backtrace
150
153
  ret = BlackStack::API.post(
151
154
  endpoint: "#{self.object_name}/count",
152
155
  params: params
@@ -163,7 +166,7 @@ module BlackStack
163
166
  def self.get(id)
164
167
  params = {}
165
168
  params['id'] = id
166
- params['backtrace'] = Mass.backtrace
169
+ params['backtrace'] = BlackStack::API.backtrace
167
170
  ret = BlackStack::API.post(
168
171
  endpoint: "#{self.object_name}/get",
169
172
  params: params
@@ -177,7 +180,7 @@ module BlackStack
177
180
  def self.update(desc)
178
181
  params = {}
179
182
  params['desc'] = desc
180
- params['backtrace'] = Mass.backtrace
183
+ params['backtrace'] = BlackStack::API.backtrace
181
184
  ret = BlackStack::API.post(
182
185
  endpoint: "#{self.object_name}/update",
183
186
  params: params
@@ -197,7 +200,7 @@ module BlackStack
197
200
  def self.insert(desc)
198
201
  params = {}
199
202
  params['desc'] = desc
200
- params['backtrace'] = Mass.backtrace
203
+ params['backtrace'] = BlackStack::API.backtrace
201
204
  ret = BlackStack::API.post(
202
205
  endpoint: "#{self.object_name}/insert",
203
206
  params: params
@@ -212,7 +215,7 @@ module BlackStack
212
215
  def self.upsert(desc)
213
216
  params = {}
214
217
  params['desc'] = desc
215
- params['backtrace'] = Mass.backtrace
218
+ params['backtrace'] = BlackStack::API.backtrace
216
219
  ret = BlackStack::API.post(
217
220
  endpoint: "#{self.object_name}/upsert",
218
221
  params: params
@@ -290,7 +293,6 @@ module BlackStack
290
293
  end # def zyte_snapshot
291
294
 
292
295
  end # class Base
293
- end # module Mass
294
296
 
295
297
  # -----------------------------------------------------------------------------------------
296
298
  # PRY Supporting Functions
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.16
4
+ version: 1.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi