amplitude-experiment 1.3.0 → 1.3.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: 5bebb227696dfbf198819fdba2640a000c67ca3a9c89d593cc03a4433ef532c8
4
- data.tar.gz: fb79230b6409d82cf3d849f07cb1705abc22ae10a27e7bdfbbe6d1add1e100d0
3
+ metadata.gz: 021a7dbe3ce531b888b2df293019ad43c0f492e4662e6fc211694e06a321253b
4
+ data.tar.gz: 0c59c6325418d0ef315688a692014caf952d3dcb5dbd04e794c0920c06c4e574
5
5
  SHA512:
6
- metadata.gz: bc2885c715208465d15a6b4217e684a2caa0eb055963b1a5ff0fcdc7829239b894d685f305383cd483fff2b082592c395672c1d75140e0537543b5479e425557
7
- data.tar.gz: 6d1c6b2488ddc5e28d0162e3535be65c3ed3c5767e08af71acdf7933a6f42a20c3d6994638b45713c8f9a9dd20ccfe054a9323465badff1acdd6960fb5cf9376
6
+ metadata.gz: 990ae6f7e507ec78e12bdbf0e67d7ee3e03ae196651add45af3e331fdcc19caa24cbbdc39fe9745dedd08a3463842ce5f23a31c39aa35945696bb62ef4a5d1c0
7
+ data.tar.gz: 87b946e0d25f380731b9d8db86f32565934793f175ccfbade88c2c3a8dc2fbc96e686a12db4fbd77b2941125ed48cc9da472ebeba1fa1dede7b5149a1938f1dd
@@ -29,5 +29,5 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'webmock', '~> 3.14'
30
30
  spec.add_development_dependency 'yard', '~> 0.9'
31
31
  spec.metadata['rubygems_mfa_required'] = 'false'
32
- spec.add_runtime_dependency 'ffi', '~> 1.15.5'
32
+ spec.add_runtime_dependency 'ffi', '~> 1.15'
33
33
  end
@@ -23,7 +23,7 @@ module EvaluationInterop
23
23
 
24
24
  class Libevaluation_interop_ExportedSymbols < FFI::Struct
25
25
  layout :DisposeStablePointer, callback([:pointer], :void),
26
- :DisposeString, callback([:string], :void),
26
+ :DisposeString, callback([:pointer], :void),
27
27
  :IsInstance, callback([:pointer, :string], :pointer),
28
28
  :createNullableByte, callback([:string], :pointer),
29
29
  :getNonNullValueOfByte, callback([:pointer], :pointer),
@@ -59,9 +59,13 @@ end
59
59
 
60
60
  def evaluation(rule_json, user_json)
61
61
  lib = EvaluationInterop.libevaluation_interop_symbols()
62
- fn = lib[:kotlin][:root][:evaluate]
63
- result_json = fn.call(rule_json, user_json).read_string
62
+ evaluate = lib[:kotlin][:root][:evaluate]
63
+ dispose = lib[:DisposeString]
64
+ result_raw = evaluate.call(rule_json, user_json)
65
+ result_json = result_raw.read_string
64
66
  result = JSON.parse(result_json)
67
+ dispose.call(result_raw)
68
+
65
69
  if result["error"] != nil
66
70
  raise "#{result["error"]}"
67
71
  elsif result["result"] == nil
@@ -1,3 +1,3 @@
1
1
  module AmplitudeExperiment
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amplitude-experiment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amplitude
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-17 00:00:00.000000000 Z
11
+ date: 2024-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.15.5
145
+ version: '1.15'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.15.5
152
+ version: '1.15'
153
153
  description: Amplitude Experiment Ruby Server SDK
154
154
  email:
155
155
  - sdk@amplitude.com