flipt_client 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -43
- data/lib/ext/darwin_arm64/libfliptengine.dylib +0 -0
- data/lib/ext/darwin_arm64/libfliptengine.rlib +0 -0
- data/lib/ext/linux_arm64/libfliptengine.rlib +0 -0
- data/lib/ext/linux_arm64/libfliptengine.so +0 -0
- data/lib/ext/linux_x86_64/libfliptengine.rlib +0 -0
- data/lib/ext/linux_x86_64/libfliptengine.so +0 -0
- data/lib/flipt_client/version.rb +1 -1
- metadata +2 -3
- data/lib/ext/flipt_engine.h +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb43f640ea6aec50fc212f5641bbd77b38a55f4bc607304be1b7cf10cbf9150
|
4
|
+
data.tar.gz: 03352f854828293e78eef89845c4ca69384b4551f3ac5966edb4f417dccd218c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25fb6f83ba21997d21510714fd34acd1eef609cbb024129b415639d8e2063ab229a71e97965c0b6aecf8789318cec483e29c11a712dcc18e3d4c7d0d26a17ec9
|
7
|
+
data.tar.gz: b837844841904b2dd17fc87e08d899c0b0054a43f75eb6287e53800436d6beb49a472e065ba1780f4dde7a57bce2de2ce03102ce5f7cf07e52116c880f87a64c
|
data/README.md
CHANGED
@@ -1,51 +1,15 @@
|
|
1
|
+
<!-- Last updated: Wed Dec 27 18:39:24 UTC 2023 -->
|
1
2
|
# Flipt Client Ruby
|
2
3
|
|
3
|
-
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/flipt_client.svg)](https://badge.fury.io/rb/flipt_client)
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
Currently, to use this client, you'll need to build the dynamic library and the gem locally and install it. This is a temporary solution until we can figure out a better way to package and distribute the libraries.
|
8
|
-
|
9
|
-
The dynamic library will contain the functionality necessary for the client to make calls to the Flipt engine via FFI. See [flipt-engine](../flipt-engine) for more information on the Flipt engine and FFI.
|
10
|
-
|
11
|
-
### Prerequisites
|
12
|
-
|
13
|
-
- [Rust](https://www.rust-lang.org/tools/install)
|
14
|
-
- [Ruby](https://www.ruby-lang.org/en/documentation/installation/)
|
15
|
-
- [Make](https://www.gnu.org/software/make/)
|
16
|
-
|
17
|
-
### Automated Build
|
18
|
-
|
19
|
-
1. Build and copy the dynamic library to the `flipt-client-ruby/lib/ext` directory for your platform. This will also build and install the `flipt_client` gem on your local machine. You can do this by running the following command from the root of the repository:
|
20
|
-
|
21
|
-
```bash
|
22
|
-
make ruby
|
23
|
-
```
|
24
|
-
|
25
|
-
### Manual Build
|
26
|
-
|
27
|
-
1. Build the Rust dynamic library
|
6
|
+
The `flipt-client-ruby` directory contains the Ruby source code for the Flipt [client-side evaluation](https://www.flipt.io/docs/integration/client) client.
|
28
7
|
|
29
|
-
|
30
|
-
cargo build --release
|
31
|
-
```
|
32
|
-
|
33
|
-
This should generate a `target/` directory in the root of this repository, which contains the dynamically linked library built for your platform.
|
34
|
-
|
35
|
-
2. You'll need to copy the dynamic library to the `flipt-client-ruby/lib/ext/$OS_$ARCH/` directory. This is a temporary solution until we can figure out a better way to package the libraries with the gem.
|
36
|
-
|
37
|
-
The `path/to/lib` will be the path to the dynamic library which will have the following paths depending on your platform.
|
38
|
-
|
39
|
-
- **Linux**: `{REPO_ROOT}/target/release/libfliptengine.so`
|
40
|
-
- **Windows**: `{REPO_ROOT}/target/release/libfliptengine.dll`
|
41
|
-
- **MacOS**: `{REPO_ROOT}/target/release/libfliptengine.dylib`
|
42
|
-
|
43
|
-
3. You can then build the gem and install it locally. You can do this by running the following command from the `flipt-client-ruby` directory:
|
8
|
+
## Installation
|
44
9
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
```
|
10
|
+
```bash
|
11
|
+
gem install flipt_client
|
12
|
+
```
|
49
13
|
|
50
14
|
## Usage
|
51
15
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/flipt_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipt_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flipt Devs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Flipt Client Evaluation SDK
|
14
14
|
email:
|
@@ -22,7 +22,6 @@ files:
|
|
22
22
|
- lib/ext/darwin_arm64/libfliptengine.d
|
23
23
|
- lib/ext/darwin_arm64/libfliptengine.dylib
|
24
24
|
- lib/ext/darwin_arm64/libfliptengine.rlib
|
25
|
-
- lib/ext/flipt_engine.h
|
26
25
|
- lib/ext/linux_arm64/libfliptengine.d
|
27
26
|
- lib/ext/linux_arm64/libfliptengine.rlib
|
28
27
|
- lib/ext/linux_arm64/libfliptengine.so
|
data/lib/ext/flipt_engine.h
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#include <stdarg.h>
|
2
|
-
#include <stdbool.h>
|
3
|
-
#include <stdint.h>
|
4
|
-
#include <stdlib.h>
|
5
|
-
|
6
|
-
/**
|
7
|
-
* # Safety
|
8
|
-
*
|
9
|
-
* This function will initialize an Engine and return a pointer back to the caller.
|
10
|
-
*/
|
11
|
-
void *initialize_engine(const char *const *namespaces, const char *opts);
|
12
|
-
|
13
|
-
/**
|
14
|
-
* # Safety
|
15
|
-
*
|
16
|
-
* This function will take in a pointer to the engine and return a variant evaluation response.
|
17
|
-
*/
|
18
|
-
const char *evaluate_variant(void *engine_ptr, const char *evaluation_request);
|
19
|
-
|
20
|
-
/**
|
21
|
-
* # Safety
|
22
|
-
*
|
23
|
-
* This function will take in a pointer to the engine and return a boolean evaluation response.
|
24
|
-
*/
|
25
|
-
const char *evaluate_boolean(void *engine_ptr, const char *evaluation_request);
|
26
|
-
|
27
|
-
/**
|
28
|
-
* # Safety
|
29
|
-
*
|
30
|
-
* This function will free the memory occupied by the engine.
|
31
|
-
*/
|
32
|
-
void destroy_engine(void *engine_ptr);
|