eppo-server-sdk 3.2.2 → 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 +1 -1
- data/README.md +5 -0
- data/ext/eppo_client/Cargo.toml +1 -1
- data/lib/eppo_client/version.rb +1 -1
- metadata +18 -12
- data/.gitignore +0 -22
- data/.rspec +0 -3
- data/.rubocop.yml +0 -8
- data/LICENSE.txt +0 -21
- data/Rakefile +0 -42
- data/Steepfile +0 -27
- data/build/x86-64_linux-setup.sh +0 -17
- 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
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
data/lib/eppo_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,33 +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
|
-
- build/x86-64_linux-setup.sh
|
31
38
|
- ext/eppo_client/Cargo.toml
|
32
39
|
- ext/eppo_client/build.rs
|
33
40
|
- ext/eppo_client/extconf.rb
|
@@ -42,7 +49,6 @@ files:
|
|
42
49
|
- lib/eppo_client/custom_errors.rb
|
43
50
|
- lib/eppo_client/validation.rb
|
44
51
|
- lib/eppo_client/version.rb
|
45
|
-
- sig/eppo_server_sdk.rbs
|
46
52
|
homepage: https://github.com/Eppo-exp/ruby-sdk
|
47
53
|
licenses:
|
48
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,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
require_relative 'lib/eppo_client/version'
|
5
|
-
|
6
|
-
GEM_NAME = 'eppo-server-sdk'
|
7
|
-
GEM_VERSION = EppoClient::VERSION
|
8
|
-
|
9
|
-
require "rb_sys/extensiontask"
|
10
|
-
|
11
|
-
task default: :build
|
12
|
-
|
13
|
-
GEMSPEC = Gem::Specification.load("eppo-server-sdk.gemspec")
|
14
|
-
|
15
|
-
RbSys::ExtensionTask.new("eppo_client", GEMSPEC) do |ext|
|
16
|
-
ext.lib_dir = "lib/eppo_client"
|
17
|
-
|
18
|
-
ext.cross_compile = true
|
19
|
-
end
|
20
|
-
|
21
|
-
task build: :compile do
|
22
|
-
system "gem build #{GEM_NAME}.gemspec"
|
23
|
-
end
|
24
|
-
|
25
|
-
task install: :build do
|
26
|
-
system "gem install #{GEM_NAME}-#{GEM_VERSION}.gem"
|
27
|
-
end
|
28
|
-
|
29
|
-
task devinstall: :build do
|
30
|
-
system "gem install #{GEM_NAME}-#{GEM_VERSION}.gem --dev"
|
31
|
-
end
|
32
|
-
|
33
|
-
task publish: :build do
|
34
|
-
system "gem push #{GEM_NAME}-#{GEM_VERSION}.gem"
|
35
|
-
end
|
36
|
-
|
37
|
-
task :clean do
|
38
|
-
system 'rm *.gem'
|
39
|
-
end
|
40
|
-
|
41
|
-
task test: :devinstall
|
42
|
-
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/build/x86-64_linux-setup.sh
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
## From:
|
4
|
-
## https://github.com/BoundaryML/baml/blob/canary/engine/language_client_ruby/x86-64_linux-setup.sh
|
5
|
-
##
|
6
|
-
|
7
|
-
set -euxo pipefail
|
8
|
-
|
9
|
-
# from https://serverfault.com/questions/1161816/mirrorlist-centos-org-no-longer-resolve
|
10
|
-
sudo sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo
|
11
|
-
sudo sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo
|
12
|
-
sudo sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo
|
13
|
-
|
14
|
-
ls /etc/yum.repos.d/
|
15
|
-
|
16
|
-
# We need this to build engine/, since it's needed for OpenSSL
|
17
|
-
sudo yum install -y perl-IPC-Cmd
|
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
|