flipper 0.16.0 → 1.4.0

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 (285) hide show
  1. checksums.yaml +5 -5
  2. data/.codeclimate.yml +1 -0
  3. data/.github/FUNDING.yml +1 -0
  4. data/.github/dependabot.yml +6 -0
  5. data/.github/workflows/ci.yml +110 -0
  6. data/.github/workflows/examples.yml +105 -0
  7. data/.github/workflows/release.yml +54 -0
  8. data/.rspec +1 -0
  9. data/CLAUDE.md +87 -0
  10. data/Changelog.md +2 -215
  11. data/Dockerfile +1 -1
  12. data/Gemfile +28 -20
  13. data/README.md +72 -62
  14. data/Rakefile +13 -3
  15. data/benchmark/enabled_ips.rb +10 -0
  16. data/benchmark/enabled_multiple_actors_ips.rb +20 -0
  17. data/benchmark/enabled_profile.rb +20 -0
  18. data/benchmark/instrumentation_ips.rb +21 -0
  19. data/benchmark/typecast_ips.rb +27 -0
  20. data/docker-compose.yml +37 -34
  21. data/docs/DockerCompose.md +0 -1
  22. data/docs/README.md +1 -0
  23. data/docs/images/banner.jpg +0 -0
  24. data/docs/images/flipper_cloud.png +0 -0
  25. data/examples/api/basic.ru +18 -0
  26. data/examples/api/custom_memoized.ru +36 -0
  27. data/examples/api/memoized.ru +42 -0
  28. data/examples/basic.rb +1 -12
  29. data/examples/cloud/app.ru +12 -0
  30. data/examples/cloud/backoff_policy.rb +13 -0
  31. data/examples/cloud/basic.rb +22 -0
  32. data/examples/cloud/cloud_setup.rb +20 -0
  33. data/examples/cloud/forked.rb +36 -0
  34. data/examples/cloud/import.rb +17 -0
  35. data/examples/cloud/poll_interval/README.md +111 -0
  36. data/examples/cloud/poll_interval/client.rb +108 -0
  37. data/examples/cloud/poll_interval/server.rb +98 -0
  38. data/examples/cloud/threaded.rb +33 -0
  39. data/examples/configuring_default.rb +2 -5
  40. data/examples/dsl.rb +10 -35
  41. data/examples/enabled_for_actor.rb +10 -15
  42. data/examples/expressions.rb +237 -0
  43. data/examples/group.rb +3 -6
  44. data/examples/group_dynamic_lookup.rb +5 -19
  45. data/examples/group_with_members.rb +4 -14
  46. data/examples/importing.rb +1 -1
  47. data/examples/individual_actor.rb +2 -5
  48. data/examples/instrumentation.rb +2 -2
  49. data/examples/instrumentation_last_accessed_at.rb +38 -0
  50. data/examples/memoizing.rb +35 -0
  51. data/examples/mirroring.rb +59 -0
  52. data/examples/percentage_of_actors.rb +6 -16
  53. data/examples/percentage_of_actors_enabled_check.rb +7 -10
  54. data/examples/percentage_of_actors_group.rb +5 -18
  55. data/examples/percentage_of_time.rb +3 -6
  56. data/examples/strict.rb +18 -0
  57. data/exe/flipper +5 -0
  58. data/flipper-cloud.gemspec +19 -0
  59. data/flipper.gemspec +10 -7
  60. data/lib/flipper/actor.rb +10 -3
  61. data/lib/flipper/adapter.rb +50 -8
  62. data/lib/flipper/adapter_builder.rb +44 -0
  63. data/lib/flipper/adapters/actor_limit.rb +54 -0
  64. data/lib/flipper/adapters/cache_base.rb +161 -0
  65. data/lib/flipper/adapters/dual_write.rb +63 -0
  66. data/lib/flipper/adapters/failover.rb +85 -0
  67. data/lib/flipper/adapters/failsafe.rb +72 -0
  68. data/lib/flipper/adapters/http/client.rb +64 -7
  69. data/lib/flipper/adapters/http/error.rb +19 -1
  70. data/lib/flipper/adapters/http.rb +97 -43
  71. data/lib/flipper/adapters/instrumented.rb +47 -26
  72. data/lib/flipper/adapters/memoizable.rb +44 -40
  73. data/lib/flipper/adapters/memory.rb +75 -111
  74. data/lib/flipper/adapters/operation_logger.rb +22 -78
  75. data/lib/flipper/adapters/poll/poller.rb +2 -0
  76. data/lib/flipper/adapters/poll.rb +52 -0
  77. data/lib/flipper/adapters/pstore.rb +27 -17
  78. data/lib/flipper/adapters/read_only.rb +8 -41
  79. data/lib/flipper/adapters/strict.rb +45 -0
  80. data/lib/flipper/adapters/sync/feature_synchronizer.rb +14 -1
  81. data/lib/flipper/adapters/sync/interval_synchronizer.rb +2 -7
  82. data/lib/flipper/adapters/sync/synchronizer.rb +13 -6
  83. data/lib/flipper/adapters/sync.rb +23 -29
  84. data/lib/flipper/adapters/wrapper.rb +54 -0
  85. data/lib/flipper/cli.rb +314 -0
  86. data/lib/flipper/cloud/configuration.rb +271 -0
  87. data/lib/flipper/cloud/dsl.rb +27 -0
  88. data/lib/flipper/cloud/message_verifier.rb +95 -0
  89. data/lib/flipper/cloud/middleware.rb +63 -0
  90. data/lib/flipper/cloud/migrate.rb +71 -0
  91. data/lib/flipper/cloud/routes.rb +14 -0
  92. data/lib/flipper/cloud/telemetry/backoff_policy.rb +96 -0
  93. data/lib/flipper/cloud/telemetry/instrumenter.rb +22 -0
  94. data/lib/flipper/cloud/telemetry/metric.rb +39 -0
  95. data/lib/flipper/cloud/telemetry/metric_storage.rb +30 -0
  96. data/lib/flipper/cloud/telemetry/submitter.rb +100 -0
  97. data/lib/flipper/cloud/telemetry.rb +191 -0
  98. data/lib/flipper/cloud.rb +54 -0
  99. data/lib/flipper/configuration.rb +54 -7
  100. data/lib/flipper/dsl.rb +58 -47
  101. data/lib/flipper/engine.rb +102 -0
  102. data/lib/flipper/errors.rb +3 -21
  103. data/lib/flipper/export.rb +24 -0
  104. data/lib/flipper/exporter.rb +17 -0
  105. data/lib/flipper/exporters/json/export.rb +32 -0
  106. data/lib/flipper/exporters/json/v1.rb +33 -0
  107. data/lib/flipper/expression/builder.rb +73 -0
  108. data/lib/flipper/expression/constant.rb +25 -0
  109. data/lib/flipper/expression.rb +71 -0
  110. data/lib/flipper/expressions/all.rb +9 -0
  111. data/lib/flipper/expressions/any.rb +9 -0
  112. data/lib/flipper/expressions/boolean.rb +9 -0
  113. data/lib/flipper/expressions/comparable.rb +13 -0
  114. data/lib/flipper/expressions/equal.rb +9 -0
  115. data/lib/flipper/expressions/feature_enabled.rb +34 -0
  116. data/lib/flipper/expressions/greater_than.rb +9 -0
  117. data/lib/flipper/expressions/greater_than_or_equal_to.rb +9 -0
  118. data/lib/flipper/expressions/less_than.rb +9 -0
  119. data/lib/flipper/expressions/less_than_or_equal_to.rb +9 -0
  120. data/lib/flipper/expressions/not_equal.rb +9 -0
  121. data/lib/flipper/expressions/now.rb +9 -0
  122. data/lib/flipper/expressions/number.rb +9 -0
  123. data/lib/flipper/expressions/percentage.rb +9 -0
  124. data/lib/flipper/expressions/percentage_of_actors.rb +12 -0
  125. data/lib/flipper/expressions/property.rb +9 -0
  126. data/lib/flipper/expressions/random.rb +9 -0
  127. data/lib/flipper/expressions/string.rb +9 -0
  128. data/lib/flipper/expressions/time.rb +16 -0
  129. data/lib/flipper/feature.rb +95 -28
  130. data/lib/flipper/feature_check_context.rb +10 -6
  131. data/lib/flipper/gate.rb +13 -11
  132. data/lib/flipper/gate_values.rb +5 -18
  133. data/lib/flipper/gates/actor.rb +10 -17
  134. data/lib/flipper/gates/boolean.rb +1 -1
  135. data/lib/flipper/gates/expression.rb +75 -0
  136. data/lib/flipper/gates/group.rb +5 -7
  137. data/lib/flipper/gates/percentage_of_actors.rb +10 -13
  138. data/lib/flipper/gates/percentage_of_time.rb +1 -2
  139. data/lib/flipper/identifier.rb +17 -0
  140. data/lib/flipper/instrumentation/log_subscriber.rb +35 -8
  141. data/lib/flipper/instrumentation/statsd.rb +4 -2
  142. data/lib/flipper/instrumentation/statsd_subscriber.rb +2 -4
  143. data/lib/flipper/instrumentation/subscriber.rb +8 -5
  144. data/lib/flipper/instrumenters/memory.rb +6 -2
  145. data/lib/flipper/metadata.rb +8 -1
  146. data/lib/flipper/middleware/memoizer.rb +46 -27
  147. data/lib/flipper/middleware/setup_env.rb +13 -3
  148. data/lib/flipper/model/active_record.rb +23 -0
  149. data/lib/flipper/poller.rb +157 -0
  150. data/lib/flipper/serializers/gzip.rb +22 -0
  151. data/lib/flipper/serializers/json.rb +17 -0
  152. data/lib/flipper/spec/shared_adapter_specs.rb +122 -56
  153. data/lib/flipper/test/shared_adapter_test.rb +120 -52
  154. data/lib/flipper/test_help.rb +43 -0
  155. data/lib/flipper/typecast.rb +59 -18
  156. data/lib/flipper/types/actor.rb +19 -13
  157. data/lib/flipper/types/group.rb +12 -5
  158. data/lib/flipper/types/percentage.rb +1 -1
  159. data/lib/flipper/version.rb +11 -1
  160. data/lib/flipper.rb +71 -12
  161. data/lib/generators/flipper/setup_generator.rb +68 -0
  162. data/lib/generators/flipper/templates/initializer.rb +45 -0
  163. data/lib/generators/flipper/templates/update/migrations/01_create_flipper_tables.rb.erb +22 -0
  164. data/lib/generators/flipper/templates/update/migrations/02_change_flipper_gates_value_to_text.rb.erb +18 -0
  165. data/lib/generators/flipper/update_generator.rb +35 -0
  166. data/package-lock.json +41 -0
  167. data/package.json +10 -0
  168. data/spec/fixtures/environment.rb +1 -0
  169. data/spec/fixtures/flipper_pstore_1679087600.json +46 -0
  170. data/spec/flipper/actor_spec.rb +10 -2
  171. data/spec/flipper/adapter_builder_spec.rb +72 -0
  172. data/spec/flipper/adapter_spec.rb +52 -6
  173. data/spec/flipper/adapters/actor_limit_spec.rb +75 -0
  174. data/spec/flipper/adapters/dual_write_spec.rb +82 -0
  175. data/spec/flipper/adapters/failover_spec.rb +141 -0
  176. data/spec/flipper/adapters/failsafe_spec.rb +58 -0
  177. data/spec/flipper/adapters/http/client_spec.rb +61 -0
  178. data/spec/flipper/adapters/http_spec.rb +402 -65
  179. data/spec/flipper/adapters/instrumented_spec.rb +31 -13
  180. data/spec/flipper/adapters/memoizable_spec.rb +51 -33
  181. data/spec/flipper/adapters/memory_spec.rb +33 -5
  182. data/spec/flipper/adapters/operation_logger_spec.rb +38 -12
  183. data/spec/flipper/adapters/poll_spec.rb +41 -0
  184. data/spec/flipper/adapters/pstore_spec.rb +0 -2
  185. data/spec/flipper/adapters/read_only_spec.rb +32 -18
  186. data/spec/flipper/adapters/strict_spec.rb +64 -0
  187. data/spec/flipper/adapters/sync/feature_synchronizer_spec.rb +39 -1
  188. data/spec/flipper/adapters/sync/interval_synchronizer_spec.rb +4 -5
  189. data/spec/flipper/adapters/sync/synchronizer_spec.rb +87 -1
  190. data/spec/flipper/adapters/sync_spec.rb +17 -6
  191. data/spec/flipper/cli_spec.rb +217 -0
  192. data/spec/flipper/cloud/configuration_spec.rb +257 -0
  193. data/spec/flipper/cloud/dsl_spec.rb +90 -0
  194. data/spec/flipper/cloud/message_verifier_spec.rb +104 -0
  195. data/spec/flipper/cloud/middleware_spec.rb +307 -0
  196. data/spec/flipper/cloud/migrate_spec.rb +160 -0
  197. data/spec/flipper/cloud/telemetry/backoff_policy_spec.rb +107 -0
  198. data/spec/flipper/cloud/telemetry/metric_spec.rb +87 -0
  199. data/spec/flipper/cloud/telemetry/metric_storage_spec.rb +58 -0
  200. data/spec/flipper/cloud/telemetry/submitter_spec.rb +145 -0
  201. data/spec/flipper/cloud/telemetry_spec.rb +208 -0
  202. data/spec/flipper/cloud_spec.rb +186 -0
  203. data/spec/flipper/configuration_spec.rb +37 -3
  204. data/spec/flipper/dsl_spec.rb +67 -80
  205. data/spec/flipper/engine_spec.rb +374 -0
  206. data/spec/flipper/export_spec.rb +13 -0
  207. data/spec/flipper/exporter_spec.rb +16 -0
  208. data/spec/flipper/exporters/json/export_spec.rb +60 -0
  209. data/spec/flipper/exporters/json/v1_spec.rb +33 -0
  210. data/spec/flipper/expression/builder_spec.rb +248 -0
  211. data/spec/flipper/expression_spec.rb +188 -0
  212. data/spec/flipper/expressions/all_spec.rb +15 -0
  213. data/spec/flipper/expressions/any_spec.rb +15 -0
  214. data/spec/flipper/expressions/boolean_spec.rb +15 -0
  215. data/spec/flipper/expressions/equal_spec.rb +24 -0
  216. data/spec/flipper/expressions/greater_than_or_equal_to_spec.rb +28 -0
  217. data/spec/flipper/expressions/greater_than_spec.rb +28 -0
  218. data/spec/flipper/expressions/less_than_or_equal_to_spec.rb +28 -0
  219. data/spec/flipper/expressions/less_than_spec.rb +32 -0
  220. data/spec/flipper/expressions/not_equal_spec.rb +15 -0
  221. data/spec/flipper/expressions/now_spec.rb +11 -0
  222. data/spec/flipper/expressions/number_spec.rb +21 -0
  223. data/spec/flipper/expressions/percentage_of_actors_spec.rb +20 -0
  224. data/spec/flipper/expressions/percentage_spec.rb +15 -0
  225. data/spec/flipper/expressions/property_spec.rb +13 -0
  226. data/spec/flipper/expressions/random_spec.rb +9 -0
  227. data/spec/flipper/expressions/string_spec.rb +11 -0
  228. data/spec/flipper/expressions/time_spec.rb +29 -0
  229. data/spec/flipper/feature_check_context_spec.rb +18 -20
  230. data/spec/flipper/feature_spec.rb +461 -48
  231. data/spec/flipper/gate_spec.rb +0 -2
  232. data/spec/flipper/gate_values_spec.rb +2 -34
  233. data/spec/flipper/gates/actor_spec.rb +0 -2
  234. data/spec/flipper/gates/boolean_spec.rb +1 -3
  235. data/spec/flipper/gates/expression_spec.rb +190 -0
  236. data/spec/flipper/gates/group_spec.rb +2 -5
  237. data/spec/flipper/gates/percentage_of_actors_spec.rb +61 -7
  238. data/spec/flipper/gates/percentage_of_time_spec.rb +2 -4
  239. data/spec/flipper/identifier_spec.rb +12 -0
  240. data/spec/flipper/instrumentation/log_subscriber_spec.rb +24 -7
  241. data/spec/flipper/instrumentation/statsd_subscriber_spec.rb +26 -3
  242. data/spec/flipper/instrumenters/memory_spec.rb +18 -1
  243. data/spec/flipper/instrumenters/noop_spec.rb +14 -8
  244. data/spec/flipper/middleware/memoizer_spec.rb +199 -62
  245. data/spec/flipper/middleware/setup_env_spec.rb +23 -5
  246. data/spec/flipper/model/active_record_spec.rb +72 -0
  247. data/spec/flipper/poller_spec.rb +390 -0
  248. data/spec/flipper/registry_spec.rb +0 -1
  249. data/spec/flipper/serializers/gzip_spec.rb +13 -0
  250. data/spec/flipper/serializers/json_spec.rb +13 -0
  251. data/spec/flipper/typecast_spec.rb +121 -7
  252. data/spec/flipper/types/actor_spec.rb +63 -47
  253. data/spec/flipper/types/boolean_spec.rb +0 -1
  254. data/spec/flipper/types/group_spec.rb +24 -3
  255. data/spec/flipper/types/percentage_of_actors_spec.rb +0 -1
  256. data/spec/flipper/types/percentage_of_time_spec.rb +0 -1
  257. data/spec/flipper/types/percentage_spec.rb +0 -1
  258. data/spec/{integration_spec.rb → flipper_integration_spec.rb} +301 -59
  259. data/spec/flipper_spec.rb +123 -29
  260. data/spec/{helper.rb → spec_helper.rb} +23 -21
  261. data/spec/support/actor_names.yml +1 -0
  262. data/spec/support/descriptions.yml +1 -0
  263. data/spec/support/fail_on_output.rb +8 -0
  264. data/spec/support/fake_backoff_policy.rb +15 -0
  265. data/spec/support/skippable.rb +18 -0
  266. data/spec/support/spec_helpers.rb +53 -6
  267. data/test/adapters/actor_limit_test.rb +20 -0
  268. data/test/test_helper.rb +2 -1
  269. data/test_rails/generators/flipper/setup_generator_test.rb +69 -0
  270. data/test_rails/generators/flipper/update_generator_test.rb +96 -0
  271. data/test_rails/helper.rb +31 -0
  272. data/test_rails/system/test_help_test.rb +52 -0
  273. metadata +200 -82
  274. data/.rubocop.yml +0 -54
  275. data/.rubocop_todo.yml +0 -199
  276. data/docs/Adapters.md +0 -124
  277. data/docs/Caveats.md +0 -4
  278. data/docs/Gates.md +0 -167
  279. data/docs/Instrumentation.md +0 -27
  280. data/docs/Optimization.md +0 -114
  281. data/docs/api/README.md +0 -849
  282. data/docs/http/README.md +0 -35
  283. data/docs/read-only/README.md +0 -21
  284. data/examples/example_setup.rb +0 -8
  285. data/test/helper.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 49607173763cd256cdb8f6a9ef1ada1fb213092a
4
- data.tar.gz: 123bcd59f941d0a4673526132bab358c75ada4ae
2
+ SHA256:
3
+ metadata.gz: 881ca599099f433a4204f2a058c512b6b9198f529d1db4fd3a3445ba822dcd9b
4
+ data.tar.gz: 5ad5da793cec928e09357f2d46ddb139c159dfc1d5b9ddea4ae4c0c52193a75b
5
5
  SHA512:
6
- metadata.gz: bf6951c97102685c5222c8b096133857b0a7a3251190cd3e6cf8885b0260463c341b8bb9f02e100e2ea2f541999ff6c7c53e6d4f73abed1cea09c8327f70acd4
7
- data.tar.gz: 10ecb72720e4b8a58956d025351118810baa6c20c82ec629ea6c5117b870cf2ef499958ba6efd6e924ecfadc86776a73be66a11c200251e39d08c64897452c72
6
+ metadata.gz: 9b049bcd83af70810efd36f1873fb9d72cf22f95cf460d80829b7ad7ed68b7ef11e619b621ea001c230dfdbee43c453e76326de59be2306ee52b23444b50619b
7
+ data.tar.gz: fb82eca0e34233cf3fe9e001923f3b87ae2acf9f7dfdbbdce553d1b8408d5f23df075d789f5be2f975d6facf077637294f306d774e026005e4a7a13124866a3a
data/.codeclimate.yml CHANGED
@@ -1,2 +1,3 @@
1
1
  exclude_patterns:
2
2
  - "lib/flipper/ui/public"
3
+ - "spec/"
@@ -0,0 +1 @@
1
+ github: flippercloud
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
@@ -0,0 +1,110 @@
1
+ name: CI
2
+ on: [push]
3
+
4
+ jobs:
5
+ test:
6
+ name: Test on ruby ${{ matrix.ruby }} and rails ${{ matrix.rails }}
7
+ runs-on: ubuntu-latest
8
+ timeout-minutes: 20
9
+ services:
10
+ redis:
11
+ image: redis
12
+ ports: ["6379:6379"]
13
+ options: >-
14
+ --health-cmd "redis-cli ping"
15
+ --health-interval 10s
16
+ --health-timeout 5s
17
+ --health-retries 5
18
+ memcached:
19
+ image: memcached
20
+ ports: ["11211:11211"]
21
+ postgres:
22
+ image: postgres:13
23
+ ports:
24
+ - 5432:5432
25
+ env:
26
+ POSTGRES_USER: postgres
27
+ POSTGRES_PASSWORD: postgres
28
+ options: >-
29
+ --health-cmd pg_isready
30
+ --health-interval 10s
31
+ --health-timeout 5s
32
+ --health-retries 5
33
+ strategy:
34
+ fail-fast: false
35
+ matrix:
36
+ ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"]
37
+ rails: ["5.2", "6.0.0", "6.1.0", "7.0.0", "7.1.0", "7.2.0", "8.0.0"]
38
+ exclude:
39
+ - ruby: "2.6"
40
+ rails: "7.1.0"
41
+ - ruby: "2.6"
42
+ rails: "7.0.0"
43
+ - ruby: "2.6"
44
+ rails: "7.2.0"
45
+ - ruby: "2.6"
46
+ rails: "8.0.0"
47
+ - ruby: "2.7"
48
+ rails: "7.1.0"
49
+ - ruby: "2.7"
50
+ rails: "7.2.0"
51
+ - ruby: "2.7"
52
+ rails: "8.0.0"
53
+ - ruby: "3.0"
54
+ rails: "5.2"
55
+ - ruby: "3.0"
56
+ rails: "7.2.0"
57
+ - ruby: "3.0"
58
+ rails: "8.0.0"
59
+ - ruby: "3.1"
60
+ rails: "5.2"
61
+ - ruby: "3.1"
62
+ rails: "6.0.0"
63
+ - ruby: "3.1"
64
+ rails: "8.0.0"
65
+ - ruby: "3.2"
66
+ rails: "5.2"
67
+ - ruby: "3.2"
68
+ rails: "6.0.0"
69
+ - ruby: "3.2"
70
+ rails: "6.1.0"
71
+ - ruby: "3.3"
72
+ rails: "5.2"
73
+ - ruby: "3.3"
74
+ rails: "6.0.0"
75
+ - ruby: "3.3"
76
+ rails: "6.1.0"
77
+ env:
78
+ SQLITE3_VERSION: ${{ matrix.rails == '8.0.0' && '2.1.0' || '1.4.1' }}
79
+ REDIS_URL: redis://localhost:6379/0
80
+ CI: true
81
+ RAILS_VERSION: ${{ matrix.rails }}
82
+ MYSQL_USER: root
83
+ MYSQL_PASSWORD: root
84
+ POSTGRES_USER: postgres
85
+ POSTGRES_PASSWORD: postgres
86
+ steps:
87
+ - name: Set up MySQL
88
+ run: sudo /etc/init.d/mysql start
89
+ - name: Start MongoDB
90
+ uses: supercharge/mongodb-github-action@1.12.1
91
+ with:
92
+ mongodb-version: 4.0
93
+ - name: Check out repository code
94
+ uses: actions/checkout@v6
95
+ - name: Do some action caching
96
+ uses: actions/cache@v4
97
+ with:
98
+ path: vendor/bundle
99
+ key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ hashFiles('**/Gemfile.lock') }}
100
+ restore-keys: |
101
+ ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-
102
+ - name: Install libpq-dev
103
+ run: sudo apt-get -yqq install libpq-dev
104
+ - name: Set up Ruby ${{ matrix.ruby }}
105
+ uses: ruby/setup-ruby@v1
106
+ with:
107
+ ruby-version: ${{ matrix.ruby }}
108
+ bundler-cache: true # 'bundle install' and cache gems
109
+ - name: Run Rake with Rails ${{ matrix.rails }}
110
+ run: bundle exec rake
@@ -0,0 +1,105 @@
1
+ name: Examples
2
+ on: [push]
3
+ jobs:
4
+ test:
5
+ if: github.repository_owner == 'flippercloud'
6
+ name: Example on ruby ${{ matrix.ruby }} and rails ${{ matrix.rails }}
7
+ runs-on: ubuntu-latest
8
+ timeout-minutes: 20
9
+ services:
10
+ redis:
11
+ image: redis
12
+ ports: ["6379:6379"]
13
+ options: >-
14
+ --health-cmd "redis-cli ping"
15
+ --health-interval 10s
16
+ --health-timeout 5s
17
+ --health-retries 5
18
+ strategy:
19
+ matrix:
20
+ ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"]
21
+ rails: ["5.2", "6.0.0", "6.1.0", "7.0.0", "7.1.0", "7.2.0", "8.0.0"]
22
+ exclude:
23
+ - ruby: "2.6"
24
+ rails: "7.1.0"
25
+ - ruby: "2.6"
26
+ rails: "7.0.0"
27
+ - ruby: "2.6"
28
+ rails: "7.2.0"
29
+ - ruby: "2.6"
30
+ rails: "8.0.0"
31
+ - ruby: "2.7"
32
+ rails: "7.1.0"
33
+ - ruby: "2.7"
34
+ rails: "7.2.0"
35
+ - ruby: "2.7"
36
+ rails: "8.0.0"
37
+ - ruby: "3.0"
38
+ rails: "5.2"
39
+ - ruby: "3.0"
40
+ rails: "7.2.0"
41
+ - ruby: "3.0"
42
+ rails: "8.0.0"
43
+ - ruby: "3.1"
44
+ rails: "5.2"
45
+ - ruby: "3.1"
46
+ rails: "6.0.0"
47
+ - ruby: "3.1"
48
+ rails: "8.0.0"
49
+ - ruby: "3.2"
50
+ rails: "5.2"
51
+ - ruby: "3.2"
52
+ rails: "6.0.0"
53
+ - ruby: "3.2"
54
+ rails: "6.1.0"
55
+ - ruby: "3.3"
56
+ rails: "5.2"
57
+ - ruby: "3.3"
58
+ rails: "6.0.0"
59
+ - ruby: "3.3"
60
+ rails: "6.1.0"
61
+ env:
62
+ SQLITE3_VERSION: ${{ matrix.rails == '8.0.0' && '2.1.0' || '1.4.1' }}
63
+ REDIS_URL: redis://localhost:6379/0
64
+ CI: true
65
+ RAILS_VERSION: ${{ matrix.rails }}
66
+ steps:
67
+ - name: Setup memcached
68
+ uses: KeisukeYamashita/memcached-actions@v1
69
+ - name: Start MongoDB
70
+ uses: supercharge/mongodb-github-action@1.12.1
71
+ with:
72
+ mongodb-version: 4.0
73
+ - name: Check out repository code
74
+ uses: actions/checkout@v6
75
+ - name: Do some action caching
76
+ uses: actions/cache@v4
77
+ with:
78
+ path: vendor/bundle
79
+ key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ hashFiles('**/Gemfile.lock') }}
80
+ restore-keys: |
81
+ ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-
82
+ - name: Install libpq-dev
83
+ run: sudo apt-get -yqq install libpq-dev
84
+ - name: Set up Ruby ${{ matrix.ruby }}
85
+ uses: ruby/setup-ruby@v1
86
+ with:
87
+ ruby-version: ${{ matrix.ruby }}
88
+ bundler-cache: true # 'bundle install' and cache gems
89
+ - name: Run Examples with Rails ${{ matrix.rails }}
90
+ env:
91
+ FLIPPER_CLOUD_TOKEN: ${{ secrets.FLIPPER_CLOUD_TOKEN }}
92
+ FLIPPER_CLOUD_TOKEN_26_52: ${{ secrets.FLIPPER_CLOUD_TOKEN_26_52 }}
93
+ FLIPPER_CLOUD_TOKEN_26_60: ${{ secrets.FLIPPER_CLOUD_TOKEN_26_60 }}
94
+ FLIPPER_CLOUD_TOKEN_26_61: ${{ secrets.FLIPPER_CLOUD_TOKEN_26_61 }}
95
+ FLIPPER_CLOUD_TOKEN_27_52: ${{ secrets.FLIPPER_CLOUD_TOKEN_27_52 }}
96
+ FLIPPER_CLOUD_TOKEN_27_60: ${{ secrets.FLIPPER_CLOUD_TOKEN_27_60 }}
97
+ FLIPPER_CLOUD_TOKEN_27_61: ${{ secrets.FLIPPER_CLOUD_TOKEN_27_61 }}
98
+ FLIPPER_CLOUD_TOKEN_27_70: ${{ secrets.FLIPPER_CLOUD_TOKEN_27_70 }}
99
+ FLIPPER_CLOUD_TOKEN_30_60: ${{ secrets.FLIPPER_CLOUD_TOKEN_30_60 }}
100
+ FLIPPER_CLOUD_TOKEN_30_61: ${{ secrets.FLIPPER_CLOUD_TOKEN_30_61 }}
101
+ FLIPPER_CLOUD_TOKEN_30_70: ${{ secrets.FLIPPER_CLOUD_TOKEN_30_70 }}
102
+ FLIPPER_CLOUD_TOKEN_31_61: ${{ secrets.FLIPPER_CLOUD_TOKEN_31_61 }}
103
+ FLIPPER_CLOUD_TOKEN_31_70: ${{ secrets.FLIPPER_CLOUD_TOKEN_31_70 }}
104
+ RAILS_VERSION: ${{ matrix.rails }}
105
+ run: script/examples
@@ -0,0 +1,54 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write # RubyGems trusted publishing (OIDC)
13
+ contents: write # Create GitHub Releases
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: '3.3'
20
+
21
+ - name: Build all gems
22
+ run: |
23
+ for gemspec in *.gemspec; do
24
+ gem build "$gemspec"
25
+ done
26
+ mkdir -p pkg
27
+ mv *.gem pkg/
28
+ echo "Built gems:"
29
+ ls -la pkg/
30
+
31
+ - name: Configure RubyGems credentials
32
+ uses: rubygems/configure-rubygems-credentials@v1.0.0
33
+
34
+ - name: Publish all gems
35
+ run: |
36
+ # Push core gem first since other gems depend on it
37
+ echo "Pushing flipper core gem..."
38
+ gem push pkg/flipper-[0-9]*.gem || echo "Core gem already pushed, continuing..."
39
+
40
+ for gem_file in pkg/flipper-*.gem; do
41
+ basename="$(basename "$gem_file")"
42
+ if [[ "$basename" =~ ^flipper-[0-9] ]]; then
43
+ continue
44
+ fi
45
+ echo "Pushing $basename..."
46
+ gem push "$gem_file" || echo "Failed to push $basename, continuing..."
47
+ done
48
+
49
+ - name: Create draft GitHub Release
50
+ uses: softprops/action-gh-release@v2
51
+ with:
52
+ draft: true
53
+ generate_release_notes: true
54
+ files: pkg/*.gem
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/CLAUDE.md ADDED
@@ -0,0 +1,87 @@
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
+ ### Releasing
21
+ 1. Bump version in `lib/flipper/version.rb`, commit, and push to main
22
+ 2. Tag and push: `git tag v1.x.x && git push origin v1.x.x`
23
+ 3. GitHub Actions (`.github/workflows/release.yml`) builds and publishes all 12 gems via RubyGems trusted publishing, then creates a draft GitHub Release
24
+ 4. Edit and publish the draft release at https://github.com/flippercloud/flipper/releases
25
+
26
+ - `bundle exec rake build` - Build all gems locally into pkg/ directory
27
+ - `script/release` - Manual fallback for local releases (prompts for OTP)
28
+
29
+ ## Architecture Overview
30
+
31
+ Flipper is a feature flag library for Ruby with a modular adapter-based architecture:
32
+
33
+ ### Core Components
34
+
35
+ **DSL Layer** (`lib/flipper/dsl.rb`):
36
+ - Main interface for feature flag operations
37
+ - Delegates to Feature instances
38
+ - Handles memoization and instrumentation
39
+ - Thread-safe instance management
40
+
41
+ **Feature** (`lib/flipper/feature.rb`):
42
+ - Represents individual feature flags
43
+ - Manages enable/disable operations through gates
44
+ - Handles instrumentation events
45
+ - Works with adapters for persistence
46
+
47
+ **Adapters** (`lib/flipper/adapters/`):
48
+ - Pluggable storage backends (Redis, ActiveRecord, Memory, etc.)
49
+ - Common interface for all storage implementations
50
+ - Support for caching, failover, and synchronization patterns
51
+
52
+ **Gates** (`lib/flipper/gates/`):
53
+ - Different targeting mechanisms:
54
+ - Boolean (on/off for everyone)
55
+ - Actor (specific users/entities)
56
+ - Group (predefined user groups)
57
+ - Percentage of Actors (rollout to X% of users)
58
+ - Percentage of Time (probabilistic enabling)
59
+ - Expression (complex conditional logic)
60
+
61
+ ### Multi-Gem Structure
62
+
63
+ The project is structured as multiple gems:
64
+ - `flipper` - Core library
65
+ - `flipper-ui` - Web interface
66
+ - `flipper-api` - REST API
67
+ - `flipper-cloud` - Cloud service integration
68
+ - `flipper-*` - Various adapter gems (redis, active_record, mongo, etc.)
69
+
70
+ ### Key Patterns
71
+
72
+ **Configuration**: Global configuration through `Flipper.configure` with per-thread instances
73
+ **Instrumentation**: Built-in event system for monitoring and debugging
74
+ **Memoization**: Automatic caching of feature checks within request/thread scope
75
+ **Type Safety**: Strong typing system for actors, percentages, and other values
76
+
77
+ ### Serialization and HTTP
78
+
79
+ Use `Flipper::Typecast` for JSON and gzip serialization instead of calling `JSON.generate`/`JSON.parse` or `Zlib` directly:
80
+ - `Typecast.to_json(hash)` / `Typecast.from_json(string)` for JSON serialization
81
+ - `Typecast.to_gzip(string)` / `Typecast.from_gzip(string)` for gzip compression
82
+
83
+ For outbound HTTP requests, use `Flipper::Adapters::Http::Client` instead of raw `Net::HTTP`. It provides timeouts, retries (`max_retries`), SSL verification, and diagnostic headers (user-agent, client-language, client-platform, etc.). See `lib/flipper/cloud/migrate.rb` for an example.
84
+
85
+ ### Testing
86
+
87
+ 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).
data/Changelog.md CHANGED
@@ -1,216 +1,3 @@
1
- ## 0.16.0
1
+ # Changelog
2
2
 
3
- ### Bug Fixes
4
-
5
- * Support slashes in feature names (https://github.com/jnunemaker/flipper/pull/362).
6
-
7
- ### Additions/Changes
8
-
9
- * Re-order gates for improved performance in some cases (https://github.com/jnunemaker/flipper/pull/370).
10
- * Add Feature#exist?, DSL#exist? and Flipper#exist? (https://github.com/jnunemaker/flipper/pull/371).
11
-
12
- ## 0.15.0
13
-
14
- * Move Flipper::UI configuration options to Flipper::UI::Configuration (https://github.com/jnunemaker/flipper/pull/345).
15
- * Bug fix in adapter synchronizing and switched DSL#import to use Synchronizer (https://github.com/jnunemaker/flipper/pull/347).
16
- * Fix AR adapter table name prefix/suffix bug (https://github.com/jnunemaker/flipper/pull/350).
17
- * Allow feature names to end with "features" in UI (https://github.com/jnunemaker/flipper/pull/353).
18
-
19
- ## 0.14.0
20
-
21
- * Changed sync_interval to be seconds instead of milliseconds.
22
-
23
- ## 0.13.0
24
-
25
- ### Additions/Changes
26
-
27
- * Update PStore adapter to allow setting thread_safe option (https://github.com/jnunemaker/flipper/pull/334).
28
- * Update Flipper::UI to Bootstrap 4 (https://github.com/jnunemaker/flipper/pull/336).
29
- * Add Flipper::UI configuration to add a banner with customizeable text and background color (https://github.com/jnunemaker/flipper/pull/337).
30
- * Add sync adapter (https://github.com/jnunemaker/flipper/pull/341).
31
- * Make cloud use sync adapter (https://github.com/jnunemaker/flipper/pull/342). This makes local flipper operations resilient to cloud failures.
32
-
33
- ## 0.12.2
34
-
35
- ### Additions/Changes
36
-
37
- * Improvements/fixes/examples for rollout adapter (https://github.com/jnunemaker/flipper/pull/332).
38
-
39
- ## 0.12.1
40
-
41
- ### Additions/Changes
42
-
43
- * Added rollout adapter documentation (https://github.com/jnunemaker/flipper/pull/328).
44
-
45
- ### Bug Fixes
46
-
47
- * Fixed ActiveRecord and Sequel adapters to include disabled features for `get_all` (https://github.com/jnunemaker/flipper/pull/327).
48
-
49
- ## 0.12
50
-
51
- ### Additions/Changes
52
-
53
- * Added Flipper.instance= writer method for explicitly setting the default instance (https://github.com/jnunemaker/flipper/pull/309).
54
- * Added Flipper::UI configuration instance for changing text and things (https://github.com/jnunemaker/flipper/pull/306).
55
- * Delegate memoize= and memoizing? for Flipper and Flipper::DSL (https://github.com/jnunemaker/flipper/pull/310).
56
- * Fixed error when enabling the same group or actor more than once (https://github.com/jnunemaker/flipper/pull/313).
57
- * Fixed redis cache adapter key (and thus cache misses) (https://github.com/jnunemaker/flipper/pull/325).
58
- * Added Rollout adapter to make it easy to import rollout data into Flipper (https://github.com/jnunemaker/flipper/pull/319).
59
- * Relaxed redis gem dependency constraint to allow redis-rb 4 (https://github.com/jnunemaker/flipper/pull/317).
60
- * Added configuration option for Flipper::UI to disable feature removal (https://github.com/jnunemaker/flipper/pull/322).
61
-
62
- ## 0.11
63
-
64
- ### Backwards Compatibility Breaks
65
-
66
- * 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.
67
- * Drop support for Ruby 2.0 as it is end of lined (https://github.com/jnunemaker/flipper/commit/c2c81ed89938155ce91acb5173ac38580f630e3d).
68
- * 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.
69
- * Removed support for metriks (https://github.com/jnunemaker/flipper/pull/291).
70
-
71
- ### Additions/Changes
72
-
73
- * 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.
74
- * Add redis cache adapter (https://github.com/jnunemaker/flipper/pull/211).
75
- * Finish API and HTTP adapter that speaks to API.
76
- * Add flipper cloud adapter (https://github.com/jnunemaker/flipper/pull/249). Nothing to see here yet, but good stuff soon. ;)
77
- * Add importing (https://github.com/jnunemaker/flipper/pull/251).
78
- * Added Adapter#get_all to allow for more efficient preload_all (https://github.com/jnunemaker/flipper/pull/255).
79
- * Added :unless option to Flipper::Middleware::Memoizer to allow skipping memoization and preloading for certain requests.
80
- * Made it possible to instrument Flipper::Cloud (https://github.com/jnunemaker/flipper/commit/4b10e4d807772202f63881f5e2c00d11ac58481f).
81
- * Made it possible to wrap Http adapter when using Flipper::Cloud (https://github.com/jnunemaker/flipper/commit/4b10e4d807772202f63881f5e2c00d11ac58481f).
82
- * Instrument get_multi in instrumented adapter (https://github.com/jnunemaker/flipper/commit/951d25c5ce07d3b56b0b2337adf5f6bcbe4050e7).
83
- * Allow instrumenting Flipper::Cloud http adapter (https://github.com/jnunemaker/flipper/pull/253).
84
- * 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).
85
- * Allow setting debug output of http adapter (https://github.com/jnunemaker/flipper/pull/256 and https://github.com/jnunemaker/flipper/pull/258).
86
- * Allow setting env key for middleware (https://github.com/jnunemaker/flipper/pull/259).
87
- * 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).
88
- * Added support for up to 3 decimal places in percentage based rollouts (https://github.com/jnunemaker/flipper/pull/274).
89
- * Removed Flipper::GroupNotRegistered error as it is now unused (https://github.com/jnunemaker/flipper/pull/270).
90
- * Added get_all to all adapters (https://github.com/jnunemaker/flipper/pull/298).
91
- * Added support for Rails 5.1 (https://github.com/jnunemaker/flipper/pull/299).
92
- * Added Flipper default instance generation (https://github.com/jnunemaker/flipper/pull/279).
93
-
94
- ## 0.10.2
95
-
96
- * Add Adapter#get_multi to allow for efficient loading of more than one feature at a time (https://github.com/jnunemaker/flipper/pull/198)
97
- * Add DSL#preload for efficiently loading several features at once using get_mutli (https://github.com/jnunemaker/flipper/pull/198)
98
- * 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)
99
- * Strip whitespace out of feature/actor/group values posted by UI (https://github.com/jnunemaker/flipper/pull/205)
100
- * 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)
101
- * 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.
102
-
103
- ## 0.10.1
104
-
105
- * Add docker compose support for contributing
106
- * Add sequel adapter
107
- * Show confirmation dialog when deleting a feature in flipper-ui
108
-
109
- ## 0.10.0
110
-
111
- * Added feature check context (https://github.com/jnunemaker/flipper/pull/158)
112
- * Do not use mass assignment for active record adapter (https://github.com/jnunemaker/flipper/pull/171)
113
- * Several documentation improvements
114
- * Make Flipper::UI.app.inspect return a String (https://github.com/jnunemaker/flipper/pull/176)
115
- * changes boolean gate route to api/v1/features/boolean (https://github.com/jnunemaker/flipper/pull/175)
116
- * add api v1 percentage_of_actors endpoint (https://github.com/jnunemaker/flipper/pull/179)
117
- * add api v1 percentage_of_time endpoint (https://github.com/jnunemaker/flipper/pull/180)
118
- * add api v1 actors gate endpoint (https://github.com/jnunemaker/flipper/pull/181)
119
- * wait for activesupport to tell us when active record is loaded for active record adapter (https://github.com/jnunemaker/flipper/pull/192)
120
-
121
- ## 0.9.2
122
-
123
- * GET /api/v1/features
124
- * POST /api/v1/features - add feature endpoint
125
- * rack-protection 2.0.0 support
126
- * pretty rake output
127
-
128
- ## 0.9.1
129
-
130
- * bump flipper-active_record to officially support rails 5
131
-
132
- ## 0.9.0
133
-
134
- * Moves SharedAdapterTests module to Flipper::Test::SharedAdapterTests to avoid clobbering anything top level in apps that use Flipper
135
- * 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.
136
- * Instrumenting adapters is now off by default. Use Flipper::Adapters::Instrumented.new(adapter) to instrument adapters and maintain the old functionality.
137
- * Added dalli cache adapter (https://github.com/jnunemaker/flipper/pull/132)
138
-
139
- ## 0.8
140
-
141
- * removed Flipper::Decorator and Flipper::Adapters::Decorator in favor of just calling methods on wrapped adapter
142
- * 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
143
- * 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)
144
- * added readonly adapter (https://github.com/jnunemaker/flipper/pull/111)
145
- * flipper groups now match for truthy values rather than explicitly only true (https://github.com/jnunemaker/flipper/issues/110)
146
- * 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
147
- * initial implementation of flipper api - very limited functionality right now (get/delete feature, boolean gate for feature) but more is on the way
148
- * made it easy to remove a feature (https://github.com/jnunemaker/flipper/pull/126)
149
- * add minitest shared tests for adapters that work the same as the shared specs for rspec (https://github.com/jnunemaker/flipper/pull/127)
150
-
151
- ## 0.7.5
152
-
153
- * support for rails 5 beta/ rack 2 alpha
154
- * fix uninitialized constant in rails generators
155
- * fix adapter test for clear to ensure that feature is not deleted, only gates
156
-
157
- ## 0.7.4
158
-
159
- * Add missing migration file to gemspec for flipper-active_record
160
-
161
- ## 0.7.3
162
-
163
- * Add Flipper ActiveRecord adapter
164
-
165
- ## 0.7.2
166
-
167
- * Add Flipper::UI.application_breadcrumb_href for setting breadcrumb back to original app from Flipper UI
168
-
169
- ## 0.7.1
170
-
171
- * 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)
172
-
173
- ## 0.7
174
-
175
- * Added Flipper.groups and Flipper.group_names
176
- * Changed percentage_of_random to percentage_of_time
177
- * Added enable/disable convenience methods for all gates (ie: enable_group, enable_actor, enable_percentage_of_actors, enable_percentage_of_time)
178
- * Added value convenience methods (ie: boolean_value, groups_value, actors_value, etc.)
179
- * Added Feature#gate_values for getting typecast adapter gate values
180
- * Added Feature#enabled_gates and #disabled_gates for getting the gates that are enabled/disabled for the feature
181
- * Remove Feature#description
182
- * Added Flipper::Adapters::PStore
183
- * 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.
184
-
185
- UI
186
-
187
- * Totally new. Works like a charm.
188
-
189
- Mongo
190
-
191
- * Updated to latest driver (~> 2.0)
192
-
193
- ## 0.6.3
194
-
195
- * Minor bug fixes
196
-
197
- ## 0.6.2
198
-
199
- * Added Flipper.group_exists?
200
-
201
- ## 0.6.1
202
-
203
- * Added statsd support for instrumentation.
204
-
205
- ## 0.4.0
206
-
207
- * No longer use #id for detecting actors. You must now define #flipper_id on
208
- anything that you would like to behave as an actor.
209
- * Strings are now used instead of Integers for Actor identifiers. More flexible
210
- and the only reason I used Integers was to do modulo for percentage of actors.
211
- Since percentage of actors now uses hashing, integer is no longer needed.
212
- * Easy integration of instrumentation with AS::Notifications or anything similar.
213
- * A bunch of stuff around inspecting and getting names/descriptions out of
214
- things to more easily figure out what is going on.
215
- * Percentage of actors hash is now also seeded with feature name so the same
216
- 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/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.2.5
1
+ FROM ruby:3.0
2
2
 
3
3
  RUN apt-get update && apt-get install -y \
4
4
  # build-essential \