Skip to content

Releases: StudioLE/example-rs

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 30 Oct 13:44
Immutable release. Only release title and notes can be modified.
1e96fc4

Maintenance

  • build(brew): Download release archives from `StudioLE/example-rs`  3ec6bfd by @StudioLE
    • StudioLE/Example is the .NET example repo, so brew install studiole/tap/example failed with a 404 on v0.2.0
  • docs(readme): Install with the `example` formula name  1e96fc4 by @StudioLE
    • The tap names the formula after the binary, so studiole/tap/example-rs doesn't exist

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 13:32
Immutable release. Only release title and notes can be modified.
3bc97ca

Features

  • app: Make `--log-level` global with an `EXAMPLE_LOG_LEVEL` env var  1a270a5 by @StudioLE
    • Accept --log-level after the subcommand, e.g. example start abc --log-level debug
    • Fall back to EXAMPLE_LOG_LEVEL when the flag is not passed
  • status: Validate `Id` with `FromStr`  175f02a by @StudioLE
    • Accept only ASCII letters, digits, -, and _ so an Id is safe as a file name
    • Add IdError with Empty and InvalidCharacter, so example start ../etc is rejected at parse time
    • Remove Id::new in favor of Id::from_str
    • Add cli_args_parse_from_invalid_id and Id::from_str tests
  • app: Add `--state-dir` with a platform default  c6a2555 by @StudioLE
    • Add global --state-dir with an EXAMPLE_STATE_DIR env var and a dir completion hint
    • Add Options with a hand-written FromServices that falls back to the platform state dir from etcetera
    • Add CliArgs::fixture() for tests that override CLI arguments
  • status: Store status in files  bcc3b7b by @StudioLE
    • Split status access into StatusProvider and StatusWriter, both registered to one StatusFileAdapter
    • Store one file per Id in Options::state_dir, treating a missing file as Inactive
    • Create the state dir on startup with Init
    • Set the status in StartHandler and StopHandler after checking it isn't already set
    • Add StatusFake, an in-memory store for both traits, and register it in with_test_services()
    • Add StatusWriterSpy to record writes, replacing StatusProviderSpy
    • Test StatusFileAdapter against a temp dir with tempfile
  • status: Add `status` subcommand  7aa1bda by @StudioLE
    • Add StatusHandler to print <id>: <status> for the requested Id and return a StatusOutput
    • Add WriteLine, injected so handlers can be tested with WriteLineSpy
    • Add ConsoleWriter to write lines to stdout, returning an error on a broken pipe where println! would panic
    • Add subcommand_handler_run and the status help snapshot
  • output: Add global `--format` for JSON, TOML, and YAML  f24fa52 by @StudioLE
    • Add global --format with an EXAMPLE_FORMAT env var, choosing between human, json, toml, and yaml
    • Declare each format with output(…) on CliArgs so the usage spec records the media type and framing
    • Add OutputRenderer to render any Serialize value in the format from CliArgs
    • Render status output through OutputRenderer
    • Snapshot each format, picking it by registering a CliArgs instance
  • commands: Print the new status from `start` and `stop`  cb33bca by @StudioLE
    • Render and write a StatusOutput after start and stop, so --format applies to every subcommand
    • Return the StatusOutput from StartHandler::execute and StopHandler::execute
    • Assert the written line with WriteLineSpy in the start and stop tests

Maintenance

  • test: resolve clippy unnecessary_wraps warning in test create_logger  f1a5a5e by @StudioLE

  • deps: Bump `studiole-di` to 0.6.0 and `studiole-logging` to 0.3.0  f83cc23 by @StudioLE
    • Adopt chainable init and expect convenience methods.
    • Fix repository URL
  • chore: Rename to SubcommandHandler for consistency  d43a9a4 by @StudioLE

  • deps: Bump `studiole-logging` and `studiole-report` to `v0.4.1`  fd1f939 by @StudioLE
    • Preserve nested error chains in StructuredError::source
    • Upgrade tracing-subscriber to v0.3.23
    • Remove unused strum_macros; strum::Display is re-exported by the derive feature of strum
  • deps: Update dependencies  6703b38 by @StudioLE

  • chore: Add feature issue templates  32e740b by @StudioLE
    • Add feature.yml issue form for the web UI
    • Add feature.md markdown template for gh issue create -T
    • Structure: Problem, Goals, Hints, References
    • Goals use RFC 2119 keywords; checkboxes for MUST, SHOULD, MAY; plain bullets for exclusions
    • Prefill feat: title and 12-feat label
  • chore(issues): Generalize issue templates for features and bugs  345be5a by @StudioLE
    • Rename feature.yml to issue.yml and feature.md to issue.md
    • Remove prefilled feat: title and 12-feat label
    • Default to 03-could label
    • Prompt for feat: or fix: title prefix in description
  • refactor: Replace `clap` with `usage-rs` for CLI parsing  972aca9 by @StudioLE
    • Swap the Parser, Subcommand, and Args derives for Cli, Subcommands, and Args
    • Replace the inert value_enum on --log-level with usage-rs value_enum, so invalid values are rejected and the accepted values appear in help
    • Bump studiole-logging to v0.5.0 with the usage feature for LogLevel's ValueEnum derive
    • Add unknown_flags = "error" to retain clap's rejection of unrecognized flags
    • Gain -V/--version and the __usage_spec__ KDL spec for completions and manpages
    • Keep subcommand dispatch in SubcommandHandler rather than adopt #[usage(run)], which would bypass the service container
    • Cover CLI parsing and help pages with tests
    • Note the last clap version in README.md
  • style(cli): Remove redundant `#[must_use]` on `Cli::run`  0502bdf by @StudioLE
    • Resolve clippy::double_must_use as nightly std now marks ExitCode as #[must_use]
  • deps: Update dependencies  7a634e3 by @StudioLE

  • test(cli_args): Use version placeholder in root help snapshot  792d26b by @StudioLE
    • Replace the version with x.y.z so the snapshot matches when CI sets the release version
  • refactor(app): Derive `about` from the package description  913ecf1 by @StudioLE
    • Replace the hand-typed about with the bare form, which reads description from Cargo.toml
    • Keep bin as a literal, as usage-rs requires a bin_spec literal for any computed bin
  • style(imports): Import `fmt` and `io` modules instead of aliasing items  699f58b by @StudioLE
    • Replace FmtResult with fmt::Result
    • Drop the IoRead and IoWrite aliases for Read and Write
    • Remove .clippy.toml to restore the default absolute-paths-max-segments of 2, allowing crate-rooted calls like serde_json::from_str()
  • refactor: Replace `mockall` with a hand-written `StatusProviderStub`  fb986e7 by @StudioLE
    • Add StatusProviderStub and Status::fixture(), with a hand-written FromServices that fills status from the fixture
    • Rename with_mock_services() to with_test_services(), which now takes no args and registers the stub
    • Override the stub per test with with_instance where a handler needs a different Status
    • Rename mock() to fixture() on Id, StartRequest, and StopRequest
    • Remove status_provider_mock_get and its snapshot, as it only tested the mock
    • Remove mockall from Cargo.toml and README.md
  • test: Add handler error-path and spy tests to showcase test doubles  1f96e72 by @StudioLE
    • Change StatusProviderStub.status to a Result so tests can stub a StatusError
    • Add StatusProviderSpy to record each Id passed to StatusProvider::get
    • Add start_handler_execute_active and stop_handler_execute_inactive to cover the already active and inactive errors
    • Add start_handler_execute_status_error to cover wrapping a StatusError as StartError::GetStatus
    • Add start_handler_execute_spy to assert the handler queries status with the request Id
    • Override stubs with with_instance(StatusProviderStub { … }) instead of an Arc<dyn StatusProvider>
    • Limit the dead_code expectation on StatusError::Read to non-test builds
  • test(cli_args): Snapshot the usage spec  7f7e0e0...
Read more

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 11 May 20:40
62216ff

Changes

New Features

Initial commit 62216ff

v0.0.0

Choose a tag to compare

@StudioLE StudioLE released this 11 May 10:46
ad76a35
chore: Create repo