Skip to content

Commit

Permalink
chore: update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Dec 6, 2023
1 parent 17684e7 commit c8b57b2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
6 changes: 3 additions & 3 deletions flipt-client-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `flipt-client-node` directory contains the TypeScript source code for a Flip

Currently, to use this client, you'll need to build the dynamic library and the Node package locally and install it. This is a temporary solution until we can figure out a better way to package and distribute the libraries.

The dynamic library will contain the functionality necessary for the Node client to make FFI calls.
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.

### Prerequisites

Expand All @@ -16,7 +16,7 @@ The dynamic library will contain the functionality necessary for the Node client

### Automated Build

1. Build and copy the Rust dynamic library to the `flipt-client-node` directory. You can do this by running the following command from the root of the repository:
1. Build and copy the dynamic library to the `flipt-client-node` directory. You can do this by running the following command from the root of the repository:

```bash

Expand All @@ -38,7 +38,7 @@ The dynamic library will contain the functionality necessary for the Node client
cargo build --release
```

This should generate a `target/` directory in the root of this repository, which contains the dynamic linking library built for your platform.
This should generate a `target/` directory in the root of this repository, which contains the dynamically linked library built for your platform.

2. You'll need to copy the dynamic library to the `flipt-client-node/ext` directory. This is a temporary solution until we can figure out a better way to package the libraries with the package.
Expand Down
18 changes: 14 additions & 4 deletions flipt-client-ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `flipt-client-ruby` directory contains the Ruby source code for a Flipt eval

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.

The dynamic library will contain the functionality necessary for the Node client to make FFI calls.
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.

### Prerequisites

Expand All @@ -16,7 +16,7 @@ The dynamic library will contain the functionality necessary for the Node client

### Automated Build

1. Build and copy the Rust dynamic library to the `flipt-client-ruby/lib/ext` directory. You can do this by running the following command from the root of the repository:
1. Build and copy the dynamic library to the `flipt-client-ruby/lib/ext` directory. You can do this by running the following command from the root of the repository:

```bash

Expand All @@ -32,7 +32,7 @@ The dynamic library will contain the functionality necessary for the Node client
cargo build --release
```

This should generate a `target/` directory in the root of this repository, which contains the dynamically linked library built for your platform. This dynamic library will contain the functionality necessary for the Ruby client to make FFI calls.
This should generate a `target/` directory in the root of this repository, which contains the dynamically linked library built for your platform.

2. You'll need to copy the dynamic library to the `flipt-client-ruby/lib/ext` directory. This is a temporary solution until we can figure out a better way to package the libraries with the gem.
Expand All @@ -56,7 +56,17 @@ In your Ruby code you can import this client and use it as so:
```ruby
require 'flipt_client'
client = Flipt::EvaluationClient.new() # uses 'default' namespace
# namespace is the first positional argument and is optional here and will have a value of "default" if not specified.
# opts is the second positional argument and is also optional, the structure is:
# {
# "url": "http://localhost:8080",
# "update_interval": 120,
# "auth_token": "secret"
# }
#
# You can replace the url with where your upstream Flipt instance points to, the update interval for how long you are willing
# to wait for updated flag state, and the auth token if your Flipt instance requires it.
client = Flipt::EvaluationClient.new()
resp = client.evaluate_variant({ flag_key: 'buzz', entity_id: 'someentity', context: { fizz: 'buzz' } })
puts resp
Expand Down

0 comments on commit c8b57b2

Please sign in to comment.