mixpanel-ruby-openfeature 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mixpanel/openfeature/provider.rb +11 -7
- data/lib/mixpanel/openfeature/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: e9d29a0e7b9305a412989e730ec11fdd8b4d57ccb88d068ca7ad3b753b0f3e5f
|
|
4
|
+
data.tar.gz: fdf41866d6fa4148febdbcdc11b791c505fb0f79776ed2d135d6a715bf5900ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b7edd78404f6305f60c15ff90f7945811dd1a88f42aa9e370180ffa001243ee2b66b60d5cda539ebfb2dd7cdb38a4ba302e75fd2ee308a9a4c83018666b6aa0
|
|
7
|
+
data.tar.gz: 624605591a8ba5039d98db770b64109463328278324f1285c26bec30c9a155244e9b315cf6fcee4dc0e3e4231502f543c464da3f8c5f124425317bb6047e1c9f
|
|
@@ -150,15 +150,19 @@ module Mixpanel
|
|
|
150
150
|
end
|
|
151
151
|
|
|
152
152
|
def build_context(evaluation_context)
|
|
153
|
-
return {} if evaluation_context.nil?
|
|
154
|
-
|
|
155
153
|
ctx = {}
|
|
156
|
-
|
|
157
|
-
evaluation_context.fields
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
unless evaluation_context.nil?
|
|
155
|
+
if evaluation_context.respond_to?(:fields)
|
|
156
|
+
evaluation_context.fields.each { |k, v| ctx[k] = unwrap_value(v) }
|
|
157
|
+
end
|
|
158
|
+
if evaluation_context.respond_to?(:targeting_key) && evaluation_context.targeting_key
|
|
159
|
+
ctx['targetingKey'] = unwrap_value(evaluation_context.targeting_key)
|
|
160
|
+
end
|
|
161
161
|
end
|
|
162
|
+
# SDK-448: marks exposures as coming from the OpenFeature provider. The
|
|
163
|
+
# SDK copies this onto `$experiment_started`; older SDKs ignore the key.
|
|
164
|
+
# Set last so a customer attribute of the same name can't override it.
|
|
165
|
+
ctx['$openfeature_provider'] = true
|
|
162
166
|
ctx
|
|
163
167
|
end
|
|
164
168
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mixpanel-ruby-openfeature
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mixpanel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: openfeature-sdk
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '3.
|
|
33
|
+
version: '3.5'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '3.
|
|
40
|
+
version: '3.5'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rspec
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|