flipper 0.24.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/ci.yml +45 -14
- data/.github/workflows/examples.yml +39 -16
- data/Changelog.md +2 -443
- data/Gemfile +19 -11
- data/README.md +31 -27
- data/Rakefile +6 -4
- data/benchmark/enabled_ips.rb +10 -0
- data/benchmark/enabled_multiple_actors_ips.rb +20 -0
- data/benchmark/enabled_profile.rb +20 -0
- data/benchmark/instrumentation_ips.rb +21 -0
- data/benchmark/typecast_ips.rb +27 -0
- data/docs/images/banner.jpg +0 -0
- data/docs/images/flipper_cloud.png +0 -0
- data/examples/api/basic.ru +3 -4
- data/examples/api/custom_memoized.ru +3 -4
- data/examples/api/memoized.ru +3 -4
- data/examples/cloud/app.ru +12 -0
- data/examples/cloud/backoff_policy.rb +13 -0
- data/examples/cloud/basic.rb +22 -0
- data/examples/cloud/cloud_setup.rb +20 -0
- data/examples/cloud/forked.rb +36 -0
- data/examples/cloud/import.rb +17 -0
- data/examples/cloud/threaded.rb +33 -0
- data/examples/dsl.rb +1 -15
- data/examples/enabled_for_actor.rb +4 -2
- data/examples/expressions.rb +213 -0
- data/examples/instrumentation.rb +1 -0
- data/examples/instrumentation_last_accessed_at.rb +1 -0
- data/examples/mirroring.rb +59 -0
- data/examples/strict.rb +18 -0
- data/exe/flipper +5 -0
- data/flipper-cloud.gemspec +19 -0
- data/flipper.gemspec +10 -6
- data/lib/flipper/actor.rb +6 -3
- data/lib/flipper/adapter.rb +33 -7
- data/lib/flipper/adapter_builder.rb +44 -0
- data/lib/flipper/adapters/actor_limit.rb +28 -0
- data/lib/flipper/adapters/cache_base.rb +143 -0
- data/lib/flipper/adapters/dual_write.rb +1 -3
- data/lib/flipper/adapters/failover.rb +0 -4
- data/lib/flipper/adapters/failsafe.rb +72 -0
- data/lib/flipper/adapters/http/client.rb +44 -20
- data/lib/flipper/adapters/http/error.rb +1 -1
- data/lib/flipper/adapters/http.rb +31 -16
- data/lib/flipper/adapters/instrumented.rb +25 -6
- data/lib/flipper/adapters/memoizable.rb +33 -21
- data/lib/flipper/adapters/memory.rb +81 -46
- data/lib/flipper/adapters/operation_logger.rb +17 -78
- data/lib/flipper/adapters/poll/poller.rb +2 -0
- data/lib/flipper/adapters/poll.rb +37 -0
- data/lib/flipper/adapters/pstore.rb +17 -11
- data/lib/flipper/adapters/read_only.rb +8 -41
- data/lib/flipper/adapters/strict.rb +45 -0
- data/lib/flipper/adapters/sync/feature_synchronizer.rb +10 -1
- data/lib/flipper/adapters/sync.rb +0 -4
- data/lib/flipper/adapters/wrapper.rb +54 -0
- data/lib/flipper/cli.rb +263 -0
- data/lib/flipper/cloud/configuration.rb +263 -0
- data/lib/flipper/cloud/dsl.rb +27 -0
- data/lib/flipper/cloud/message_verifier.rb +95 -0
- data/lib/flipper/cloud/middleware.rb +63 -0
- data/lib/flipper/cloud/routes.rb +14 -0
- data/lib/flipper/cloud/telemetry/backoff_policy.rb +93 -0
- data/lib/flipper/cloud/telemetry/instrumenter.rb +22 -0
- data/lib/flipper/cloud/telemetry/metric.rb +39 -0
- data/lib/flipper/cloud/telemetry/metric_storage.rb +30 -0
- data/lib/flipper/cloud/telemetry/submitter.rb +98 -0
- data/lib/flipper/cloud/telemetry.rb +191 -0
- data/lib/flipper/cloud.rb +53 -0
- data/lib/flipper/configuration.rb +25 -4
- data/lib/flipper/dsl.rb +46 -45
- data/lib/flipper/engine.rb +102 -0
- data/lib/flipper/errors.rb +3 -20
- data/lib/flipper/export.rb +26 -0
- data/lib/flipper/exporter.rb +17 -0
- data/lib/flipper/exporters/json/export.rb +32 -0
- data/lib/flipper/exporters/json/v1.rb +33 -0
- data/lib/flipper/expression/builder.rb +73 -0
- data/lib/flipper/expression/constant.rb +25 -0
- data/lib/flipper/expression.rb +71 -0
- data/lib/flipper/expressions/all.rb +11 -0
- data/lib/flipper/expressions/any.rb +9 -0
- data/lib/flipper/expressions/boolean.rb +9 -0
- data/lib/flipper/expressions/comparable.rb +13 -0
- data/lib/flipper/expressions/duration.rb +28 -0
- data/lib/flipper/expressions/equal.rb +9 -0
- data/lib/flipper/expressions/greater_than.rb +9 -0
- data/lib/flipper/expressions/greater_than_or_equal_to.rb +9 -0
- data/lib/flipper/expressions/less_than.rb +9 -0
- data/lib/flipper/expressions/less_than_or_equal_to.rb +9 -0
- data/lib/flipper/expressions/not_equal.rb +9 -0
- data/lib/flipper/expressions/now.rb +9 -0
- data/lib/flipper/expressions/number.rb +9 -0
- data/lib/flipper/expressions/percentage.rb +9 -0
- data/lib/flipper/expressions/percentage_of_actors.rb +12 -0
- data/lib/flipper/expressions/property.rb +9 -0
- data/lib/flipper/expressions/random.rb +9 -0
- data/lib/flipper/expressions/string.rb +9 -0
- data/lib/flipper/expressions/time.rb +9 -0
- data/lib/flipper/feature.rb +87 -26
- data/lib/flipper/feature_check_context.rb +10 -6
- data/lib/flipper/gate.rb +13 -11
- data/lib/flipper/gate_values.rb +5 -18
- data/lib/flipper/gates/actor.rb +10 -17
- data/lib/flipper/gates/boolean.rb +1 -1
- data/lib/flipper/gates/expression.rb +75 -0
- data/lib/flipper/gates/group.rb +5 -7
- data/lib/flipper/gates/percentage_of_actors.rb +10 -13
- data/lib/flipper/gates/percentage_of_time.rb +1 -2
- data/lib/flipper/identifier.rb +2 -2
- data/lib/flipper/instrumentation/log_subscriber.rb +34 -6
- data/lib/flipper/instrumentation/statsd_subscriber.rb +2 -4
- data/lib/flipper/instrumentation/subscriber.rb +8 -1
- data/lib/flipper/metadata.rb +7 -1
- data/lib/flipper/middleware/memoizer.rb +28 -22
- data/lib/flipper/model/active_record.rb +23 -0
- data/lib/flipper/poller.rb +118 -0
- data/lib/flipper/serializers/gzip.rb +22 -0
- data/lib/flipper/serializers/json.rb +17 -0
- data/lib/flipper/spec/shared_adapter_specs.rb +105 -63
- data/lib/flipper/test/shared_adapter_test.rb +101 -58
- data/lib/flipper/test_help.rb +43 -0
- data/lib/flipper/typecast.rb +59 -18
- data/lib/flipper/types/actor.rb +13 -13
- data/lib/flipper/types/group.rb +4 -4
- data/lib/flipper/types/percentage.rb +1 -1
- data/lib/flipper/version.rb +11 -1
- data/lib/flipper.rb +50 -11
- data/lib/generators/flipper/setup_generator.rb +63 -0
- data/lib/generators/flipper/templates/update/migrations/01_create_flipper_tables.rb.erb +22 -0
- data/lib/generators/flipper/templates/update/migrations/02_change_flipper_gates_value_to_text.rb.erb +18 -0
- data/lib/generators/flipper/update_generator.rb +35 -0
- data/package-lock.json +41 -0
- data/package.json +10 -0
- data/spec/fixtures/environment.rb +1 -0
- data/spec/fixtures/flipper_pstore_1679087600.json +46 -0
- data/spec/flipper/adapter_builder_spec.rb +72 -0
- data/spec/flipper/adapter_spec.rb +30 -2
- data/spec/flipper/adapters/actor_limit_spec.rb +20 -0
- data/spec/flipper/adapters/dual_write_spec.rb +2 -2
- data/spec/flipper/adapters/failsafe_spec.rb +58 -0
- data/spec/flipper/adapters/http/client_spec.rb +61 -0
- data/spec/flipper/adapters/http_spec.rb +137 -55
- data/spec/flipper/adapters/instrumented_spec.rb +29 -11
- data/spec/flipper/adapters/memoizable_spec.rb +51 -31
- data/spec/flipper/adapters/memory_spec.rb +14 -3
- data/spec/flipper/adapters/operation_logger_spec.rb +31 -12
- data/spec/flipper/adapters/read_only_spec.rb +32 -17
- data/spec/flipper/adapters/strict_spec.rb +64 -0
- data/spec/flipper/adapters/sync/feature_synchronizer_spec.rb +27 -0
- data/spec/flipper/cli_spec.rb +164 -0
- data/spec/flipper/cloud/configuration_spec.rb +251 -0
- data/spec/flipper/cloud/dsl_spec.rb +82 -0
- data/spec/flipper/cloud/message_verifier_spec.rb +104 -0
- data/spec/flipper/cloud/middleware_spec.rb +289 -0
- data/spec/flipper/cloud/telemetry/backoff_policy_spec.rb +107 -0
- data/spec/flipper/cloud/telemetry/metric_spec.rb +87 -0
- data/spec/flipper/cloud/telemetry/metric_storage_spec.rb +58 -0
- data/spec/flipper/cloud/telemetry/submitter_spec.rb +145 -0
- data/spec/flipper/cloud/telemetry_spec.rb +208 -0
- data/spec/flipper/cloud_spec.rb +181 -0
- data/spec/flipper/configuration_spec.rb +17 -0
- data/spec/flipper/dsl_spec.rb +54 -73
- data/spec/flipper/engine_spec.rb +373 -0
- data/spec/flipper/export_spec.rb +13 -0
- data/spec/flipper/exporter_spec.rb +16 -0
- data/spec/flipper/exporters/json/export_spec.rb +60 -0
- data/spec/flipper/exporters/json/v1_spec.rb +33 -0
- data/spec/flipper/expression/builder_spec.rb +248 -0
- data/spec/flipper/expression_spec.rb +188 -0
- data/spec/flipper/expressions/all_spec.rb +15 -0
- data/spec/flipper/expressions/any_spec.rb +15 -0
- data/spec/flipper/expressions/boolean_spec.rb +15 -0
- data/spec/flipper/expressions/duration_spec.rb +43 -0
- data/spec/flipper/expressions/equal_spec.rb +24 -0
- data/spec/flipper/expressions/greater_than_or_equal_to_spec.rb +28 -0
- data/spec/flipper/expressions/greater_than_spec.rb +28 -0
- data/spec/flipper/expressions/less_than_or_equal_to_spec.rb +28 -0
- data/spec/flipper/expressions/less_than_spec.rb +32 -0
- data/spec/flipper/expressions/not_equal_spec.rb +15 -0
- data/spec/flipper/expressions/now_spec.rb +11 -0
- data/spec/flipper/expressions/number_spec.rb +21 -0
- data/spec/flipper/expressions/percentage_of_actors_spec.rb +20 -0
- data/spec/flipper/expressions/percentage_spec.rb +15 -0
- data/spec/flipper/expressions/property_spec.rb +13 -0
- data/spec/flipper/expressions/random_spec.rb +9 -0
- data/spec/flipper/expressions/string_spec.rb +11 -0
- data/spec/flipper/expressions/time_spec.rb +13 -0
- data/spec/flipper/feature_check_context_spec.rb +17 -17
- data/spec/flipper/feature_spec.rb +436 -33
- data/spec/flipper/gate_values_spec.rb +2 -33
- data/spec/flipper/gates/boolean_spec.rb +1 -1
- data/spec/flipper/gates/expression_spec.rb +108 -0
- data/spec/flipper/gates/group_spec.rb +2 -3
- data/spec/flipper/gates/percentage_of_actors_spec.rb +61 -5
- data/spec/flipper/gates/percentage_of_time_spec.rb +2 -2
- data/spec/flipper/identifier_spec.rb +4 -5
- data/spec/flipper/instrumentation/log_subscriber_spec.rb +23 -6
- data/spec/flipper/instrumentation/statsd_subscriber_spec.rb +25 -1
- data/spec/flipper/middleware/memoizer_spec.rb +74 -24
- data/spec/flipper/model/active_record_spec.rb +61 -0
- data/spec/flipper/poller_spec.rb +47 -0
- data/spec/flipper/serializers/gzip_spec.rb +13 -0
- data/spec/flipper/serializers/json_spec.rb +13 -0
- data/spec/flipper/typecast_spec.rb +121 -6
- data/spec/flipper/types/actor_spec.rb +63 -46
- data/spec/flipper/types/group_spec.rb +2 -2
- data/spec/flipper_integration_spec.rb +168 -58
- data/spec/flipper_spec.rb +93 -29
- data/spec/spec_helper.rb +8 -14
- data/spec/support/actor_names.yml +1 -0
- data/spec/support/fail_on_output.rb +8 -0
- data/spec/support/fake_backoff_policy.rb +15 -0
- data/spec/support/skippable.rb +18 -0
- data/spec/support/spec_helpers.rb +23 -8
- data/test/adapters/actor_limit_test.rb +20 -0
- data/test_rails/generators/flipper/setup_generator_test.rb +64 -0
- data/test_rails/generators/flipper/update_generator_test.rb +96 -0
- data/test_rails/helper.rb +19 -2
- data/test_rails/system/test_help_test.rb +51 -0
- metadata +223 -19
- data/lib/flipper/railtie.rb +0 -47
- data/spec/flipper/railtie_spec.rb +0 -73
data/Changelog.md
CHANGED
@@ -1,444 +1,3 @@
|
|
1
|
-
|
1
|
+
# Changelog
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
* flipper-api: `exclude_gates` parameter to exclude gate data in GETs (https://github.com/jnunemaker/flipper/pull/572).
|
6
|
-
* Make it possible to disable internal memoization (https://github.com/jnunemaker/flipper/pull/612).
|
7
|
-
* Add Flipper::Actor#hash so actors can be hash keys (https://github.com/jnunemaker/flipper/pull/616).
|
8
|
-
* Pretty Up `rails routes` again and make rack-protection dependency less strict (https://github.com/jnunemaker/flipper/pull/619).
|
9
|
-
* Add kwargs for method_missing using ruby 3.0 (https://github.com/jnunemaker/flipper/pull/620).
|
10
|
-
|
11
|
-
## 0.24.0
|
12
|
-
|
13
|
-
### Additions/Changes
|
14
|
-
|
15
|
-
* Add Ruby 3.0 and 3.1 to the CI matrix and fix groups block arity check for ruby 3 (https://github.com/jnunemaker/flipper/pull/601)
|
16
|
-
* Removed support for Ruby 2.5 (which was end of line 9 months ago)
|
17
|
-
* Add (alpha) client side instrumentation of events to cloud (https://github.com/jnunemaker/flipper/pull/602)
|
18
|
-
* Fix deprecated uses of Redis#pipelined (https://github.com/jnunemaker/flipper/pull/603). redis-rb >= 3 now required.
|
19
|
-
* Fix Flipper UI Rack application when `Rack::Session::Pool` is used to build it (https://github.com/jnunemaker/flipper/pull/606).
|
20
|
-
|
21
|
-
## 0.23.1
|
22
|
-
|
23
|
-
### Additions/Changes
|
24
|
-
|
25
|
-
* Relax dalli version constraint (https://github.com/jnunemaker/flipper/pull/596)
|
26
|
-
|
27
|
-
### Bug Fixes
|
28
|
-
|
29
|
-
* Fix railtie initialization to mount middleware after config/intializers/* (https://github.com/jnunemaker/flipper/pull/586)
|
30
|
-
|
31
|
-
## 0.23.0
|
32
|
-
|
33
|
-
### Additions/Changes
|
34
|
-
|
35
|
-
* Allow some HTML in banner and descriptions (https://github.com/jnunemaker/flipper/pull/570).
|
36
|
-
* Moved some cloud headers to http client (https://github.com/jnunemaker/flipper/pull/567).
|
37
|
-
* Update flipper-ui jquery and bootstrap versions (https://github.com/jnunemaker/flipper/issues/565 and https://github.com/jnunemaker/flipper/pull/566).
|
38
|
-
* Moved docs to www.flippercloud.io/docs (https://github.com/jnunemaker/flipper/pull/574).
|
39
|
-
* PStore adapter now defaults to thread safe and no longer supports `.thread_safe` (https://github.com/jnunemaker/flipper/commit/4048704fefe41b716015294a19a0b94546637630).
|
40
|
-
* Add failover adapter (https://github.com/jnunemaker/flipper/pull/584).
|
41
|
-
* Improve http adapter error message (https://github.com/jnunemaker/flipper/pull/587).
|
42
|
-
* Rails 7 support (mostly in https://github.com/jnunemaker/flipper/pull/592).
|
43
|
-
|
44
|
-
## 0.22.2
|
45
|
-
|
46
|
-
### Additions/Changes
|
47
|
-
|
48
|
-
* Allow adding multiple actors at once in flipper-ui via comma separation (configurable via `Flipper::UI.configuration.actors_separator`) (https://github.com/jnunemaker/flipper/pull/556)
|
49
|
-
|
50
|
-
### Bug Fixes
|
51
|
-
|
52
|
-
* Fix railtie initialization to avoid altering middleware order (https://github.com/jnunemaker/flipper/pull/563)
|
53
|
-
|
54
|
-
## 0.22.1
|
55
|
-
|
56
|
-
### Additions/Changes
|
57
|
-
|
58
|
-
* Remove Octicons and replace with a pure CSS status circle (https://github.com/jnunemaker/flipper/pull/547)
|
59
|
-
* Rescue unique errors in AR and Sequel when setting value (https://github.com/jnunemaker/flipper/commit/87f5a98bce7baad7a27b75b5bce3256967769f27)
|
60
|
-
* Add a Content-Security-Policy to flipper-ui (https://github.com/jnunemaker/flipper/pull/552)
|
61
|
-
* Fix Synchronizer issue that occurs for ActiveRecord adapter (https://github.com/jnunemaker/flipper/pull/554)
|
62
|
-
|
63
|
-
## 0.22.0
|
64
|
-
|
65
|
-
### Additions/Changes
|
66
|
-
|
67
|
-
* Enable log subscriber by default in Rails (https://github.com/jnunemaker/flipper/pull/525)
|
68
|
-
* Remove memoizer from API and UI (https://github.com/jnunemaker/flipper/pull/527). If you are using the UI or API without configuring the default instance of Flipper, you'll need to enable memoization if you want it. For examples, see the examples/ui and examples/api directories.
|
69
|
-
* Fix SQL reserved word use in get_all for ActiveRecord and Sequel (https://github.com/jnunemaker/flipper/pull/536).
|
70
|
-
* Handle spaces in names gracefully in UI (https://github.com/jnunemaker/flipper/pull/541).
|
71
|
-
|
72
|
-
## 0.21.0
|
73
|
-
|
74
|
-
### Additions/Changes
|
75
|
-
|
76
|
-
* Default to using memory adapter (https://github.com/jnunemaker/flipper/pull/501)
|
77
|
-
* Adapters now configured on require when possible (https://github.com/jnunemaker/flipper/pull/502)
|
78
|
-
* Added cloud recommendation to flipper-ui. Can be disabled with `Flipper::UI.configure { |config| config.cloud_recommendation = false }`. Just want to raise awareness that more is available if people want it (https://github.com/jnunemaker/flipper/pull/504)
|
79
|
-
* Added default `flipper_id` implementation via `Flipper::Identifier` and automatically included it in ActiveRecord and Sequel models (https://github.com/jnunemaker/flipper/pull/505)
|
80
|
-
* Deprecate superflous sync_method setting (https://github.com/jnunemaker/flipper/pull/511)
|
81
|
-
* Flipper is now pre-configured when used with Rails. By default, it will [memoize and preload all features for each request](https://flippercloud.io/docs/optimization#memoization). (https://github.com/jnunemaker/flipper/pull/506)
|
82
|
-
|
83
|
-
### Upgrading
|
84
|
-
|
85
|
-
You should be able to upgrade to 0.21 without any breaking changes. However, if you want to simplify your setup, you can remove some configuration that is now handled automatically:
|
86
|
-
|
87
|
-
1. Adapters are configured when on require, so unless you are using caching or other customizations, you can remove adapter configuration.
|
88
|
-
|
89
|
-
```diff
|
90
|
-
# config/initializers/flipper.rb
|
91
|
-
- Flipper.configure do |config|
|
92
|
-
- config.default { Flipper.new(Flipper::Adapters::ActiveRecord.new) }
|
93
|
-
- end
|
94
|
-
```
|
95
|
-
|
96
|
-
2. `Flipper::Middleware::Memoizer` will be enabled by default -- including preloading. **Note**: You may want to disable preloading (see below) if you have > 100 features.
|
97
|
-
|
98
|
-
```diff
|
99
|
-
# config/initializers/flipper.rb
|
100
|
-
- Rails.configuration.middleware.use Flipper::Middleware::Memoizer,
|
101
|
-
- preload: [:stats, :search, :some_feature]
|
102
|
-
+ Rails.application.configure do
|
103
|
-
+ # Uncomment to configure which features to preload on all requests
|
104
|
-
+ # config.flipper.preload = [:stats, :search, :some_feature]
|
105
|
-
+ #
|
106
|
-
+ # Or, you may want to disable preloading entirely:
|
107
|
-
+ # config.flipper.preload = false
|
108
|
-
+ end
|
109
|
-
```
|
110
|
-
|
111
|
-
3. `#flipper_id`, which is used to enable features for specific actors, is now defined by [Flipper::Identifier](lib/flipper/identifier.rb) on all ActiveRecord and Sequel models. You can remove your implementation if it is in the form of `ModelName;id`.
|
112
|
-
|
113
|
-
4. When using `flipper-cloud`, The `Flipper::Cloud.app` webhook receiver is now mounted at `/_flipper` by default.
|
114
|
-
|
115
|
-
```diff
|
116
|
-
# config/routes.rb
|
117
|
-
- mount Flipper::Cloud.app, at: "/_flipper"
|
118
|
-
```
|
119
|
-
|
120
|
-
## 0.20.4
|
121
|
-
|
122
|
-
### Additions/Changes
|
123
|
-
|
124
|
-
* Allow actors and time gates to deal with decimal percentages (https://github.com/jnunemaker/flipper/pull/492)
|
125
|
-
* Change Flipper::Cloud::Middleware to receive webhooks at / in addition to /webhooks.
|
126
|
-
* Add `write_through` option to ActiveSupportCacheStore adapter to support write-through caching (https://github.com/jnunemaker/flipper/pull/512)
|
127
|
-
|
128
|
-
## 0.20.3
|
129
|
-
|
130
|
-
### Additions/Changes
|
131
|
-
|
132
|
-
* Changed the internal structure of how the memory adapter stores things.
|
133
|
-
|
134
|
-
## 0.20.2
|
135
|
-
|
136
|
-
### Additions/Changes
|
137
|
-
|
138
|
-
* Http adapter now raises error when enable/disable/add/remove/clear fail.
|
139
|
-
* Cloud adapter sends some extra info like hostname, ruby version, etc. for debugging and decision making.
|
140
|
-
|
141
|
-
## 0.20.1
|
142
|
-
|
143
|
-
### Additions/Changes
|
144
|
-
|
145
|
-
* Just a minor tweak to cloud webhook middleware to provide more debugging information about why a hook wasn't successful.
|
146
|
-
|
147
|
-
## 0.20.0
|
148
|
-
|
149
|
-
### Additions/Changes
|
150
|
-
|
151
|
-
* Add support for webhooks to `Flipper::Cloud` (https://github.com/jnunemaker/flipper/pull/489).
|
152
|
-
|
153
|
-
## 0.19.1
|
154
|
-
|
155
|
-
### Additions/Changes
|
156
|
-
|
157
|
-
* Bump rack-protection version to < 2.2 (https://github.com/jnunemaker/flipper/pull/487)
|
158
|
-
* Add memoizer_options to Flipper::Api.app (https://github.com/jnunemaker/flipper/commit/174ad4bb94046a25c432d3c53fe1ff9f5a76d838)
|
159
|
-
|
160
|
-
## 0.19.0
|
161
|
-
|
162
|
-
### Additions/Changes
|
163
|
-
|
164
|
-
* 100% of actors is now considered conditional. Feature#on?, Feature#conditional?, Feature#state would all be affected. See https://github.com/jnunemaker/flipper/issues/463 for more.
|
165
|
-
* Several doc updates.
|
166
|
-
|
167
|
-
## 0.18.0
|
168
|
-
|
169
|
-
### Additions/Changes
|
170
|
-
|
171
|
-
* Add support for feature descriptions to flipper-ui (https://github.com/jnunemaker/flipper/pull/461).
|
172
|
-
* Remove rubocop (https://github.com/jnunemaker/flipper/pull/469).
|
173
|
-
* flipper-ui redesign (https://github.com/jnunemaker/flipper/pull/470).
|
174
|
-
* Removed support for ruby 2.4.
|
175
|
-
* Added support for ruby 2.7.
|
176
|
-
* Removed support for Rails 4.x.x.
|
177
|
-
* Removed support for customizing actors, groups, % of actors and % of time text in flipper-ui in favor of automatic and more descriptive text.
|
178
|
-
|
179
|
-
## 0.17.2
|
180
|
-
|
181
|
-
### Additions/Changes
|
182
|
-
|
183
|
-
* Avoid errors on import when there are no features and shared specs/tests for get all with no features (https://github.com/jnunemaker/flipper/pull/441 and https://github.com/jnunemaker/flipper/pull/442)
|
184
|
-
* ::ActiveRecord::RecordNotUnique > ActiveRecord::RecordNotUnique (https://github.com/jnunemaker/flipper/pull/444)
|
185
|
-
* Clear gate values on enable (https://github.com/jnunemaker/flipper/pull/454)
|
186
|
-
* Remove use of multi from redis adapter (https://github.com/jnunemaker/flipper/pull/451)
|
187
|
-
|
188
|
-
## 0.17.1
|
189
|
-
|
190
|
-
* Fix require in flipper-active_record (https://github.com/jnunemaker/flipper/pull/437)
|
191
|
-
|
192
|
-
## 0.17.0
|
193
|
-
|
194
|
-
### Additions/Changes
|
195
|
-
|
196
|
-
* Allow shorthand block notation on group types (https://github.com/jnunemaker/flipper/pull/406)
|
197
|
-
* Relax active record/support constraints to support Rails 6 (https://github.com/jnunemaker/flipper/pull/409)
|
198
|
-
* Allow disabling fun (https://github.com/jnunemaker/flipper/pull/413)
|
199
|
-
* Include thing_value in payload of Instrumented#enable and #disable (https://github.com/jnunemaker/flipper/pull/417)
|
200
|
-
* Replace Erubis with Erubi (https://github.com/jnunemaker/flipper/pull/407)
|
201
|
-
* Allow customizing Rack::Protection middleware list (https://github.com/jnunemaker/flipper/pull/385)
|
202
|
-
* Allow setting write_timeout for ruby 2.6+ (https://github.com/jnunemaker/flipper/pull/433)
|
203
|
-
* Drop support for Ruby 2.1, 2.2, and 2.3 (https://github.com/jnunemaker/flipper/commit/cf58982e70de5e6963b018ceced4f36a275f5b5d)
|
204
|
-
* Add support for Ruby 2.6 (https://github.com/jnunemaker/flipper/commit/57888311449ec81184d3d47ba9ae5cb1ad4a2f45)
|
205
|
-
* Remove support for Rails 3.2 (https://github.com/jnunemaker/flipper/commit/177c48c4edf51d4e411e7c673e30e06d1c66fb40)
|
206
|
-
* Add write_timeout for flipper http adapter for ruby 2.6+ (https://github.com/jnunemaker/flipper/pull/433)
|
207
|
-
* Relax moneta version to allow for < 1.2 (https://github.com/jnunemaker/flipper/pull/434).
|
208
|
-
* Improve active record idempotency (https://github.com/jnunemaker/flipper/pull/436).
|
209
|
-
* Allow customizing add actor placeholder text (https://github.com/jnunemaker/flipper/commit/5faa1e9cf66b68f8227d2f8408fb448a14676c45)
|
210
|
-
|
211
|
-
## 0.16.2
|
212
|
-
|
213
|
-
### Additions/Changes
|
214
|
-
|
215
|
-
* Bump rollout redis dependency to < 5 (https://github.com/jnunemaker/flipper/pull/403)
|
216
|
-
* Bump redis dependency to < 5 (https://github.com/jnunemaker/flipper/pull/401)
|
217
|
-
* Bump sequel dependency to < 6 (https://github.com/jnunemaker/flipper/pull/399 and https://github.com/jnunemaker/flipper/commit/edc767e69b4ce8daead9801f38e0e8bf6b238765)
|
218
|
-
|
219
|
-
## 0.16.1
|
220
|
-
|
221
|
-
### Additions/Changes
|
222
|
-
|
223
|
-
* Add actors API endpoint (https://github.com/jnunemaker/flipper/pull/372).
|
224
|
-
* Fix rack body proxy require for those using flipper without rack (https://github.com/jnunemaker/flipper/pull/376).
|
225
|
-
* Unescapes feature_name in FeatureNameFromRoute (https://github.com/jnunemaker/flipper/pull/377).
|
226
|
-
* Replace delete_all with destroy_all in ActiveRecord adapter (https://github.com/jnunemaker/flipper/pull/395)
|
227
|
-
* Target correct bootstrap breakpoints in flipper UI (https://github.com/jnunemaker/flipper/pull/396)
|
228
|
-
|
229
|
-
## 0.16.0
|
230
|
-
|
231
|
-
### Bug Fixes
|
232
|
-
|
233
|
-
* Support slashes in feature names (https://github.com/jnunemaker/flipper/pull/362).
|
234
|
-
|
235
|
-
### Additions/Changes
|
236
|
-
|
237
|
-
* Re-order gates for improved performance in some cases (https://github.com/jnunemaker/flipper/pull/370).
|
238
|
-
* Add Feature#exist?, DSL#exist? and Flipper#exist? (https://github.com/jnunemaker/flipper/pull/371).
|
239
|
-
|
240
|
-
## 0.15.0
|
241
|
-
|
242
|
-
* Move Flipper::UI configuration options to Flipper::UI::Configuration (https://github.com/jnunemaker/flipper/pull/345).
|
243
|
-
* Bug fix in adapter synchronizing and switched DSL#import to use Synchronizer (https://github.com/jnunemaker/flipper/pull/347).
|
244
|
-
* Fix AR adapter table name prefix/suffix bug (https://github.com/jnunemaker/flipper/pull/350).
|
245
|
-
* Allow feature names to end with "features" in UI (https://github.com/jnunemaker/flipper/pull/353).
|
246
|
-
|
247
|
-
## 0.14.0
|
248
|
-
|
249
|
-
* Changed sync_interval to be seconds instead of milliseconds.
|
250
|
-
|
251
|
-
## 0.13.0
|
252
|
-
|
253
|
-
### Additions/Changes
|
254
|
-
|
255
|
-
* Update PStore adapter to allow setting thread_safe option (https://github.com/jnunemaker/flipper/pull/334).
|
256
|
-
* Update Flipper::UI to Bootstrap 4 (https://github.com/jnunemaker/flipper/pull/336).
|
257
|
-
* Add Flipper::UI configuration to add a banner with customizeable text and background color (https://github.com/jnunemaker/flipper/pull/337).
|
258
|
-
* Add sync adapter (https://github.com/jnunemaker/flipper/pull/341).
|
259
|
-
* Make cloud use sync adapter (https://github.com/jnunemaker/flipper/pull/342). This makes local flipper operations resilient to cloud failures.
|
260
|
-
|
261
|
-
## 0.12.2
|
262
|
-
|
263
|
-
### Additions/Changes
|
264
|
-
|
265
|
-
* Improvements/fixes/examples for rollout adapter (https://github.com/jnunemaker/flipper/pull/332).
|
266
|
-
|
267
|
-
## 0.12.1
|
268
|
-
|
269
|
-
### Additions/Changes
|
270
|
-
|
271
|
-
* Added rollout adapter documentation (https://github.com/jnunemaker/flipper/pull/328).
|
272
|
-
|
273
|
-
### Bug Fixes
|
274
|
-
|
275
|
-
* Fixed ActiveRecord and Sequel adapters to include disabled features for `get_all` (https://github.com/jnunemaker/flipper/pull/327).
|
276
|
-
|
277
|
-
## 0.12
|
278
|
-
|
279
|
-
### Additions/Changes
|
280
|
-
|
281
|
-
* Added Flipper.instance= writer method for explicitly setting the default instance (https://github.com/jnunemaker/flipper/pull/309).
|
282
|
-
* Added Flipper::UI configuration instance for changing text and things (https://github.com/jnunemaker/flipper/pull/306).
|
283
|
-
* Delegate memoize= and memoizing? for Flipper and Flipper::DSL (https://github.com/jnunemaker/flipper/pull/310).
|
284
|
-
* Fixed error when enabling the same group or actor more than once (https://github.com/jnunemaker/flipper/pull/313).
|
285
|
-
* Fixed redis cache adapter key (and thus cache misses) (https://github.com/jnunemaker/flipper/pull/325).
|
286
|
-
* Added Rollout adapter to make it easy to import rollout data into Flipper (https://github.com/jnunemaker/flipper/pull/319).
|
287
|
-
* Relaxed redis gem dependency constraint to allow redis-rb 4 (https://github.com/jnunemaker/flipper/pull/317).
|
288
|
-
* Added configuration option for Flipper::UI to disable feature removal (https://github.com/jnunemaker/flipper/pull/322).
|
289
|
-
|
290
|
-
## 0.11
|
291
|
-
|
292
|
-
### Backwards Compatibility Breaks
|
293
|
-
|
294
|
-
* Set flipper from env for API and UI (https://github.com/jnunemaker/flipper/pull/223 and https://github.com/jnunemaker/flipper/pull/229). It is documented, but now the memoizing middleware requires that the SetupEnv middleware is used first, unless you are configuring a Flipper default instance.
|
295
|
-
* Drop support for Ruby 2.0 as it is end of lined (https://github.com/jnunemaker/flipper/commit/c2c81ed89938155ce91acb5173ac38580f630e3d).
|
296
|
-
* Allow unregistered groups (https://github.com/jnunemaker/flipper/pull/244). Only break in compatibility is that previously unregistered groups could not be enabled and now they can be.
|
297
|
-
* Removed support for metriks (https://github.com/jnunemaker/flipper/pull/291).
|
298
|
-
|
299
|
-
### Additions/Changes
|
300
|
-
|
301
|
-
* Use primary keys with sequel adapter (https://github.com/jnunemaker/flipper/pull/210). Should be backwards compatible, but if you want it to work this way you will need to migrate your database to the new schema.
|
302
|
-
* Add redis cache adapter (https://github.com/jnunemaker/flipper/pull/211).
|
303
|
-
* Finish API and HTTP adapter that speaks to API.
|
304
|
-
* Add flipper cloud adapter (https://github.com/jnunemaker/flipper/pull/249). Nothing to see here yet, but good stuff soon. ;)
|
305
|
-
* Add importing (https://github.com/jnunemaker/flipper/pull/251).
|
306
|
-
* Added Adapter#get_all to allow for more efficient preload_all (https://github.com/jnunemaker/flipper/pull/255).
|
307
|
-
* Added :unless option to Flipper::Middleware::Memoizer to allow skipping memoization and preloading for certain requests.
|
308
|
-
* Made it possible to instrument Flipper::Cloud (https://github.com/jnunemaker/flipper/commit/4b10e4d807772202f63881f5e2c00d11ac58481f).
|
309
|
-
* Made it possible to wrap Http adapter when using Flipper::Cloud (https://github.com/jnunemaker/flipper/commit/4b10e4d807772202f63881f5e2c00d11ac58481f).
|
310
|
-
* Instrument get_multi in instrumented adapter (https://github.com/jnunemaker/flipper/commit/951d25c5ce07d3b56b0b2337adf5f6bcbe4050e7).
|
311
|
-
* Allow instrumenting Flipper::Cloud http adapter (https://github.com/jnunemaker/flipper/pull/253).
|
312
|
-
* Add DSL#preload_all and Adapter#get_all to allow for making even more efficient loading of features (https://github.com/jnunemaker/flipper/pull/255).
|
313
|
-
* Allow setting debug output of http adapter (https://github.com/jnunemaker/flipper/pull/256 and https://github.com/jnunemaker/flipper/pull/258).
|
314
|
-
* Allow setting env key for middleware (https://github.com/jnunemaker/flipper/pull/259).
|
315
|
-
* Added ActiveSupport cache store adapter for use with Rails.cache (https://github.com/jnunemaker/flipper/pull/265 and https://github.com/jnunemaker/flipper/pull/297).
|
316
|
-
* Added support for up to 3 decimal places in percentage based rollouts (https://github.com/jnunemaker/flipper/pull/274).
|
317
|
-
* Removed Flipper::GroupNotRegistered error as it is now unused (https://github.com/jnunemaker/flipper/pull/270).
|
318
|
-
* Added get_all to all adapters (https://github.com/jnunemaker/flipper/pull/298).
|
319
|
-
* Added support for Rails 5.1 (https://github.com/jnunemaker/flipper/pull/299).
|
320
|
-
* Added Flipper default instance generation (https://github.com/jnunemaker/flipper/pull/279).
|
321
|
-
|
322
|
-
## 0.10.2
|
323
|
-
|
324
|
-
* Add Adapter#get_multi to allow for efficient loading of more than one feature at a time (https://github.com/jnunemaker/flipper/pull/198)
|
325
|
-
* Add DSL#preload for efficiently loading several features at once using get_mutli (https://github.com/jnunemaker/flipper/pull/198)
|
326
|
-
* Add :preload and :preload_all options to memoizer as a way of efficiently loading several features for a request in one network call instead of N where N is the number of features checked (https://github.com/jnunemaker/flipper/pull/198)
|
327
|
-
* Strip whitespace out of feature/actor/group values posted by UI (https://github.com/jnunemaker/flipper/pull/205)
|
328
|
-
* Fix bug with dalli adapter where deleting a feature using the UI or API was not clearing the cache in the dalli adapter which meant the feature would continue to use whatever cached enabled state was present until the TTL was hit (1cd96f6)
|
329
|
-
* Change cache keys for dalli adapter. Backwards compatible in that it will just repopulate new keys on first check with this version, but old keys are not expired, so if you used the default ttl of 0, you'll have to expire them on your own. The primary reason for the change was safer namespacing of the cache keys to avoid collisions.
|
330
|
-
|
331
|
-
## 0.10.1
|
332
|
-
|
333
|
-
* Add docker compose support for contributing
|
334
|
-
* Add sequel adapter
|
335
|
-
* Show confirmation dialog when deleting a feature in flipper-ui
|
336
|
-
|
337
|
-
## 0.10.0
|
338
|
-
|
339
|
-
* Added feature check context (https://github.com/jnunemaker/flipper/pull/158)
|
340
|
-
* Do not use mass assignment for active record adapter (https://github.com/jnunemaker/flipper/pull/171)
|
341
|
-
* Several documentation improvements
|
342
|
-
* Make Flipper::UI.app.inspect return a String (https://github.com/jnunemaker/flipper/pull/176)
|
343
|
-
* changes boolean gate route to api/v1/features/boolean (https://github.com/jnunemaker/flipper/pull/175)
|
344
|
-
* add api v1 percentage_of_actors endpoint (https://github.com/jnunemaker/flipper/pull/179)
|
345
|
-
* add api v1 percentage_of_time endpoint (https://github.com/jnunemaker/flipper/pull/180)
|
346
|
-
* add api v1 actors gate endpoint (https://github.com/jnunemaker/flipper/pull/181)
|
347
|
-
* wait for activesupport to tell us when active record is loaded for active record adapter (https://github.com/jnunemaker/flipper/pull/192)
|
348
|
-
|
349
|
-
## 0.9.2
|
350
|
-
|
351
|
-
* GET /api/v1/features
|
352
|
-
* POST /api/v1/features - add feature endpoint
|
353
|
-
* rack-protection 2.0.0 support
|
354
|
-
* pretty rake output
|
355
|
-
|
356
|
-
## 0.9.1
|
357
|
-
|
358
|
-
* bump flipper-active_record to officially support rails 5
|
359
|
-
|
360
|
-
## 0.9.0
|
361
|
-
|
362
|
-
* Moves SharedAdapterTests module to Flipper::Test::SharedAdapterTests to avoid clobbering anything top level in apps that use Flipper
|
363
|
-
* Memoizable, Instrumented and OperationLogger now delegate any missing methods to the original adapter. This was lost with the removal of the official decorator in 0.8, but is actually useful functionality for these "wrapping" adapters.
|
364
|
-
* Instrumenting adapters is now off by default. Use Flipper::Adapters::Instrumented.new(adapter) to instrument adapters and maintain the old functionality.
|
365
|
-
* Added dalli cache adapter (https://github.com/jnunemaker/flipper/pull/132)
|
366
|
-
|
367
|
-
## 0.8
|
368
|
-
|
369
|
-
* removed Flipper::Decorator and Flipper::Adapters::Decorator in favor of just calling methods on wrapped adapter
|
370
|
-
* fix bug where certain versions of AR left off quotes for key column which caused issues with MySQL https://github.com/jnunemaker/flipper/issues/120
|
371
|
-
* fix bug where AR would store multiple gate values for percentage gates for each enable/disable and then nondeterministically pick one on read (https://github.com/jnunemaker/flipper/pull/122 and https://github.com/jnunemaker/flipper/pull/124)
|
372
|
-
* added readonly adapter (https://github.com/jnunemaker/flipper/pull/111)
|
373
|
-
* flipper groups now match for truthy values rather than explicitly only true (https://github.com/jnunemaker/flipper/issues/110)
|
374
|
-
* removed gate operation instrumentation (https://github.com/jnunemaker/flipper/commit/32f14ed1fb25c64961b23c6be3dc6773143a06c8); I don't think it was useful and never found myself instrumenting it in reality
|
375
|
-
* initial implementation of flipper api - very limited functionality right now (get/delete feature, boolean gate for feature) but more is on the way
|
376
|
-
* made it easy to remove a feature (https://github.com/jnunemaker/flipper/pull/126)
|
377
|
-
* add minitest shared tests for adapters that work the same as the shared specs for rspec (https://github.com/jnunemaker/flipper/pull/127)
|
378
|
-
|
379
|
-
## 0.7.5
|
380
|
-
|
381
|
-
* support for rails 5 beta/ rack 2 alpha
|
382
|
-
* fix uninitialized constant in rails generators
|
383
|
-
* fix adapter test for clear to ensure that feature is not deleted, only gates
|
384
|
-
|
385
|
-
## 0.7.4
|
386
|
-
|
387
|
-
* Add missing migration file to gemspec for flipper-active_record
|
388
|
-
|
389
|
-
## 0.7.3
|
390
|
-
|
391
|
-
* Add Flipper ActiveRecord adapter
|
392
|
-
|
393
|
-
## 0.7.2
|
394
|
-
|
395
|
-
* Add Flipper::UI.application_breadcrumb_href for setting breadcrumb back to original app from Flipper UI
|
396
|
-
|
397
|
-
## 0.7.1
|
398
|
-
|
399
|
-
* Fix bug where features with names that match static file routes were incorrectly routing to the file action (https://github.com/jnunemaker/flipper/issues/80)
|
400
|
-
|
401
|
-
## 0.7
|
402
|
-
|
403
|
-
* Added Flipper.groups and Flipper.group_names
|
404
|
-
* Changed percentage_of_random to percentage_of_time
|
405
|
-
* Added enable/disable convenience methods for all gates (enable_group, enable_actor, enable_percentage_of_actors, enable_percentage_of_time)
|
406
|
-
* Added value convenience methods (boolean_value, groups_value, actors_value, etc.)
|
407
|
-
* Added Feature#gate_values for getting typecast adapter gate values
|
408
|
-
* Added Feature#enabled_gates and #disabled_gates for getting the gates that are enabled/disabled for the feature
|
409
|
-
* Remove Feature#description
|
410
|
-
* Added Flipper::Adapters::PStore
|
411
|
-
* Moved memoizable decorator to instance variable storage from class level thread local stuff. Now not thread safe, but we can make a thread safe version later.
|
412
|
-
|
413
|
-
UI
|
414
|
-
|
415
|
-
* Totally new. Works like a charm.
|
416
|
-
|
417
|
-
Mongo
|
418
|
-
|
419
|
-
* Updated to latest driver (~> 2.0)
|
420
|
-
|
421
|
-
## 0.6.3
|
422
|
-
|
423
|
-
* Minor bug fixes
|
424
|
-
|
425
|
-
## 0.6.2
|
426
|
-
|
427
|
-
* Added Flipper.group_exists?
|
428
|
-
|
429
|
-
## 0.6.1
|
430
|
-
|
431
|
-
* Added statsd support for instrumentation.
|
432
|
-
|
433
|
-
## 0.4.0
|
434
|
-
|
435
|
-
* No longer use #id for detecting actors. You must now define #flipper_id on
|
436
|
-
anything that you would like to behave as an actor.
|
437
|
-
* Strings are now used instead of Integers for Actor identifiers. More flexible
|
438
|
-
and the only reason I used Integers was to do modulo for percentage of actors.
|
439
|
-
Since percentage of actors now uses hashing, integer is no longer needed.
|
440
|
-
* Easy integration of instrumentation with AS::Notifications or anything similar.
|
441
|
-
* A bunch of stuff around inspecting and getting names/descriptions out of
|
442
|
-
things to more easily figure out what is going on.
|
443
|
-
* Percentage of actors hash is now also seeded with feature name so the same
|
444
|
-
actors don't get all features instantly.
|
3
|
+
All notable [changes since 1.0 are documented in GitHub Releases](https://github.com/flippercloud/flipper/releases). View [0.x Changelog](https://github.com/flippercloud/flipper/blob/v0.28.3/Changelog.md).
|
data/Gemfile
CHANGED
@@ -6,24 +6,32 @@ Dir['flipper-*.gemspec'].each do |gemspec|
|
|
6
6
|
gemspec(name: "flipper-#{plugin}", development_group: plugin)
|
7
7
|
end
|
8
8
|
|
9
|
-
gem '
|
10
|
-
gem 'rake'
|
11
|
-
gem 'shotgun', '~> 0.9'
|
9
|
+
gem 'debug'
|
10
|
+
gem 'rake'
|
12
11
|
gem 'statsd-ruby', '~> 1.2.1'
|
13
12
|
gem 'rspec', '~> 3.0'
|
14
|
-
gem 'rack-test'
|
13
|
+
gem 'rack-test'
|
14
|
+
gem 'rackup'
|
15
15
|
gem 'sqlite3', "~> #{ENV['SQLITE3_VERSION'] || '1.4.1'}"
|
16
|
-
gem 'rails', "~> #{ENV['RAILS_VERSION'] || '7.
|
17
|
-
gem 'minitest', '~> 5.
|
16
|
+
gem 'rails', "~> #{ENV['RAILS_VERSION'] || '7.1'}"
|
17
|
+
gem 'minitest', '~> 5.18'
|
18
18
|
gem 'minitest-documentation'
|
19
|
-
gem 'webmock'
|
19
|
+
gem 'webmock'
|
20
20
|
gem 'ice_age'
|
21
21
|
gem 'redis-namespace'
|
22
22
|
gem 'webrick'
|
23
|
+
gem 'stackprof'
|
24
|
+
gem 'benchmark-ips'
|
25
|
+
gem 'stackprof-webnav'
|
26
|
+
gem 'flamegraph'
|
27
|
+
gem 'mysql2'
|
28
|
+
gem 'pg'
|
29
|
+
gem 'cuprite'
|
30
|
+
gem 'puma'
|
23
31
|
|
24
32
|
group(:guard) do
|
25
|
-
gem 'guard'
|
26
|
-
gem 'guard-rspec'
|
27
|
-
gem 'guard-bundler'
|
28
|
-
gem 'rb-fsevent'
|
33
|
+
gem 'guard'
|
34
|
+
gem 'guard-rspec'
|
35
|
+
gem 'guard-bundler'
|
36
|
+
gem 'rb-fsevent'
|
29
37
|
end
|
data/README.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
[![Flipper Mark](docs/images/banner.jpg)](https://www.flippercloud.io)
|
2
2
|
|
3
|
-
[Website](https://flippercloud.io) | [Documentation](https://flippercloud.io/docs) | [Examples](examples) | [Twitter](https://twitter.com/flipper_cloud)
|
3
|
+
[Website](https://flippercloud.io?utm_source=oss&utm_medium=readme&utm_campaign=website_link) | [Documentation](https://flippercloud.io/docs?utm_source=oss&utm_medium=readme&utm_campaign=docs_link) | [Examples](examples) | [Twitter](https://twitter.com/flipper_cloud) | [Ruby.social](https://ruby.social/@flipper)
|
4
4
|
|
5
5
|
# Flipper
|
6
6
|
|
7
|
-
> Beautiful, performant feature flags for Ruby.
|
7
|
+
> Beautiful, performant feature flags for Ruby and Rails.
|
8
8
|
|
9
9
|
Flipper gives you control over who has access to features in your app.
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
- Enable or disable features for everyone, specific actors, groups of actors, a percentage of actors, or a percentage of time.
|
12
|
+
- Configure your feature flags from the console or a web UI.
|
13
|
+
- Regardless of what data store you are using, Flipper can performantly store your feature flags.
|
14
|
+
- Use [Flipper Cloud](#flipper-cloud) to cascade features from multiple environments, share settings with your team, control permissions, keep an audit history, and rollback.
|
15
15
|
|
16
16
|
Control your software — don't let it control you.
|
17
17
|
|
@@ -35,7 +35,7 @@ Or install it yourself with:
|
|
35
35
|
|
36
36
|
## Subscribe & Ship
|
37
37
|
|
38
|
-
[💌 Subscribe](https://
|
38
|
+
[💌 Subscribe](https://blog.flippercloud.io/#/portal/signup) - we'll send you short and sweet emails when we release new versions ([examples](https://blog.flippercloud.io/tag/releases/)).
|
39
39
|
|
40
40
|
## Getting Started
|
41
41
|
|
@@ -43,7 +43,7 @@ Use `Flipper#enabled?` in your app to check if a feature is enabled.
|
|
43
43
|
|
44
44
|
```ruby
|
45
45
|
# check if search is enabled
|
46
|
-
if Flipper.enabled?
|
46
|
+
if Flipper.enabled?(:search, current_user)
|
47
47
|
puts 'Search away!'
|
48
48
|
else
|
49
49
|
puts 'No search for you!'
|
@@ -66,24 +66,26 @@ Flipper.enable_group :search, :admin
|
|
66
66
|
Flipper.enable_percentage_of_actors :search, 2
|
67
67
|
```
|
68
68
|
|
69
|
-
Read more about [getting started with Flipper](https://flippercloud.io/docs) and [enabling features](https://flippercloud.io/docs/features).
|
69
|
+
Read more about [getting started with Flipper](https://flippercloud.io/docs?utm_source=oss&utm_medium=readme&utm_campaign=getting_started) and [enabling features](https://flippercloud.io/docs/features?utm_source=oss&utm_medium=readme&utm_campaign=enabling_features).
|
70
70
|
|
71
71
|
## Flipper Cloud
|
72
72
|
|
73
|
-
Like Flipper and want more? Check out [Flipper Cloud](https://www.flippercloud.io), which comes with:
|
73
|
+
Like Flipper and want more? Check out [Flipper Cloud](https://www.flippercloud.io?utm_source=oss&utm_medium=readme&utm_campaign=check_out), which comes with:
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
75
|
+
- **multiple environments** — production, staging, per continent, whatever you need. Every environment inherits from production by default and every project comes with a [project overview page](https://blog.flippercloud.io/project-overview/) that shows each feature and its status in each environment.
|
76
|
+
- **personal environments** — everyone on your team gets a personal environment (that inherits from production) which they can modify however they want without stepping on anyone else's toes.
|
77
|
+
- **permissions** — grant access to everyone in your organization or lockdown each project to particular people. You can even limit access to a particular environment (like production) to specific people.
|
78
|
+
- **audit history** — every feature change and who made it.
|
79
|
+
- **rollbacks** — enable or disable a feature accidentally? No problem. You can roll back to any point in the audit history with a single click.
|
80
|
+
- **maintenance** — we'll keep the lights on for you. We also have handy webhooks and background polling for keeping your app in sync with Cloud, so **our availability won't affect yours**. All your feature flag reads are local to your app.
|
81
|
+
- **everything in one place** — no need to bounce around from different application UIs or IRB consoles.
|
82
82
|
|
83
|
-
[![Flipper Cloud Screenshot](docs/images/flipper_cloud.png)](https://www.flippercloud.io)
|
83
|
+
[![Flipper Cloud Screenshot](docs/images/flipper_cloud.png)](https://www.flippercloud.io?utm_source=oss&utm_medium=readme&utm_campaign=screenshot)
|
84
84
|
|
85
85
|
Cloud is super simple to integrate with Rails ([demo app](https://github.com/fewerandfaster/flipper-rails-demo)), Sinatra or any other framework.
|
86
86
|
|
87
|
+
We also have a [free plan](https://www.flippercloud.io?utm_source=oss&utm_medium=readme&utm_campaign=free_plan) that you can use forever.
|
88
|
+
|
87
89
|
## Contributing
|
88
90
|
|
89
91
|
1. Fork it
|
@@ -97,15 +99,17 @@ Cloud is super simple to integrate with Rails ([demo app](https://github.com/few
|
|
97
99
|
|
98
100
|
1. Update the version to be whatever it should be and commit.
|
99
101
|
2. `script/release`
|
100
|
-
3.
|
102
|
+
3. Create a new [GitHub Release](https://github.com/flippercloud/flipper/releases/new)
|
101
103
|
|
102
104
|
## Brought To You By
|
103
105
|
|
104
|
-
| pic
|
105
|
-
|
106
|
-
| ![@jnunemaker](https://avatars3.githubusercontent.com/u/235?s=64)
|
107
|
-
| ![@bkeepers](https://avatars3.githubusercontent.com/u/173?s=64)
|
108
|
-
| ![@dpep](https://avatars3.githubusercontent.com/u/918804?s=64)
|
109
|
-
| ![@alexwheeler](https://avatars3.githubusercontent.com/u/3260042?s=64) | [@alexwheeler](https://github.com/alexwheeler) | api
|
110
|
-
| ![@thetimbanks](https://avatars1.githubusercontent.com/u/471801?s=64)
|
111
|
-
| ![@lazebny](https://avatars1.githubusercontent.com/u/6276766?s=64)
|
106
|
+
| pic | @mention | area |
|
107
|
+
| ---------------------------------------------------------------------- | ---------------------------------------------- | ----------- |
|
108
|
+
| ![@jnunemaker](https://avatars3.githubusercontent.com/u/235?s=64) | [@jnunemaker](https://github.com/jnunemaker) | most things |
|
109
|
+
| ![@bkeepers](https://avatars3.githubusercontent.com/u/173?s=64) | [@bkeepers](https://github.com/bkeepers) | most things |
|
110
|
+
| ![@dpep](https://avatars3.githubusercontent.com/u/918804?s=64) | [@dpep](https://github.com/dpep) | tbd |
|
111
|
+
| ![@alexwheeler](https://avatars3.githubusercontent.com/u/3260042?s=64) | [@alexwheeler](https://github.com/alexwheeler) | api |
|
112
|
+
| ![@thetimbanks](https://avatars1.githubusercontent.com/u/471801?s=64) | [@thetimbanks](https://github.com/thetimbanks) | ui |
|
113
|
+
| ![@lazebny](https://avatars1.githubusercontent.com/u/6276766?s=64) | [@lazebny](https://github.com/lazebny) | docker |
|
114
|
+
| ![@pagertree](https://avatars.githubusercontent.com/u/24941240?s=64) | [@pagertree](https://github.com/pagertree) | sponsor |
|
115
|
+
| ![@kdaigle](https://avatars.githubusercontent.com/u/2501?s=64) | [@kdaigle](https://github.com/kdaigle) | sponsor |
|
data/Rakefile
CHANGED
@@ -18,14 +18,17 @@ end
|
|
18
18
|
desc 'Tags version, pushes to remote, and pushes gem'
|
19
19
|
task release: :build do
|
20
20
|
sh 'git', 'tag', "v#{Flipper::VERSION}"
|
21
|
-
sh 'git push origin
|
21
|
+
sh 'git push origin main'
|
22
22
|
sh "git push origin v#{Flipper::VERSION}"
|
23
|
-
|
23
|
+
puts "\nWhat OTP code should be used?"
|
24
|
+
otp_code = STDIN.gets.chomp
|
25
|
+
sh "ls pkg/*.gem | xargs -n 1 gem push --otp #{otp_code}"
|
24
26
|
end
|
25
27
|
|
26
28
|
require 'rspec/core/rake_task'
|
27
29
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
28
|
-
t.rspec_opts = %w(--color
|
30
|
+
t.rspec_opts = %w(--color)
|
31
|
+
t.verbose = false
|
29
32
|
end
|
30
33
|
|
31
34
|
namespace :spec do
|
@@ -39,7 +42,6 @@ end
|
|
39
42
|
Rake::TestTask.new do |t|
|
40
43
|
t.libs = %w(lib test)
|
41
44
|
t.pattern = 'test/**/*_test.rb'
|
42
|
-
t.options = '--documentation'
|
43
45
|
t.warning = false
|
44
46
|
end
|
45
47
|
|