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 +4 -4
- data/amplitude-experiment.gemspec +1 -1
- data/lib/experiment/local/evaluation/evaluation.rb +7 -3
- data/lib/experiment/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 021a7dbe3ce531b888b2df293019ad43c0f492e4662e6fc211694e06a321253b
|
4
|
+
data.tar.gz: 0c59c6325418d0ef315688a692014caf952d3dcb5dbd04e794c0920c06c4e574
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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([:
|
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
|
-
|
63
|
-
|
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
|
data/lib/experiment/version.rb
CHANGED
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.
|
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-
|
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
|
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
|
152
|
+
version: '1.15'
|
153
153
|
description: Amplitude Experiment Ruby Server SDK
|
154
154
|
email:
|
155
155
|
- sdk@amplitude.com
|