Skip to content

[FSSDK-8956] docs: change full stack to feature experimentation #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 49 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
# Optimizely Ruby SDK

[![Build Status](https://github.com/optimizely/ruby-sdk/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/optimizely/ruby-sdk/actions/workflows/ruby.yml?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/optimizely/ruby-sdk/badge.svg)](https://coveralls.io/github/optimizely/ruby-sdk)
[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)

This repository houses the Ruby SDK for use with Optimizely Full Stack and Optimizely Rollouts.

Optimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the [documentation](https://docs.developers.optimizely.com/full-stack/docs).
This repository houses the Ruby SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy).

Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams that enables you to experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).

Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap.

Optimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the [documentation](https://docs.developers.optimizely.com/rollouts/docs).
## Get Started

## Getting Started
Refer to the [Ruby SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/ruby-sdk) for detailed instructions on getting started with using the SDK.

### Requirements

* Ruby 2.7+

### Installing the SDK
### Install the SDK

The SDK is available through [RubyGems](https://rubygems.org/gems/optimizely-sdk). To install:

Expand All @@ -23,9 +28,11 @@ gem install optimizely-sdk
```

### Feature Management Access
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely customer success manager.

## Use the Ruby SDK

### Using the SDK
### Initialization

You can initialize the Optimizely instance in two ways: directly with a datafile, or by using a factory class, `OptimizelyFactory`, which provides methods to create an Optimizely instance with the default configuration.

Expand Down Expand Up @@ -71,7 +78,6 @@ You can initialize the Optimizely instance in two ways: directly with a datafile
)
```


#### HTTP Config Manager

The `HTTPConfigManager` asynchronously polls for datafiles from a specified URL at regular intervals by making HTTP requests.
Expand Down Expand Up @@ -110,7 +116,7 @@ The polling interval is used to specify a fixed delay between consecutive HTTP r
A string with placeholder `{sdk_key}` can be provided so that this template along with the provided `sdk_key` is used to form the target URL.

**start_by_default**
Boolean flag used to start the `AsyncScheduler` for datafile polling if set to `True`.
Boolean flag used to start the `AsyncScheduler` for datafile polling if set to `true`.

**blocking_timeout**
The blocking timeout period is used to specify a maximum time to wait for initial bootstrapping. Valid blocking timeout period is between 1 and 2592000 seconds. Default is 15 seconds.
Expand Down Expand Up @@ -146,7 +152,7 @@ A notification signal will be triggered whenever a _new_ datafile is fetched and

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, line 144: use block code style instead of in-line code style for notification_center.add_notification_listener(Optimizely::NotificationCenter::NOTIFICATION_TYPES[:OPTIMIZELY_CONFIG_UPDATE], @callback)

* The `BatchEventProcessor` maintains a single consumer thread that pulls events off of the `Queue` and buffers them for either a configured batch size or for a maximum duration before the resulting `LogEvent` is sent to the `NotificationCenter`.

##### Use BatchEventProcessor
#### Use BatchEventProcessor
~~~~~~
event_processor = Optimizely::BatchEventProcessor.new(
event_queue: SizedQueue.new(10),
Expand Down Expand Up @@ -179,9 +185,10 @@ If you enable event batching, make sure that you call the `close` method, `optim
| -- | --
| `close()` | Stops all timers and flushes the event queue. This method will also stop any timers that are happening for the datafile manager.

See the Optimizely Full Stack [developer documentation](http://developers.optimizely.com/server/reference/index.html) to learn how to set up your first Full Stack project and use the SDK.
For Further details see the Optimizely [Feature Experimentation documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome)
to learn how to set up your first Ruby project and use the SDK.

## Development
## SDK Development

### Building the SDK

Expand All @@ -191,9 +198,9 @@ To build a local copy of the gem which will be output to `/pkg`:
rake build
```

### Unit tests
### Unit Tests

##### Running all tests
#### Running all tests
You can run all unit tests with:

```
Expand All @@ -205,6 +212,7 @@ rake spec
Please see [CONTRIBUTING](CONTRIBUTING.md).

### Credits

This software incorporates code from the following open source projects:

**Httparty** [https://github.com/jnunemaker/httparty](https://github.com/jnunemaker/httparty)
Expand All @@ -219,8 +227,8 @@ License (MIT): [https://github.com/ruby-json-schema/json-schema/blob/master/LICE
Copyright © 2012 Sokolov Yura 'funny-falcon'
License (MIT): [https://github.com/funny-falcon/murmurhash3-ruby/blob/master/LICENSE](https://github.com/funny-falcon/murmurhash3-ruby/blob/master/LICENSE)


### Additional Code

This software may be used with additional code that is separately downloaded by you. _These components are subject to
their own license terms, which you should review carefully_.

Expand Down Expand Up @@ -249,3 +257,29 @@ License (MIT): [https://github.com/rubocop-hq/rubocop/blob/master/LICENSE.txt](h
**WebMock** [https://github.com/bblimke/webmock](https://github.com/bblimke/webmock)
Copyright © 2009-2010 Bartosz Blimke
License (MIT): [https://github.com/bblimke/webmock/blob/master/LICENSE](https://github.com/bblimke/webmock/blob/master/LICENSE)

### Other Optimizely SDKs

- Agent - https://github.com/optimizely/agent

- Android - https://github.com/optimizely/android-sdk

- C# - https://github.com/optimizely/csharp-sdk

- Flutter - https://github.com/optimizely/optimizely-flutter-sdk

- Go - https://github.com/optimizely/go-sdk

- Java - https://github.com/optimizely/java-sdk

- JavaScript - https://github.com/optimizely/javascript-sdk

- PHP - https://github.com/optimizely/php-sdk

- Python - https://github.com/optimizely/python-sdk

- React - https://github.com/optimizely/react-sdk

- Ruby - https://github.com/optimizely/ruby-sdk

- Swift - https://github.com/optimizely/swift-sdk
2 changes: 1 addition & 1 deletion optimizely-sdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 2.7'

spec.summary = "Ruby SDK for Optimizely's testing framework"
spec.description = "A Ruby SDK for Optimizely's Full Stack product."
spec.description = 'A Ruby SDK for use with Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts'
spec.homepage = 'https://www.optimizely.com/'
spec.license = 'Apache-2.0'

Expand Down