You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository houses the Ruby SDK for use with Optimizely Full Stack and Optimizely Rollouts.
7
7
8
-
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).
8
+
This repository houses the Ruby SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy).
9
+
10
+
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).
9
11
10
-
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).
12
+
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.
11
13
12
-
## Getting Started
14
+
## Get Started
15
+
16
+
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.
13
17
14
18
### Requirements
19
+
15
20
* Ruby 2.7+
16
21
17
-
### Installing the SDK
22
+
### Install the SDK
18
23
19
24
The SDK is available through [RubyGems](https://rubygems.org/gems/optimizely-sdk). To install:
20
25
@@ -23,40 +28,42 @@ gem install optimizely-sdk
23
28
```
24
29
25
30
### Feature Management Access
26
-
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.
31
+
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely customer success manager.
27
32
28
-
### Using the SDK
33
+
## Use the Ruby SDK
34
+
35
+
### Initialization
29
36
30
37
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.
31
38
32
39
#### Initialization with datafile
33
40
34
41
Initialize Optimizely with a datafile. This datafile will be used as ProjectConfig throughout the life of the Optimizely instance.
1. Initialize Optimizely by providing an `sdk_key` and an optional `datafile`. This will initialize an HTTPConfigManager that makes an HTTP GET request to the URL (formed using your provided `sdk_key` and the default datafile CDN url template) to asynchronously download the project datafile at regular intervals and update ProjectConfig when a new datafile is received.
@@ -94,7 +100,7 @@ The `HTTPConfigManager` asynchronously polls for datafiles from a specified URL
94
100
datafile_access_token: nil,
95
101
proxy_config: nil
96
102
)
97
-
~~~~~~
103
+
```
98
104
**Note:**You must provide either the `sdk_key`orURL. If you provide both, the URL takes precedence.
99
105
100
106
**sdk_key**
@@ -110,7 +116,7 @@ The polling interval is used to specify a fixed delay between consecutive HTTP r
110
116
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.
111
117
112
118
**start_by_default**
113
-
Boolean flag used to start the `AsyncScheduler` for datafile polling if set to `True`.
119
+
Boolean flag used to start the `AsyncScheduler`for datafile polling if set to `true`.
114
120
115
121
**blocking_timeout**
116
122
The blocking timeout period is used to specify a maximum time to wait for initial bootstrapping. Valid blocking timeout period is between 1and2592000 seconds. Default is 15 seconds.
@@ -135,7 +141,10 @@ The following properties can be set to override the default configurations for `
135
141
| start_by_default |true|Boolean flag to specify if datafile polling should start right away as soon as `HTTPConfigManager` initializes
136
142
| blocking_timeout |15 seconds |Maximum time in seconds to block the `config` call until config has been initialized
137
143
138
-
A notification signal will be triggered whenever a _new_ datafile is fetched and Project Config is updated. To subscribe to these notifications, use the `notification_center.add_notification_listener(Optimizely::NotificationCenter::NOTIFICATION_TYPES[:OPTIMIZELY_CONFIG_UPDATE], @callback)`
144
+
A notification signal will be triggered whenever a _new_ datafile is fetched andProjectConfig is updated. To subscribe to these notifications, use the
@@ -146,8 +155,8 @@ A notification signal will be triggered whenever a _new_ datafile is fetched and
146
155
147
156
*The`BatchEventProcessor` maintains a single consumer thread that pulls events off of the `Queue`and buffers them for either a configured batch size orfor a maximum duration before the resulting `LogEvent` is sent to the `NotificationCenter`.
The following properties can be used to customize the `BatchEventProcessor` configuration.
@@ -179,9 +188,10 @@ If you enable event batching, make sure that you call the `close` method, `optim
179
188
|--|--
180
189
|`close()`|Stops all timers and flushes the event queue. This method will also stop any timers that are happening for the datafile manager.
181
190
182
-
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.
191
+
ForFurther details see the Optimizely [FeatureExperimentation documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome)
192
+
to learn how to set up your first Ruby project and use the SDK.
183
193
184
-
## Development
194
+
## SDK Development
185
195
186
196
### Building the SDK
187
197
@@ -191,9 +201,9 @@ To build a local copy of the gem which will be output to `/pkg`:
191
201
rake build
192
202
```
193
203
194
-
### Unit tests
204
+
### Unit Tests
195
205
196
-
##### Running all tests
206
+
#### Running all tests
197
207
You can run all unit tests with:
198
208
199
209
```
@@ -205,6 +215,7 @@ rake spec
205
215
Please see [CONTRIBUTING](CONTRIBUTING.md).
206
216
207
217
### Credits
218
+
208
219
This software incorporates code from the following open source projects:
0 commit comments