flipper 1.3.5 → 1.3.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CLAUDE.md +74 -0
  3. data/lib/flipper/version.rb +1 -1
  4. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0f7fc2b532a31e1f4b4cf56421b7e296d12ad92eb12d817571d480d211004c6
4
- data.tar.gz: 37fccbcff9644cda8c874f745b32ce5dbcdd650494f9921807985e8a7da83cdf
3
+ metadata.gz: 8f53e9dadf45ea1d00e7abd24358748347d516d761ea347c438057f62fdbc185
4
+ data.tar.gz: 8c2a73d793d41ce64ed26c559bf532127f73e17e20944930aa6bf14aff355a57
5
5
  SHA512:
6
- metadata.gz: b452ac3f04236bc0adcf1f96b086cc7c29780d694fceddae975687dfbbaf796b41eaa867d2c5748cf61b4071b9d4f2b189f2921fe8a37b85222499fb9207aea2
7
- data.tar.gz: 2eb9788694d89d2777386032f173f3a616438d4f57f29b1b84a2321cd44e4aa4fb342c89c8f891e353710f5a41329f5473bbbe824385bd5a419d8463961c33a8
6
+ metadata.gz: af26df5e8c10540348e2b8dd31f11198dafdc8f3bcb6ef8e5361e3a764caa5a872734c64807746f1d077cfbc95df9143959e4c3446429dce1d5d871e46861fa7
7
+ data.tar.gz: 2005a736ea665c359154bf85f56495fcf9b326e9ecb740d2e1aca0c52a698367b44334a90ae2b1277c2a3c0dcdddcc478eab3126975f210fc796a454202913f4
data/CLAUDE.md ADDED
@@ -0,0 +1,74 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Development Commands
6
+
7
+ ### Testing
8
+ - `bundle exec rake` - Run all tests (RSpec, Minitest, and Rails tests)
9
+ - `bundle exec rspec` - Run RSpec tests only
10
+ - `bundle exec rake spec:ui` - Run UI-specific specs
11
+ - `bundle exec rake test` - Run Minitest tests only
12
+ - `bundle exec rake test_rails` - Run Rails generator tests
13
+ - `script/test` - Bootstrap and run tests across multiple Rails versions (5.0-8.0)
14
+
15
+ ### Development Setup
16
+ - `script/bootstrap` - Bundle install dependencies and setup binstubs
17
+ - `script/console` - Start interactive console with Flipper loaded (uses Pry)
18
+ - `script/server` - Start local UI server on port 9999 for testing web interface
19
+
20
+ ### Building and Releasing
21
+ - `bundle exec rake build` - Build all gems into pkg/ directory
22
+ - `bundle exec rake release` - Tag version, push to remote, and push gems (requires OTP)
23
+
24
+ ## Architecture Overview
25
+
26
+ Flipper is a feature flag library for Ruby with a modular adapter-based architecture:
27
+
28
+ ### Core Components
29
+
30
+ **DSL Layer** (`lib/flipper/dsl.rb`):
31
+ - Main interface for feature flag operations
32
+ - Delegates to Feature instances
33
+ - Handles memoization and instrumentation
34
+ - Thread-safe instance management
35
+
36
+ **Feature** (`lib/flipper/feature.rb`):
37
+ - Represents individual feature flags
38
+ - Manages enable/disable operations through gates
39
+ - Handles instrumentation events
40
+ - Works with adapters for persistence
41
+
42
+ **Adapters** (`lib/flipper/adapters/`):
43
+ - Pluggable storage backends (Redis, ActiveRecord, Memory, etc.)
44
+ - Common interface for all storage implementations
45
+ - Support for caching, failover, and synchronization patterns
46
+
47
+ **Gates** (`lib/flipper/gates/`):
48
+ - Different targeting mechanisms:
49
+ - Boolean (on/off for everyone)
50
+ - Actor (specific users/entities)
51
+ - Group (predefined user groups)
52
+ - Percentage of Actors (rollout to X% of users)
53
+ - Percentage of Time (probabilistic enabling)
54
+ - Expression (complex conditional logic)
55
+
56
+ ### Multi-Gem Structure
57
+
58
+ The project is structured as multiple gems:
59
+ - `flipper` - Core library
60
+ - `flipper-ui` - Web interface
61
+ - `flipper-api` - REST API
62
+ - `flipper-cloud` - Cloud service integration
63
+ - `flipper-*` - Various adapter gems (redis, active_record, mongo, etc.)
64
+
65
+ ### Key Patterns
66
+
67
+ **Configuration**: Global configuration through `Flipper.configure` with per-thread instances
68
+ **Instrumentation**: Built-in event system for monitoring and debugging
69
+ **Memoization**: Automatic caching of feature checks within request/thread scope
70
+ **Type Safety**: Strong typing system for actors, percentages, and other values
71
+
72
+ ### Testing
73
+
74
+ Uses both RSpec (currently preferred for new tests) and Minitest. Shared adapter specs ensure consistency across all storage backends. Extensive testing across multiple Rails versions (5.0-8.0).
@@ -1,5 +1,5 @@
1
1
  module Flipper
2
- VERSION = '1.3.5'.freeze
2
+ VERSION = '1.3.6'.freeze
3
3
 
4
4
  REQUIRED_RUBY_VERSION = '2.6'.freeze
5
5
  NEXT_REQUIRED_RUBY_VERSION = '3.0'.freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
@@ -35,6 +35,7 @@ files:
35
35
  - ".github/workflows/ci.yml"
36
36
  - ".github/workflows/examples.yml"
37
37
  - ".rspec"
38
+ - CLAUDE.md
38
39
  - CODE_OF_CONDUCT.md
39
40
  - Changelog.md
40
41
  - Dockerfile
@@ -314,7 +315,7 @@ metadata:
314
315
  homepage_uri: https://www.flippercloud.io
315
316
  source_code_uri: https://github.com/flippercloud/flipper
316
317
  bug_tracker_uri: https://github.com/flippercloud/flipper/issues
317
- changelog_uri: https://github.com/flippercloud/flipper/releases/tag/v1.3.5
318
+ changelog_uri: https://github.com/flippercloud/flipper/releases/tag/v1.3.6
318
319
  funding_uri: https://github.com/sponsors/flippercloud
319
320
  rdoc_options: []
320
321
  require_paths: