inferno_session_browser 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: dd32817d2fd52d76f212058a94fe01026c39fa5b035a9b17a8812af37d362632
4
+ data.tar.gz: 8fee9dce39b8087ca6af57536fe860179f6d03dbd196c3b58ad051ecce68dc31
5
+ SHA512:
6
+ metadata.gz: edd4a5298e0e801fde6953fb2efb061f163b2e352be9f43a542205deb009de65f81ad42cada3d993392834909e0d2345e65480dd8ca1a18f6d59b4e0e9fa7ea2
7
+ data.tar.gz: 99a1cb9ba6864a781486af05ad5dda0f967d21d5ddfbb66dc8bba58e981af6503336cfc84e327df18f05a19fa950c35723876ac07fa0150b5a494963aa2499e9
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Require-only activation of a read-only session dashboard.
6
+ - Server-side pagination, suite/option/date/state/URL filters, and current test-result summaries.
7
+ - Expandable, paginated run history and links to existing Inferno session pages.
8
+ - Packaged frontend assets, configurable mount/input names, and base-path support.
9
+ - SQLite and PostgreSQL coverage with Inferno Core 1.4.0 and 1.4.4.
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/NOTICE ADDED
@@ -0,0 +1,6 @@
1
+ Inferno Session Browser
2
+ Copyright 2026 Inferno Session Browser contributors
3
+
4
+ This independent add-on uses the Inferno Framework as a runtime dependency.
5
+ Inferno Framework is maintained by its respective contributors:
6
+ https://github.com/inferno-framework/inferno-core
data/README.md ADDED
@@ -0,0 +1,180 @@
1
+ # Inferno Session Browser
2
+
3
+ A read-only dashboard for sessions in an existing Inferno Framework instance. Loading the gem exposes `/sessions`; with `BASE_PATH=/inferno`, it exposes `/inferno/sessions`.
4
+
5
+ The browser reads existing sessions immediately. It shows test suites and selected versions, sanitized FHIR server URLs, dates, recorded run states, current result counts, and expandable run history. **Open session** links to Inferno's existing detail page. It does not run tests, cancel runs, delete data, or change certification logic.
6
+
7
+ ## Requirements
8
+
9
+ - Ruby 3.3.6 and Inferno Core `>= 1.4.0, < 1.5`.
10
+ - The host's existing SQLite or PostgreSQL database and web application.
11
+ - Existing access controls also cover the browser: no separate login is added.
12
+
13
+ Runtime assets are shipped in the gem. Installation requires no npm, frontend build, or CDN. Node/Playwright are used only for development checks.
14
+
15
+ ## Add to an ONC host
16
+
17
+ For a published release, add the gem from RubyGems.org to the host's `Gemfile`:
18
+
19
+ ```ruby
20
+ gem 'inferno_session_browser', '~> 0.1.0'
21
+ ```
22
+
23
+ Add this to `lib/onc_certification_g10_test_kit.rb` before the host constructs `Inferno::Web.app`:
24
+
25
+ ```ruby
26
+ require 'inferno_session_browser'
27
+ ```
28
+
29
+ Then run `bundle install` in the host and restart its web process. The `require` registers the adapter automatically; no change to `config.ru`, Inferno Core, or its React application is required. Merely installing a dependency does not execute the `require`.
30
+
31
+ The gem may be loaded before or after Inferno's web provider, provided it is loaded before the application is constructed. Requiring it repeatedly registers one adapter. Worker/CLI loading does not initialize a database or load the web provider.
32
+
33
+ ### Local development
34
+
35
+ With sibling repositories, use a path dependency in the host's `Gemfile`:
36
+
37
+ ```ruby
38
+ gem 'inferno_session_browser', path: '../inferno_session_browser'
39
+ ```
40
+
41
+ Keep the same `require` line, run `bundle install` in the host, and restart its web process after changes.
42
+
43
+ ## Docker / Podman with an unpublished gem
44
+
45
+ A sibling path is outside ONC's Docker build context. Vendor the packaged source inside the host instead:
46
+
47
+ ```sh
48
+ # In the gem repository:
49
+ mkdir -p pkg
50
+ gem_file="$(ruby -e 'print Gem::Specification.load("inferno_session_browser.gemspec").file_name')"
51
+ gem build inferno_session_browser.gemspec --output "pkg/$gem_file"
52
+
53
+ # In the ONC host repository:
54
+ mkdir -p vendor
55
+ gem unpack ../inferno_session_browser/pkg/inferno_session_browser-0.1.0.gem --target vendor
56
+ ```
57
+
58
+ The vendor paths here illustrate version `0.1.0`; use the version of the archive you built.
59
+
60
+ Use the host dependency:
61
+
62
+ ```ruby
63
+ gem 'inferno_session_browser', path: 'vendor/inferno_session_browser-0.1.0'
64
+ ```
65
+
66
+ In ONC's `Dockerfile`, copy that directory **before** the existing `RUN bundle install`:
67
+
68
+ ```dockerfile
69
+ COPY vendor/inferno_session_browser-0.1.0 /opt/inferno/vendor/inferno_session_browser-0.1.0
70
+ ```
71
+
72
+ Keep the `require` line, update the host lockfile with `bundle install`, and rebuild/restart the image through your normal workflow. The browser needs no migrations. These are installation instructions; this repository does not edit or deploy the ONC host.
73
+
74
+ ## Configuration
75
+
76
+ Configure before constructing the web application:
77
+
78
+ ```ruby
79
+ require 'inferno_session_browser'
80
+
81
+ InfernoSessionBrowser.configure do |config|
82
+ config.mount_path = '/sessions'
83
+ config.fhir_url_input_names = ['url']
84
+ end
85
+ ```
86
+
87
+ The mount path is relative to `BASE_PATH`. Use another path if `/sessions` conflicts with a host route. URL inputs are matched in configured priority order, case-insensitively by their stored input name. The first valid HTTP(S) URL wins. An application snapshots its configuration when constructed.
88
+
89
+ Only those URL inputs are read from `session_data`. URLs retain scheme, host, port, and path; username/password, query, and fragment are removed before display **and before filtering**. Other inputs, credential objects, resources, result messages, and request payloads are not returned by this browser.
90
+
91
+ ## Table and history
92
+
93
+ - Filter by session ID substring, suite, selected suite option values, FHIR URL substring, recorded run state, and date range.
94
+ - Date ranges use an inclusive `from` and exclusive `to`; choose creation time or latest activity. API timestamps use UTC; the page displays local time.
95
+ - Default sorting is latest activity descending, with session ID as a stable tie breaker. Creation time and suite ID are also sortable.
96
+ - Default page size is 25; choose 50 or 100. Expanded run history uses 25 rows per page.
97
+ - Filters, sorting, and session pagination are saved in the URL for bookmarks.
98
+ - Auto-refresh runs every 10 seconds while the tab is visible; it can be disabled. Failed refreshes keep the last successful table visible.
99
+
100
+ Run state is derived from persisted runs: `never_run`, an active `queued`/`running`/`waiting`/`cancelling` run, or `idle`. The latest active run takes precedence over completed runs. A recorded active status does not prove a worker is alive after a crash.
101
+
102
+ Current result counts use the latest result for each individual test across runs, including optional tests. Group/suite results are excluded from counts. History counts are scoped to the selected run; its target outcome is shown separately when stored. Neither a completed run nor these counts is a certification verdict.
103
+
104
+ Sessions whose suite is no longer installed remain listed using stored IDs/options; **Open session** is unavailable for them. Only the connected host database is listed, not other Inferno servers.
105
+
106
+ Option and sanitized URL filters scan lightweight candidate metadata in batches of 500 for consistent SQLite/PostgreSQL behavior. Only the requested page receives result summaries; complete test histories and payloads are never fetched for the table. Very large databases can still make aggregate activity/filter scans expensive.
107
+
108
+ ## JSON API
109
+
110
+ All routes accept GET/HEAD. Writes return 405. Responses are not cached. Invalid parameters return 400 JSON; unknown sessions return 404.
111
+
112
+ | Route | Response |
113
+ | --- | --- |
114
+ | `/sessions/api/sessions` | `{ data: [...], pagination: { page, page_size, total } }` |
115
+ | `/sessions/api/options` | `{ suites: [...], suite_options: [...], states: [...] }` |
116
+ | `/sessions/api/sessions/:id/runs` | `{ data: [...], pagination: { page, page_size, total } }` |
117
+
118
+ Collection parameters: `page`, `page_size` (25/50/100), `q`, `suite_id`, `suite_options[option_id]`, `fhir_url`, `state`, `date_field` (`created_at`/`latest_activity`), `from`, `to`, `sort` (`created_at`/`latest_activity`/`suite`), and `direction` (`asc`/`desc`). Dates must be ISO 8601 with a timezone. History accepts only `page` and `page_size`; options accepts no parameters.
119
+
120
+ Session fields: `id`, `suite_id`, `suite_title`, `suite_available`, `suite_options`, `fhir_url`, `created_at`, `latest_activity`, `state`, `run_count`, `result_counts`, and `session_url`. Run fields: `id`, `status`, `created_at`, `updated_at`, `target` (`type`, `id`, `title`), `outcome`, and `result_counts`.
121
+
122
+ Example:
123
+
124
+ ```sh
125
+ curl --get 'http://localhost/sessions/api/sessions' \
126
+ --data-urlencode 'state=running' \
127
+ --data-urlencode 'suite_options[us_core_version]=6' \
128
+ --data-urlencode 'page_size=25'
129
+ ```
130
+
131
+ ## Development and verification
132
+
133
+ ```sh
134
+ bundle install
135
+ bundle exec rspec
136
+ ```
137
+
138
+ Set `INFERNO_CORE_VERSION=1.4.0` or `1.4.4` when installing/resolving the bundle to pin the compatibility target. If an existing development lockfile pins another version, run `bundle update inferno_core --conservative` with the chosen environment variable.
139
+
140
+ By default specs use in-memory SQLite. For PostgreSQL, set `TEST_DATABASE_URL` to a **dedicated disposable test database**: fixtures create/drop the four test tables. Never point it at the host database. With both core versions installed, `ruby scripts/check.rb` runs the compatibility matrix (including PostgreSQL when this variable is set).
141
+
142
+ ```sh
143
+ TEST_DATABASE_URL='postgres://localhost/inferno_browser_test' bundle exec rspec
144
+ ```
145
+
146
+ The activation specs boot real Inferno instances in temporary directories, run Inferno's own migrations on fresh fixture databases, and verify both load orders, historical sessions, original session pages, packaged assets, timezone handling, and worker-safe loading.
147
+
148
+ Browser checks:
149
+
150
+ ```sh
151
+ npm install
152
+ npx playwright install chromium
153
+ bundle exec npm run test:browser
154
+ ```
155
+
156
+ They start a local fixture server on `127.0.0.1:4568` and check pagination, filters, bookmarks, history, refresh controls, and failure recovery. To use installed Chrome, set `PLAYWRIGHT_BROWSER_CHANNEL=chrome`. Set `BROWSER_TEST_RUBY` to an explicit Ruby executable if needed. No browser tests contact your ONC instance.
157
+
158
+ GitHub Actions runs the database/core matrix plus browser checks. Build and verify the package locally:
159
+
160
+ ```sh
161
+ mkdir -p pkg
162
+ gem_file="$(ruby -e 'print Gem::Specification.load("inferno_session_browser.gemspec").file_name')"
163
+ gem build inferno_session_browser.gemspec --output "pkg/$gem_file"
164
+ bundle exec ruby test/installed_gem_smoke.rb "pkg/$gem_file"
165
+ ```
166
+
167
+ The check installs the archive into a temporary gem home, boots both load orders, and verifies that the library and reported version come from that package. Omitting its argument selects the package filename from the current gemspec.
168
+
169
+ For a shared-gem setup, you can also install the archive and check a standalone host:
170
+
171
+ ```sh
172
+ gem install --local "pkg/$gem_file"
173
+ BROWSER_PACKAGED=1 ruby test/host_smoke.rb before
174
+ ```
175
+
176
+ See [RELEASING.md](RELEASING.md) for the manual release procedure, including RubyGems account setup, version updates, Git tags, and publishing checks.
177
+
178
+ ## License
179
+
180
+ Apache License 2.0. See `LICENSE` and `NOTICE`.
data/RELEASING.md ADDED
@@ -0,0 +1,76 @@
1
+ # Releasing Inferno Session Browser
2
+
3
+ Releases are published manually to [RubyGems.org](https://rubygems.org). Run the commands below from the repository root using Ruby 3.3.6. Build and publish from the same clean, committed source that passed CI.
4
+
5
+ ## Account setup
6
+
7
+ Create a RubyGems.org account and enable [multi-factor authentication for the UI and API](https://guides.rubygems.org/setting-up-multifactor-authentication/). The gem's `rubygems_mfa_required` metadata requires its owners to enable MFA, and `allowed_push_host` restricts publishing to RubyGems.org. Authentication is entered through the RubyGems CLI; account credentials belong outside this repository.
8
+
9
+ For the first release, confirm that `inferno_session_browser` is available to your account. For later releases, confirm that your account owns the gem and the intended version has not already been published.
10
+
11
+ ## Prepare the release commit
12
+
13
+ 1. Set `InfernoSessionBrowser::VERSION` in `lib/inferno_session_browser/version.rb`. It is already `0.1.0` for the first release.
14
+ 2. Update `CHANGELOG.md` with the version, actual release date, and user-facing changes. Update installation examples when their supported release series changes.
15
+ 3. Review the gemspec's author, homepage, metadata, Ruby requirement, and runtime dependencies.
16
+ 4. Commit the final source and documentation, push that commit through the normal review process, and wait for the **Checks** workflow to pass for that exact commit. It must pass Inferno Core 1.4.0 and 1.4.4 with both SQLite and PostgreSQL, installed-package checks, and browser tests.
17
+
18
+ The [README](README.md#development-and-verification) explains the local checks. PostgreSQL checks require a dedicated disposable test database because the fixtures create and drop tables.
19
+
20
+ Before tagging, `git status --short` must show no staged, unstaged, or untracked changes. Keep the release checkout on the commit that passed CI.
21
+
22
+ ## Tag the checked commit
23
+
24
+ Derive the tag and archive filename from the gemspec:
25
+
26
+ ```sh
27
+ release_version="$(ruby -e 'print Gem::Specification.load("inferno_session_browser.gemspec").version')"
28
+ gem_file="$(ruby -e 'print Gem::Specification.load("inferno_session_browser.gemspec").file_name')"
29
+ gem_package="pkg/$gem_file"
30
+ release_tag="v$release_version"
31
+
32
+ git status --short
33
+ git tag -a "$release_tag" -m "Release $release_version"
34
+ git push origin "$release_tag"
35
+ ```
36
+
37
+ For the first release the tag is `v0.1.0`. If a tag already exists, verify that it names the intended release commit instead of moving or replacing it. Pushing the tag runs CI; wait for those checks to pass before publishing.
38
+
39
+ ## Build and verify the archive
40
+
41
+ Stay on the tagged commit. Confirm that the tag resolves to the current checkout:
42
+
43
+ ```sh
44
+ test "$(git rev-parse "$release_tag^{commit}")" = "$(git rev-parse HEAD)"
45
+
46
+ export INFERNO_CORE_VERSION=1.4.4
47
+ bundle install
48
+ mkdir -p pkg
49
+ gem build inferno_session_browser.gemspec --output "$gem_package"
50
+ gem specification "$gem_package"
51
+ bundle exec ruby test/installed_gem_smoke.rb "$gem_package"
52
+ ```
53
+
54
+ If an existing development lockfile selects a different Inferno Core version, run `bundle update inferno_core --conservative` with `INFERNO_CORE_VERSION=1.4.4` before verification.
55
+
56
+ Inspect the archive specification for the intended name/version, author, homepage, metadata, license, dependencies, and files. It must contain the Ruby implementation, JavaScript/CSS assets, HTML template, README, release guide, changelog, license, and notice. It must exclude local databases, logs, credentials, and generated development artifacts. The installed-package check must report the intended version for both load orders and load the library from its temporary installation.
57
+
58
+ Run `git status --short` again to confirm that build and verification did not change the release source. Publish this verified archive.
59
+
60
+ ## Publish and verify
61
+
62
+ ```sh
63
+ gem signin
64
+ gem push --host https://rubygems.org "$gem_package"
65
+ gem specification inferno_session_browser version --remote --version "$release_version"
66
+ ```
67
+
68
+ Complete any MFA prompt from the CLI. Confirm that the [RubyGems page](https://rubygems.org/gems/inferno_session_browser) shows the intended version and repository/documentation links.
69
+
70
+ In a fresh Ruby 3.3.6 environment, install the published version:
71
+
72
+ ```sh
73
+ gem install inferno_session_browser --version "$release_version"
74
+ ```
75
+
76
+ Follow the README's host integration instructions and verify that the dashboard and assets load. Record the matching tag and changelog in a GitHub release. If a correction is needed after publication, prepare a new version and repeat this procedure.
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gem 'inferno_session_browser', path: '../..'
3
+ gem 'inferno_core', ENV.fetch('INFERNO_CORE_VERSION', '1.4.4')
@@ -0,0 +1,4 @@
1
+ development:
2
+ adapter: sqlite
3
+ database: data/demo.db
4
+ max_connections: 1
@@ -0,0 +1,6 @@
1
+ require 'bundler/setup'
2
+ require 'inferno'
3
+ require 'inferno_session_browser'
4
+ Inferno::Application.finalize!
5
+ use Rack::Static, urls: Inferno::Utils::StaticAssets.static_assets_map, root: Inferno::Utils::StaticAssets.inferno_path
6
+ run Inferno::Web.app
@@ -0,0 +1,9 @@
1
+ class SessionBrowserDemo < Inferno::TestSuite
2
+ id :session_browser_demo
3
+ title 'Session Browser Demonstration'
4
+ test do
5
+ id :example
6
+ title 'Example test'
7
+ run { }
8
+ end
9
+ end
@@ -0,0 +1,14 @@
1
+ # Run from examples/host; creates only this example's data/demo.db.
2
+ require 'bundler/setup'
3
+ require 'fileutils'
4
+ require 'sequel'
5
+ FileUtils.mkdir_p(%w[data log tmp])
6
+ Sequel.extension :migration
7
+ db = Sequel.sqlite('data/demo.db')
8
+ Sequel::Migrator.run(db, File.join(Gem::Specification.find_by_name('inferno_core').full_gem_path, 'lib/inferno/db/migrations'))
9
+ if db[:test_sessions].empty?
10
+ now = Time.now
11
+ db[:test_sessions].insert(id: 'example', test_suite_id: 'session_browser_demo', suite_options: '[]', created_at: now, updated_at: now)
12
+ end
13
+ db.disconnect
14
+ puts 'Example ready. Start with: ASYNC_JOBS=false bundle exec rackup -p 4568'
@@ -0,0 +1,5 @@
1
+ :root{color-scheme:light;--ink:#20304a;--muted:#5e6d82;--line:#dde3ec;--blue:#164f94;--soft:#f3f6fa;--red:#a42336;--green:#216345;--amber:#845c0a;font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#f7f9fc}
2
+ *{box-sizing:border-box}body{margin:0}main{max-width:1800px;margin:auto;padding:32px}h1{font-size:28px;margin:0;font-weight:650;letter-spacing:-.6px}p{margin:0}.eyebrow{color:var(--blue);font-size:11px;font-weight:750;letter-spacing:2px;margin-bottom:5px}.subtitle{color:var(--muted);margin-top:5px}.page-header{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:26px}.refresh-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.refresh-controls label{display:flex;align-items:center;gap:5px;color:var(--muted)}
3
+ button,input,select{font:inherit}button{border:1px solid #bec9d9;border-radius:6px;background:white;color:var(--ink);padding:7px 12px;cursor:pointer}button:hover{background:var(--soft)}button:disabled{opacity:.45;cursor:default}button.primary{background:var(--blue);border-color:var(--blue);color:white}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #81afe2;outline-offset:2px}input[type=search],input[type=datetime-local],select{width:100%;background:white;color:var(--ink);border:1px solid #c9d2df;border-radius:5px;padding:8px;min-height:36px}label{display:block;font-size:12px;font-weight:550}label input,label select{margin-top:5px;font-weight:400;font-size:14px}input[type=checkbox]{accent-color:var(--blue);margin-top:0}
4
+ #filters{padding:18px;background:white;border:1px solid var(--line);border-radius:9px}.filter-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:14px}#option-filters:not(:empty){margin-top:14px}.filter-actions{display:flex;align-items:center;gap:10px;margin-top:17px}#options-error{color:var(--amber);font-size:12px}#error{border:1px solid #e9b0b9;background:#fff1f3;color:var(--red);padding:13px 16px;border-radius:7px;margin-top:18px}.table-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:22px 0 12px}#status{color:var(--muted);font-size:13px}.sorting{display:flex;align-items:center;gap:10px}.sorting label{display:flex;align-items:center;gap:6px;white-space:nowrap}.sorting select{margin:0;width:auto;font-size:12px;padding:5px}.table-scroll{overflow:auto;border:1px solid var(--line);border-radius:8px;background:white}table{border-collapse:collapse;width:100%;text-align:left}th{padding:13px 12px;background:var(--soft);color:var(--muted);font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.3px;border-bottom:1px solid var(--line);white-space:nowrap}td{padding:14px 12px;vertical-align:top;border-bottom:1px solid var(--line)}tbody tr:last-child td{border-bottom:0}.sort-heading{border:0;padding:0;background:none;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit}.session-id{font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:nowrap}.suite-title{font-weight:600;min-width:140px}.suite-options{font-size:11px;color:var(--muted);margin-top:5px}.fhir-url{max-width:235px;overflow-wrap:anywhere;font-size:12px}.time{min-width:105px;white-space:nowrap;font-size:12px}.time small{display:block;color:var(--muted)}.badge{display:inline-block;font-size:11px;font-weight:600;padding:3px 7px;border-radius:4px;background:#ecf0f5;color:#4c5c71;white-space:nowrap}.badge.running,.badge.queued{background:#e7f0ff;color:var(--blue)}.badge.waiting,.badge.cancelling,.badge.skip{background:#fff3d8;color:var(--amber)}.badge.fail,.badge.error{background:#fdebed;color:var(--red)}.badge.pass{background:#e6f5eb;color:var(--green)}.counts{display:flex;flex-wrap:wrap;gap:4px;min-width:145px;max-width:220px}.muted{color:var(--muted);font-size:12px}.actions{min-width:125px}.actions a{display:block;color:var(--blue);font-size:12px;text-decoration:none;margin-bottom:8px}.actions a:hover{text-decoration:underline}.expand-button{font-size:11px;padding:5px 8px}.history-cell{background:#f8faff;padding:18px}.history-title{font-size:13px;font-weight:600;margin-bottom:12px}.history-table{background:white;font-size:12px;border:1px solid var(--line)}.history-table th{padding:10px;font-size:10px}.history-table td{padding:10px}.history-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:12px}.history-error{color:var(--red);margin:8px 0}.empty-row{padding:40px;text-align:center;color:var(--muted)}.result-note{font-size:11px;color:var(--muted);margin-top:10px}.pagination{display:flex;align-items:center;justify-content:space-between;margin-top:16px;gap:15px}.pagination label{display:flex;align-items:center;gap:8px;white-space:nowrap}.pagination select{margin:0;width:65px}.pagination>div{display:flex;align-items:center;gap:12px}#page-number{font-size:12px;color:var(--muted)}footer{margin-top:30px;color:var(--muted);font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}
5
+ @media(max-width:1000px){main{padding:20px}.filter-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}.page-header{align-items:flex-start}.refresh-controls{justify-content:flex-end}.table-toolbar{align-items:flex-start}}@media(max-width:600px){main{padding:14px}.page-header{display:block}.refresh-controls{justify-content:flex-start;margin-top:18px}.filter-grid{grid-template-columns:1fr}.table-toolbar{display:block}.sorting{margin-top:12px}.pagination{flex-wrap:wrap}}