openfeature-flagd-provider 0.1.3 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3818e16ad54fb7f0f168217349f823f84fb26a2b8392984766e178f2da422d9
4
- data.tar.gz: 63325181c71479777aecd65d9d82e11c4dd060eb7d3b46649fe14e7480754c84
3
+ metadata.gz: d82a6d06fedbd2c998ecf58f03c5d2cceaef75ca85ff9959fd2a5d6471301a31
4
+ data.tar.gz: 7e338fb28c1fbff19f0e6715f06e0eb725ecb33fcee2a44014fd0f9e805b33e6
5
5
  SHA512:
6
- metadata.gz: 2154f07ad06cc67d0067350d5a0011e421bcad489d02bbf9efb829e8682c8c163dce3e9b461b9d8f82e8caa5a762f79a18a113b8781a34d09138be0530a8bfb2
7
- data.tar.gz: a18dc531cfd02c5c7cca268be3e9d375749535bb326d36060baa8dcaab4296b478f0f4c3be1b0056bf6d9169120e89dba2c0b462021816afed3209a4642e8b0f
6
+ metadata.gz: 8b8509614948c7b7cce54dc6954c85e0bce477c4d057841a5b90d7c0f3c41e7853e804bcd27f51580df2bc62c1f6008f4af4f3939a8d423b6172bf905a6a00a8
7
+ data.tar.gz: 741557ab2732daaec94038356e961ef44e0bf66e97a5aa7904f203f14025c3254d607e31c4f3124e2154b97164df8a35788da22357abc259cf2455c8547d5906
data/.gitignore CHANGED
@@ -9,3 +9,6 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ # generated grpc bindings (built via `rake generate`)
14
+ /lib/flagd/
data/.rubocop.yml CHANGED
@@ -7,4 +7,8 @@ inherit_mode:
7
7
  AllCops:
8
8
  Exclude:
9
9
  # gRPC generated files
10
- - 'lib/openfeature/flagd/provider/flagd/**/*.rb'
10
+ - 'lib/flagd/**/*.rb'
11
+
12
+ # keyword_init: true is not redundant: it maps a positional Hash to fields and rejects positional args
13
+ Style/RedundantStructKeywordInit:
14
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.4
1
+ 4.0.9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,117 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.0](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-flagd-provider/v0.1.7...openfeature-flagd-provider/v0.2.0) (2026-11-02)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * require Ruby >= 3.4 and test only on 3.4 and 4.0 ([#264](https://github.com/open-feature/ruby-sdk-contrib/issues/264))
9
+ * **flagd:** migrate provider to evaluation.v2 RPCs ([#263](https://github.com/open-feature/ruby-sdk-contrib/issues/263))
10
+
11
+ ### 🐛 Bug Fixes
12
+
13
+ * **flagd-provider:** update fractional targeting test expectations for flagd v0.15.4 ([#166](https://github.com/open-feature/ruby-sdk-contrib/issues/166)) ([f3ea5cb](https://github.com/open-feature/ruby-sdk-contrib/commit/f3ea5cbd372b11942109c1ed1577d8bb2f577711))
14
+
15
+
16
+ ### ✨ New Features
17
+
18
+ * **flagd:** migrate provider to evaluation.v2 RPCs ([#263](https://github.com/open-feature/ruby-sdk-contrib/issues/263)) ([340482b](https://github.com/open-feature/ruby-sdk-contrib/commit/340482bbacefe9c3dd04fc848ebc3579bb1a9dcf))
19
+ * support Ruby 3.3 (lower minimum from 3.4 to 3.3) ([#204](https://github.com/open-feature/ruby-sdk-contrib/issues/204)) ([295a34f](https://github.com/open-feature/ruby-sdk-contrib/commit/295a34f6d0bb4ff382362020a976ae0235e3ed53))
20
+
21
+
22
+ ### 🧹 Chore
23
+
24
+ * add e2e test suite ([#211](https://github.com/open-feature/ruby-sdk-contrib/issues/211)) ([c36b372](https://github.com/open-feature/ruby-sdk-contrib/commit/c36b37234b756fd1111f7e042202ab0be6d1616e))
25
+ * **deps:** lock file maintenance ([#234](https://github.com/open-feature/ruby-sdk-contrib/issues/234)) ([402c691](https://github.com/open-feature/ruby-sdk-contrib/commit/402c6913534128605eb2bd4cad870c31cff2d7c0))
26
+ * **deps:** lock file maintenance ([#242](https://github.com/open-feature/ruby-sdk-contrib/issues/242)) ([788b51c](https://github.com/open-feature/ruby-sdk-contrib/commit/788b51c34300d0654fa837bfd15a86d56a7ac142))
27
+ * **deps:** lock file maintenance ([#248](https://github.com/open-feature/ruby-sdk-contrib/issues/248)) ([24d69f1](https://github.com/open-feature/ruby-sdk-contrib/commit/24d69f1ce10a461a9e86971ffa3d579394894145))
28
+ * **deps:** lock file maintenance ([#251](https://github.com/open-feature/ruby-sdk-contrib/issues/251)) ([a351265](https://github.com/open-feature/ruby-sdk-contrib/commit/a3512650043f83c8be7e224d9797c639ddc3a4f0))
29
+ * **deps:** lock file maintenance ([#259](https://github.com/open-feature/ruby-sdk-contrib/issues/259)) ([ffe7663](https://github.com/open-feature/ruby-sdk-contrib/commit/ffe7663ffef575202abe21b94f196076a49b3ad1))
30
+ * **deps:** lock file maintenance ([#277](https://github.com/open-feature/ruby-sdk-contrib/issues/277)) ([857f47f](https://github.com/open-feature/ruby-sdk-contrib/commit/857f47f679bfa29454dd899ef40040c08a69dd13))
31
+ * **deps:** lock file maintenance ([#284](https://github.com/open-feature/ruby-sdk-contrib/issues/284)) ([73f1ac8](https://github.com/open-feature/ruby-sdk-contrib/commit/73f1ac8372d698d0c913383b4c923b41620bc3be))
32
+ * **deps:** pin dependencies ([#221](https://github.com/open-feature/ruby-sdk-contrib/issues/221)) ([6c727e5](https://github.com/open-feature/ruby-sdk-contrib/commit/6c727e5a4f9fa47140d0057fbb567405c9bd2adb))
33
+ * **deps:** update dependency ruby to v4 ([#124](https://github.com/open-feature/ruby-sdk-contrib/issues/124)) ([f6fdaf6](https://github.com/open-feature/ruby-sdk-contrib/commit/f6fdaf6c304f730960e379ec7042657916a7ae44))
34
+ * **deps:** update dependency ruby to v4.0.3 ([#161](https://github.com/open-feature/ruby-sdk-contrib/issues/161)) ([538486e](https://github.com/open-feature/ruby-sdk-contrib/commit/538486e8b6a42979c35a251f12e94292f412f8a0))
35
+ * **deps:** update dependency ruby to v4.0.4 ([#170](https://github.com/open-feature/ruby-sdk-contrib/issues/170)) ([0bde1a8](https://github.com/open-feature/ruby-sdk-contrib/commit/0bde1a85b475764deb22b56d34e1e333a809ec37))
36
+ * **deps:** update dependency ruby to v4.0.5 ([#173](https://github.com/open-feature/ruby-sdk-contrib/issues/173)) ([d410cee](https://github.com/open-feature/ruby-sdk-contrib/commit/d410ceeed7c77ea2626d009c052ed53d2621e511))
37
+ * **deps:** update dependency ruby to v4.0.6 ([#194](https://github.com/open-feature/ruby-sdk-contrib/issues/194)) ([c786a79](https://github.com/open-feature/ruby-sdk-contrib/commit/c786a7972924b7feee9321fd20062bb17ca2caea))
38
+ * **deps:** update dependency ruby to v4.0.7 ([#219](https://github.com/open-feature/ruby-sdk-contrib/issues/219)) ([74e1acb](https://github.com/open-feature/ruby-sdk-contrib/commit/74e1acb0bab6d20d74107da95a6472daff0c0da4))
39
+ * **deps:** update dependency ruby to v4.0.8 ([#272](https://github.com/open-feature/ruby-sdk-contrib/issues/272)) ([003d193](https://github.com/open-feature/ruby-sdk-contrib/commit/003d193e84e4c27639405d2cfe83680f0aa0c21b))
40
+ * **deps:** update dependency ruby to v4.0.9 ([#276](https://github.com/open-feature/ruby-sdk-contrib/issues/276)) ([feaca24](https://github.com/open-feature/ruby-sdk-contrib/commit/feaca24ef5f68442132750137c73a49780eabc3a))
41
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.14.3 ([#120](https://github.com/open-feature/ruby-sdk-contrib/issues/120)) ([eed7fbd](https://github.com/open-feature/ruby-sdk-contrib/commit/eed7fbd9c72c4947d99c896ad6c170b093061ff6))
42
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.14.4 ([#137](https://github.com/open-feature/ruby-sdk-contrib/issues/137)) ([85d0c36](https://github.com/open-feature/ruby-sdk-contrib/commit/85d0c36f1b7c4fd891a443a8f8e22829cea15715))
43
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.14.5 ([#143](https://github.com/open-feature/ruby-sdk-contrib/issues/143)) ([cc3f37a](https://github.com/open-feature/ruby-sdk-contrib/commit/cc3f37a39445e34ecb982aa077af83285514b444))
44
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.15.0 ([#144](https://github.com/open-feature/ruby-sdk-contrib/issues/144)) ([c35eaf7](https://github.com/open-feature/ruby-sdk-contrib/commit/c35eaf7232ff220f713fbfadf82677307c6dad16))
45
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.15.1 ([#147](https://github.com/open-feature/ruby-sdk-contrib/issues/147)) ([f52786c](https://github.com/open-feature/ruby-sdk-contrib/commit/f52786c794e01578f544c5803a5b20206f64a5bc))
46
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.15.2 ([#153](https://github.com/open-feature/ruby-sdk-contrib/issues/153)) ([0d0a63f](https://github.com/open-feature/ruby-sdk-contrib/commit/0d0a63ff08275529c697e7a7a3f752eb104c6f15))
47
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.15.3 ([#156](https://github.com/open-feature/ruby-sdk-contrib/issues/156)) ([3bab478](https://github.com/open-feature/ruby-sdk-contrib/commit/3bab478d09eac169c9dfae558cf1b43ea4a7eb0b))
48
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.15.4 ([#157](https://github.com/open-feature/ruby-sdk-contrib/issues/157)) ([9525476](https://github.com/open-feature/ruby-sdk-contrib/commit/9525476382a5ea03d617e9713a1843679e296fdd))
49
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.15.5 ([#168](https://github.com/open-feature/ruby-sdk-contrib/issues/168)) ([3fb40ce](https://github.com/open-feature/ruby-sdk-contrib/commit/3fb40ce1f97c6a5cefbf3ca89866ceb0d11287ea))
50
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.15.7 ([#178](https://github.com/open-feature/ruby-sdk-contrib/issues/178)) ([b5aacb4](https://github.com/open-feature/ruby-sdk-contrib/commit/b5aacb46d7cafc2bd49c8850d2001a35b355c6d6))
51
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.16.0 ([#181](https://github.com/open-feature/ruby-sdk-contrib/issues/181)) ([38973ba](https://github.com/open-feature/ruby-sdk-contrib/commit/38973ba94ce78bd2173c901ee821a0beb75a08f2))
52
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.16.1 ([#197](https://github.com/open-feature/ruby-sdk-contrib/issues/197)) ([305e086](https://github.com/open-feature/ruby-sdk-contrib/commit/305e08657c526b117cdee62d5b871d284e4e786b))
53
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.16.2 ([#207](https://github.com/open-feature/ruby-sdk-contrib/issues/207)) ([19af251](https://github.com/open-feature/ruby-sdk-contrib/commit/19af251c6049ba3f9be20862be69492a96801273))
54
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.16.3 ([#217](https://github.com/open-feature/ruby-sdk-contrib/issues/217)) ([32d368f](https://github.com/open-feature/ruby-sdk-contrib/commit/32d368f358638835833eef0826aeacf3b94309f9))
55
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.17.0 ([#239](https://github.com/open-feature/ruby-sdk-contrib/issues/239)) ([a9ebd8d](https://github.com/open-feature/ruby-sdk-contrib/commit/a9ebd8dae98bb48ca09358af5c9700a8095e59f5))
56
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.17.1 ([#255](https://github.com/open-feature/ruby-sdk-contrib/issues/255)) ([dc8dc9b](https://github.com/open-feature/ruby-sdk-contrib/commit/dc8dc9b954f61fc1c14fb69db33724b7ddb99abf))
57
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.18.0 ([#257](https://github.com/open-feature/ruby-sdk-contrib/issues/257)) ([19cc45a](https://github.com/open-feature/ruby-sdk-contrib/commit/19cc45aba35ca7a8f5a8cdf0140b9e886961b21e))
58
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.18.1 ([#279](https://github.com/open-feature/ruby-sdk-contrib/issues/279)) ([cf58cdb](https://github.com/open-feature/ruby-sdk-contrib/commit/cf58cdb40f033ab62c8c866b4cbb05f2605d8507))
59
+ * **deps:** update ghcr.io/open-feature/flagd docker tag to v0.18.2 ([#281](https://github.com/open-feature/ruby-sdk-contrib/issues/281)) ([47d39d3](https://github.com/open-feature/ruby-sdk-contrib/commit/47d39d330590d435fa3fbf5a735b857ae9ceff10))
60
+ * **deps:** update providers/openfeature-flagd-provider/schemas digest to 3aecf63 ([#222](https://github.com/open-feature/ruby-sdk-contrib/issues/222)) ([80b7f16](https://github.com/open-feature/ruby-sdk-contrib/commit/80b7f16184f6c646568f043e50028cbeb473107c))
61
+ * **deps:** update providers/openfeature-flagd-provider/test-harness digest to 05e34e7 ([#230](https://github.com/open-feature/ruby-sdk-contrib/issues/230)) ([9c4d1e7](https://github.com/open-feature/ruby-sdk-contrib/commit/9c4d1e7e345d709149a42f44fa374959b199e6f3))
62
+ * **deps:** update providers/openfeature-flagd-provider/test-harness digest to 5022ee2 ([#228](https://github.com/open-feature/ruby-sdk-contrib/issues/228)) ([c856315](https://github.com/open-feature/ruby-sdk-contrib/commit/c8563159a140344c8a3a392a95431cb0c7f7bc9b))
63
+ * **deps:** update providers/openfeature-flagd-provider/test-harness digest to b308c1b ([#223](https://github.com/open-feature/ruby-sdk-contrib/issues/223)) ([bab0033](https://github.com/open-feature/ruby-sdk-contrib/commit/bab0033f9782ea425788034ea234e9a2b569e260))
64
+ * **flagd:** fix lint and fractional expectations for flagd v0.18.0 ([#262](https://github.com/open-feature/ruby-sdk-contrib/issues/262)) ([56a6500](https://github.com/open-feature/ruby-sdk-contrib/commit/56a650012e7b9f17cae35b096043c8159577ed9f))
65
+ * require Ruby >= 3.4 and test only on 3.4 and 4.0 ([#264](https://github.com/open-feature/ruby-sdk-contrib/issues/264)) ([89489ce](https://github.com/open-feature/ruby-sdk-contrib/commit/89489ceb37f3d9dbebc29982a265bb7aeecc6af7))
66
+ * resolve open dependabot security alerts ([#180](https://github.com/open-feature/ruby-sdk-contrib/issues/180)) ([b96958f](https://github.com/open-feature/ruby-sdk-contrib/commit/b96958ffd4603caf8b64dcf432a729a44289afc0))
67
+ * resolve open dependabot security alerts ([#203](https://github.com/open-feature/ruby-sdk-contrib/issues/203)) ([a1ab3a3](https://github.com/open-feature/ruby-sdk-contrib/commit/a1ab3a38f8221ea822792f098c5213a071c01d68))
68
+ * use testcontainers for e2e tests ([#213](https://github.com/open-feature/ruby-sdk-contrib/issues/213)) ([1101d49](https://github.com/open-feature/ruby-sdk-contrib/commit/1101d4990d64c4905404a98aab8d3c3b602bf2d1))
69
+
70
+
71
+ ### 🚀 Performance
72
+
73
+ * freeze provider metadata so hooks skip the per-evaluation copy ([#274](https://github.com/open-feature/ruby-sdk-contrib/issues/274)) ([7a13862](https://github.com/open-feature/ruby-sdk-contrib/commit/7a138628c2b09e32631786669cfa3255b0ec4c40))
74
+
75
+
76
+ ### 🛠️ Build
77
+
78
+ * **deps-dev:** bump json from 2.19.0 to 2.19.2 in /providers/openfeature-flagd-provider ([#139](https://github.com/open-feature/ruby-sdk-contrib/issues/139)) ([fdab199](https://github.com/open-feature/ruby-sdk-contrib/commit/fdab199870ffa27e96002e9c3239057223af2944))
79
+ * **flagd:** generate grpc bindings at build time ([#215](https://github.com/open-feature/ruby-sdk-contrib/issues/215)) ([afd0d8c](https://github.com/open-feature/ruby-sdk-contrib/commit/afd0d8c35ad374d161cd9d342c8c156f7a033a37))
80
+
81
+ ## [0.1.7](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-flagd-provider/v0.1.6...openfeature-flagd-provider/v0.1.7) (2026-03-18)
82
+
83
+
84
+ ### 🧹 Chore
85
+
86
+ * **deps:** update dependency ruby to v3.4.9 ([#107](https://github.com/open-feature/ruby-sdk-contrib/issues/107)) ([e0d4314](https://github.com/open-feature/ruby-sdk-contrib/commit/e0d4314f1183cc80e84ba04980fe2d01584bec9c))
87
+
88
+ ## [0.1.6](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-flagd-provider/v0.1.5...openfeature-flagd-provider/v0.1.6) (2026-03-09)
89
+
90
+
91
+ ### 🐛 Bug Fixes
92
+
93
+ * **flagd:** delegate method() through ConfiguredClient for conformance ([51fcb5b](https://github.com/open-feature/ruby-sdk-contrib/commit/51fcb5bd4e22d249cd18ef6bd13b37572e6c1d94))
94
+
95
+ ## [0.1.5](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-flagd-provider/v0.1.4...openfeature-flagd-provider/v0.1.5) (2026-03-09)
96
+
97
+
98
+ ### ✨ New Features
99
+
100
+ * add OFREP provider ([#80](https://github.com/open-feature/ruby-sdk-contrib/issues/80)) ([e33e0ab](https://github.com/open-feature/ruby-sdk-contrib/commit/e33e0ab340193eee4434df65bb33e1002a69eaad))
101
+
102
+
103
+ ### 🧹 Chore
104
+
105
+ * add conformance tests, SimpleCov, version standardization, and README improvements ([#95](https://github.com/open-feature/ruby-sdk-contrib/issues/95)) ([1c430a9](https://github.com/open-feature/ruby-sdk-contrib/commit/1c430a92041a7841ac01a2642a66376b8259acd2))
106
+ * improve repository maturity and contributor experience ([#91](https://github.com/open-feature/ruby-sdk-contrib/issues/91)) ([7e28025](https://github.com/open-feature/ruby-sdk-contrib/commit/7e280257e6f543bc46537f43aeac302be003b47b))
107
+
108
+ ## [0.1.4](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-flagd-provider/v0.1.3...openfeature-flagd-provider/v0.1.4) (2026-03-08)
109
+
110
+
111
+ ### 🧹 Chore
112
+
113
+ * update minimum Ruby version to >= 3.4 ([#83](https://github.com/open-feature/ruby-sdk-contrib/issues/83)) ([ccf689a](https://github.com/open-feature/ruby-sdk-contrib/commit/ccf689a097de8d7db86fffd84b2127ac75687d4c))
114
+
3
115
  ## [0.1.3](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-flagd-provider/v0.1.2...openfeature-flagd-provider/v0.1.3) (2026-03-07)
4
116
 
5
117
 
data/Gemfile.lock CHANGED
@@ -1,38 +1,89 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openfeature-flagd-provider (0.1.3)
4
+ openfeature-flagd-provider (0.2.0)
5
5
  grpc (~> 1.50)
6
6
  openfeature-sdk (~> 0.3.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- ast (2.4.2)
12
- diff-lcs (1.5.1)
13
- google-protobuf (3.25.3-arm64-darwin)
14
- google-protobuf (3.25.3-x86_64-linux)
15
- googleapis-common-protos-types (1.14.0)
16
- google-protobuf (~> 3.18)
17
- grpc (1.62.0-arm64-darwin)
18
- google-protobuf (~> 3.25)
11
+ ast (2.4.3)
12
+ base64 (0.3.0)
13
+ bigdecimal (4.1.3)
14
+ builder (3.3.0)
15
+ cucumber (9.2.1)
16
+ builder (~> 3.2)
17
+ cucumber-ci-environment (> 9, < 11)
18
+ cucumber-core (> 13, < 14)
19
+ cucumber-cucumber-expressions (~> 17.0)
20
+ cucumber-gherkin (> 24, < 28)
21
+ cucumber-html-formatter (> 20.3, < 22)
22
+ cucumber-messages (> 19, < 25)
23
+ diff-lcs (~> 1.5)
24
+ mini_mime (~> 1.1)
25
+ multi_test (~> 1.1)
26
+ sys-uname (~> 1.2)
27
+ cucumber-ci-environment (10.0.1)
28
+ cucumber-core (13.0.3)
29
+ cucumber-gherkin (>= 27, < 28)
30
+ cucumber-messages (>= 20, < 23)
31
+ cucumber-tag-expressions (> 5, < 7)
32
+ cucumber-cucumber-expressions (17.1.0)
33
+ bigdecimal
34
+ cucumber-gherkin (27.0.0)
35
+ cucumber-messages (>= 19.1.4, < 23)
36
+ cucumber-html-formatter (21.15.1)
37
+ cucumber-messages (> 19, < 28)
38
+ cucumber-messages (22.0.0)
39
+ cucumber-tag-expressions (6.1.2)
40
+ diff-lcs (1.6.2)
41
+ docile (1.4.1)
42
+ docker-api (2.5.0)
43
+ base64
44
+ excon (>= 0.64.0)
45
+ excon (1.10.0)
46
+ ffi (1.17.4)
47
+ ffi (1.17.4-arm64-darwin)
48
+ ffi (1.17.4-x86_64-linux-gnu)
49
+ google-protobuf (4.36.2)
50
+ bigdecimal
51
+ rake (~> 13.3)
52
+ google-protobuf (4.36.2-arm64-darwin)
53
+ bigdecimal
54
+ rake (~> 13.3)
55
+ google-protobuf (4.36.2-x86_64-linux-gnu)
56
+ bigdecimal
57
+ rake (~> 13.3)
58
+ googleapis-common-protos-types (1.24.0)
59
+ google-protobuf (~> 4.26)
60
+ grpc (1.85.0)
61
+ google-protobuf (>= 3.25, < 5.0)
19
62
  googleapis-common-protos-types (~> 1.0)
20
- grpc (1.62.0-x86_64-linux)
21
- google-protobuf (~> 3.25)
63
+ grpc (1.85.0-arm64-darwin)
64
+ google-protobuf (>= 3.25, < 5.0)
22
65
  googleapis-common-protos-types (~> 1.0)
23
- json (2.7.2)
24
- language_server-protocol (3.17.0.3)
66
+ grpc (1.85.0-x86_64-linux-gnu)
67
+ google-protobuf (>= 3.25, < 5.0)
68
+ googleapis-common-protos-types (~> 1.0)
69
+ grpc-tools (1.85.0)
70
+ json (3.1.0)
71
+ language_server-protocol (3.17.0.6)
25
72
  lint_roller (1.1.0)
73
+ logger (1.7.0)
74
+ memoist3 (1.0.0)
75
+ mini_mime (1.1.5)
76
+ multi_test (1.1.0)
26
77
  openfeature-sdk (0.3.1)
27
- parallel (1.24.0)
28
- parser (3.3.0.5)
78
+ parallel (2.3.0)
79
+ parser (3.3.13.0)
29
80
  ast (~> 2.4.1)
30
81
  racc
31
- racc (1.7.3)
82
+ prism (1.9.0)
83
+ racc (1.8.1)
32
84
  rainbow (3.1.1)
33
- rake (13.2.1)
34
- regexp_parser (2.9.0)
35
- rexml (3.2.6)
85
+ rake (13.4.2)
86
+ regexp_parser (2.13.1)
36
87
  rspec (3.12.0)
37
88
  rspec-core (~> 3.12.0)
38
89
  rspec-expectations (~> 3.12.0)
@@ -46,47 +97,70 @@ GEM
46
97
  diff-lcs (>= 1.2.0, < 2.0)
47
98
  rspec-support (~> 3.12.0)
48
99
  rspec-support (3.12.2)
49
- rubocop (1.62.1)
50
- json (~> 2.3)
51
- language_server-protocol (>= 3.17.0)
52
- parallel (~> 1.10)
100
+ rubocop (1.91.0)
101
+ json (>= 2.3)
102
+ language_server-protocol (~> 3.17.0.2)
103
+ lint_roller (~> 1.1.0)
104
+ parallel (>= 1.10)
53
105
  parser (>= 3.3.0.2)
54
106
  rainbow (>= 2.2.2, < 4.0)
55
- regexp_parser (>= 1.8, < 3.0)
56
- rexml (>= 3.2.5, < 4.0)
57
- rubocop-ast (>= 1.31.1, < 2.0)
107
+ regexp_parser (>= 2.9.3, < 3.0)
108
+ rubocop-ast (>= 1.49.0, < 2.0)
58
109
  ruby-progressbar (~> 1.7)
59
- unicode-display_width (>= 2.4.0, < 3.0)
60
- rubocop-ast (1.31.2)
61
- parser (>= 3.3.0.4)
62
- rubocop-performance (1.20.2)
63
- rubocop (>= 1.48.1, < 2.0)
64
- rubocop-ast (>= 1.30.0, < 2.0)
110
+ unicode-display_width (>= 2.4.0, < 4.0)
111
+ rubocop-ast (1.50.0)
112
+ parser (>= 3.3.7.2)
113
+ prism (~> 1.7)
114
+ rubocop-performance (1.26.1)
115
+ lint_roller (~> 1.1)
116
+ rubocop (>= 1.75.0, < 2.0)
117
+ rubocop-ast (>= 1.47.1, < 2.0)
65
118
  ruby-progressbar (1.13.0)
66
- standard (1.35.1)
119
+ simplecov (0.22.0)
120
+ docile (~> 1.1)
121
+ simplecov-html (~> 0.11)
122
+ simplecov_json_formatter (~> 0.1)
123
+ simplecov-html (0.13.2)
124
+ simplecov_json_formatter (0.1.4)
125
+ standard (1.57.0)
67
126
  language_server-protocol (~> 3.17.0.2)
68
127
  lint_roller (~> 1.0)
69
- rubocop (~> 1.62.0)
128
+ rubocop (~> 1.91.0)
70
129
  standard-custom (~> 1.0.0)
71
- standard-performance (~> 1.3)
130
+ standard-performance (~> 1.8)
72
131
  standard-custom (1.0.2)
73
132
  lint_roller (~> 1.0)
74
133
  rubocop (~> 1.50)
75
- standard-performance (1.3.1)
134
+ standard-performance (1.9.0)
76
135
  lint_roller (~> 1.1)
77
- rubocop-performance (~> 1.20.2)
78
- unicode-display_width (2.5.0)
136
+ rubocop-performance (~> 1.26.0)
137
+ sys-uname (1.5.1)
138
+ ffi (~> 1.1)
139
+ memoist3 (~> 1.0.0)
140
+ testcontainers-core (0.2.0)
141
+ docker-api (~> 2.2)
142
+ unicode-display_width (3.3.0)
143
+ unicode-emoji (~> 4.3)
144
+ unicode-emoji (4.3.0)
79
145
 
80
146
  PLATFORMS
81
147
  arm64-darwin-21
148
+ arm64-darwin-24
149
+ ruby
82
150
  x86_64-linux
83
151
 
84
152
  DEPENDENCIES
153
+ base64
154
+ cucumber (~> 9.2)
155
+ grpc-tools (~> 1.71)
156
+ logger
85
157
  openfeature-flagd-provider!
86
158
  rake (~> 13.0)
87
159
  rspec (~> 3.12.0)
88
160
  rubocop
161
+ simplecov (~> 0.22)
89
162
  standard
163
+ testcontainers-core (~> 0.2)
90
164
 
91
165
  BUNDLED WITH
92
166
  2.3.25
data/README.md CHANGED
@@ -22,6 +22,9 @@ Or install it yourself as:
22
22
  gem install openfeature-flagd-provider
23
23
  ```
24
24
 
25
+ > [!NOTE]
26
+ > The gRPC bindings are generated at build time and not committed, so Bundler `git:` sources won't work. To use unreleased code, clone the repo, run `bundle exec rake generate` in this directory (it initializes the `schemas` submodule if needed), and reference it with `path:`.
27
+
25
28
  ## Usage
26
29
 
27
30
  The `OpenFeature::Flagd` supports multiple configuration options that dictate how the SDK communicates with flagd.
data/Rakefile CHANGED
@@ -2,7 +2,20 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
+ require "cucumber/rake/task"
6
+
7
+ desc "Generate gRPC bindings from the schemas submodule"
8
+ task :generate do
9
+ sh "git submodule update --init schemas" unless File.exist?("schemas/protobuf")
10
+ sh "grpc_tools_ruby_protoc -I schemas/protobuf --ruby_out=lib --grpc_out=lib " \
11
+ "schemas/protobuf/flagd/evaluation/v2/evaluation.proto " \
12
+ "schemas/protobuf/flagd/sync/v1/sync.proto"
13
+ end
5
14
 
6
15
  RSpec::Core::RakeTask.new(:spec)
16
+ Cucumber::Rake::Task.new(:e2e) # requires Docker; not part of default
17
+ task spec: :generate
18
+ task e2e: :generate
19
+ Rake::Task["build"].enhance([:generate]) # ship freshly generated bindings
7
20
 
8
21
  task default: :spec
data/cucumber.yml ADDED
@@ -0,0 +1 @@
1
+ default: --require features --publish-quiet --tags "not @deprecated and not @fractional-v1 and not @fractional-v3" test-harness/gherkin/evaluation.feature test-harness/gherkin/targeting.feature
@@ -2,7 +2,7 @@ version: '3.7'
2
2
 
3
3
  services:
4
4
  flagd:
5
- image: ghcr.io/open-feature/flagd:v0.10.1
5
+ image: ghcr.io/open-feature/flagd:v0.18.2@sha256:a1b6de22ef4f8a4f10af2f9d0009ccef946d707d4211db342f0f2422778b764a
6
6
  ports:
7
7
  - '127.0.0.1:8013:8013'
8
8
  volumes:
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: flagd/evaluation/v2/evaluation.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/protobuf/struct_pb'
8
+
9
+
10
+ descriptor_data = "\n$flagd/evaluation/v2/evaluation.proto\x12\x13\x66lagd.evaluation.v2\x1a\x1cgoogle/protobuf/struct.proto\"\xe6\x01\n\x07\x41nyFlag\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x14\n\x07variant\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x16\n\x0c\x64ouble_value\x18\x05 \x01(\x01H\x00\x12/\n\x0cobject_value\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12)\n\x08metadata\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructB\x07\n\x05valueB\n\n\x08_variant\"S\n\x15ResolveBooleanRequest\x12\x10\n\x08\x66lag_key\x18\x01 \x01(\t\x12(\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x93\x01\n\x16ResolveBooleanResponse\x12\x12\n\x05value\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x14\n\x07variant\x18\x03 \x01(\tH\x01\x88\x01\x01\x12)\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\n\x06_valueB\n\n\x08_variant\"R\n\x14ResolveStringRequest\x12\x10\n\x08\x66lag_key\x18\x01 \x01(\t\x12(\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x92\x01\n\x15ResolveStringResponse\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x14\n\x07variant\x18\x03 \x01(\tH\x01\x88\x01\x01\x12)\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\n\x06_valueB\n\n\x08_variant\"Q\n\x13ResolveFloatRequest\x12\x10\n\x08\x66lag_key\x18\x01 \x01(\t\x12(\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x91\x01\n\x14ResolveFloatResponse\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x14\n\x07variant\x18\x03 \x01(\tH\x01\x88\x01\x01\x12)\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\n\x06_valueB\n\n\x08_variant\"O\n\x11ResolveIntRequest\x12\x10\n\x08\x66lag_key\x18\x01 \x01(\t\x12(\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x8f\x01\n\x12ResolveIntResponse\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x14\n\x07variant\x18\x03 \x01(\tH\x01\x88\x01\x01\x12)\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\n\x06_valueB\n\n\x08_variant\"R\n\x14ResolveObjectRequest\x12\x10\n\x08\x66lag_key\x18\x01 \x01(\t\x12(\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xab\x01\n\x15ResolveObjectResponse\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x88\x01\x01\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x14\n\x07variant\x18\x03 \x01(\tH\x01\x88\x01\x01\x12)\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\n\x06_valueB\n\n\x08_variant\"J\n\x13\x45ventStreamResponse\x12\x0c\n\x04type\x18\x01 \x01(\t\x12%\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x14\n\x12\x45ventStreamRequest2\xf8\x04\n\x07Service\x12k\n\x0eResolveBoolean\x12*.flagd.evaluation.v2.ResolveBooleanRequest\x1a+.flagd.evaluation.v2.ResolveBooleanResponse\"\x00\x12h\n\rResolveString\x12).flagd.evaluation.v2.ResolveStringRequest\x1a*.flagd.evaluation.v2.ResolveStringResponse\"\x00\x12\x65\n\x0cResolveFloat\x12(.flagd.evaluation.v2.ResolveFloatRequest\x1a).flagd.evaluation.v2.ResolveFloatResponse\"\x00\x12_\n\nResolveInt\x12&.flagd.evaluation.v2.ResolveIntRequest\x1a\'.flagd.evaluation.v2.ResolveIntResponse\"\x00\x12h\n\rResolveObject\x12).flagd.evaluation.v2.ResolveObjectRequest\x1a*.flagd.evaluation.v2.ResolveObjectResponse\"\x00\x12\x64\n\x0b\x45ventStream\x12\'.flagd.evaluation.v2.EventStreamRequest\x1a(.flagd.evaluation.v2.EventStreamResponse\"\x00\x30\x01\x42\xd3\x01\n(dev.openfeature.flagd.grpc.evaluation.v2Z\x13\x66lagd/evaluation/v2\xaa\x02$OpenFeature.Flagd.Grpc.Evaluation.V2\xca\x02\x35OpenFeature\\Providers\\Flagd\\Schema\\Grpc\\Evaluation\\V2\xea\x02\x32OpenFeature::Flagd::Provider::Grpc::Evaluation::V2b\x06proto3"
11
+
12
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
+ pool.add_serialized_file(descriptor_data)
14
+
15
+ module OpenFeature
16
+ module Flagd
17
+ module Provider
18
+ module Grpc
19
+ module Evaluation
20
+ module V2
21
+ AnyFlag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.AnyFlag").msgclass
22
+ ResolveBooleanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveBooleanRequest").msgclass
23
+ ResolveBooleanResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveBooleanResponse").msgclass
24
+ ResolveStringRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveStringRequest").msgclass
25
+ ResolveStringResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveStringResponse").msgclass
26
+ ResolveFloatRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveFloatRequest").msgclass
27
+ ResolveFloatResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveFloatResponse").msgclass
28
+ ResolveIntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveIntRequest").msgclass
29
+ ResolveIntResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveIntResponse").msgclass
30
+ ResolveObjectRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveObjectRequest").msgclass
31
+ ResolveObjectResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.ResolveObjectResponse").msgclass
32
+ EventStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.EventStreamResponse").msgclass
33
+ EventStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v2.EventStreamRequest").msgclass
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,45 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: flagd/evaluation/v2/evaluation.proto for package 'OpenFeature.Flagd.Provider.Grpc.Evaluation.V2'
3
+ # Original file comments:
4
+ # *
5
+ # Flag evaluation API
6
+ #
7
+ # This proto forms the basis of a flag-evaluation API.
8
+ # It supports single and bulk evaluation RPCs, and flags of various types, as well as establishing a stream for getting notifications about changes in a flag definition.
9
+ # It supports the inclusion of a "context" with each evaluation, which may contain arbitrary attributes relevant to flag evaluation.
10
+
11
+ require 'grpc'
12
+ require 'flagd/evaluation/v2/evaluation_pb'
13
+
14
+ module OpenFeature
15
+ module Flagd
16
+ module Provider
17
+ module Grpc
18
+ module Evaluation
19
+ module V2
20
+ module Service
21
+ # Service defines the exposed rpcs of flagd
22
+ class Service
23
+
24
+ include ::GRPC::GenericService
25
+
26
+ self.marshal_class_method = :encode
27
+ self.unmarshal_class_method = :decode
28
+ self.service_name = 'flagd.evaluation.v2.Service'
29
+
30
+ rpc :ResolveBoolean, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveBooleanRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveBooleanResponse
31
+ rpc :ResolveString, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveStringRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveStringResponse
32
+ rpc :ResolveFloat, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveFloatRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveFloatResponse
33
+ rpc :ResolveInt, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveIntRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveIntResponse
34
+ rpc :ResolveObject, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveObjectRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::ResolveObjectResponse
35
+ rpc :EventStream, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::EventStreamRequest, stream(::OpenFeature::Flagd::Provider::Grpc::Evaluation::V2::EventStreamResponse)
36
+ end
37
+
38
+ Stub = Service.rpc_stub_class
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: flagd/sync/v1/sync.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/protobuf/struct_pb'
8
+
9
+
10
+ descriptor_data = "\n\x18\x66lagd/sync/v1/sync.proto\x12\rflagd.sync.v1\x1a\x1cgoogle/protobuf/struct.proto\"=\n\x10SyncFlagsRequest\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x14\n\x08selector\x18\x02 \x01(\tB\x02\x18\x01\"t\n\x11SyncFlagsResponse\x12\x1a\n\x12\x66lag_configuration\x18\x01 \x01(\t\x12\x32\n\x0csync_context\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x88\x01\x01\x42\x0f\n\r_sync_context\"A\n\x14\x46\x65tchAllFlagsRequest\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x14\n\x08selector\x18\x02 \x01(\tB\x02\x18\x01\"3\n\x15\x46\x65tchAllFlagsResponse\x12\x1a\n\x12\x66lag_configuration\x18\x01 \x01(\t\"\x18\n\x12GetMetadataRequest:\x02\x18\x01\"J\n\x13GetMetadataResponse\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct:\x02\x18\x01J\x04\x08\x01\x10\x02\x32\x9e\x02\n\x0f\x46lagSyncService\x12R\n\tSyncFlags\x12\x1f.flagd.sync.v1.SyncFlagsRequest\x1a .flagd.sync.v1.SyncFlagsResponse\"\x00\x30\x01\x12\\\n\rFetchAllFlags\x12#.flagd.sync.v1.FetchAllFlagsRequest\x1a$.flagd.sync.v1.FetchAllFlagsResponse\"\x00\x12Y\n\x0bGetMetadata\x12!.flagd.sync.v1.GetMetadataRequest\x1a\".flagd.sync.v1.GetMetadataResponse\"\x03\x88\x02\x01\x42\xa8\x01\n\x1f\x64\x65v.openfeature.flagd.grpc.syncZ\rflagd/sync/v1\xaa\x02\x1bOpenFeature.Flagd.Grpc.Sync\xca\x02,OpenFeature\\Providers\\Flagd\\Schema\\Grpc\\Sync\xea\x02(OpenFeature::Flagd::Provider::Grpc::Syncb\x06proto3"
11
+
12
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
+ pool.add_serialized_file(descriptor_data)
14
+
15
+ module OpenFeature
16
+ module Flagd
17
+ module Provider
18
+ module Grpc
19
+ module Sync
20
+ SyncFlagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.SyncFlagsRequest").msgclass
21
+ SyncFlagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.SyncFlagsResponse").msgclass
22
+ FetchAllFlagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.FetchAllFlagsRequest").msgclass
23
+ FetchAllFlagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.FetchAllFlagsResponse").msgclass
24
+ GetMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.GetMetadataRequest").msgclass
25
+ GetMetadataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.GetMetadataResponse").msgclass
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -3,7 +3,7 @@
3
3
  require "grpc"
4
4
  require "google/protobuf/well_known_types"
5
5
 
6
- require_relative "flagd/evaluation/v1/evaluation_services_pb"
6
+ require "flagd/evaluation/v2/evaluation_services_pb"
7
7
  require_relative "configuration"
8
8
 
9
9
  module OpenFeature
@@ -37,12 +37,12 @@ module OpenFeature
37
37
  attr_reader :metadata
38
38
 
39
39
  def initialize(configuration: nil)
40
- @metadata = OpenFeature::SDK::Provider::ProviderMetadata.new(name: PROVIDER_NAME)
40
+ @metadata = OpenFeature::SDK::Provider::ProviderMetadata.new(name: PROVIDER_NAME).freeze
41
41
  @grpc_client = grpc_client(configuration)
42
42
  end
43
43
 
44
44
  def fetch_boolean_value(flag_key:, default_value:, evaluation_context: nil)
45
- request = Grpc::Evaluation::ResolveBooleanRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
45
+ request = Grpc::Evaluation::V2::ResolveBooleanRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
46
46
  process_request(default_value) { @grpc_client.resolve_boolean(request) }
47
47
  end
48
48
 
@@ -51,22 +51,22 @@ module OpenFeature
51
51
  end
52
52
 
53
53
  def fetch_integer_value(flag_key:, default_value:, evaluation_context: nil)
54
- request = Grpc::Evaluation::ResolveIntRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
54
+ request = Grpc::Evaluation::V2::ResolveIntRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
55
55
  process_request(default_value) { @grpc_client.resolve_int(request) }
56
56
  end
57
57
 
58
58
  def fetch_float_value(flag_key:, default_value:, evaluation_context: nil)
59
- request = Grpc::Evaluation::ResolveFloatRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
59
+ request = Grpc::Evaluation::V2::ResolveFloatRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
60
60
  process_request(default_value) { @grpc_client.resolve_float(request) }
61
61
  end
62
62
 
63
63
  def fetch_string_value(flag_key:, default_value:, evaluation_context: nil)
64
- request = Grpc::Evaluation::ResolveStringRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
64
+ request = Grpc::Evaluation::V2::ResolveStringRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
65
65
  process_request(default_value) { @grpc_client.resolve_string(request) }
66
66
  end
67
67
 
68
68
  def fetch_object_value(flag_key:, default_value:, evaluation_context: nil)
69
- request = Grpc::Evaluation::ResolveObjectRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
69
+ request = Grpc::Evaluation::V2::ResolveObjectRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
70
70
  process_request(default_value) { @grpc_client.resolve_object(request) }
71
71
  end
72
72
 
@@ -74,10 +74,14 @@ module OpenFeature
74
74
 
75
75
  def process_request(default_value, &block)
76
76
  response = block.call
77
+ # empty variant + DEFAULT/DISABLED means no variant resolved; use the code default
78
+ variant = response.variant
79
+ reason = response.reason
80
+ fallback = variant.to_s.empty? && (reason == "DEFAULT" || reason == "DISABLED")
77
81
  OpenFeature::SDK::Provider::ResolutionDetails.new(
78
- value: response.value,
79
- reason: response.reason,
80
- variant: response.variant,
82
+ value: fallback ? default_value : response.value,
83
+ reason: reason,
84
+ variant: variant.to_s.empty? ? nil : variant,
81
85
  error_code: nil,
82
86
  error_message: nil,
83
87
  flag_metadata: nil
@@ -121,7 +125,7 @@ module OpenFeature
121
125
  )
122
126
  end
123
127
 
124
- Grpc::Evaluation::Service::Stub.new(server_address(configuration), options).freeze
128
+ Grpc::Evaluation::V2::Service::Stub.new(server_address(configuration), options).freeze
125
129
  end
126
130
 
127
131
  def server_address(configuration)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OpenFeature
4
4
  module Flagd
5
- VERSION = "0.1.3"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
@@ -56,6 +56,14 @@ module OpenFeature
56
56
  client.respond_to?(method_name, include_private) || super
57
57
  end
58
58
 
59
+ def method(name)
60
+ if client.respond_to?(name)
61
+ client.method(name)
62
+ else
63
+ super
64
+ end
65
+ end
66
+
59
67
  def configuration
60
68
  @configuration ||= Configuration.default_config
61
69
  .merge(Configuration.environment_variables_config)
@@ -12,18 +12,22 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "The flagd provider for the OpenFeature Ruby SDK"
13
13
  spec.homepage = "https://github.com/open-feature/ruby-sdk-contrib/tree/main/providers/openfeature-flagd-provider"
14
14
  spec.license = "Apache-2.0"
15
- spec.required_ruby_version = ">= 3.1"
15
+ spec.required_ruby_version = ">= 3.4"
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/open-feature/ruby-sdk-contrib/tree/main/providers/openfeature-flagd-provider"
19
19
  spec.metadata["changelog_uri"] = "https://github.com/open-feature/ruby-sdk-contrib/blob/main/providers/openfeature-flagd-provider/CHANGELOG.md"
20
20
  spec.metadata["bug_tracker_uri"] = "https://github.com/open-feature/ruby-sdk-contrib/issues"
21
21
  spec.metadata["documentation_uri"] = "https://github.com/open-feature/ruby-sdk-contrib/tree/main/providers/openfeature-flagd-provider/README.md"
22
+ spec.metadata["rubygems_mfa_required"] = "true"
22
23
 
23
24
  # Specify which files should be added to the gem when it is released.
24
25
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ # Generated gRPC bindings are not committed, so include them explicitly (see Rakefile :generate).
25
27
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
28
+ tracked = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
+ generated = Dir["lib/flagd/**/*.rb"]
30
+ (tracked + generated).uniq
27
31
  end
28
32
  spec.bindir = "exe"
29
33
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
@@ -33,7 +37,13 @@ Gem::Specification.new do |spec|
33
37
  spec.add_runtime_dependency "openfeature-sdk", "~> 0.3.1"
34
38
 
35
39
  spec.add_development_dependency "rake", "~> 13.0"
40
+ spec.add_development_dependency "grpc-tools", "~> 1.71"
36
41
  spec.add_development_dependency "rspec", "~> 3.12.0"
42
+ spec.add_development_dependency "cucumber", "~> 9.2"
43
+ spec.add_development_dependency "testcontainers-core", "~> 0.2"
44
+ spec.add_development_dependency "base64"
45
+ spec.add_development_dependency "logger"
37
46
  spec.add_development_dependency "standard"
38
47
  spec.add_development_dependency "rubocop"
48
+ spec.add_development_dependency "simplecov", "~> 0.22"
39
49
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openfeature-flagd-provider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenFeature Authors
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-03-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: grpc
@@ -52,6 +51,20 @@ dependencies:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
53
  version: '13.0'
54
+ - !ruby/object:Gem::Dependency
55
+ name: grpc-tools
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.71'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.71'
55
68
  - !ruby/object:Gem::Dependency
56
69
  name: rspec
57
70
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +79,62 @@ dependencies:
66
79
  - - "~>"
67
80
  - !ruby/object:Gem::Version
68
81
  version: 3.12.0
82
+ - !ruby/object:Gem::Dependency
83
+ name: cucumber
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '9.2'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '9.2'
96
+ - !ruby/object:Gem::Dependency
97
+ name: testcontainers-core
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '0.2'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.2'
110
+ - !ruby/object:Gem::Dependency
111
+ name: base64
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ - !ruby/object:Gem::Dependency
125
+ name: logger
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ type: :development
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
69
138
  - !ruby/object:Gem::Dependency
70
139
  name: standard
71
140
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +163,20 @@ dependencies:
94
163
  - - ">="
95
164
  - !ruby/object:Gem::Version
96
165
  version: '0'
166
+ - !ruby/object:Gem::Dependency
167
+ name: simplecov
168
+ requirement: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '0.22'
173
+ type: :development
174
+ prerelease: false
175
+ version_requirements: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '0.22'
97
180
  description: The flagd provider for the OpenFeature Ruby SDK
98
181
  email:
99
182
  - cncf-openfeature-contributors@lists.cncf.io
@@ -112,15 +195,16 @@ files:
112
195
  - Rakefile
113
196
  - bin/console
114
197
  - bin/setup
198
+ - cucumber.yml
115
199
  - docker/docker-compose.yml
116
200
  - docker/flags.json
201
+ - lib/flagd/evaluation/v2/evaluation_pb.rb
202
+ - lib/flagd/evaluation/v2/evaluation_services_pb.rb
203
+ - lib/flagd/sync/v1/sync_pb.rb
204
+ - lib/flagd/sync/v1/sync_services_pb.rb
117
205
  - lib/openfeature/flagd/provider.rb
118
206
  - lib/openfeature/flagd/provider/client.rb
119
207
  - lib/openfeature/flagd/provider/configuration.rb
120
- - lib/openfeature/flagd/provider/flagd/evaluation/v1/evaluation_pb.rb
121
- - lib/openfeature/flagd/provider/flagd/evaluation/v1/evaluation_services_pb.rb
122
- - lib/openfeature/flagd/provider/flagd/sync/v1/sync_pb.rb
123
- - lib/openfeature/flagd/provider/flagd/sync/v1/sync_services_pb.rb
124
208
  - lib/openfeature/flagd/provider/version.rb
125
209
  - openfeature-flagd-provider.gemspec
126
210
  homepage: https://github.com/open-feature/ruby-sdk-contrib/tree/main/providers/openfeature-flagd-provider
@@ -132,7 +216,7 @@ metadata:
132
216
  changelog_uri: https://github.com/open-feature/ruby-sdk-contrib/blob/main/providers/openfeature-flagd-provider/CHANGELOG.md
133
217
  bug_tracker_uri: https://github.com/open-feature/ruby-sdk-contrib/issues
134
218
  documentation_uri: https://github.com/open-feature/ruby-sdk-contrib/tree/main/providers/openfeature-flagd-provider/README.md
135
- post_install_message:
219
+ rubygems_mfa_required: 'true'
136
220
  rdoc_options: []
137
221
  require_paths:
138
222
  - lib
@@ -140,15 +224,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
224
  requirements:
141
225
  - - ">="
142
226
  - !ruby/object:Gem::Version
143
- version: '3.1'
227
+ version: '3.4'
144
228
  required_rubygems_version: !ruby/object:Gem::Requirement
145
229
  requirements:
146
230
  - - ">="
147
231
  - !ruby/object:Gem::Version
148
232
  version: '0'
149
233
  requirements: []
150
- rubygems_version: 3.5.22
151
- signing_key:
234
+ rubygems_version: 4.0.20
152
235
  specification_version: 4
153
236
  summary: The flagd provider for the OpenFeature Ruby SDK
154
237
  test_files: []
@@ -1,61 +0,0 @@
1
- # frozen_string_literal: true
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: flagd/evaluation/v1/evaluation.proto
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/protobuf/struct_pb'
8
-
9
-
10
- descriptor_data = "\n$flagd/evaluation/v1/evaluation.proto\x12\x13\x66lagd.evaluation.v1\x1a\x1cgoogle/protobuf/struct.proto\"F\n\x11ResolveAllRequest\x12\x31\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x07\x63ontext\"\xb6\x01\n\x12ResolveAllResponse\x12H\n\x05\x66lags\x18\x01 \x03(\x0b\x32\x32.flagd.evaluation.v1.ResolveAllResponse.FlagsEntryR\x05\x66lags\x1aV\n\nFlagsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32\x1c.flagd.evaluation.v1.AnyFlagR\x05value:\x02\x38\x01\"\xed\x01\n\x07\x41nyFlag\x12\x16\n\x06reason\x18\x01 \x01(\tR\x06reason\x12\x18\n\x07variant\x18\x02 \x01(\tR\x07variant\x12\x1f\n\nbool_value\x18\x03 \x01(\x08H\x00R\tboolValue\x12#\n\x0cstring_value\x18\x04 \x01(\tH\x00R\x0bstringValue\x12#\n\x0c\x64ouble_value\x18\x05 \x01(\x01H\x00R\x0b\x64oubleValue\x12<\n\x0cobject_value\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00R\x0bobjectValueB\x07\n\x05value\"e\n\x15ResolveBooleanRequest\x12\x19\n\x08\x66lag_key\x18\x01 \x01(\tR\x07\x66lagKey\x12\x31\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x07\x63ontext\"\x95\x01\n\x16ResolveBooleanResponse\x12\x14\n\x05value\x18\x01 \x01(\x08R\x05value\x12\x16\n\x06reason\x18\x02 \x01(\tR\x06reason\x12\x18\n\x07variant\x18\x03 \x01(\tR\x07variant\x12\x33\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"d\n\x14ResolveStringRequest\x12\x19\n\x08\x66lag_key\x18\x01 \x01(\tR\x07\x66lagKey\x12\x31\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x07\x63ontext\"\x94\x01\n\x15ResolveStringResponse\x12\x14\n\x05value\x18\x01 \x01(\tR\x05value\x12\x16\n\x06reason\x18\x02 \x01(\tR\x06reason\x12\x18\n\x07variant\x18\x03 \x01(\tR\x07variant\x12\x33\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"c\n\x13ResolveFloatRequest\x12\x19\n\x08\x66lag_key\x18\x01 \x01(\tR\x07\x66lagKey\x12\x31\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x07\x63ontext\"\x93\x01\n\x14ResolveFloatResponse\x12\x14\n\x05value\x18\x01 \x01(\x01R\x05value\x12\x16\n\x06reason\x18\x02 \x01(\tR\x06reason\x12\x18\n\x07variant\x18\x03 \x01(\tR\x07variant\x12\x33\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"a\n\x11ResolveIntRequest\x12\x19\n\x08\x66lag_key\x18\x01 \x01(\tR\x07\x66lagKey\x12\x31\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x07\x63ontext\"\x91\x01\n\x12ResolveIntResponse\x12\x14\n\x05value\x18\x01 \x01(\x03R\x05value\x12\x16\n\x06reason\x18\x02 \x01(\tR\x06reason\x12\x18\n\x07variant\x18\x03 \x01(\tR\x07variant\x12\x33\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"d\n\x14ResolveObjectRequest\x12\x19\n\x08\x66lag_key\x18\x01 \x01(\tR\x07\x66lagKey\x12\x31\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x07\x63ontext\"\xad\x01\n\x15ResolveObjectResponse\x12-\n\x05value\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x05value\x12\x16\n\x06reason\x18\x02 \x01(\tR\x06reason\x12\x18\n\x07variant\x18\x03 \x01(\tR\x07variant\x12\x33\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"V\n\x13\x45ventStreamResponse\x12\x12\n\x04type\x18\x01 \x01(\tR\x04type\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x04\x64\x61ta\"\x14\n\x12\x45ventStreamRequest2\xd9\x05\n\x07Service\x12_\n\nResolveAll\x12&.flagd.evaluation.v1.ResolveAllRequest\x1a\'.flagd.evaluation.v1.ResolveAllResponse\"\x00\x12k\n\x0eResolveBoolean\x12*.flagd.evaluation.v1.ResolveBooleanRequest\x1a+.flagd.evaluation.v1.ResolveBooleanResponse\"\x00\x12h\n\rResolveString\x12).flagd.evaluation.v1.ResolveStringRequest\x1a*.flagd.evaluation.v1.ResolveStringResponse\"\x00\x12\x65\n\x0cResolveFloat\x12(.flagd.evaluation.v1.ResolveFloatRequest\x1a).flagd.evaluation.v1.ResolveFloatResponse\"\x00\x12_\n\nResolveInt\x12&.flagd.evaluation.v1.ResolveIntRequest\x1a\'.flagd.evaluation.v1.ResolveIntResponse\"\x00\x12h\n\rResolveObject\x12).flagd.evaluation.v1.ResolveObjectRequest\x1a*.flagd.evaluation.v1.ResolveObjectResponse\"\x00\x12\x64\n\x0b\x45ventStream\x12\'.flagd.evaluation.v1.EventStreamRequest\x1a(.flagd.evaluation.v1.EventStreamResponse\"\x00\x30\x01\x42\xc6\x01\n%dev.openfeature.flagd.grpc.evaluationZ\x13\x66lagd/evaluation/v1\xaa\x02!OpenFeature.Flagd.Grpc.Evaluation\xca\x02\x32OpenFeature\\Providers\\Flagd\\Schema\\Grpc\\Evaluation\xea\x02.OpenFeature::Flagd::Provider::Grpc::Evaluationb\x06proto3"
11
-
12
- pool = Google::Protobuf::DescriptorPool.generated_pool
13
-
14
- begin
15
- pool.add_serialized_file(descriptor_data)
16
- rescue TypeError => e
17
- # Compatibility code: will be removed in the next major version.
18
- require 'google/protobuf/descriptor_pb'
19
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
- parsed.clear_dependency
21
- serialized = parsed.class.encode(parsed)
22
- file = pool.add_serialized_file(serialized)
23
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
- imports = [
25
- ["google.protobuf.Struct", "google/protobuf/struct.proto"],
26
- ]
27
- imports.each do |type_name, expected_filename|
28
- import_file = pool.lookup(type_name).file_descriptor
29
- if import_file.name != expected_filename
30
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
- end
32
- end
33
- warn "Each proto file must use a consistent fully-qualified name."
34
- warn "This will become an error in the next major version."
35
- end
36
-
37
- module OpenFeature
38
- module Flagd
39
- module Provider
40
- module Grpc
41
- module Evaluation
42
- ResolveAllRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveAllRequest").msgclass
43
- ResolveAllResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveAllResponse").msgclass
44
- AnyFlag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.AnyFlag").msgclass
45
- ResolveBooleanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveBooleanRequest").msgclass
46
- ResolveBooleanResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveBooleanResponse").msgclass
47
- ResolveStringRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveStringRequest").msgclass
48
- ResolveStringResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveStringResponse").msgclass
49
- ResolveFloatRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveFloatRequest").msgclass
50
- ResolveFloatResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveFloatResponse").msgclass
51
- ResolveIntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveIntRequest").msgclass
52
- ResolveIntResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveIntResponse").msgclass
53
- ResolveObjectRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveObjectRequest").msgclass
54
- ResolveObjectResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.ResolveObjectResponse").msgclass
55
- EventStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.EventStreamResponse").msgclass
56
- EventStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.evaluation.v1.EventStreamRequest").msgclass
57
- end
58
- end
59
- end
60
- end
61
- end
@@ -1,44 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: flagd/evaluation/v1/evaluation.proto for package 'OpenFeature.Flagd.Provider.Grpc.Evaluation'
3
- # Original file comments:
4
- # *
5
- # Flag evaluation API
6
- #
7
- # This proto forms the basis of a flag-evaluation API.
8
- # It supports single and bulk evaluation RPCs, and flags of various types, as well as establishing a stream for getting notifications about changes in a flag definition.
9
- # It supports the inclusion of a "context" with each evaluation, which may contain arbitrary attributes relevant to flag evaluation.
10
-
11
- require 'grpc'
12
- require_relative 'evaluation_pb'
13
-
14
- module OpenFeature
15
- module Flagd
16
- module Provider
17
- module Grpc
18
- module Evaluation
19
- module Service
20
- # Service defines the exposed rpcs of flagd
21
- class Service
22
-
23
- include ::GRPC::GenericService
24
-
25
- self.marshal_class_method = :encode
26
- self.unmarshal_class_method = :decode
27
- self.service_name = 'flagd.evaluation.v1.Service'
28
-
29
- rpc :ResolveAll, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveAllRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveAllResponse
30
- rpc :ResolveBoolean, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveBooleanRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveBooleanResponse
31
- rpc :ResolveString, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveStringRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveStringResponse
32
- rpc :ResolveFloat, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveFloatRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveFloatResponse
33
- rpc :ResolveInt, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveIntRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveIntResponse
34
- rpc :ResolveObject, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveObjectRequest, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::ResolveObjectResponse
35
- rpc :EventStream, ::OpenFeature::Flagd::Provider::Grpc::Evaluation::EventStreamRequest, stream(::OpenFeature::Flagd::Provider::Grpc::Evaluation::EventStreamResponse)
36
- end
37
-
38
- Stub = Service.rpc_stub_class
39
- end
40
- end
41
- end
42
- end
43
- end
44
- end
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: flagd/sync/v1/sync.proto
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/protobuf/struct_pb'
8
-
9
-
10
- descriptor_data = "\n\x18\x66lagd/sync/v1/sync.proto\x12\rflagd.sync.v1\x1a\x1cgoogle/protobuf/struct.proto\"O\n\x10SyncFlagsRequest\x12\x1f\n\x0bprovider_id\x18\x01 \x01(\tR\nproviderId\x12\x1a\n\x08selector\x18\x02 \x01(\tR\x08selector\"B\n\x11SyncFlagsResponse\x12-\n\x12\x66lag_configuration\x18\x01 \x01(\tR\x11\x66lagConfiguration\"S\n\x14\x46\x65tchAllFlagsRequest\x12\x1f\n\x0bprovider_id\x18\x01 \x01(\tR\nproviderId\x12\x1a\n\x08selector\x18\x02 \x01(\tR\x08selector\"F\n\x15\x46\x65tchAllFlagsResponse\x12-\n\x12\x66lag_configuration\x18\x01 \x01(\tR\x11\x66lagConfiguration\"\x14\n\x12GetMetadataRequest\"P\n\x13GetMetadataResponse\x12\x33\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadataJ\x04\x08\x01\x10\x02\x32\x9b\x02\n\x0f\x46lagSyncService\x12R\n\tSyncFlags\x12\x1f.flagd.sync.v1.SyncFlagsRequest\x1a .flagd.sync.v1.SyncFlagsResponse\"\x00\x30\x01\x12\\\n\rFetchAllFlags\x12#.flagd.sync.v1.FetchAllFlagsRequest\x1a$.flagd.sync.v1.FetchAllFlagsResponse\"\x00\x12V\n\x0bGetMetadata\x12!.flagd.sync.v1.GetMetadataRequest\x1a\".flagd.sync.v1.GetMetadataResponse\"\x00\x42\xa8\x01\n\x1f\x64\x65v.openfeature.flagd.grpc.syncZ\rflagd/sync/v1\xaa\x02\x1bOpenFeature.Flagd.Grpc.Sync\xca\x02,OpenFeature\\Providers\\Flagd\\Schema\\Grpc\\Sync\xea\x02(OpenFeature::Flagd::Provider::Grpc::Syncb\x06proto3"
11
-
12
- pool = Google::Protobuf::DescriptorPool.generated_pool
13
-
14
- begin
15
- pool.add_serialized_file(descriptor_data)
16
- rescue TypeError => e
17
- # Compatibility code: will be removed in the next major version.
18
- require 'google/protobuf/descriptor_pb'
19
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
- parsed.clear_dependency
21
- serialized = parsed.class.encode(parsed)
22
- file = pool.add_serialized_file(serialized)
23
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
- imports = [
25
- ["google.protobuf.Struct", "google/protobuf/struct.proto"],
26
- ]
27
- imports.each do |type_name, expected_filename|
28
- import_file = pool.lookup(type_name).file_descriptor
29
- if import_file.name != expected_filename
30
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
- end
32
- end
33
- warn "Each proto file must use a consistent fully-qualified name."
34
- warn "This will become an error in the next major version."
35
- end
36
-
37
- module OpenFeature
38
- module Flagd
39
- module Provider
40
- module Grpc
41
- module Sync
42
- SyncFlagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.SyncFlagsRequest").msgclass
43
- SyncFlagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.SyncFlagsResponse").msgclass
44
- FetchAllFlagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.FetchAllFlagsRequest").msgclass
45
- FetchAllFlagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.FetchAllFlagsResponse").msgclass
46
- GetMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.GetMetadataRequest").msgclass
47
- GetMetadataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flagd.sync.v1.GetMetadataResponse").msgclass
48
- end
49
- end
50
- end
51
- end
52
- end