eppo-server-sdk 3.2.0 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Cargo.lock +17 -7
- data/README.md +5 -0
- data/ext/eppo_client/Cargo.toml +3 -3
- data/lib/eppo_client/version.rb +1 -1
- metadata +18 -11
- data/.gitignore +0 -22
- data/.rspec +0 -3
- data/.rubocop.yml +0 -8
- data/LICENSE.txt +0 -21
- data/Rakefile +0 -53
- data/Steepfile +0 -27
- data/sig/eppo_server_sdk.rbs +0 -96
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f7df6c86f861e8529f9efd44cacf1090af56bcaa5cb3ca4b2a7b72728f2d4a2
|
4
|
+
data.tar.gz: 28f7afdbd4a28fb358e9c74464bf8eafdb6e832e1855aadd15943e141acbef47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d04b5cec0385e8275becf66bd6e8b3afad02fe2da0af52d7f2cd4ec4a41d753e3ddb85acdd9076c2ddf1c3c16ac8b855759cf2689ed094730efb858b90bafac6
|
7
|
+
data.tar.gz: e830c55fdca91ed98e6c4016ef7c9e0d48bc211f3984526c66128b2995be29edf3d70fbf11e92bdb9bbe6a5a5fe458c7f617bb8dedb9a982395203047b6fff65
|
data/Cargo.lock
CHANGED
@@ -304,7 +304,7 @@ dependencies = [
|
|
304
304
|
|
305
305
|
[[package]]
|
306
306
|
name = "eppo_client"
|
307
|
-
version = "3.2.
|
307
|
+
version = "3.2.4"
|
308
308
|
dependencies = [
|
309
309
|
"env_logger",
|
310
310
|
"eppo_core",
|
@@ -318,9 +318,9 @@ dependencies = [
|
|
318
318
|
|
319
319
|
[[package]]
|
320
320
|
name = "eppo_core"
|
321
|
-
version = "4.
|
321
|
+
version = "4.1.0"
|
322
322
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
323
|
-
checksum = "
|
323
|
+
checksum = "626df025f5b474b42ead14953310e31e81e4b88ce52a993573bf87bc9def12d4"
|
324
324
|
dependencies = [
|
325
325
|
"chrono",
|
326
326
|
"derive_more",
|
@@ -907,6 +907,15 @@ version = "0.1.5"
|
|
907
907
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
908
908
|
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
909
909
|
|
910
|
+
[[package]]
|
911
|
+
name = "openssl-src"
|
912
|
+
version = "300.3.1+3.3.1"
|
913
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
914
|
+
checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91"
|
915
|
+
dependencies = [
|
916
|
+
"cc",
|
917
|
+
]
|
918
|
+
|
910
919
|
[[package]]
|
911
920
|
name = "openssl-sys"
|
912
921
|
version = "0.9.103"
|
@@ -915,6 +924,7 @@ checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6"
|
|
915
924
|
dependencies = [
|
916
925
|
"cc",
|
917
926
|
"libc",
|
927
|
+
"openssl-src",
|
918
928
|
"pkg-config",
|
919
929
|
"vcpkg",
|
920
930
|
]
|
@@ -1022,18 +1032,18 @@ dependencies = [
|
|
1022
1032
|
|
1023
1033
|
[[package]]
|
1024
1034
|
name = "rb-sys"
|
1025
|
-
version = "0.9.
|
1035
|
+
version = "0.9.102"
|
1026
1036
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1027
|
-
checksum = "
|
1037
|
+
checksum = "df4dec4b1d304c3b308a2cd86b1216ea45dd4361f4e9fa056f108332d0a450c1"
|
1028
1038
|
dependencies = [
|
1029
1039
|
"rb-sys-build",
|
1030
1040
|
]
|
1031
1041
|
|
1032
1042
|
[[package]]
|
1033
1043
|
name = "rb-sys-build"
|
1034
|
-
version = "0.9.
|
1044
|
+
version = "0.9.102"
|
1035
1045
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1036
|
-
checksum = "
|
1046
|
+
checksum = "1d71de3e29d174b8fb17b5d4470f27d7aa2605f8a9d05fda0d3aeff30e05a570"
|
1037
1047
|
dependencies = [
|
1038
1048
|
"bindgen",
|
1039
1049
|
"lazy_static",
|
data/README.md
CHANGED
@@ -20,3 +20,8 @@ eppo_core = { path = '../eppo_core' }
|
|
20
20
|
```
|
21
21
|
|
22
22
|
Make sure you remove the override before updating `Cargo.lock`. Otherwise, the lock file will be missing `eppo_core` checksum and will be unsuitable for release. (CI will warn you if you do this accidentally.)
|
23
|
+
|
24
|
+
## Releasing
|
25
|
+
|
26
|
+
* Bump versions in `ruby-sdk/lib/eppo_client/version.rb` and `ruby-sdk/ext/eppo_client/Cargo.toml`.
|
27
|
+
* Run `cargo update --workspace --verbose` to update `Cargo.lock` and `Gemfile.lock`.
|
data/ext/eppo_client/Cargo.toml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[package]
|
2
2
|
name = "eppo_client"
|
3
3
|
# TODO: this version and lib/eppo_client/version.rb should be in sync
|
4
|
-
version = "3.2.
|
4
|
+
version = "3.2.4"
|
5
5
|
edition = "2021"
|
6
6
|
license = "MIT"
|
7
7
|
publish = false
|
@@ -12,10 +12,10 @@ crate-type = ["cdylib"]
|
|
12
12
|
|
13
13
|
[dependencies]
|
14
14
|
env_logger = { version = "0.11.3", features = ["unstable-kv"] }
|
15
|
-
eppo_core = { version = "4.
|
15
|
+
eppo_core = { version = "4.1.0", features = ["vendored"] }
|
16
16
|
log = { version = "0.4.21", features = ["kv_serde"] }
|
17
17
|
magnus = { version = "0.6.4" }
|
18
18
|
serde = { version = "1.0.203", features = ["derive"] }
|
19
19
|
serde_magnus = "0.8.1"
|
20
|
-
rb-sys = "0.9"
|
20
|
+
rb-sys = "0.9.102"
|
21
21
|
serde_json = "1.0.128"
|
data/lib/eppo_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,32 +1,40 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eppo-server-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eppo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
12
|
-
dependencies:
|
11
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rb_sys
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.9.102
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.9.102
|
13
27
|
description:
|
14
28
|
email:
|
15
29
|
- eppo-team@geteppo.com
|
16
30
|
executables: []
|
17
31
|
extensions:
|
18
|
-
- ext/eppo_client/
|
32
|
+
- ext/eppo_client/extconf.rb
|
19
33
|
extra_rdoc_files: []
|
20
34
|
files:
|
21
|
-
- ".gitignore"
|
22
|
-
- ".rspec"
|
23
|
-
- ".rubocop.yml"
|
24
35
|
- Cargo.lock
|
25
36
|
- Cargo.toml
|
26
|
-
- LICENSE.txt
|
27
37
|
- README.md
|
28
|
-
- Rakefile
|
29
|
-
- Steepfile
|
30
38
|
- ext/eppo_client/Cargo.toml
|
31
39
|
- ext/eppo_client/build.rs
|
32
40
|
- ext/eppo_client/extconf.rb
|
@@ -41,7 +49,6 @@ files:
|
|
41
49
|
- lib/eppo_client/custom_errors.rb
|
42
50
|
- lib/eppo_client/validation.rb
|
43
51
|
- lib/eppo_client/version.rb
|
44
|
-
- sig/eppo_server_sdk.rbs
|
45
52
|
homepage: https://github.com/Eppo-exp/ruby-sdk
|
46
53
|
licenses:
|
47
54
|
- MIT
|
data/.gitignore
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/_yardoc/
|
4
|
-
/coverage/
|
5
|
-
/doc/
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/tmp/
|
9
|
-
*.bundle
|
10
|
-
*.so
|
11
|
-
*.o
|
12
|
-
*.a
|
13
|
-
mkmf.log
|
14
|
-
target/
|
15
|
-
*.gem
|
16
|
-
|
17
|
-
# rspec failure tracking
|
18
|
-
.rspec_status
|
19
|
-
|
20
|
-
# .cargo/config.toml should be used for testing with local version of
|
21
|
-
# eppo_core but it should not be committed.
|
22
|
-
/.cargo/config.toml
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2024 Eppo
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/Rakefile
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
require "rspec/core/rake_task"
|
5
|
-
require_relative 'lib/eppo_client/version'
|
6
|
-
|
7
|
-
GEM_NAME = 'eppo-server-sdk'
|
8
|
-
GEM_VERSION = EppoClient::VERSION
|
9
|
-
|
10
|
-
RSpec::Core::RakeTask.new(:spec)
|
11
|
-
|
12
|
-
require "rubocop/rake_task"
|
13
|
-
|
14
|
-
RuboCop::RakeTask.new
|
15
|
-
|
16
|
-
require "rb_sys/extensiontask"
|
17
|
-
|
18
|
-
task default: :build
|
19
|
-
|
20
|
-
GEMSPEC = Gem::Specification.load("eppo-server-sdk.gemspec")
|
21
|
-
|
22
|
-
RbSys::ExtensionTask.new("eppo_client", GEMSPEC) do |ext|
|
23
|
-
ext.lib_dir = "lib/eppo_client"
|
24
|
-
end
|
25
|
-
|
26
|
-
task build: :compile do
|
27
|
-
system "gem build #{GEM_NAME}.gemspec"
|
28
|
-
end
|
29
|
-
|
30
|
-
task install: :build do
|
31
|
-
system "gem install #{GEM_NAME}-#{GEM_VERSION}.gem"
|
32
|
-
end
|
33
|
-
|
34
|
-
task devinstall: :build do
|
35
|
-
system "gem install #{GEM_NAME}-#{GEM_VERSION}.gem --dev"
|
36
|
-
end
|
37
|
-
|
38
|
-
task publish: :build do
|
39
|
-
system "gem push #{GEM_NAME}-#{GEM_VERSION}.gem"
|
40
|
-
end
|
41
|
-
|
42
|
-
task :clean do
|
43
|
-
system 'rm *.gem'
|
44
|
-
end
|
45
|
-
|
46
|
-
RSpec::Core::RakeTask.new(:test) do |task|
|
47
|
-
root_dir = Rake.application.original_dir
|
48
|
-
task.pattern = "#{root_dir}/spec/*_spec.rb"
|
49
|
-
task.verbose = false
|
50
|
-
end
|
51
|
-
|
52
|
-
task test: :devinstall
|
53
|
-
task test_refreshed_data: [:devinstall, 'test-data']
|
data/Steepfile
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# D = Steep::Diagnostic
|
2
|
-
#
|
3
|
-
target :lib do
|
4
|
-
signature "sig"
|
5
|
-
|
6
|
-
check "lib" # Directory name
|
7
|
-
|
8
|
-
library "singleton"
|
9
|
-
library "logger"
|
10
|
-
|
11
|
-
# configure_code_diagnostics(D::Ruby.default) # `default` diagnostics setting (applies by default)
|
12
|
-
# configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
|
13
|
-
# configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
|
14
|
-
# configure_code_diagnostics(D::Ruby.silent) # `silent` diagnostics setting
|
15
|
-
# configure_code_diagnostics do |hash| # You can setup everything yourself
|
16
|
-
# hash[D::Ruby::NoMethod] = :information
|
17
|
-
# end
|
18
|
-
end
|
19
|
-
|
20
|
-
target :test do
|
21
|
-
signature "sig", "sig-private"
|
22
|
-
|
23
|
-
check "test"
|
24
|
-
|
25
|
-
library "singleton"
|
26
|
-
library "logger"
|
27
|
-
end
|
data/sig/eppo_server_sdk.rbs
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
# EppoClient is the main module for initializing the Eppo client.
|
2
|
-
# It provides a method to initialize the client with a given configuration.
|
3
|
-
module EppoClient
|
4
|
-
def self.init: (Config config) -> void
|
5
|
-
|
6
|
-
# The base assignment logger class to override
|
7
|
-
class AssignmentLogger
|
8
|
-
def log_assignment: (untyped assignment_event) -> void
|
9
|
-
|
10
|
-
def log_bandit_action: (untyped assignment_event) -> void
|
11
|
-
end
|
12
|
-
|
13
|
-
# The main client singleton
|
14
|
-
class Client
|
15
|
-
@assignment_logger: AssignmentLogger
|
16
|
-
@core: Core::Client
|
17
|
-
|
18
|
-
include Singleton
|
19
|
-
|
20
|
-
attr_accessor assignment_logger: AssignmentLogger
|
21
|
-
|
22
|
-
def self.instance: () -> Client
|
23
|
-
|
24
|
-
def init: (Config config) -> void
|
25
|
-
|
26
|
-
def shutdown: () -> void
|
27
|
-
|
28
|
-
def get_string_assignment: (String flag_key, String subject_key, Hash[String, untyped] subject_attributes, String default_value) -> String
|
29
|
-
|
30
|
-
def get_numeric_assignment: (String flag_key, String subject_key, Hash[String, untyped] subject_attributes, Numeric default_value) -> Numeric
|
31
|
-
|
32
|
-
def get_integer_assignment: (String flag_key, String subject_key, Hash[String, untyped] subject_attributes, Integer default_value) -> Integer
|
33
|
-
|
34
|
-
def get_boolean_assignment: (String flag_key, String subject_key, Hash[String, untyped] subject_attributes, bool default_value) -> bool
|
35
|
-
|
36
|
-
def get_json_assignment: (String flag_key, String subject_key, Hash[String, untyped] subject_attributes, Object default_value) -> Object
|
37
|
-
|
38
|
-
def get_bandit_action: (String flag_key, String subject_key, Hash[String, untyped] subject_attributes, Hash[String, untyped] actions, String default_variation) -> { variation: untyped, action: untyped }
|
39
|
-
|
40
|
-
private
|
41
|
-
|
42
|
-
# rubocop:disable Metrics/MethodLength
|
43
|
-
def get_assignment_inner: (untyped flag_key, String subject_key, untyped subject_attributes, untyped expected_type, untyped default_value) -> untyped
|
44
|
-
|
45
|
-
def log_assignment: (untyped event) -> void
|
46
|
-
|
47
|
-
def log_bandit_action: (untyped event) -> void
|
48
|
-
|
49
|
-
def enrich_event_metadata: (untyped event) -> void
|
50
|
-
|
51
|
-
def coerce_context_attributes: (untyped attributes) -> untyped
|
52
|
-
end
|
53
|
-
|
54
|
-
# The class for configuring the Eppo client singleton
|
55
|
-
class Config
|
56
|
-
@api_key: String
|
57
|
-
@assignment_logger: AssignmentLogger
|
58
|
-
@base_url: String
|
59
|
-
|
60
|
-
attr_reader api_key: String
|
61
|
-
attr_reader assignment_logger: AssignmentLogger
|
62
|
-
attr_reader base_url: String
|
63
|
-
|
64
|
-
def initialize: (String api_key, ?assignment_logger: AssignmentLogger, ?base_url: String) -> void
|
65
|
-
|
66
|
-
def validate: () -> void
|
67
|
-
|
68
|
-
# Hide instance variables (specifically api_key) from logs
|
69
|
-
def inspect: () -> ::String
|
70
|
-
end
|
71
|
-
|
72
|
-
# A custom error class for AssignmentLogger
|
73
|
-
class AssignmentLoggerError < StandardError
|
74
|
-
def initialize: (String message) -> void
|
75
|
-
end
|
76
|
-
|
77
|
-
# A custom error class for invalid values
|
78
|
-
class InvalidValueError < StandardError
|
79
|
-
def initialize: (String message) -> void
|
80
|
-
end
|
81
|
-
|
82
|
-
def self?.validate_not_blank: (String field_name, String field_value) -> void
|
83
|
-
|
84
|
-
VERSION: String
|
85
|
-
end
|
86
|
-
|
87
|
-
# Exposed from Rust
|
88
|
-
module EppoClient::Core
|
89
|
-
DEFAULT_BASE_URL: String
|
90
|
-
class Client
|
91
|
-
def self.new: (untyped config) -> Client
|
92
|
-
def shutdown: () -> void
|
93
|
-
def get_assignment: (String flag_key, String subject_key, untyped subject_attributes, String expected_type) -> untyped
|
94
|
-
def get_bandit_action: (String flag_key, String subject_key, untyped attributes, untyped actions, String default_variation) -> untyped
|
95
|
-
end
|
96
|
-
end
|