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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66277b1d5bea79db7794168b2f9be005a3c37ef6ea0dc1d9b0cbf876c5fb1c17
4
- data.tar.gz: 94381d579783bffc333ac56391ea530466c796a44ce700c25dc99267409412ed
3
+ metadata.gz: bd92e3883469ddd7a7f1ca4a16012b1527d823c5d026db1830c597c32f740047
4
+ data.tar.gz: 6a064d33d9a4a3e260294a484c24e4c6f6899d70b226c2656726f7c1af7505f4
5
5
  SHA512:
6
- metadata.gz: 9b958f804a26259dadd8f33d46a0326d9c4ca5a8aad5c0a230ffdbb54d0adc7d82714677add429dc5161c855d31a0e1a19fdc0461db70a0945436285160996b2
7
- data.tar.gz: 731696f8b1129e8151031d8ede467f646f0c910f747a36dfc9ab54b127db6097eddfcbb35afc2cf1d49da2d53a8c22e20e0d908f9a6371845a7f67e63a84b701
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
@@ -1,5 +1,3 @@
1
- require 'oj'
2
-
3
1
  module DevCycle
4
2
  class DVCOptions
5
3
  attr_reader :config_polling_interval_ms
@@ -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(Oj.dump(user))
190
+ user_addr = malloc_asc_string(user.to_json)
191
191
  asc_pin(user_addr)
192
- event_addr = malloc_asc_string(Oj.dump(event))
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(Oj.dump(event))
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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.3.0
11
11
  =end
12
12
 
13
13
  module DevCycle
14
- VERSION = '2.1.0'
14
+ VERSION = '2.1.1'
15
15
  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.0
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-15 00:00:00.000000000 Z
11
+ date: 2023-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus