flipper 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +25 -1
  3. data/.github/workflows/examples.yml +7 -1
  4. data/Changelog.md +1 -638
  5. data/Gemfile +5 -1
  6. data/README.md +21 -21
  7. data/Rakefile +2 -2
  8. data/exe/flipper +5 -0
  9. data/flipper.gemspec +6 -2
  10. data/lib/flipper/adapters/http/client.rb +25 -16
  11. data/lib/flipper/adapters/strict.rb +11 -8
  12. data/lib/flipper/cli.rb +240 -0
  13. data/lib/flipper/cloud/configuration.rb +7 -1
  14. data/lib/flipper/cloud/middleware.rb +5 -5
  15. data/lib/flipper/cloud/telemetry/submitter.rb +2 -2
  16. data/lib/flipper/cloud.rb +1 -1
  17. data/lib/flipper/engine.rb +32 -17
  18. data/lib/flipper/instrumentation/log_subscriber.rb +12 -3
  19. data/lib/flipper/metadata.rb +3 -1
  20. data/lib/flipper/test_help.rb +36 -0
  21. data/lib/flipper/version.rb +11 -1
  22. data/lib/generators/flipper/setup_generator.rb +63 -0
  23. data/lib/generators/flipper/templates/update/migrations/01_create_flipper_tables.rb.erb +22 -0
  24. data/lib/generators/flipper/templates/update/migrations/02_change_flipper_gates_value_to_text.rb.erb +18 -0
  25. data/lib/generators/flipper/update_generator.rb +35 -0
  26. data/spec/fixtures/environment.rb +1 -0
  27. data/spec/flipper/adapter_builder_spec.rb +1 -2
  28. data/spec/flipper/adapters/http/client_spec.rb +61 -0
  29. data/spec/flipper/adapters/http_spec.rb +92 -75
  30. data/spec/flipper/adapters/strict_spec.rb +11 -9
  31. data/spec/flipper/cli_spec.rb +164 -0
  32. data/spec/flipper/cloud/configuration_spec.rb +9 -2
  33. data/spec/flipper/cloud/dsl_spec.rb +5 -5
  34. data/spec/flipper/cloud/middleware_spec.rb +8 -8
  35. data/spec/flipper/cloud/telemetry/submitter_spec.rb +24 -24
  36. data/spec/flipper/cloud/telemetry_spec.rb +1 -1
  37. data/spec/flipper/cloud_spec.rb +4 -4
  38. data/spec/flipper/engine_spec.rb +76 -11
  39. data/spec/flipper/instrumentation/log_subscriber_spec.rb +9 -2
  40. data/spec/flipper_spec.rb +1 -1
  41. data/spec/spec_helper.rb +1 -0
  42. data/spec/support/spec_helpers.rb +10 -4
  43. data/test_rails/generators/flipper/setup_generator_test.rb +64 -0
  44. data/test_rails/generators/flipper/update_generator_test.rb +96 -0
  45. data/test_rails/helper.rb +19 -2
  46. data/test_rails/system/test_help_test.rb +46 -0
  47. metadata +25 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a399f5f1ee9a91cdc05d7d47ac2b5a337e1f27ed076dbd39ff7ce952f445d80c
4
- data.tar.gz: 129babef74f77cae24886e92078af369ee31652a3b41e14b5921d55a236e41ec
3
+ metadata.gz: c4f95a5fd56395048ef3fa3f0fd4737db8136f2e814dca352dc167c0f421a8a4
4
+ data.tar.gz: 2e42041673d4ddcf0a01b7ed1d21424dd421e4288595f2982c93101863c6fbc0
5
5
  SHA512:
6
- metadata.gz: 0c5d6b3f364e5f50ff7e7df4642c3a31659be1f56bcb5a313b976fcfc677271536202454c890ef9e6b17be69cdaf750eeb73e02217122b986f23fb77694d4229
7
- data.tar.gz: 0bce7c2195a3759034d3b46666bef74c3c808835a0dc27f8d8ab6cc2f99182f0a2751a9c0dd6d6c0522bd8f40754bfe2f36a001989311d9b62341c8dafcad4ff
6
+ metadata.gz: 70fd697b619ea770334d35b97035184ce3139805fdb3613e0fe950efbfd69898b976524793fe64eabaa9fd0c6a4374eac35c78ef014e39f4fce8313cbd599f91
7
+ data.tar.gz: f204a5d8518b120e9299d2bf5b114cf73889784f4bef1f836f7f290964f5cc73a753294668e9e9257ae44800c5784e9ea58f4b0d5265c49f8c056bbf352a550a
@@ -13,9 +13,21 @@ jobs:
13
13
  --health-interval 10s
14
14
  --health-timeout 5s
15
15
  --health-retries 5
16
+ postgres:
17
+ image: postgres:13
18
+ ports:
19
+ - 5432:5432
20
+ env:
21
+ POSTGRES_USER: postgres
22
+ POSTGRES_PASSWORD: postgres
23
+ options: >-
24
+ --health-cmd pg_isready
25
+ --health-interval 10s
26
+ --health-timeout 5s
27
+ --health-retries 5
16
28
  strategy:
17
29
  matrix:
18
- ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
30
+ ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
19
31
  rails: ['5.2', '6.0.0', '6.1.0', '7.0.0', '7.1.0']
20
32
  exclude:
21
33
  - ruby: "2.6"
@@ -36,12 +48,24 @@ jobs:
36
48
  rails: "6.0.0"
37
49
  - ruby: "3.2"
38
50
  rails: "6.1.0"
51
+ - ruby: "3.3"
52
+ rails: "5.2"
53
+ - ruby: "3.3"
54
+ rails: "6.0.0"
55
+ - ruby: "3.3"
56
+ rails: "6.1.0"
39
57
  env:
40
58
  SQLITE3_VERSION: 1.4.1
41
59
  REDIS_URL: redis://localhost:6379/0
42
60
  CI: true
43
61
  RAILS_VERSION: ${{ matrix.rails }}
62
+ MYSQL_USER: root
63
+ MYSQL_PASSWORD: root
64
+ POSTGRES_USER: postgres
65
+ POSTGRES_PASSWORD: postgres
44
66
  steps:
67
+ - name: Set up MySQL
68
+ run: sudo /etc/init.d/mysql start
45
69
  - name: Setup memcached
46
70
  uses: KeisukeYamashita/memcached-actions@v1
47
71
  - name: Start MongoDB
@@ -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