devcycle-ruby-server-sdk 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/devcycle-ruby-server-sdk/api/devcycle_api.rb +1 -3
- data/lib/devcycle-ruby-server-sdk/localbucketing/dvc_options.rb +0 -2
- data/lib/devcycle-ruby-server-sdk/localbucketing/local_bucketing.rb +3 -3
- data/lib/devcycle-ruby-server-sdk/models/event.rb +4 -0
- data/lib/devcycle-ruby-server-sdk/models/user_data.rb +4 -3
- data/lib/devcycle-ruby-server-sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd92e3883469ddd7a7f1ca4a16012b1527d823c5d026db1830c597c32f740047
|
4
|
+
data.tar.gz: 6a064d33d9a4a3e260294a484c24e4c6f6899d70b226c2656726f7c1af7505f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d566f41de3940df34ff782de63e05223bead0ca334fd8c31b59eeef074bf35dbefbcd03682fa178d709a0f637fa945f723b04eb80a3e80e794d2c05fa95cdd06
|
7
|
+
data.tar.gz: 7e8f10ff94003890b2350032ef06e997ec1aec81ce82c390fad9d762d47638166db61365b1040ad57944afc6f273122768cc94831623056167ef1b387a6c192d
|
@@ -183,9 +183,7 @@ module DevCycle
|
|
183
183
|
type_code = variable_type_code_from_type(type)
|
184
184
|
variable_json = variable_for_user(user_data, key, type_code)
|
185
185
|
if variable_json == nil
|
186
|
-
@logger.warn("No variable found for key #{key}, returning default value")
|
187
|
-
elsif type != variable_json['type']
|
188
|
-
@logger.warn("Type mismatch for variable #{key}, returning default value")
|
186
|
+
@logger.warn("No variable found or type mismatch for key #{key}, returning default value")
|
189
187
|
else
|
190
188
|
value = variable_json['value']
|
191
189
|
defaulted = false
|
@@ -187,9 +187,9 @@ module DevCycle
|
|
187
187
|
def queue_event(user, event)
|
188
188
|
@wasm_mutex.synchronize do
|
189
189
|
begin
|
190
|
-
user_addr = malloc_asc_string(
|
190
|
+
user_addr = malloc_asc_string(user.to_json)
|
191
191
|
asc_pin(user_addr)
|
192
|
-
event_addr = malloc_asc_string(
|
192
|
+
event_addr = malloc_asc_string(event.to_json)
|
193
193
|
@@stack_tracer = @@stack_tracer_raise
|
194
194
|
@@instance.invoke("queueEvent", @sdkKeyAddr, user_addr, event_addr)
|
195
195
|
ensure
|
@@ -210,7 +210,7 @@ module DevCycle
|
|
210
210
|
end
|
211
211
|
varmap_addr = malloc_asc_string(Oj.dump(variable_variation_map))
|
212
212
|
asc_pin(varmap_addr)
|
213
|
-
event_addr = malloc_asc_string(
|
213
|
+
event_addr = malloc_asc_string(event.to_json)
|
214
214
|
@@stack_tracer = @@stack_tracer_raise
|
215
215
|
@@instance.invoke("queueAggregateEvent", @sdkKeyAddr, event_addr, varmap_addr)
|
216
216
|
ensure
|
@@ -12,6 +12,7 @@ OpenAPI Generator version: 5.3.0
|
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
|
+
require 'oj'
|
15
16
|
|
16
17
|
module DevCycle
|
17
18
|
class Event
|
@@ -259,6 +260,9 @@ module DevCycle
|
|
259
260
|
end
|
260
261
|
end
|
261
262
|
|
263
|
+
def to_json
|
264
|
+
Oj.dump(to_hash, mode: :json)
|
265
|
+
end
|
262
266
|
end
|
263
267
|
|
264
268
|
end
|
@@ -17,9 +17,6 @@ require 'oj'
|
|
17
17
|
module DevCycle
|
18
18
|
class UserData
|
19
19
|
|
20
|
-
def to_json
|
21
|
-
Oj.dump(self)
|
22
|
-
end
|
23
20
|
# Unique id to identify the user
|
24
21
|
attr_accessor :user_id
|
25
22
|
|
@@ -414,5 +411,9 @@ module DevCycle
|
|
414
411
|
value
|
415
412
|
end
|
416
413
|
end
|
414
|
+
|
415
|
+
def to_json
|
416
|
+
Oj.dump(to_hash, mode: :json)
|
417
|
+
end
|
417
418
|
end
|
418
419
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devcycle-ruby-server-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DevCycleHQ
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|