Skip to content

Commit 20bc43a

Browse files
chore: release 3.7.0 [version bump]
1 parent 1ad4f2b commit 20bc43a

5 files changed

Lines changed: 19 additions & 18 deletions

File tree

.changeset/evaluate-flags-api.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 3.7.0
2+
3+
### Minor Changes
4+
5+
- 1ad4f2b: Add `evaluate_flags(distinct_id, …)` returning a `FeatureFlagEvaluations` snapshot, and a `flags:` option on `capture` so a single `/flags` call can power both flag branching and event enrichment per request.
6+
7+
```ruby
8+
snapshot = posthog.evaluate_flags("user-1", flag_keys: ["checkout-redesign"])
9+
posthog.capture(distinct_id: "user-1", event: "checkout_started", flags: snapshot) if snapshot.enabled?("checkout-redesign")
10+
```
11+
12+
The snapshot exposes `enabled?`, `get_flag`, `get_flag_payload`, plus `only_accessed` / `only([keys])` filter helpers. `flag_keys:` scopes the underlying `/flags` request itself. `enabled?` and `get_flag` fire `$feature_flag_called` events with full metadata (`$feature_flag_id`, `$feature_flag_version`, `$feature_flag_reason`, `$feature_flag_request_id`), deduped through the existing per-distinct_id cache. `get_flag_payload` does not record access or fire an event.
13+
14+
Deprecates `is_feature_enabled`, `get_feature_flag`, `get_feature_flag_result`, `get_feature_flag_payload`, and `capture(send_feature_flags:)`. They continue to work unchanged but now emit a one-time deprecation warning per method pointing at `evaluate_flags()`. Removal is planned for the next major version.
15+
116
## 3.6.5
217

318
### Patch Changes

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
posthog-ruby (3.6.5)
4+
posthog-ruby (3.7.0)
55
concurrent-ruby (~> 1)
66

77
GEM
@@ -286,7 +286,7 @@ CHECKSUMS
286286
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
287287
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
288288
parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
289-
posthog-ruby (3.6.5)
289+
posthog-ruby (3.7.0)
290290
pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6
291291
prettier (4.0.4) sha256=713110c77675de802806b4e09b4b7783e497689db3e8a991f812aa78f4835bc5
292292
prettier_print (1.2.1) sha256=a72838b5f23facff21f90a5423cdcdda19e4271092b41f4ea7f50b83929e6ff9

lib/posthog/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PostHog
4-
VERSION = '3.6.5'
4+
VERSION = '3.7.0'
55
end

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "posthog-ruby",
33
"private": true,
4-
"version": "3.6.5",
4+
"version": "3.7.0",
55
"description": "Release metadata and changesets for the PostHog Ruby SDK",
66
"license": "MIT",
77
"packageManager": "pnpm@10.33.0",

0 commit comments

Comments
 (0)