flipper 1.1.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +9 -2
  3. data/.github/workflows/examples.yml +8 -2
  4. data/Changelog.md +1 -647
  5. data/Gemfile +3 -2
  6. data/README.md +3 -1
  7. data/Rakefile +2 -2
  8. data/docs/images/banner.jpg +0 -0
  9. data/exe/flipper +5 -0
  10. data/flipper.gemspec +5 -1
  11. data/lib/flipper/adapters/actor_limit.rb +28 -0
  12. data/lib/flipper/adapters/cache_base.rb +143 -0
  13. data/lib/flipper/adapters/http/client.rb +25 -16
  14. data/lib/flipper/adapters/operation_logger.rb +18 -88
  15. data/lib/flipper/adapters/read_only.rb +6 -39
  16. data/lib/flipper/adapters/strict.rb +16 -18
  17. data/lib/flipper/adapters/wrapper.rb +54 -0
  18. data/lib/flipper/cli.rb +263 -0
  19. data/lib/flipper/cloud/configuration.rb +9 -4
  20. data/lib/flipper/cloud/middleware.rb +5 -5
  21. data/lib/flipper/cloud/telemetry/instrumenter.rb +4 -8
  22. data/lib/flipper/cloud/telemetry/submitter.rb +2 -2
  23. data/lib/flipper/cloud/telemetry.rb +10 -2
  24. data/lib/flipper/cloud.rb +1 -1
  25. data/lib/flipper/engine.rb +32 -17
  26. data/lib/flipper/instrumentation/log_subscriber.rb +12 -3
  27. data/lib/flipper/metadata.rb +3 -1
  28. data/lib/flipper/poller.rb +6 -5
  29. data/lib/flipper/serializers/gzip.rb +3 -5
  30. data/lib/flipper/serializers/json.rb +3 -5
  31. data/lib/flipper/spec/shared_adapter_specs.rb +17 -16
  32. data/lib/flipper/test/shared_adapter_test.rb +17 -17
  33. data/lib/flipper/test_help.rb +43 -0
  34. data/lib/flipper/typecast.rb +3 -3
  35. data/lib/flipper/version.rb +11 -1
  36. data/lib/flipper.rb +3 -1
  37. data/lib/generators/flipper/setup_generator.rb +63 -0
  38. data/package-lock.json +41 -0
  39. data/package.json +10 -0
  40. data/spec/fixtures/environment.rb +1 -0
  41. data/spec/flipper/adapter_builder_spec.rb +1 -2
  42. data/spec/flipper/adapters/actor_limit_spec.rb +20 -0
  43. data/spec/flipper/adapters/http/client_spec.rb +61 -0
  44. data/spec/flipper/adapters/http_spec.rb +102 -76
  45. data/spec/flipper/adapters/strict_spec.rb +11 -9
  46. data/spec/flipper/cli_spec.rb +164 -0
  47. data/spec/flipper/cloud/configuration_spec.rb +35 -36
  48. data/spec/flipper/cloud/dsl_spec.rb +5 -5
  49. data/spec/flipper/cloud/middleware_spec.rb +8 -8
  50. data/spec/flipper/cloud/telemetry/backoff_policy_spec.rb +8 -9
  51. data/spec/flipper/cloud/telemetry/submitter_spec.rb +24 -24
  52. data/spec/flipper/cloud/telemetry_spec.rb +53 -1
  53. data/spec/flipper/cloud_spec.rb +10 -9
  54. data/spec/flipper/engine_spec.rb +140 -58
  55. data/spec/flipper/instrumentation/log_subscriber_spec.rb +9 -2
  56. data/spec/flipper/middleware/memoizer_spec.rb +7 -4
  57. data/spec/flipper_spec.rb +1 -1
  58. data/spec/spec_helper.rb +1 -0
  59. data/spec/support/fail_on_output.rb +8 -0
  60. data/spec/support/spec_helpers.rb +12 -5
  61. data/test/adapters/actor_limit_test.rb +20 -0
  62. data/test_rails/generators/flipper/setup_generator_test.rb +64 -0
  63. data/test_rails/system/test_help_test.rb +51 -0
  64. metadata +31 -9
  65. data/spec/support/climate_control.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0045f824274ad425560681d88802488af7e79ec6f67a228f61ec02ab3b90016a
4
- data.tar.gz: e8b934abcf93152ea294c4ec1071063084888b13640df3f2aaf34b9d6a5c9cbe
3
+ metadata.gz: 934e0e50f2aea9b4294ed435a780f5eb55ad8b547df9c80f609022b880a4dd9c
4
+ data.tar.gz: 8799605783af26860795d336a66d511f35b0f644424aca80cd3f81baaadc6475
5
5
  SHA512:
6
- metadata.gz: 831624665d1c63d16bf7f724d82622c4838006a9889c30f674f151cab1633961e32689cbf383de2b83cce16c8ff183037959cc06f5a804aa1ab63a93252992ab
7
- data.tar.gz: ceb9a261463a6bce77f975317aacb2931d03773926c51186422e8430c0601f428690c4199f50ae1a19892d6f011f404ebe18d30e58c786263cbc2f14728f5727
6
+ metadata.gz: d0e041360e5d15966dd4f4a39be10616aff35dd56a7491297adce42b8d13d3ba7126feaf2d3798194c72fac73afad7e2355379ff51e40481f4a0ee25c49e6c8a
7
+ data.tar.gz: c16307b9a21775b1db67e9fd99c72c5206e7b0d6e0324e7625f349228757aea1243be676ba838ac0b853a7a48469fe8536da41085982556c0492ad985daf51ca
@@ -26,8 +26,9 @@ jobs:
26
26
  --health-timeout 5s
27
27
  --health-retries 5
28
28
  strategy:
29
+ fail-fast: false
29
30
  matrix:
30
- ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
31
+ ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
31
32
  rails: ['5.2', '6.0.0', '6.1.0', '7.0.0', '7.1.0']
32
33
  exclude:
33
34
  - ruby: "2.6"
@@ -48,6 +49,12 @@ jobs:
48
49
  rails: "6.0.0"
49
50
  - ruby: "3.2"
50
51
  rails: "6.1.0"
52
+ - ruby: "3.3"
53
+ rails: "5.2"
54
+ - ruby: "3.3"
55
+ rails: "6.0.0"
56
+ - ruby: "3.3"
57
+ rails: "6.1.0"
51
58
  env:
52
59
  SQLITE3_VERSION: 1.4.1
53
60
  REDIS_URL: redis://localhost:6379/0
@@ -69,7 +76,7 @@ jobs:
69
76
  - name: Check out repository code
70
77
  uses: actions/checkout@v4
71
78
  - name: Do some action caching
72
- uses: actions/cache@v3
79
+ uses: actions/cache@v4
73
80
  with:
74
81
  path: vendor/bundle
75
82
  key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ hashFiles('**/Gemfile.lock') }}
@@ -16,7 +16,7 @@ jobs:
16
16
  --health-retries 5
17
17
  strategy:
18
18
  matrix:
19
- ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
19
+ ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
20
20
  rails: ['5.2', '6.0.0', '6.1.0', '7.0.0', '7.1.0']
21
21
  exclude:
22
22
  - ruby: "2.6"
@@ -37,6 +37,12 @@ jobs:
37
37
  rails: "6.0.0"
38
38
  - ruby: "3.2"
39
39
  rails: "6.1.0"
40
+ - ruby: "3.3"
41
+ rails: "5.2"
42
+ - ruby: "3.3"
43
+ rails: "6.0.0"
44
+ - ruby: "3.3"
45
+ rails: "6.1.0"
40
46
  env:
41
47
  SQLITE3_VERSION: 1.4.1
42
48
  REDIS_URL: redis://localhost:6379/0
@@ -52,7 +58,7 @@ jobs:
52
58
  - name: Check out repository code
53
59
  uses: actions/checkout@v4
54
60
  - name: Do some action caching
55
- uses: actions/cache@v3
61
+ uses: actions/cache@v4
56
62
  with:
57
63
  path: vendor/bundle
58
64
  key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ hashFiles('**/Gemfile.lock') }}