Skip to content

Releases: artichoke/strftime-ruby

v1.0.1

04 Jun 17:41
7fdf895
Compare
Choose a tag to compare

Release 1.0.1 of strftime-ruby.

strftime-ruby is available on crates.io.

This release addresses new clippy lints since the v1.0.0 release and adds additional crates.io category metadata to Cargo.toml.

What's Changed

  • Add tests for check format assertions by @lopopolo in #67
  • chore: Update .github/workflows/code-coverage.yaml in `artichoke/st… by @lopopolo in #68
  • Move readme doctest module at the end of the file by @x-hgg-x in #69
  • chore: Update .github/workflows/code-coverage.yaml in `artichoke/st… by @lopopolo in #70
  • chore: Update .github/workflows/code-coverage.yaml in `artichoke/st… by @lopopolo in #71
  • Bump rubocop from 1.32.0 to 1.36.0 by @dependabot in #73
  • chore: Update .github/workflows/audit.yaml in `artichoke/strftime-r… by @lopopolo in #74
  • Add missing Ruby lint and format job in CI workflow by @lopopolo in #75
  • Fix clippy::single_match_else warning on new stable 1.64.0 by @lopopolo in #76
  • Bump rubocop from 1.36.0 to 1.38.0 by @dependabot in #77
  • chore: Update .github/workflows/rustdoc.yaml in `artichoke/strftime… by @lopopolo in #78
  • Fix clippy warning by @x-hgg-x in #79
  • Bump rubocop from 1.38.0 to 1.39.0 by @dependabot in #80
  • Address clippy lint violations in Rust 1.66.0 by @lopopolo in #81
  • chore: Update .github/workflows/audit.yaml in `artichoke/strftime-r… by @lopopolo in #82
  • chore: Update .github/workflows/code-coverage.yaml in `artichoke/st… by @lopopolo in #83
  • chore: Update .github/workflows/code-coverage.yaml in `artichoke/st… by @lopopolo in #84
  • Bump rubocop from 1.39.0 to 1.42.0 by @dependabot in #85
  • Bump mheap/github-action-required-labels from 2 to 3 by @dependabot in #86
  • Bump rubocop from 1.42.0 to 1.44.1 by @dependabot in #87
  • Bump rubocop from 1.44.1 to 1.47.0 by @dependabot in #88
  • Bump rubocop from 1.47.0 to 1.48.1 by @dependabot in #89
  • Add tests for boundary conditions when computing ISO week number by @lopopolo in #90
  • chore: Update .github/workflows/rustdoc.yaml in `artichoke/strftime… by @lopopolo in #91
  • Remove dependency on actions-rs organization GitHub Actions by @lopopolo in #92
  • Upgrade Ruby version and bundler version by @lopopolo in #93
  • Use stricter version pinning for GitHub Actions by @lopopolo in #94
  • Bump ruby/setup-ruby from 1.147.0 to 1.148.0 by @dependabot in #96
  • Bump rubocop from 1.48.1 to 1.50.2 by @dependabot in #95
  • Stop monitoring Twitter links, fix markdown link check job by @lopopolo in #97
  • chore: Update .github/workflows/code-coverage.yaml in `artichoke/st… by @lopopolo in #98
  • Bump ruby/setup-ruby from 1.148.0 to 1.150.0 by @dependabot in #101
  • Bump aws-actions/configure-aws-credentials from 2.0.0 to 2.1.0 by @dependabot in #100
  • Bump rubocop from 1.50.2 to 1.51.0 by @dependabot in #99
  • Add no-std, no-alloc crates.io category metadata by @lopopolo in #102

Full Changelog: v1.0.0...v1.0.1

v1.0.0

20 Aug 16:23
3125c5a
Compare
Choose a tag to compare

Release 1.0.0 of strftime-ruby.

strftime-ruby is available on crates.io.

strftime-ruby is a Ruby 3.1.2 compatible implementation of the Time#strftime method. The strftime routines provided by this crate are POSIX-compatible, except for intentionally ignoring the E and O modified conversion specifiers.

API

There are 5 strftime functions in this crate which vary in the type of format specifier they take and how they write the formatted output:

  • strftime::buffered::strftime: Takes a &[u8] format specifier and writes to the provided byte slice.
  • strftime::fmt::strftime: Takes a &str format specifier and writes to the provided core::fmt::Write object.
  • strftime::bytes::strftime: Takes a &[u8] format specifier and writes to a newly allocated Vec, which is returned.
  • strftime::string::strftime: Takes a &str format specifier and writes to a newly allocated String, which is returned.
  • strftime::io::strftime: Takes a &[u8] format specifier and writes to the provided std::io::Write object.

Allocations

The only routines that allocate in this crate are strftime::bytes::strftime and strftime::string::strftime. These routines use fallible allocation APIs from alloc and return errors to callers.

strftime::fmt::strftime and strftime::io::strftime perform no allocations on their own, but the provided writers may allocate.

Cargo Features

strftime-ruby has alloc and std features. All features are enabled by default.

strftime::buffered::strftime and strftime::fmt::strftime are available when this crate is compiled without any features and are usable in a no_std context.

The alloc feature enables strftime::bytes::strftime and strftime::string::strftime.

The std feature enables strftime::io::strftime.

Test Coverage

strftime-ruby has 100% line coverage, which is enforced by CI, and is fuzzed regularly.

Composition

strftime-ruby's APIs take an implementation of its Time trait to determine the values used with format specifiers. The intent is that time crates across the ecosystem can implement it, making this crate fully interoperable across all time implementations.