quonfig 0.0.10 → 0.0.12

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 (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +94 -0
  4. data/lib/quonfig/caching_http_connection.rb +3 -3
  5. data/lib/quonfig/client.rb +22 -27
  6. data/lib/quonfig/config_loader.rb +5 -1
  7. data/lib/quonfig/config_store.rb +10 -6
  8. data/lib/quonfig/context.rb +5 -4
  9. data/lib/quonfig/datadir.rb +4 -10
  10. data/lib/quonfig/dev_context.rb +4 -2
  11. data/lib/quonfig/duration.rb +2 -2
  12. data/lib/quonfig/encryption.rb +12 -16
  13. data/lib/quonfig/errors/invalid_environment_error.rb +1 -3
  14. data/lib/quonfig/errors/invalid_sdk_key_error.rb +6 -7
  15. data/lib/quonfig/errors/missing_env_var_error.rb +0 -3
  16. data/lib/quonfig/errors/missing_environment_error.rb +1 -1
  17. data/lib/quonfig/errors/uninitialized_error.rb +1 -1
  18. data/lib/quonfig/evaluation.rb +11 -8
  19. data/lib/quonfig/evaluator.rb +34 -37
  20. data/lib/quonfig/fixed_size_hash.rb +1 -0
  21. data/lib/quonfig/http_connection.rb +2 -4
  22. data/lib/quonfig/internal_logger.rb +63 -27
  23. data/lib/quonfig/murmer3.rb +2 -2
  24. data/lib/quonfig/options.rb +62 -75
  25. data/lib/quonfig/periodic_sync.rb +1 -1
  26. data/lib/quonfig/quonfig.rb +3 -3
  27. data/lib/quonfig/reason.rb +2 -1
  28. data/lib/quonfig/resolver.rb +8 -9
  29. data/lib/quonfig/semantic_logger_filter.rb +4 -3
  30. data/lib/quonfig/semver.rb +6 -8
  31. data/lib/quonfig/sse_config_client.rb +14 -15
  32. data/lib/quonfig/stdlib_formatter.rb +3 -3
  33. data/lib/quonfig/telemetry/context_shape_aggregator.rb +2 -3
  34. data/lib/quonfig/telemetry/example_contexts_aggregator.rb +1 -1
  35. data/lib/quonfig/telemetry/telemetry_reporter.rb +1 -0
  36. data/lib/quonfig/time_helpers.rb +2 -0
  37. data/lib/quonfig/version.rb +5 -0
  38. data/lib/quonfig.rb +2 -1
  39. data/quonfig.gemspec +29 -165
  40. metadata +24 -193
  41. data/.claude/rules/constitution.md +0 -81
  42. data/.claude/rules/git-safety.md +0 -11
  43. data/.claude/rules/issue-tracking.md +0 -13
  44. data/.claude/rules/testing-workflow.md +0 -28
  45. data/.envrc.sample +0 -3
  46. data/.github/CODEOWNERS +0 -2
  47. data/.github/pull_request_template.md +0 -8
  48. data/.github/workflows/release.yml +0 -49
  49. data/.github/workflows/ruby.yml +0 -60
  50. data/.github/workflows/test.yaml +0 -40
  51. data/.rubocop.yml +0 -13
  52. data/.tool-versions +0 -1
  53. data/CLAUDE.md +0 -29
  54. data/CODEOWNERS +0 -1
  55. data/Gemfile +0 -26
  56. data/Gemfile.lock +0 -177
  57. data/Rakefile +0 -64
  58. data/VERSION +0 -1
  59. data/dev/allocation_stats +0 -60
  60. data/dev/benchmark +0 -40
  61. data/dev/console +0 -12
  62. data/dev/script_setup.rb +0 -18
  63. data/test/fixtures/datafile.json +0 -87
  64. data/test/integration/test_context_precedence.rb +0 -112
  65. data/test/integration/test_datadir_environment.rb +0 -54
  66. data/test/integration/test_dev_overrides.rb +0 -40
  67. data/test/integration/test_enabled.rb +0 -478
  68. data/test/integration/test_enabled_with_contexts.rb +0 -64
  69. data/test/integration/test_get.rb +0 -136
  70. data/test/integration/test_get_feature_flag.rb +0 -28
  71. data/test/integration/test_get_or_raise.rb +0 -60
  72. data/test/integration/test_get_weighted_values.rb +0 -34
  73. data/test/integration/test_helpers.rb +0 -667
  74. data/test/integration/test_helpers_test.rb +0 -73
  75. data/test/integration/test_post.rb +0 -44
  76. data/test/integration/test_telemetry.rb +0 -170
  77. data/test/support/common_helpers.rb +0 -106
  78. data/test/support/mock_base_client.rb +0 -27
  79. data/test/support/mock_config_loader.rb +0 -1
  80. data/test/test_bound_client.rb +0 -109
  81. data/test/test_caching_http_connection.rb +0 -218
  82. data/test/test_client.rb +0 -255
  83. data/test/test_client_network_mode.rb +0 -136
  84. data/test/test_client_telemetry.rb +0 -175
  85. data/test/test_config_loader.rb +0 -70
  86. data/test/test_context.rb +0 -139
  87. data/test/test_context_shape.rb +0 -37
  88. data/test/test_context_shape_aggregator.rb +0 -126
  89. data/test/test_datadir.rb +0 -203
  90. data/test/test_details_getters.rb +0 -242
  91. data/test/test_dev_context.rb +0 -163
  92. data/test/test_duration.rb +0 -37
  93. data/test/test_encryption.rb +0 -16
  94. data/test/test_evaluation_summaries_aggregator.rb +0 -180
  95. data/test/test_evaluator.rb +0 -285
  96. data/test/test_example_contexts_aggregator.rb +0 -119
  97. data/test/test_exponential_backoff.rb +0 -44
  98. data/test/test_fixed_size_hash.rb +0 -119
  99. data/test/test_helper.rb +0 -17
  100. data/test/test_http_connection.rb +0 -81
  101. data/test/test_internal_logger.rb +0 -34
  102. data/test/test_options.rb +0 -198
  103. data/test/test_rate_limit_cache.rb +0 -44
  104. data/test/test_reason.rb +0 -79
  105. data/test/test_rename.rb +0 -65
  106. data/test/test_resolver.rb +0 -291
  107. data/test/test_semantic_logger_filter.rb +0 -144
  108. data/test/test_semver.rb +0 -108
  109. data/test/test_should_log.rb +0 -186
  110. data/test/test_sse_config_client.rb +0 -297
  111. data/test/test_stdlib_formatter.rb +0 -195
  112. data/test/test_telemetry_reporter.rb +0 -209
  113. data/test/test_typed_getters.rb +0 -131
  114. data/test/test_types.rb +0 -141
  115. data/test/test_weighted_value_resolver.rb +0 -84
metadata CHANGED
@@ -1,77 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quonfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dwyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-01 00:00:00.000000000 Z
11
+ date: 2026-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: concurrent-ruby
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 1.0.5
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '1.0'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 1.0.5
33
- - !ruby/object:Gem::Dependency
34
- name: faraday
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0'
40
- type: :runtime
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: '0'
47
- - !ruby/object:Gem::Dependency
48
- name: ld-eventsource
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- - !ruby/object:Gem::Dependency
62
- name: uuid
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: '0'
68
- type: :runtime
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: '0'
75
13
  - !ruby/object:Gem::Dependency
76
14
  name: activesupport
77
15
  requirement: !ruby/object:Gem::Requirement
@@ -87,89 +25,53 @@ dependencies:
87
25
  - !ruby/object:Gem::Version
88
26
  version: '4'
89
27
  - !ruby/object:Gem::Dependency
90
- name: allocation_stats
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: '0'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
- - !ruby/object:Gem::Dependency
104
- name: benchmark-ips
28
+ name: concurrent-ruby
105
29
  requirement: !ruby/object:Gem::Requirement
106
30
  requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - ">="
31
+ - - "~>"
115
32
  - !ruby/object:Gem::Version
116
- version: '0'
117
- - !ruby/object:Gem::Dependency
118
- name: bundler
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
33
+ version: '1.0'
121
34
  - - ">="
122
35
  - !ruby/object:Gem::Version
123
- version: '0'
124
- type: :development
36
+ version: 1.0.5
37
+ type: :runtime
125
38
  prerelease: false
126
39
  version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - ">="
129
- - !ruby/object:Gem::Version
130
- version: '0'
131
- - !ruby/object:Gem::Dependency
132
- name: juwelier
133
- requirement: !ruby/object:Gem::Requirement
134
40
  requirements:
135
41
  - - "~>"
136
42
  - !ruby/object:Gem::Version
137
- version: 2.4.9
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
43
+ version: '1.0'
44
+ - - ">="
143
45
  - !ruby/object:Gem::Version
144
- version: 2.4.9
46
+ version: 1.0.5
145
47
  - !ruby/object:Gem::Dependency
146
- name: rdoc
48
+ name: faraday
147
49
  requirement: !ruby/object:Gem::Requirement
148
50
  requirements:
149
51
  - - ">="
150
52
  - !ruby/object:Gem::Version
151
- version: '0'
152
- type: :development
53
+ version: '1.0'
54
+ type: :runtime
153
55
  prerelease: false
154
56
  version_requirements: !ruby/object:Gem::Requirement
155
57
  requirements:
156
58
  - - ">="
157
59
  - !ruby/object:Gem::Version
158
- version: '0'
60
+ version: '1.0'
159
61
  - !ruby/object:Gem::Dependency
160
- name: simplecov
62
+ name: ld-eventsource
161
63
  requirement: !ruby/object:Gem::Requirement
162
64
  requirements:
163
65
  - - ">="
164
66
  - !ruby/object:Gem::Version
165
- version: '0'
166
- type: :development
67
+ version: '2.0'
68
+ type: :runtime
167
69
  prerelease: false
168
70
  version_requirements: !ruby/object:Gem::Requirement
169
71
  requirements:
170
72
  - - ">="
171
73
  - !ruby/object:Gem::Version
172
- version: '0'
74
+ version: '2.0'
173
75
  description: Quonfig — feature flags and live config, stored as files in git.
174
76
  email: jeff@quonfig.com
175
77
  executables: []
@@ -179,31 +81,9 @@ extra_rdoc_files:
179
81
  - LICENSE.txt
180
82
  - README.md
181
83
  files:
182
- - ".claude/rules/constitution.md"
183
- - ".claude/rules/git-safety.md"
184
- - ".claude/rules/issue-tracking.md"
185
- - ".claude/rules/testing-workflow.md"
186
- - ".envrc.sample"
187
- - ".github/CODEOWNERS"
188
- - ".github/pull_request_template.md"
189
- - ".github/workflows/release.yml"
190
- - ".github/workflows/ruby.yml"
191
- - ".github/workflows/test.yaml"
192
- - ".rubocop.yml"
193
- - ".tool-versions"
194
84
  - CHANGELOG.md
195
- - CLAUDE.md
196
- - CODEOWNERS
197
- - Gemfile
198
- - Gemfile.lock
199
85
  - LICENSE.txt
200
86
  - README.md
201
- - Rakefile
202
- - VERSION
203
- - dev/allocation_stats
204
- - dev/benchmark
205
- - dev/console
206
- - dev/script_setup.rb
207
87
  - lib/quonfig.rb
208
88
  - lib/quonfig/bound_client.rb
209
89
  - lib/quonfig/caching_http_connection.rb
@@ -252,65 +132,16 @@ files:
252
132
  - lib/quonfig/telemetry/telemetry_reporter.rb
253
133
  - lib/quonfig/time_helpers.rb
254
134
  - lib/quonfig/types.rb
135
+ - lib/quonfig/version.rb
255
136
  - lib/quonfig/weighted_value_resolver.rb
256
137
  - quonfig.gemspec
257
- - test/fixtures/datafile.json
258
- - test/integration/test_context_precedence.rb
259
- - test/integration/test_datadir_environment.rb
260
- - test/integration/test_dev_overrides.rb
261
- - test/integration/test_enabled.rb
262
- - test/integration/test_enabled_with_contexts.rb
263
- - test/integration/test_get.rb
264
- - test/integration/test_get_feature_flag.rb
265
- - test/integration/test_get_or_raise.rb
266
- - test/integration/test_get_weighted_values.rb
267
- - test/integration/test_helpers.rb
268
- - test/integration/test_helpers_test.rb
269
- - test/integration/test_post.rb
270
- - test/integration/test_telemetry.rb
271
- - test/support/common_helpers.rb
272
- - test/support/mock_base_client.rb
273
- - test/support/mock_config_loader.rb
274
- - test/test_bound_client.rb
275
- - test/test_caching_http_connection.rb
276
- - test/test_client.rb
277
- - test/test_client_network_mode.rb
278
- - test/test_client_telemetry.rb
279
- - test/test_config_loader.rb
280
- - test/test_context.rb
281
- - test/test_context_shape.rb
282
- - test/test_context_shape_aggregator.rb
283
- - test/test_datadir.rb
284
- - test/test_details_getters.rb
285
- - test/test_dev_context.rb
286
- - test/test_duration.rb
287
- - test/test_encryption.rb
288
- - test/test_evaluation_summaries_aggregator.rb
289
- - test/test_evaluator.rb
290
- - test/test_example_contexts_aggregator.rb
291
- - test/test_exponential_backoff.rb
292
- - test/test_fixed_size_hash.rb
293
- - test/test_helper.rb
294
- - test/test_http_connection.rb
295
- - test/test_internal_logger.rb
296
- - test/test_options.rb
297
- - test/test_rate_limit_cache.rb
298
- - test/test_reason.rb
299
- - test/test_rename.rb
300
- - test/test_resolver.rb
301
- - test/test_semantic_logger_filter.rb
302
- - test/test_semver.rb
303
- - test/test_should_log.rb
304
- - test/test_sse_config_client.rb
305
- - test/test_stdlib_formatter.rb
306
- - test/test_telemetry_reporter.rb
307
- - test/test_typed_getters.rb
308
- - test/test_types.rb
309
- - test/test_weighted_value_resolver.rb
310
138
  homepage: https://github.com/quonfig/sdk-ruby
311
139
  licenses:
312
140
  - MIT
313
- metadata: {}
141
+ metadata:
142
+ source_code_uri: https://github.com/quonfig/sdk-ruby
143
+ changelog_uri: https://github.com/quonfig/sdk-ruby/blob/main/CHANGELOG.md
144
+ rubygems_mfa_required: 'true'
314
145
  post_install_message:
315
146
  rdoc_options: []
316
147
  require_paths:
@@ -319,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
319
150
  requirements:
320
151
  - - ">="
321
152
  - !ruby/object:Gem::Version
322
- version: '0'
153
+ version: '3.0'
323
154
  required_rubygems_version: !ruby/object:Gem::Requirement
324
155
  requirements:
325
156
  - - ">="
@@ -1,81 +0,0 @@
1
- ---
2
- name: constitution
3
- description: Rules for when agents must stop for human review vs. proceed autonomously. Read before committing significant changes or when uncertain about scope.
4
- ---
5
-
6
- # Agent Constitution
7
-
8
- Default rule: **when in doubt, block for human review**. A false positive costs 30 seconds. A false negative can cause real damage.
9
-
10
- Human-review blocks use the built-in `blocked` status plus the `needs-human` label (bd's custom-status format doesn't accept `blocked:human`). Do NOT call `bd close` on a bead that needs human input — closed beads are invisible to the human review queue.
11
-
12
- ## Auto-Proceed (no human needed)
13
-
14
- - Bug fixes with passing tests
15
- - UI copy, labels, and styling changes
16
- - Test coverage additions
17
- - Refactoring within a single file that doesn't change public interfaces
18
- - Docs and comment updates
19
- - Simulation-discovered bugs with a clear root cause and fix
20
- - Patch-version dependency bumps
21
- - Adding new flags/configs to `our-config/` (no schema change)
22
- - **Data-only edits** to existing configs in `our-config/` — flipping a boolean, editing a value, renaming a label. Changing *what* is stored is a data change; changing *how* it's stored is a schema change.
23
- - Staging deployments (`fly.staging.toml`)
24
-
25
- ## Stop and Ask (blocked + needs-human)
26
-
27
- **Push as far as you can before blocking.** The goal is to surface a specific,
28
- answerable question — not to stop at the first sign of uncertainty. Investigate the
29
- codebase, try the obvious path, and block only when you hit a concrete fork that
30
- requires a human judgment call. An agent that does real work and then blocks with a
31
- precise question is far more valuable than one that blocks immediately.
32
-
33
- Block when you reach a decision point that touches:
34
-
35
- - **Storage format** — git repo structure, JSON config schema, Gitea config
36
- - **SDK-facing API surface** — anything SDK clients call: `api-delivery` endpoints, SSE protocol, SDK public interfaces
37
- - **Cache or delivery protocol** — how configs are loaded, evicted, or streamed
38
- - **Auth and access control** — workspace permissions, API keys, OAuth flows
39
- - **New external dependencies** — adding a package to package.json, go.mod, etc.
40
- - **Database schema changes** — Drizzle migrations, ClickHouse schema
41
- - **Multi-service contract changes** — modifying interfaces shared between two or more services
42
- - **High uncertainty** — you've investigated and the right approach still isn't clear
43
-
44
- When blocking, be specific: explain exactly what decision is needed, what you've
45
- already ruled out, and what the options are. Vague blocks ("not sure how to proceed")
46
- are not acceptable — do more investigation first.
47
-
48
- ```bash
49
- bd update <id> --status blocked --add-label needs-human
50
- bd comments add <id> "Blocked: [what the decision is, what you investigated, what the options are]"
51
- ```
52
-
53
- To see the human-review queue: `bd list --label needs-human`. Do NOT call `bd close` on these — the label is what surfaces them.
54
-
55
- ## Never Touch Without Explicit Instruction
56
-
57
- - Credentials, secrets, `.env` files with real values
58
- - Live production data or the Gitea service token
59
- - Anything in `business/`
60
- - Production fly deployments (`fly.toml` or `fly.production.toml`, not `fly.staging.toml`)
61
- - The `.beads/` database directly (always use `bd` CLI)
62
-
63
- ## Alpha Phase Rules
64
-
65
- In alpha it is acceptable to:
66
- - Deploy to staging without asking
67
- - Commit directly to main in sub-repos
68
- - Run simulated user tests against the local dev server
69
- - File new beads for bugs found during simulation
70
-
71
- It is NOT acceptable to:
72
- - Deploy to production without asking
73
- - Modify `integration-test-data/` YAML without asking
74
- - Merge breaking changes to SDK public APIs without asking
75
-
76
- ## Daily Digest
77
-
78
- Append to `digests/YYYY-MM-DD.md` after each completed task:
79
- - What was done and what tests passed
80
- - What is blocked and why
81
- - Any bugs filed by the simulate stage
@@ -1,11 +0,0 @@
1
- ---
2
- description: Git safety rules applied to all projects in the monorepo
3
- globs: ["**"]
4
- ---
5
-
6
- IMPORTANT: Never force push (`--force` or `--force-with-lease`) to any branch.
7
- IMPORTANT: Never delete branches without explicit user approval.
8
- IMPORTANT: Never run `git reset --hard` or `git clean` without explaining what will be lost and getting confirmation first.
9
- IMPORTANT: Always commit work-in-progress before any context switch so nothing is lost.
10
- IMPORTANT: Keep commits small and well-scoped so anything can be easily reverted.
11
- IMPORTANT: If git blocks an operation, stop and ask — don't force past it.
@@ -1,13 +0,0 @@
1
- ---
2
- description: Issue tracking with beads (bd) for all projects
3
- globs: ["**"]
4
- ---
5
-
6
- IMPORTANT: Do not use Linear for issue tracking. Use beads (`bd`) instead.
7
-
8
- Quick reference:
9
- - `bd ready` — find available work
10
- - `bd show <id>` — view issue details
11
- - `bd update <id> --status in_progress` — claim work
12
- - `bd close <id>` — complete work
13
- - `bd sync` — sync with git
@@ -1,28 +0,0 @@
1
- ---
2
- description: Testing workflow rules for all code projects
3
- globs: ["app-quonfig/**", "www-quonfig/**", "ai-starter/**", "api-telemetry/**", "api-delivery/**", "sdk-node/**", "sdk-go/**"]
4
- ---
5
-
6
- IMPORTANT: Default to TDD — write the failing test first, run it and confirm it fails (red), then implement until it passes (green). The red→green sequence is the cheapest check that the test is real and that the change actually worked. Paste both the failing and passing output as evidence.
7
-
8
- IMPORTANT: The goal is **verification**, not test volume. If a change genuinely isn't red/green testable in code (UI polish, infra glue, config-only changes, anything where the test rig would be more complex than the fix), pick one:
9
- 1. **Simulated verification** — drive the real flow (browser automation, live HTTP call, dev server) and paste the evidence it worked.
10
- 2. **Block for human** — `bd update <id> --status blocked --add-label needs-human` with a comment explaining what you tried and why verification needs human hands. Do NOT `bd close` — that hides the bead from the human queue.
11
-
12
- Never ship with zero verification. Don't build elaborate test scaffolding when the change doesn't warrant it — the form can flex, the evidence cannot.
13
-
14
- IMPORTANT: Run the relevant test suite before marking a task complete (the file or package you touched, not necessarily the whole repo).
15
-
16
- ## Browser / Chrome DevTools testing (app-quonfig)
17
-
18
- When any task requires browser testing in app-quonfig, ALWAYS read these skills first:
19
- - `/user-test-login` — `.claude/skills/user-test-login/SKILL.md`
20
- - `/user-create-test` — `.claude/skills/user-create-test/SKILL.md`
21
-
22
- Key points so you don't go off-script:
23
- - Test accounts live in `app-quonfig/.dev/test-users.json` (gitignored, alias-keyed)
24
- - The dev-agent login route (`POST /api/dev/login-as`) is the preferred way to sign in headlessly — requires `DEV_AGENT_LOGIN=true` in `.env`
25
- - Use `isolatedContext` in Chrome MCP when you need a clean session that doesn't share cookies
26
- - Avoid `@example.com` emails — that domain triggers SSO via the Test Organization
27
- - Verification codes for new sign-ups come from the WorkOS Events API (see `/user-create-test` for the node snippet)
28
- - If a test requires a user with a specific state (e.g. pending invite, no org), create a fresh account with `/user-create-test` rather than reusing an existing one
data/.envrc.sample DELETED
@@ -1,3 +0,0 @@
1
- export AWS_ACCESS_KEY_ID=
2
- export AWS_SECRET_ACCESS_KEY=
3
- export PREFAB_INTEGRATION_TEST_API_KEY=
data/.github/CODEOWNERS DELETED
@@ -1,2 +0,0 @@
1
- # All changes require review from prefabdevs team
2
- * @prefab-cloud/prefabdevs
@@ -1,8 +0,0 @@
1
- ## Description
2
- *(Brief overview of what this PR changes and/or why the changes are needed)*
3
-
4
- ## Testing & Validation
5
- *(Outline the steps needed to be taken to verify the changes.)*
6
-
7
- ## Rollout
8
- *(Optional section: Provide rollout and rollback procedures, when outside the bounds or requiring additional work beyond standard deployment)*
@@ -1,49 +0,0 @@
1
- ---
2
- name: Push gem
3
-
4
- "on":
5
- workflow_run:
6
- workflows: ["Ruby"]
7
- branches: [main]
8
- types:
9
- - completed
10
-
11
- jobs:
12
- push:
13
- runs-on: ubuntu-latest
14
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
15
-
16
- permissions:
17
- contents: write
18
- id-token: write
19
-
20
- steps:
21
- - uses: actions/checkout@v4
22
- with:
23
- persist-credentials: false
24
- submodules: recursive
25
-
26
- - name: Set up Ruby
27
- uses: ruby/setup-ruby@v1
28
- with:
29
- bundler-cache: false
30
- ruby-version: '3.3'
31
-
32
- - name: Install runtime dependencies
33
- run: bundle install --without development --jobs 4 --retry 3
34
-
35
- - name: Check if version already exists
36
- id: version-check
37
- run: |
38
- VERSION=$(cat VERSION)
39
- if gem list -r quonfig | grep -q "quonfig ($VERSION)"; then
40
- echo "version-exists=true" >> $GITHUB_OUTPUT
41
- echo "Version $VERSION already exists on RubyGems, skipping publish"
42
- else
43
- echo "version-exists=false" >> $GITHUB_OUTPUT
44
- echo "Version $VERSION not found, proceeding with publish"
45
- fi
46
-
47
- - name: Release gem
48
- if: steps.version-check.outputs.version-exists == 'false'
49
- uses: rubygems/release-gem@v1
@@ -1,60 +0,0 @@
1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
- # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
-
8
- name: Ruby
9
-
10
- on:
11
- push:
12
- branches: [ "main" ]
13
- pull_request:
14
- branches: [ "main" ]
15
-
16
- permissions:
17
- contents: read
18
-
19
- jobs:
20
- test:
21
-
22
- runs-on: ubuntu-latest
23
- strategy:
24
- fail-fast: false
25
- matrix:
26
- ruby-version: ['3.2','3.3','3.4']
27
-
28
- steps:
29
- - name: Checkout sdk-ruby
30
- uses: actions/checkout@v4
31
- with:
32
- submodules: recursive
33
- path: sdk-ruby
34
-
35
- - name: Checkout integration-test-data
36
- uses: actions/checkout@v4
37
- with:
38
- repository: quonfig/integration-test-data
39
- path: integration-test-data
40
- ref: main
41
-
42
- - name: Set up Ruby
43
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
44
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
45
- # uses: ruby/setup-ruby@v1
46
- # uses: ruby/setup-ruby@2b019609e2b0f1ea1a2bc8ca11cb82ab46ada124
47
- uses: ruby/setup-ruby@v1
48
- with:
49
- ruby-version: ${{ matrix.ruby-version }}
50
- bundler-cache: false # runs 'bundle install' and caches installed gems automatically
51
- working-directory: sdk-ruby
52
- - name: Install dependencies
53
- working-directory: sdk-ruby
54
- run: bundle install --without development --jobs 4 --retry 3
55
- - name: Run tests
56
- working-directory: sdk-ruby
57
- run: bundle exec rake --trace
58
- env:
59
- NOT_A_NUMBER: "abcd"
60
- IS_A_NUMBER: "1234"
@@ -1,40 +0,0 @@
1
- name: Test
2
- on:
3
- push:
4
- branches: [main]
5
- pull_request:
6
-
7
- jobs:
8
- test:
9
- runs-on: ubuntu-latest
10
- strategy:
11
- fail-fast: false
12
- matrix:
13
- ruby-version: ['3.1', '3.2', '3.3']
14
- steps:
15
- - name: Checkout sdk-ruby
16
- uses: actions/checkout@v4
17
- with:
18
- path: sdk-ruby
19
-
20
- - name: Checkout integration-test-data
21
- uses: actions/checkout@v4
22
- with:
23
- repository: quonfig/integration-test-data
24
- path: integration-test-data
25
- ref: main
26
-
27
- - name: Set up Ruby ${{ matrix.ruby-version }}
28
- uses: ruby/setup-ruby@v1
29
- with:
30
- ruby-version: ${{ matrix.ruby-version }}
31
- bundler-cache: true
32
- working-directory: sdk-ruby
33
-
34
- - name: Install dependencies
35
- working-directory: sdk-ruby
36
- run: bundle install
37
-
38
- - name: Run tests
39
- working-directory: sdk-ruby
40
- run: bundle exec rake test
data/.rubocop.yml DELETED
@@ -1,13 +0,0 @@
1
- AllCops:
2
- NewCops: enable
3
- Exclude:
4
- - sdk-reforge.gemspec
5
- - lib/prefab_pb.rb
6
-
7
- Metrics:
8
- Exclude:
9
- - 'test/*.rb'
10
-
11
- Layout/LineLength:
12
- Exclude:
13
- - 'test/*.rb'
data/.tool-versions DELETED
@@ -1 +0,0 @@
1
- ruby 3.2.7
data/CLAUDE.md DELETED
@@ -1,29 +0,0 @@
1
- # Quonfig Ruby SDK
2
-
3
- Ruby SDK for Quonfig feature flags and configuration.
4
-
5
- ## Build & Test
6
-
7
- ```bash
8
- bundle install # install dependencies
9
- bundle exec rake test # run all tests
10
- bundle exec ruby test/test_FOO.rb # run a single test file
11
- bundle exec rake # default task — runs tests
12
- ```
13
-
14
- ## Directory layout
15
-
16
- - `lib/quonfig/` — SDK source code
17
- - `test/` — unit tests (one `test_*.rb` per module)
18
- - `test/integration/` — integration tests driven by shared YAML specs
19
-
20
- Integration tests require the sibling directory `../../integration-test-data/`
21
- to exist (cloned from `quonfig/integration-test-data`). Without it the
22
- integration suite cannot resolve its YAML specs.
23
-
24
- ## Environment variables
25
-
26
- - `QUONFIG_BACKEND_SDK_KEY` — backend SDK key for authenticated config delivery
27
- - `QUONFIG_DIR` — path to a local Quonfig workspace (datadir mode)
28
- - `QUONFIG_ENVIRONMENT` — which environment to evaluate (`production`, `staging`, `development`)
29
- - `QUONFIG_DOMAIN` — base domain used to derive api/sse/telemetry URLs (default `quonfig.com`). Setting `QUONFIG_DOMAIN=quonfig-staging.com` derives `https://primary.quonfig-staging.com`, `https://stream.primary.quonfig-staging.com`, and `https://telemetry.quonfig-staging.com` automatically. Explicit `api_urls:` / `telemetry_url:` kwargs override this.
data/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * @prefab-cloud/prefabdevs @prefab-cloud/prefabmaintainers @prefab-cloud/prefabadmins
data/Gemfile DELETED
@@ -1,26 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'concurrent-ruby', '~> 1.0', '>= 1.0.5'
4
- gem 'faraday'
5
- gem 'ld-eventsource'
6
- gem 'uuid'
7
-
8
- gem 'activesupport', '>= 4'
9
-
10
- group :development do
11
- gem 'allocation_stats'
12
- gem 'benchmark-ips'
13
- gem 'bundler'
14
- gem 'juwelier', '~> 2.4.9'
15
- gem 'rdoc'
16
- gem 'simplecov', '>= 0'
17
- end
18
-
19
- group :test do
20
- gem 'semantic_logger', '!= 4.16.0', require: "semantic_logger/sync"
21
- gem 'minitest'
22
- gem 'minitest-focus'
23
- gem 'minitest-reporters'
24
- gem 'timecop'
25
- gem 'webrick'
26
- end