Skip to content

Commit ff1cd25

Browse files
[FSSDK-8956] chore: prepare 4.0.1 branch for release (#329)
* ci: cleanup broken/slow actions (#309) * fix source clear * fix readme build badge * remove readme url check * updated prefix of ticket-check action (#315) * [FSSDK-8956] docs: change full stack to feature experimentation (#327) * change full stack to feature experimentation * bump version and update changelog (#328) --------- Co-authored-by: Muhammad Shaharyar <[email protected]>
1 parent 1263f22 commit ff1cd25

File tree

8 files changed

+102
-75
lines changed

8 files changed

+102
-75
lines changed

.github/workflows/lint_markdown.yml

-19
This file was deleted.

.github/workflows/ruby.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Ruby
1+
name: build
22

33
on:
44
push:
@@ -7,9 +7,6 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
lint_markdown_files:
11-
uses: optimizely/ruby-sdk/.github/workflows/lint_markdown.yml@master
12-
1310
integration_tests:
1411
uses: optimizely/ruby-sdk/.github/workflows/integration_test.yml@master
1512
secrets:

.github/workflows/source_clear_crone.yml

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15+
- name: Set up Ruby
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: '3.1'
19+
bundler-cache: true
1520
- name: Source clear scan
1621
env:
1722
SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}

.github/workflows/ticket_reference_check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
- name: Check for Jira ticket reference
1414
uses: optimizely/github-action-ticket-reference-checker-public@master
1515
with:
16-
bodyRegex: 'OASIS-(?<ticketNumber>\d+)'
16+
bodyRegex: 'FSSDK-(?<ticketNumber>\d+)'

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Optimizely Ruby SDK Changelog
22

3+
## 4.0.1
4+
March 13th, 2023
5+
6+
We updated our README.md and other non-functional code to reflect that this SDK supports both Optimizely Feature Experimentation and Optimizely Full Stack. ([#327](https://github.com/optimizely/ruby-sdk/pull/327))
37

48
## 4.0.0
59
August 4, 2022

README.md

+89-49
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
# Optimizely Ruby SDK
2-
[![Build Status](https://travis-ci.org/optimizely/ruby-sdk.svg?branch=master)](https://travis-ci.org/optimizely/ruby-sdk)
2+
3+
[![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)
34
[![Coverage Status](https://coveralls.io/repos/github/optimizely/ruby-sdk/badge.svg)](https://coveralls.io/github/optimizely/ruby-sdk)
45
[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)
56

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

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).
11+
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.
13+
14+
## Get Started
915

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).
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.
1117

12-
## Getting Started
18+
### Requirements
1319

14-
### Installing the SDK
20+
* Ruby 2.7+
21+
22+
### Install the SDK
1523

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

@@ -20,40 +28,42 @@ gem install optimizely-sdk
2028
```
2129

2230
### Feature Management Access
23-
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.
32+
33+
## Use the Ruby SDK
2434

25-
### Using the SDK
35+
### Initialization
2636

2737
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.
2838

2939
#### Initialization with datafile
3040

3141
Initialize Optimizely with a datafile. This datafile will be used as ProjectConfig throughout the life of the Optimizely instance.
3242

33-
```
43+
```ruby
3444
optimizely_instance = Optimizely::Project.new(datafile)
3545
```
3646

3747
#### Initialization by OptimizelyFactory
3848

3949
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.
4050

41-
```
51+
```ruby
4252
optimizely_instance = Optimizely::OptimizelyFactory.default_instance('put_your_sdk_key_here', datafile)
4353
```
4454

4555
When the `datafile` is given then it will be used initially before any update.
4656

4757
2. Initialize Optimizely by providing a Config Manager that implements a `config` method. You can customize our `HTTPConfigManager` as needed.
4858

49-
```
59+
```ruby
5060
custom_config_manager = CustomConfigManager.new
5161
optimizely_instance = Optimizely::OptimizelyFactory.default_instance_with_config_manager(custom_config_manager)
5262
```
5363

5464
3. Initialize Optimizely with required `sdk_key` and other optional arguments.
5565

56-
```
66+
```ruby
5767
optimizely_instance = Optimizely::OptimizelyFactory.custom_instance(
5868
sdk_key,
5969
datafile,
@@ -66,15 +76,14 @@ You can initialize the Optimizely instance in two ways: directly with a datafile
6676
notification_center,
6777
event_processor
6878
)
69-
```
70-
79+
```
7180

7281
#### HTTP Config Manager
7382

7483
The `HTTPConfigManager` asynchronously polls for datafiles from a specified URL at regular intervals by making HTTP requests.
7584

7685

77-
~~~~~~
86+
```ruby
7887
http_project_config_manager = Optimizely::HTTPProjectConfigManager.new(
7988
sdk_key: nil,
8089
url: nil,
@@ -91,7 +100,7 @@ The `HTTPConfigManager` asynchronously polls for datafiles from a specified URL
91100
datafile_access_token: nil,
92101
proxy_config: nil
93102
)
94-
~~~~~~
103+
```
95104
**Note:** You must provide either the `sdk_key` or URL. If you provide both, the URL takes precedence.
96105

97106
**sdk_key**
@@ -107,7 +116,7 @@ The polling interval is used to specify a fixed delay between consecutive HTTP r
107116
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.
108117

109118
**start_by_default**
110-
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`.
111120

112121
**blocking_timeout**
113122
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.
@@ -132,19 +141,22 @@ The following properties can be set to override the default configurations for `
132141
| start_by_default | true | Boolean flag to specify if datafile polling should start right away as soon as `HTTPConfigManager` initializes
133142
| blocking_timeout | 15 seconds | Maximum time in seconds to block the `config` call until config has been initialized
134143

135-
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 and Project Config is updated. To subscribe to these notifications, use the
145+
```ruby
146+
notification_center.add_notification_listener(Optimizely::NotificationCenter::NOTIFICATION_TYPES[:OPTIMIZELY_CONFIG_UPDATE], @callback)
147+
```
136148

137149

138150
#### BatchEventProcessor
139151

140-
[BatchEventProcessor](https://github.com/optimizely/ruby-sdk/blob/master/lib/optimizely/event/batch_event_processor.rb) is a batched implementation of the [EventProcessor](https://github.com/optimizely/ruby-sdk/blob/master/lib/optimizely/event/event_processor.rb)
152+
[BatchEventProcessor](https://github.com/optimizely/ruby-sdk/blob/master/lib/optimizely/event/batch_event_processor.rb) is a batched implementation of the [EventProcessor](https://github.com/optimizely/ruby-sdk/blob/master/lib/optimizely/event/event_processor.rb)
141153

142154
* Events passed to the `BatchEventProcessor` are immediately added to a `Queue`.
143155

144156
* 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`.
145157

146-
##### Use BatchEventProcessor
147-
~~~~~~
158+
#### Use BatchEventProcessor
159+
```ruby
148160
event_processor = Optimizely::BatchEventProcessor.new(
149161
event_queue: SizedQueue.new(10),
150162
event_dispatcher: event_dispatcher,
@@ -153,7 +165,7 @@ event_processor = Optimizely::BatchEventProcessor.new(
153165
logger: logger,
154166
notification_center: notification_center
155167
)
156-
~~~~~~
168+
```
157169

158170
#### Advanced configuration
159171
The following properties can be used to customize the `BatchEventProcessor` configuration.
@@ -176,9 +188,10 @@ If you enable event batching, make sure that you call the `close` method, `optim
176188
| -- | --
177189
| `close()` | Stops all timers and flushes the event queue. This method will also stop any timers that are happening for the datafile manager.
178190

179-
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+
For Further details see the Optimizely [Feature Experimentation 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.
180193

181-
## Development
194+
## SDK Development
182195

183196
### Building the SDK
184197

@@ -188,9 +201,9 @@ To build a local copy of the gem which will be output to `/pkg`:
188201
rake build
189202
```
190203
191-
### Unit tests
204+
### Unit Tests
192205
193-
##### Running all tests
206+
#### Running all tests
194207
You can run all unit tests with:
195208
196209
```
@@ -202,47 +215,74 @@ rake spec
202215
Please see [CONTRIBUTING](CONTRIBUTING.md).
203216
204217
### Credits
218+
205219
This software incorporates code from the following open source projects:
206220
207-
**Httparty** [https://github.com/jnunemaker/httparty](https://github.com/jnunemaker/httparty)
208-
Copyright &copy; 2008 John Nunemaker
221+
**Httparty** [https://github.com/jnunemaker/httparty](https://github.com/jnunemaker/httparty)
222+
Copyright &copy; 2008 John Nunemaker
209223
License (MIT): [https://github.com/jnunemaker/httparty/blob/master/MIT-LICENSE](https://github.com/jnunemaker/httparty/blob/master/MIT-LICENSE)
210224
211-
**JSON Schema Validator** [https://github.com/ruby-json-schema/json-schema](https://github.com/ruby-json-schema/json-schema)
212-
Copyright &copy; 2010-2011, Lookingglass Cyber Solutions
225+
**JSON Schema Validator** [https://github.com/ruby-json-schema/json-schema](https://github.com/ruby-json-schema/json-schema)
226+
Copyright &copy; 2010-2011, Lookingglass Cyber Solutions
213227
License (MIT): [https://github.com/ruby-json-schema/json-schema/blob/master/LICENSE.md](https://github.com/ruby-json-schema/json-schema/blob/master/LICENSE.md)
214228
215-
**Murmurhash3** [https://github.com/funny-falcon/murmurhash3-ruby](https://github.com/funny-falcon/murmurhash3-ruby)
216-
Copyright &copy; 2012 Sokolov Yura 'funny-falcon'
229+
**Murmurhash3** [https://github.com/funny-falcon/murmurhash3-ruby](https://github.com/funny-falcon/murmurhash3-ruby)
230+
Copyright &copy; 2012 Sokolov Yura 'funny-falcon'
217231
License (MIT): [https://github.com/funny-falcon/murmurhash3-ruby/blob/master/LICENSE](https://github.com/funny-falcon/murmurhash3-ruby/blob/master/LICENSE)
218232
219-
220233
### Additional Code
234+
221235
This software may be used with additional code that is separately downloaded by you. _These components are subject to
222236
their own license terms, which you should review carefully_.
223237
224-
**Bundler** [https://github.com/bundler/bundler](https://github.com/bundler/bundler)
225-
Copyright &copy; 2008-2018 Andre Arko, Engine Yard, et al
238+
**Bundler** [https://github.com/bundler/bundler](https://github.com/bundler/bundler)
239+
Copyright &copy; 2008-2018 Andre Arko, Engine Yard, et al
226240
License (MIT): [https://github.com/bundler/bundler/blob/master/LICENSE.md](https://github.com/bundler/bundler/blob/master/LICENSE.md)
227241
228-
**Coveralls** [https://github.com/lemurheavy/coveralls-ruby](https://github.com/lemurheavy/coveralls-ruby)
229-
Copyright &copy; 2012 Wil Gieseler
242+
**Coveralls** [https://github.com/lemurheavy/coveralls-ruby](https://github.com/lemurheavy/coveralls-ruby)
243+
Copyright &copy; 2012 Wil Gieseler
230244
License (MIT): [https://github.com/lemurheavy/coveralls-ruby/blob/master/LICENSE](https://github.com/lemurheavy/coveralls-ruby/blob/master/LICENSE)
231245
232-
**Rake** [https://github.com/ruby/rake](https://github.com/ruby/rake)
233-
Copyright &copy; 2004-2017 Jim Weirich
234-
License (MIT): [https://github.com/ruby/rake/blob/master/MIT-LICENSE](https://github.com/ruby/rake/blob/master/MIT-LICENSE)
246+
**Rake** [https://github.com/ruby/rake](https://github.com/ruby/rake)
247+
Copyright &copy; 2004-2017 Jim Weirich
248+
License (MIT): [https://github.com/ruby/rake/blob/master/MIT-LICENSE](https://github.com/ruby/rake/blob/master/MIT-LICENSE)
235249
236-
**RSpec** [https://github.com/rspec/rspec](https://github.com/rspec/rspec)
237-
Copyright &copy; 2009 Chad Humphries, David Chelimsky
238-
Copyright &copy; 2006 David Chelimsky, The RSpec Development Team
239-
Copyright &copy; 2005 Steven Baker
240-
License (MIT): [https://github.com/rspec/rspec/blob/master/LICENSE.md](https://github.com/rspec/rspec/blob/master/LICENSE.md)
250+
**RSpec** [https://github.com/rspec/rspec](https://github.com/rspec/rspec)
251+
Copyright &copy; 2009 Chad Humphries, David Chelimsky
252+
Copyright &copy; 2006 David Chelimsky, The RSpec Development Team
253+
Copyright &copy; 2005 Steven Baker
254+
License (MIT): [https://github.com/rspec/rspec/blob/master/LICENSE.md](https://github.com/rspec/rspec/blob/master/LICENSE.md)
241255
242-
**RuboCop** [https://github.com/rubocop-hq/rubocop](https://github.com/rubocop-hq/rubocop)
243-
Copyright &copy; 2012-19 Bozhidar Batsov
256+
**RuboCop** [https://github.com/rubocop-hq/rubocop](https://github.com/rubocop-hq/rubocop)
257+
Copyright &copy; 2012-19 Bozhidar Batsov
244258
License (MIT): [https://github.com/rubocop-hq/rubocop/blob/master/LICENSE.txt](https://github.com/rubocop-hq/rubocop/blob/master/LICENSE.txt)
245259
246-
**WebMock** [https://github.com/bblimke/webmock](https://github.com/bblimke/webmock)
247-
Copyright &copy; 2009-2010 Bartosz Blimke
260+
**WebMock** [https://github.com/bblimke/webmock](https://github.com/bblimke/webmock)
261+
Copyright &copy; 2009-2010 Bartosz Blimke
248262
License (MIT): [https://github.com/bblimke/webmock/blob/master/LICENSE](https://github.com/bblimke/webmock/blob/master/LICENSE)
263+
264+
### Other Optimizely SDKs
265+
266+
- Agent - https://github.com/optimizely/agent
267+
268+
- Android - https://github.com/optimizely/android-sdk
269+
270+
- C# - https://github.com/optimizely/csharp-sdk
271+
272+
- Flutter - https://github.com/optimizely/optimizely-flutter-sdk
273+
274+
- Go - https://github.com/optimizely/go-sdk
275+
276+
- Java - https://github.com/optimizely/java-sdk
277+
278+
- JavaScript - https://github.com/optimizely/javascript-sdk
279+
280+
- PHP - https://github.com/optimizely/php-sdk
281+
282+
- Python - https://github.com/optimizely/python-sdk
283+
284+
- React - https://github.com/optimizely/react-sdk
285+
286+
- Ruby - https://github.com/optimizely/ruby-sdk
287+
288+
- Swift - https://github.com/optimizely/swift-sdk

lib/optimizely/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
#
1818
module Optimizely
1919
CLIENT_ENGINE = 'ruby-sdk'
20-
VERSION = '4.0.0'
20+
VERSION = '4.0.1'
2121
end

optimizely-sdk.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
1010
spec.required_ruby_version = '>= 2.7'
1111

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

0 commit comments

Comments
 (0)