philiprehberger-feature_flag 0.2.2 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fc85ef0053c9780d69a7f68a427e781d6d18562f500471fce701d2c713620e1
4
- data.tar.gz: 050fc622f01aef80dd5377eee18d0468619d9a18bab4076920d598d500a5f7ce
3
+ metadata.gz: a5e6904fdb4d83c2d0112c38bb58aa4e6973477b375e519698305f80aacecd2c
4
+ data.tar.gz: c57aa5b855cc3f191a9e04c5567bcd4ca5d3ecab632090769d9e3979a7d708df
5
5
  SHA512:
6
- metadata.gz: 1ec37f71140ce0e6d104cc949c99e98d8d4316ecbf1f53a571a1affadc1af59f369a9c7a9bb8c59fd6a3b709b5c479b691bb36283d89fbb32039a2b221671af0
7
- data.tar.gz: 7c247ac56d6bea5219f0d3b1cfd5bdd9b7e0d549de1058b268ef565ec388d2b963d6997c4cf04a1ff7a2ed9b60a6390caaff7b5f37c4cfdb5a1cc0570d7a95d3
6
+ metadata.gz: 45301d182e116b4eda9e0d297a89f5dba803ee7fb9c5be13c2c9bf52140b9e393b7edee42ad394fa93c19d5f5e6da2a0185d5968f679b6c9bbca72afcdcb5306
7
+ data.tar.gz: 4e392cc4350bb7c4d98be615008140e7c174eefa1ac078b59e49f84fba66d44a4249cb97756918a807d9c996b897c513b4ca964b47be2b116c1dbf4caa77149e
data/CHANGELOG.md CHANGED
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.6] - 2026-03-31
11
+
12
+ ### Changed
13
+ - Standardize README badges, support section, and license format
14
+
15
+ ## [0.2.5] - 2026-03-26
16
+
17
+ ### Changed
18
+
19
+ - Add Sponsor badge and fix License link format in README
20
+
21
+ ## [0.2.4] - 2026-03-24
22
+
23
+ ### Changed
24
+ - Expand test coverage to 70+ examples covering edge cases and error paths
25
+
26
+ ## [0.2.3] - 2026-03-24
27
+
28
+ ### Fixed
29
+ - Align README one-liner with gemspec summary
30
+
10
31
  ## [0.2.2] - 2026-03-24
11
32
 
12
33
  ### Fixed
data/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [![Tests](https://github.com/philiprehberger/rb-feature-flag/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/rb-feature-flag/actions/workflows/ci.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/philiprehberger-feature_flag.svg)](https://rubygems.org/gems/philiprehberger-feature_flag)
5
- [![License](https://img.shields.io/github/license/philiprehberger/rb-feature-flag)](LICENSE)
5
+ [![Last updated](https://img.shields.io/github/last-commit/philiprehberger/rb-feature-flag)](https://github.com/philiprehberger/rb-feature-flag/commits/main)
6
6
 
7
- Minimal feature flag system with YAML, ENV, and in-memory backends for Ruby
7
+ Minimal feature flag system with YAML, ENV, and in-memory backends
8
8
 
9
9
  ## Requirements
10
10
 
@@ -230,6 +230,24 @@ bundle exec rspec
230
230
  bundle exec rubocop
231
231
  ```
232
232
 
233
+ ## Support
234
+
235
+ If you find this project useful:
236
+
237
+ ⭐ [Star the repo](https://github.com/philiprehberger/rb-feature-flag)
238
+
239
+ 🐛 [Report issues](https://github.com/philiprehberger/rb-feature-flag/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
240
+
241
+ 💡 [Suggest features](https://github.com/philiprehberger/rb-feature-flag/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)
242
+
243
+ ❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)
244
+
245
+ 🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)
246
+
247
+ 💻 [GitHub Profile](https://github.com/philiprehberger)
248
+
249
+ 🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)
250
+
233
251
  ## License
234
252
 
235
- MIT
253
+ [MIT](LICENSE)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Philiprehberger
4
4
  module FeatureFlag
5
- VERSION = '0.2.2'
5
+ VERSION = '0.2.6'
6
6
  end
7
7
  end
@@ -48,10 +48,17 @@ module Philiprehberger
48
48
 
49
49
  def with(flag, value)
50
50
  @overrides ||= {}
51
- @overrides[flag.to_s] = value
51
+ key = flag.to_s
52
+ had_previous = @overrides.key?(key)
53
+ previous = @overrides[key]
54
+ @overrides[key] = value
52
55
  yield
53
56
  ensure
54
- @overrides&.delete(flag.to_s)
57
+ if had_previous
58
+ @overrides[key] = previous
59
+ else
60
+ @overrides&.delete(key)
61
+ end
55
62
  end
56
63
 
57
64
  def reload!
@@ -78,7 +85,7 @@ module Philiprehberger
78
85
  resolve_backend_value(flag, user_id)
79
86
  end
80
87
 
81
- def resolve_backend_value(flag, user_id) # rubocop:disable Naming/PredicateMethod
88
+ def resolve_backend_value(flag, user_id)
82
89
  value = configuration.backend.get(flag)
83
90
  return false if value.nil?
84
91
  return Rollout.enabled_for?(flag, user_id, value['percentage']) if rollout?(value)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: philiprehberger-feature_flag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Rehberger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-25 00:00:00.000000000 Z
11
+ date: 2026-03-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A lightweight feature flag library supporting in-memory, ENV, and YAML
14
14
  backends with percentage rollout and A/B variant support.