flipper 0.26.2 → 0.27.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +8 -0
  3. data/Gemfile +2 -3
  4. data/Rakefile +3 -3
  5. data/examples/api/basic.ru +3 -4
  6. data/examples/api/custom_memoized.ru +3 -4
  7. data/examples/api/memoized.ru +3 -4
  8. data/lib/flipper/adapter.rb +23 -7
  9. data/lib/flipper/adapters/http.rb +11 -3
  10. data/lib/flipper/adapters/instrumented.rb +25 -2
  11. data/lib/flipper/adapters/memoizable.rb +19 -2
  12. data/lib/flipper/adapters/memory.rb +8 -4
  13. data/lib/flipper/adapters/operation_logger.rb +16 -3
  14. data/lib/flipper/dsl.rb +1 -5
  15. data/lib/flipper/export.rb +26 -0
  16. data/lib/flipper/exporter.rb +17 -0
  17. data/lib/flipper/exporters/json/export.rb +32 -0
  18. data/lib/flipper/exporters/json/v1.rb +33 -0
  19. data/lib/flipper/instrumentation/subscriber.rb +8 -0
  20. data/lib/flipper/spec/shared_adapter_specs.rb +23 -0
  21. data/lib/flipper/test/shared_adapter_test.rb +24 -0
  22. data/lib/flipper/typecast.rb +17 -0
  23. data/lib/flipper/version.rb +1 -1
  24. data/lib/flipper.rb +2 -1
  25. data/spec/fixtures/flipper_pstore_1679087600.json +46 -0
  26. data/spec/flipper/adapter_spec.rb +29 -2
  27. data/spec/flipper/adapters/http_spec.rb +25 -3
  28. data/spec/flipper/adapters/instrumented_spec.rb +28 -10
  29. data/spec/flipper/adapters/memoizable_spec.rb +30 -10
  30. data/spec/flipper/adapters/operation_logger_spec.rb +29 -10
  31. data/spec/flipper/dsl_spec.rb +20 -3
  32. data/spec/flipper/export_spec.rb +13 -0
  33. data/spec/flipper/exporter_spec.rb +16 -0
  34. data/spec/flipper/exporters/json/export_spec.rb +60 -0
  35. data/spec/flipper/exporters/json/v1_spec.rb +33 -0
  36. data/spec/flipper/instrumentation/log_subscriber_spec.rb +10 -0
  37. data/spec/flipper/instrumentation/statsd_subscriber_spec.rb +10 -0
  38. data/spec/flipper/typecast_spec.rb +79 -0
  39. data/spec/flipper_spec.rb +7 -1
  40. data/spec/support/skippable.rb +18 -0
  41. metadata +18 -2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.2
4
+ version: 0.27.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-15 00:00:00.000000000 Z
11
+ date: 2023-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -96,6 +96,10 @@ files:
96
96
  - lib/flipper/configuration.rb
97
97
  - lib/flipper/dsl.rb
98
98
  - lib/flipper/errors.rb
99
+ - lib/flipper/export.rb
100
+ - lib/flipper/exporter.rb
101
+ - lib/flipper/exporters/json/export.rb
102
+ - lib/flipper/exporters/json/v1.rb
99
103
  - lib/flipper/feature.rb
100
104
  - lib/flipper/feature_check_context.rb
101
105
  - lib/flipper/gate.rb
@@ -130,6 +134,7 @@ files:
130
134
  - lib/flipper/types/percentage_of_time.rb
131
135
  - lib/flipper/version.rb
132
136
  - spec/fixtures/feature.json
137
+ - spec/fixtures/flipper_pstore_1679087600.json
133
138
  - spec/flipper/actor_spec.rb
134
139
  - spec/flipper/adapter_spec.rb
135
140
  - spec/flipper/adapters/dual_write_spec.rb
@@ -148,6 +153,10 @@ files:
148
153
  - spec/flipper/adapters/sync_spec.rb
149
154
  - spec/flipper/configuration_spec.rb
150
155
  - spec/flipper/dsl_spec.rb
156
+ - spec/flipper/export_spec.rb
157
+ - spec/flipper/exporter_spec.rb
158
+ - spec/flipper/exporters/json/export_spec.rb
159
+ - spec/flipper/exporters/json/v1_spec.rb
151
160
  - spec/flipper/feature_check_context_spec.rb
152
161
  - spec/flipper/feature_spec.rb
153
162
  - spec/flipper/gate_spec.rb
@@ -179,6 +188,7 @@ files:
179
188
  - spec/spec_helper.rb
180
189
  - spec/support/descriptions.yml
181
190
  - spec/support/fake_udp_socket.rb
191
+ - spec/support/skippable.rb
182
192
  - spec/support/spec_helpers.rb
183
193
  - test/adapters/memory_test.rb
184
194
  - test/adapters/pstore_test.rb
@@ -210,6 +220,7 @@ specification_version: 4
210
220
  summary: Feature flipper for ANYTHING
211
221
  test_files:
212
222
  - spec/fixtures/feature.json
223
+ - spec/fixtures/flipper_pstore_1679087600.json
213
224
  - spec/flipper/actor_spec.rb
214
225
  - spec/flipper/adapter_spec.rb
215
226
  - spec/flipper/adapters/dual_write_spec.rb
@@ -228,6 +239,10 @@ test_files:
228
239
  - spec/flipper/adapters/sync_spec.rb
229
240
  - spec/flipper/configuration_spec.rb
230
241
  - spec/flipper/dsl_spec.rb
242
+ - spec/flipper/export_spec.rb
243
+ - spec/flipper/exporter_spec.rb
244
+ - spec/flipper/exporters/json/export_spec.rb
245
+ - spec/flipper/exporters/json/v1_spec.rb
231
246
  - spec/flipper/feature_check_context_spec.rb
232
247
  - spec/flipper/feature_spec.rb
233
248
  - spec/flipper/gate_spec.rb
@@ -259,6 +274,7 @@ test_files:
259
274
  - spec/spec_helper.rb
260
275
  - spec/support/descriptions.yml
261
276
  - spec/support/fake_udp_socket.rb
277
+ - spec/support/skippable.rb
262
278
  - spec/support/spec_helpers.rb
263
279
  - test/adapters/memory_test.rb
264
280
  - test/adapters/pstore_test.rb