From dffd2ae9069919790a01883e2a8a3eaa879f4259 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 10:00:56 +1000 Subject: [PATCH 01/32] **run_all_unit_tests.sh** : ~ updated to latest (from https://github.com/synesissoftware/misc-dev-scripts) --- run_all_unit_tests.sh | 272 +++++++++++++++++++++--------------------- 1 file changed, 139 insertions(+), 133 deletions(-) diff --git a/run_all_unit_tests.sh b/run_all_unit_tests.sh index cfad669..6aea55b 100755 --- a/run_all_unit_tests.sh +++ b/run_all_unit_tests.sh @@ -8,9 +8,9 @@ # executing each rbenv version # # Created: 9th June 2011 -# Updated: 16th March 2025 +# Updated: 12th August 2026 # -# Copyright (c) Matthew Wilson, 2011-2025 +# Copyright (c) Matthew Wilson, 2011-2026 # All rights reserved # # Redistribution and use in source and binary forms, with or without @@ -53,50 +53,30 @@ while [ -h "$Source" ]; do [[ $Source != /* ]] && Source="$ScriptDir/$Source" done ScriptDir="$(cd -P "$( dirname "$Source" )" && pwd)" +Basename="$(basename "$Source")" # colours if command -v tput > /dev/null; then - RbEnvClr_Blue=${FG_BLUE:-$(tput setaf 4)} - RbEnvClr_Red=${FG_BLUE:-$(tput setaf 1)} - RbEnvClr_Bold=${FD_BOLD:-$(tput bold)} - RbEnvClr_None=${FD_NONE:-$(tput sgr0)} + SisClr_Blue=${FG_BLUE:-$(tput setaf 4)} + SisClr_Red=${FG_RED:-$(tput setaf 1)} + SisClr_Bold=${FD_BOLD:-$(tput bold)} + SisClr_None=${FD_NONE:-$(tput sgr0)} else - RbEnvClr_Blue= - RbEnvClr_Red= - RbEnvClr_Bold= - RbEnvClr_None= + SisClr_Blue= + SisClr_Red= + SisClr_Bold= + SisClr_None= fi -# special command-line handling ('--pwd') +# special command-line handling ('--pwd', '--rbenv-versions') ProjectDir="$ScriptDir" - -for arg in "$@" -do - - case "$arg" in - - --pwd) - - ProjectDir=$(pwd) - ;; - *) - - Arguments="$Arguments $arg" - ;; - esac -done - - -# special command-line handling ('--rbenv-versions') -# rbenv handling - -Arguments= +ForwardArgs=() FoundHelp= RunRbEnvAllVersions= @@ -105,19 +85,24 @@ do case "$arg" in - --help) + --help) - FoundHelp=1 - Arguments="$Arguments $arg" - ;; - --rbenv-versions) + FoundHelp=1 + ForwardArgs+=("$arg") + ;; + --pwd) - RunRbEnvAllVersions=1 - ;; - *) + ProjectDir=$(pwd) + ForwardArgs+=("$arg") + ;; + --rbenv-versions) - Arguments="$Arguments $arg" - ;; + RunRbEnvAllVersions=1 + ;; + *) + + ForwardArgs+=("$arg") + ;; esac done @@ -130,78 +115,70 @@ if [ ! -z "$RunRbEnvAllVersions" ]; then if ! command -v rbenv > /dev/null; then - >&2 echo "$0: ${RbEnvClr_Red}${RbEnvClr_Bold}rbenv${RbEnvClr_None} not detected" - - exit 1 - fi - - if [ ! -e "$ProjectDir/.ruby-version" ];then - - >&2 echo "$0: ${RbEnvClr_Red}${RbEnvClr_Bold}.ruby-version${RbEnvClr_None} file not detected" + >&2 echo "$0: ${SisClr_Red}${SisClr_Bold}rbenv${SisClr_None} not detected" - exit 1 + exit 1 fi exclusions=() if [ -e "$ProjectDir/.ruby-version-exclusions" ]; then - exclusion_lines=`cat "$ProjectDir/.ruby-version-exclusions"` - for line in $exclusion_lines; do + exclusion_lines=`cat "$ProjectDir/.ruby-version-exclusions"` + for line in $exclusion_lines; do - exclusions+=($line) - done + exclusions+=("$line") + done fi - echo "executing command line '${RbEnvClr_Blue}${RbEnvClr_Bold}$0 $Arguments${RbEnvClr_None}' with all Ruby versions ..." + echo "executing command line '${SisClr_Blue}${SisClr_Bold}$0 ${ForwardArgs[*]}${SisClr_None}' with all Ruby versions ..." - current=$(rbenv local) + current= + if [ -f "$ProjectDir/.ruby-version" ]; then - #echo "current version: $current" + current=$(tr -d '[:space:]' < "$ProjectDir/.ruby-version") + fi versions=() while IFS= read -r line; do - versions+=("$line") + versions+=("$line") done < <(rbenv versions --bare) - echo "versions: ${RbEnvClr_Blue}${RbEnvClr_Bold}${versions[*]}${RbEnvClr_None}; skipped versions: ${RbEnvClr_Blue}${RbEnvClr_Bold}${exclusions[*]}${RbEnvClr_None}; current version: ${RbEnvClr_Blue}${RbEnvClr_Bold}${current}${RbEnvClr_None}" + echo "versions: ${SisClr_Blue}${SisClr_Bold}${versions[*]}${SisClr_None}; skipped versions: ${SisClr_Blue}${SisClr_Bold}${exclusions[*]}${SisClr_None}; current version: ${SisClr_Blue}${SisClr_Bold}${current:-(none)}${SisClr_None}" result=0 - for version in ${versions[@]} + for version in "${versions[@]}" do - echo + echo - skip= + skip= - for exclusion in "${exclusions[@]}"; do + for exclusion in "${exclusions[@]}"; do - if [[ "$exclusion" == "$version" ]]; then + if [[ "$exclusion" == "$version" ]]; then - skip=1 - fi - done + skip=1 + fi + done - if [ "$skip" != "" ]; then + if [ "$skip" != "" ]; then - echo "skipping Ruby version ${RbEnvClr_Blue}${RbEnvClr_Bold}$version${RbEnvClr_None}:" - else + echo "skipping Ruby version ${SisClr_Blue}${SisClr_Bold}$version${SisClr_None}:" + else - echo "processing Ruby version ${RbEnvClr_Blue}${RbEnvClr_Bold}$version${RbEnvClr_None}:" + echo "processing Ruby version ${SisClr_Blue}${SisClr_Bold}$version${SisClr_None}:" - echo -e "\texecuting command line '$0 $Arguments' with Ruby version $version ..." - rbenv local $version + echo -e "\texecuting command line 'RBENV_VERSION=$version $0 ${ForwardArgs[*]}' with Ruby version $version ..." - if ! $0 $Arguments; then + if ! RBENV_VERSION="$version" "$0" "${ForwardArgs[@]}"; then - result=1 - fi + result=1 fi + fi done - rbenv local $current - exit $result fi @@ -210,74 +187,103 @@ fi Separate= DebugFlag= +PrependLib= WarningsFlag=-W0 for v in "$@" do - case "$v" in - - --debug) - - DebugFlag=--debug - ;; - --help) - - echo "USAGE: $Source { | --help | [ --debug ] [ --pwd ] [ --rbenv-versions ] [ --separate ] [ --warnings ]}" - echo - echo "flags:" - echo - echo " --help" - echo " shows this help and terminates" - echo - echo " --debug" - echo " executes Ruby interpreter in debug mode" - echo - echo " --pwd" - echo " executes from present working directory, rather than relative to the script directory" - echo - echo " --rbenv-versions" - echo " executes this script (with all other specified arguments) for each rbenv version (except those listed in the file .ruby-version-exclusions, if present)" - echo - echo " --separate" - echo " executes each unit-test in a separate program" - echo - echo " --warnings" - echo " executes Ruby interpreter in warnings mode" - echo - - exit - ;; - --pwd) - - # already-processed as special case above - ;; - --separate) - - Separate=true - ;; - --warnings|--warn) - - WarningsFlag=-W2 #-W:performance - ;; - *) - - >&2 echo "unrecognised argument '$v'; use --help for usage" - - exit 1 - ;; - esac + case "$v" in + + --debug) + + DebugFlag=--debug + ;; + --help) + + cat << EOF +USAGE: $Basename { | --help | [ --debug ] [ --lib ] [ --pwd ] [ --rbenv-versions ] [ --separate ] [ --warnings ]} + +flags: + + --help + shows this help and terminates + + --debug + executes Ruby interpreter in debug mode + + --lib + prepends the lib directory under the script's directory into RUBYLIB before executing + + --pwd + executes from present working directory, rather than relative to the script directory + + --rbenv-versions + executes this script (with all other specified arguments) for each rbenv version (except those listed in the file .ruby-version-exclusions, if present) + + --separate + executes each unit-test in a separate program + + --warnings + executes Ruby interpreter in warnings mode +EOF + + exit 0 + ;; + --lib) + + PrependLib=1 + ;; + --pwd) + + # already-processed as special case above + ;; + --rbenv-versions) + + # already-processed as special case above + ;; + --separate) + + Separate=true + ;; + --warnings|--warn) + + WarningsFlag=-W2 #-W:performance + ;; + *) + + >&2 echo "unrecognised argument '$v'; use --help for usage" + + exit 1 + ;; + esac done # executing tests +if [ ! -z "$PrependLib" ]; then + + export RUBYLIB=$ProjectDir/lib:$RUBYLIB +fi + + if [ -z "$Separate" ]; then ruby $DebugFlag $WarningsFlag "$ProjectDir/test/unit/ts_all.rb" else - find "$ProjectDir" -name 'tc_*.rb' -exec ruby $DebugFlag $WarningsFlag {} \; + result=0 + + while IFS= read -r -d '' testfile; do + + if ! ruby $DebugFlag $WarningsFlag "$testfile"; then + + result=1 + fi + done < <(find "$ProjectDir" -name 'tc_*.rb' -print0) + + exit $result fi From cbd752106a8b4b31a279fe3ae10ccd65f47312b1 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 11:47:50 +1000 Subject: [PATCH 02/32] boilerplate: markdown files --- CHANGES.md | 2 +- EXAMPLES.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c900d33..3ef995b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -# **libpath.Ruby** Changes +# libpath.Ruby - Changes ## 0.2.2.1 - 6th April 2024 diff --git a/EXAMPLES.md b/EXAMPLES.md index 8f93d4a..205bca9 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -1,4 +1,4 @@ -# libpath.Ruby Examples +# libpath.Ruby - Examples |Name|Source & Description|Summary| |---|---|---| From d0f0b0f8fd2b28fad35161c6929b0748a6fd16b3 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 11:54:58 +1000 Subject: [PATCH 03/32] boilerplate: .gitattributes --- .gitattributes | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..702382f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,75 @@ +# .gitattributes — Ruby (GitHub-hosted) +# +# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=ruby), +# gitattributes/gitattributes Common.gitattributes + Web (*.rb), +# github-linguist overrides. + +# Default: detect text, normalize to LF in the repository +* text=auto + +# --- Source --- +*.gemspec text eol=lf diff=ruby +*.rake text eol=lf diff=ruby +*.rb text eol=lf diff=ruby +*.ru text eol=lf diff=ruby +Gemfile text eol=lf diff=ruby +Rakefile text eol=lf diff=ruby +Capfile text eol=lf diff=ruby +Guardfile text eol=lf diff=ruby +*.erb text +*.haml text +*.slim text + +# --- Lock / config --- +Gemfile.lock text -diff +*.gemspec.lock text -diff +*.yml text +*.yaml text +*.toml text +*.json text + +# --- Scripts --- +*.bash text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf +*.sh text eol=lf +*.zsh text eol=lf + +# --- Docs / meta --- +*.adoc text +*.markdown text diff=markdown +*.md text diff=markdown +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +LICENSE text +NEWS text +README text +TODO text +.gitattributes text +.gitignore text + +# --- Binary --- +*.gem binary +*.so binary + +# --- Archives / images (common) --- +*.gif binary +*.gz binary +*.ico binary +*.jpeg binary +*.jpg binary +*.png binary +*.tar binary +*.zip binary + +# --- GitHub Linguist --- +**/vendor/bundle/** linguist-vendored +**/vendor/cache/** linguist-vendored +**/coverage/** linguist-generated +**/doc/** linguist-documentation +**/pkg/** linguist-generated From eb1a62f334283333375374952480bacddec825fd Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 11:59:18 +1000 Subject: [PATCH 04/32] boilerplate: LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 151313b..10d2c75 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ libpath.Ruby - BSD 3-Clause License -Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems +Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems Copyright (c) 2019, Matthew Wilson and Synesis Software All rights reserved. From c5841f027b2fa3ab812eead92707e13b8034c1aa Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 12:08:51 +1000 Subject: [PATCH 05/32] boilerplate: .vscode/settings.json --- .vscode/settings.json | 49 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d9e8963..19efccd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,43 @@ { - "[ruby]": { - "editor.tabSize": 2, - }, - "cmake.configureOnOpen": false, - "editor.detectIndentation": false, - "editor.insertSpaces": true, - "editor.tabSize": 2, - "files.trimTrailingWhitespace": true, + "[json]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + }, + "[markdown]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + }, + "[python]": { + "editor.insertSpaces": true, + "editor.rulers": [ 60, 76 ], + "editor.tabSize": 4, + }, + "[ruby]": { + "editor.defaultFormatter": "Shopify.ruby-lsp", + "editor.formatOnSave": true, + "editor.formatOnType": true, + "editor.insertSpaces": true, + "editor.rulers": [ 60, 76 ], + "editor.semanticHighlighting.enabled": true, + "editor.tabSize": 2, + }, + "[shellscript]": { + "editor.insertSpaces": true, + "editor.rulers": [ 60, 76 ], + "editor.tabSize": 2, + }, + "[toml]": { + "editor.insertSpaces": false, + "editor.tabSize": 2, + }, + "cmake.configureOnOpen": false, + "editor.detectIndentation": false, + "editor.insertSpaces": false, + "editor.renderWhitespace": "all", + "editor.rulers": [ 76 ], + "editor.tabSize": 2, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "git.mergeEditor": false, + "rubyLsp.formatter": "auto", } From 97eea417fb53833e95d019da8df5fa528bbe18b3 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 12:14:51 +1000 Subject: [PATCH 06/32] boilerplate: .vimrc --- .vimrc | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .vimrc diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..b8184be --- /dev/null +++ b/.vimrc @@ -0,0 +1,70 @@ +" Synesis Ruby project .vimrc — aligned with .vscode/settings.json (2-space Ruby) + +set nocompatible +filetype indent plugin on +syntax enable +set autoindent +set backspace=indent,eol,start +set hlsearch +set incsearch +set number + +" files.insertFinalNewline +set eol +set fixeol + +" editor.renderWhitespace: all +set list +set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+ + +" editor.detectIndentation: false — global defaults (editor.tabSize: 2, insertSpaces: true) +set colorcolumn=76 +set expandtab +set shiftwidth=2 +set softtabstop=2 +set tabstop=2 + +" colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line). +" Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes. +if has('termguicolors') + " set termguicolors +endif + +function! s:ConfigureColorColumn() abort + highlight ColorColumn ctermbg=236 guibg=#2a2a2a cterm=NONE gui=NONE +endfunction + +call s:ConfigureColorColumn() +autocmd ColorScheme * call s:ConfigureColorColumn() + +" files.trimTrailingWhitespace +autocmd BufWritePre * %s/\s\+$//e + +augroup sis_c_cxx + autocmd! + + " [c] / [cpp] + autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76 + + " [rust] + autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76 + + " [cmake] + autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 + + " [shellscript] + autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76 + + " [bat] + autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76 + + " [json] / [markdown] / [yaml] / [ruby] + autocmd FileType json,markdown,yaml,ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 + + " [python] + autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76 + + " [toml] + autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2 +augroup END + From 961b17862bd72ed06e4ee82e568e3eaa1f7ae7fe Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 13:23:49 +1000 Subject: [PATCH 07/32] boilerplate: build_gem.cmd, build_gem.sh, generate_rdoc.cmd, generate_rdoc.sh --- .sis/project_name.txt | 1 + build_gem.cmd | 10 ++-------- build_gem.sh | 10 ++-------- generate_rdoc.cmd | 28 ++++++++++++++++++++++++++++ generate_rdoc.sh | 12 ++++-------- 5 files changed, 37 insertions(+), 24 deletions(-) create mode 100644 .sis/project_name.txt create mode 100644 generate_rdoc.cmd diff --git a/.sis/project_name.txt b/.sis/project_name.txt new file mode 100644 index 0000000..f5e7335 --- /dev/null +++ b/.sis/project_name.txt @@ -0,0 +1 @@ +libpath.Ruby diff --git a/build_gem.cmd b/build_gem.cmd index 9db8891..c894c21 100644 --- a/build_gem.cmd +++ b/build_gem.cmd @@ -6,14 +6,8 @@ REM REM Purpose: Builds the gem REM REM Created: 11th July 2016 -REM Updated: 6th April 2024 -REM -REM Author: Matthew Wilson +REM Updated: 14th August 2026 REM REM ######################################################################## -gem build libpath.gemspec %* - - -REM ############################ end of file ############################### - +FOR %%f IN (*.gemspec) DO gem build "%%f" %* diff --git a/build_gem.sh b/build_gem.sh index deea741..864823e 100755 --- a/build_gem.sh +++ b/build_gem.sh @@ -6,14 +6,8 @@ # Purpose: Builds the gem # # Created: 9th June 2016 -# Updated: 6th April 2024 -# -# Author: Matthew Wilson +# Updated: 14th August 2026 # ############################################################################# -gem build libpath.gemspec $* - - -# ############################## end of file ############################# # - +gem build *.gemspec $* diff --git a/generate_rdoc.cmd b/generate_rdoc.cmd new file mode 100644 index 0000000..4f6f7ad --- /dev/null +++ b/generate_rdoc.cmd @@ -0,0 +1,28 @@ +@ECHO OFF + +REM ######################################################################## +REM File: generate_rdoc.cmd +REM +REM Purpose: Generates documentation +REM +REM Created: 14th August 2026 +REM Updated: 14th August 2026 +REM +REM ######################################################################## + +IF EXIST doc RMDIR /S /Q doc +rdoc ^ + -x build_gem.cmd ^ + -x build_gem.sh ^ + -x generate_rdoc.cmd ^ + -x generate_rdoc.sh ^ + -x run_all_unit_tests.sh ^ + -x *.gemspec ^ + -x doc/ ^ + -x gems/ ^ + -x old-gems/ ^ + -x test/performance/ ^ + -x test/scratch/ ^ + -x tc_.*\.rb ^ + -x ts_all.rb ^ + %* diff --git a/generate_rdoc.sh b/generate_rdoc.sh index a9bbc03..e7dc865 100755 --- a/generate_rdoc.sh +++ b/generate_rdoc.sh @@ -6,18 +6,18 @@ # Purpose: Generates documentation # # Created: 11th June 2016 -# Updated: 6th April 2024 +# Updated: 14th August 2026 # ############################################################################# - rm -rfd doc rdoc \ -x build_gem.cmd \ -x build_gem.sh \ + -x generate_rdoc.cmd \ -x generate_rdoc.sh \ -x run_all_unit_tests.sh \ - -x libpath.gemspec \ + -x *.gemspec \ \ -x doc/ \ -x gems/ \ @@ -25,11 +25,7 @@ rdoc \ -x test/performance/ \ -x test/scratch/ \ \ - -x ts_all.rb \ -x tc_.*\.rb \ + -x ts_all.rb \ \ $* - - -# ############################## end of file ############################# # - From 55d0bbb2355fb3148562fab15579dc53fbedacbb Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 13:32:07 +1000 Subject: [PATCH 08/32] boilerplate: LICENSE --- LICENSE | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 10d2c75..c1c5532 100644 --- a/LICENSE +++ b/LICENSE @@ -5,8 +5,7 @@ Copyright (c) 2019, Matthew Wilson and Synesis Software All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. From e27a26ef95d2c5b45eb2fb6604a5c057dd5625df Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 13:41:33 +1000 Subject: [PATCH 09/32] bolierplate: updating Gemfile --- Gemfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b279194..6a7cd99 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,5 @@ source "https://rubygems.org" -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } - -gem 'xqsr3', [ '~> 0.39', '>= 0.39.3' ] +gem "xqsr3", [ '~> 0.39', '>= 0.39.4' ] From 9989b7ebb9f86c0912994bafe9473173111112f2 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 13:52:05 +1000 Subject: [PATCH 10/32] boilerplate: placeholder markdown files --- AUTHORS.md | 0 FAQ.md | 0 NEWS.md | 0 TODO.md | 0 examples/path_from_arg0.md | 2 +- 5 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 AUTHORS.md create mode 100644 FAQ.md create mode 100644 NEWS.md create mode 100644 TODO.md diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..e69de29 diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000..e69de29 diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..e69de29 diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..e69de29 diff --git a/examples/path_from_arg0.md b/examples/path_from_arg0.md index e07c8b6..0ec5bbc 100644 --- a/examples/path_from_arg0.md +++ b/examples/path_from_arg0.md @@ -1,4 +1,4 @@ -# libpath.Ruby Example - **path_from_arg0** +# libpath.Ruby - Example - **path_from_arg0** ## Summary From 773ed0f2e54a19dede037ac5b5b70264f21b8b23 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 14:05:54 +1000 Subject: [PATCH 11/32] boilerplate: .gitignore --- .gitignore | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index f5221c0..0d510c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,57 +1,50 @@ - # directories (by name) -/.bundle/ /.bzr/ +/.bundle/ /.config/ -/.git/ /.svn/ +/.yardoc/ + +/_yardoc/ /InstalledFiles/ /build/ /coverage/ /doc/ /lib/bundler/man/ +/old-gems/ /pkg/ /rdoc/ +/scratch/ /spec/reports/ /test/tmp/ /test/version_tmp/ /tmp/ /vendor/bundle/ - # directories (by pattern) -InstalledFiles -coverage -pkg -rdoc - - # files (by name) .DS_Store -.bundle -.config .repl_history .ruby-version .rvmrc -.yardoc - -_yardoc - -Gemfile.lock +/spec/examples.txt # files (by pattern) +*~ *.*~ .dat* +*.b64 +*.bridgesupport *.gem *.rbc *.scc *.suo *.swp +*.tmp *.zip - From 6c929301be476f28c69fdc3fef571e38c754381b Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 14:17:19 +1000 Subject: [PATCH 12/32] version dependencies --- Gemfile.lock | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..0bad7bf --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,14 @@ +GEM + remote: https://rubygems.org/ + specs: + xqsr3 (0.39.4.1) + +PLATFORMS + arm64-darwin-25 + ruby + +DEPENDENCIES + xqsr3 (~> 0.39, >= 0.39.4) + +BUNDLED WITH + 2.6.9 From c3de67ccc5213d0704e6e486194c1e3045db1457 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 14:28:01 +1000 Subject: [PATCH 13/32] boilerplate: .ruby-version-exclusions --- .ruby-version-exclusions | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.ruby-version-exclusions b/.ruby-version-exclusions index c301815..a8df221 100644 --- a/.ruby-version-exclusions +++ b/.ruby-version-exclusions @@ -1,9 +1,2 @@ +1.8.7-p375 1.9.3-p551 -#2.0.0-p648 -#2.1.10 -#2.2.10 -#2.3.8 -#2.4.1 -#2.5.3 -#2.6.1 - From ba697542a43973fb5bf3c515a3d405fb2df55800 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 16:07:12 +1000 Subject: [PATCH 14/32] Add canonical AUTHORS, FAQ, NEWS, and TODO markdown skeletons --- AUTHORS.md | 17 +++++++++++++++++ FAQ.md | 28 ++++++++++++++++++++++++++++ NEWS.md | 8 ++++++++ TODO.md | 20 ++++++++++++++++++++ 4 files changed, 73 insertions(+) diff --git a/AUTHORS.md b/AUTHORS.md index e69de29..fca3408 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -0,0 +1,17 @@ +# libpath.Ruby - Authors + + +## Major Contributors: + +* Matt Wilson ([mwsis](https://github.com/mwsis)) + + +## Defect reports, fixes and suggestions (for which we are very grateful): + +* \ + +Contributions are welcomed. + + + + diff --git a/FAQ.md b/FAQ.md index e69de29..113fbdc 100644 --- a/FAQ.md +++ b/FAQ.md @@ -0,0 +1,28 @@ +# libpath.Ruby - FAQ + +The FAQ list is under (constant) development. If you post a question on the +[Issues](https://github.com/synesissoftware/libpath.Ruby/issues) forum +it will be used to create one. + + +## Table of Contents + +- [Q1: "How do I install this library?"](#q1-how-do-i-install-this-library) + + +# FAQs: + + +## Q1: "How do I install this library?" + +Install via **gem**: + +``` +gem install libpath-ruby +``` + +See [README.md](./README.md) for usage. + + + + diff --git a/NEWS.md b/NEWS.md index e69de29..1eedb13 100644 --- a/NEWS.md +++ b/NEWS.md @@ -0,0 +1,8 @@ +# libpath.Ruby - News + +| Date | News Item | +| ------------- | --------- | + + + + diff --git a/TODO.md b/TODO.md index e69de29..942e36b 100644 --- a/TODO.md +++ b/TODO.md @@ -0,0 +1,20 @@ +# libpath.Ruby - TODO + + +## Functional improvements + +* \ + + +## Performance improvements + +* \ + + +## Packaging improvements + +* \ + + + + From d4662e0082d1f4b64125e966ee20f42237e64ade Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 16:14:10 +1000 Subject: [PATCH 15/32] Complete CHANGES.md through early 0.0.x releases --- CHANGES.md | 154 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 145 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3ef995b..4c3555a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,28 +1,164 @@ # libpath.Ruby - Changes +## 0.2.2.3 - 13th April 2024 + +* warnings fixes; + + +## 0.2.2.2 - 7th April 2024 + +* merged **tidying** into **master**; + + ## 0.2.2.1 - 6th April 2024 -* + project boilerplate -* ~ canonicalisation of layout, etc. +* project boilerplate; +* canonicalisation of layout; ## 0.2.2 - 18th May 2019 -* ~ minor fix to source +* minor fix to source; ## 0.2.1 - 16th April 2019 -* + added #to_s attribute to Path classes -* + added example examples/path_from_arg0.rb -* ~ significant improvements to documentation +* added `#to_s` attribute to Path classes; +* added example **examples/path_from_arg0.rb**; +* significant improvements to documentation; +* added **README.md**; -## previous versions +## 0.2.0.1 - 16th April 2019 -T.B.C. +* significant improvements to documentation; +* added **.ruby-version-exclusions**; +* gemspec requires Ruby 2.0+; +* updated **run_all_unit_tests.sh** (from **misc-dev-scripts**); - +## 0.2.0 - 30th January 2019 + +* added **Constants**, **Exceptions**, and `Util#name_is_malformed?()`; + + +## 0.1.1.2 - 30th January 2019 + +* fixed `ParsedPath` compare-path attributes on Windows; + + +## 0.1.1.1 - 30th January 2019 + +* various fixes to path-handling; + + +## 0.1.0 - 28th January 2019 + +* added `LibPath::Path(::Unix|::Windows)::ParsedPath`; + + +## 0.0.20 - 27th January 2019 + +* Windows compatibility; + + +## 0.0.19 - 27th January 2019 + +* further path-handling modifications; + + +## 0.0.18 - 27th January 2019 + +* handling redundant path-name separators; + + +## 0.0.17 - 27th January 2019 + +* fixed `split_path()` for repeated internal separators; + + +## 0.0.16 - 27th January 2019 + +* improved slash correction on Windows (`/` to `\`); + + +## 0.0.15 - 25th January 2019 + +* added `LibPath::Util(::Unix|::Windows).derive_relative_path()`; + + +## 0.0.14 - 25th January 2019 + +* refactored `classify_path()`; +* renamed `path_is_drived?()` to `path_is_letter_drived?()`; + + +## 0.0.13 - 25th January 2019 +* added `LibPath::Form(::Unix|::Windows).classify_path()`; + + +## 0.0.12 - 21st January 2019 + +* fix; + + +## 0.0.11 - 21st January 2019 + +* further tidying of Windows Form functions; + + +## 0.0.10 - 20th January 2019 + +* improved `get_windows_volume()` for complex cases; + + +## 0.0.9 - 20th January 2019 + +* `get_windows_volume()` obtains volume form as third returned element; + + +## 0.0.8 - 20th January 2019 + +* added `combine_paths()` and `make_path_absolute()`; +* added `Form::Windows.path_is_drived?()`; + + +## 0.0.7 - 19th January 2019 + +* merge; + + +## 0.0.6 - 17th January 2019 + +* fix; + + +## 0.0.5 - 9th January 2019 + +* added `Util(::Unix|::Windows).make_path_canonical()`; + + +## 0.0.4 - 9th January 2019 + +* added `Form.split_path()` for Unix and Windows; + + +## 0.0.3 - 9th January 2019 + +* added internal Form API functions; + + +## 0.0.2 - 8th January 2019 + +* added Form predicates `path_is_absolute?`, `path_is_homed?`, `path_is_rooted?`, and Windows `path_is_UNC?`; + + +## 0.0.1 - 8th January 2019 + +* initial version; + + + + From 404bb80e708af714448669e473a0763acfc375d7 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 14 Aug 2026 16:28:27 +1000 Subject: [PATCH 16/32] Add ruby.yml CI badge and switch Gemfile to gemspec --- Gemfile | 3 +-- README.md | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 6a7cd99..be173b2 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,4 @@ source "https://rubygems.org" -gem "xqsr3", [ '~> 0.39', '>= 0.39.4' ] - +gemspec diff --git a/README.md b/README.md index a67913f..90f724a 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ **libpath**, for Ruby [![Gem Version](https://badge.fury.io/rb/libpath-ruby.svg)](https://badge.fury.io/rb/libpath-ruby) +[![Ruby](https://github.com/synesissoftware/libpath.Ruby/actions/workflows/ruby.yml/badge.svg)](https://github.com/synesissoftware/libpath.Ruby/actions/workflows/ruby.yml) ## Table of Contents From ade380d14e2458a07cd7691e12229c9b7d304bff Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 05:36:38 +1000 Subject: [PATCH 17/32] chore: dependencies --- .gitattributes | 2 +- Gemfile.lock | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 702382f..2c70232 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,7 +21,7 @@ Guardfile text eol=lf diff=ruby *.slim text # --- Lock / config --- -Gemfile.lock text -diff +Gemfile.lock text *.gemspec.lock text -diff *.yml text *.yaml text diff --git a/Gemfile.lock b/Gemfile.lock index 0bad7bf..4389314 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,14 +1,20 @@ +PATH + remote: . + specs: + libpath-ruby (0.2.2.3) + GEM remote: https://rubygems.org/ specs: - xqsr3 (0.39.4.1) + xqsr3 (0.39.5) PLATFORMS arm64-darwin-25 ruby DEPENDENCIES - xqsr3 (~> 0.39, >= 0.39.4) + libpath-ruby! + xqsr3 (>= 0.21.1, < 1.0) BUNDLED WITH 2.6.9 From 9563d008130a271ad17c7f79a94445c3dff6c269 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 06:44:52 +1000 Subject: [PATCH 18/32] gemspec updates --- CHANGES.md | 5 +++++ lib/libpath/version.rb | 6 +++--- libpath.gemspec | 29 ++++++++++++++++++++--------- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4c3555a..24f3d85 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ # libpath.Ruby - Changes +## 0.2.3 - 15th August 2026 + +T.B.C. + + ## 0.2.2.3 - 13th April 2024 * warnings fixes; diff --git a/lib/libpath/version.rb b/lib/libpath/version.rb index e8c177d..7efda84 100644 --- a/lib/libpath/version.rb +++ b/lib/libpath/version.rb @@ -4,13 +4,13 @@ # Purpose: Version for libpath.Ruby library # # Created: 8th January 2019 -# Updated: 13th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # # Author: Matthew Wilson # -# Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems +# Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems # Copyright (c) 2019, Matthew Wilson and Synesis Software # All rights reserved. # @@ -50,7 +50,7 @@ module LibPath # Current version of the libpath.Ruby library - VERSION = '0.2.2.3' + VERSION = '0.2.3' private # @!visibility private diff --git a/libpath.gemspec b/libpath.gemspec index 597f1a3..d809fd4 100644 --- a/libpath.gemspec +++ b/libpath.gemspec @@ -1,32 +1,43 @@ -# gemspec for libpath +# ######################################################################## # +# File: libpath.gemspec +# +# Purpose: Gemspec for libpath.Ruby library +# +# Created: 8th January 2019 +# Updated: 15th August 2026 +# +# ######################################################################## # + $:.unshift File.join(File.dirname(__FILE__), 'lib') require 'libpath/version' -require 'date' Gem::Specification.new do |spec| spec.name = 'libpath-ruby' spec.version = LibPath::VERSION - spec.date = Date.today.to_s spec.summary = 'libpath.Ruby' spec.description = <= 0.21.1', '< 1.0' ] + spec.add_development_dependency "xqsr3", [ '>= 0.39.5', '< 1.0' ] - spec.files = Dir[ 'Rakefile', '{bin,examples,lib,man,spec,test}/**/*', 'README*', 'LICENSE*' ] & `git ls-files -z`.split("\0") + spec.files = Dir[ 'Rakefile', '{bin,examples,lib,man,spec,test}/**/*', 'README*', 'LICENSE*' ] & `git ls-files -z`.split("\0") end # ############################## end of file ############################# # - From 77f273086a6fd126c784de1f67f90df998cc78d4 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 06:46:42 +1000 Subject: [PATCH 19/32] chore: AUTHORS.md --- AUTHORS.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index fca3408..f51d08f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,17 +1,21 @@ # libpath.Ruby - Authors -## Major Contributors: +## Major Contributors -* Matt Wilson ([mwsis](https://github.com/mwsis)) +| Name | GitHub | +| ----------- | --------------------------------- | +| Matt Wilson | [mwsis](https://github.com/mwsis) | -## Defect reports, fixes and suggestions (for which we are very grateful): +## Defect reports, fixes and suggestions (for which we are very grateful) -* \ +| Name | GitHub | +| ----------- | --------------------------------- | +| \ | | -Contributions are welcomed. +Contributions are welcomed. From d87652151d4e84a48ee88506339829b21e1b05d4 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 06:50:09 +1000 Subject: [PATCH 20/32] fix: gemspec metadata --- libpath.gemspec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libpath.gemspec b/libpath.gemspec index d809fd4..ef1301c 100644 --- a/libpath.gemspec +++ b/libpath.gemspec @@ -34,6 +34,13 @@ END_DESC spec.required_ruby_version = '>= 2.0' + spec.metadata = { + 'bug_tracker_uri' => 'https://github.com/synesissoftware/libpath.Ruby/issues', + 'changelog_uri' => 'https://github.com/synesissoftware/libpath.Ruby/blob/master/CHANGES.md', + 'homepage_uri' => 'https://github.com/synesissoftware/libpath.Ruby', + 'source_code_uri' => 'https://github.com/synesissoftware/libpath.Ruby', + } + spec.add_development_dependency "xqsr3", [ '>= 0.39.5', '< 1.0' ] spec.files = Dir[ 'Rakefile', '{bin,examples,lib,man,spec,test}/**/*', 'README*', 'LICENSE*' ] & `git ls-files -z`.split("\0") From ebbe5fd2d752eea9ca5477c2e82be5215fb37642 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 07:55:53 +1000 Subject: [PATCH 21/32] added/updated Rakefile --- Rakefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Rakefile diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..d461f24 --- /dev/null +++ b/Rakefile @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Rakefile for libpath.Ruby + +require 'rake/testtask' + + +Rake::TestTask.new do |tt| + + tt.libs << 'lib' + tt.libs << 'test' + tt.name = 'test' + tt.test_files = FileList['test/**/tc_*.rb'] + tt.verbose = true +end + + +task :default => :test + + +# ############################## end of file ############################# # From 60f67c3968c18a7fc8c13a75007e490c7f086b0c Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 08:11:09 +1000 Subject: [PATCH 22/32] chore: CONTRIBUTING.md, INSTALL.md, SECURITY.md --- CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ INSTALL.md | 41 +++++++++++++++++++++++++++++++++++++++++ SECURITY.md | 23 +++++++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 INSTALL.md create mode 100644 SECURITY.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..735a888 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,36 @@ +# libpath.Ruby - Contributing + + +## Table of Contents + +- [Defects and features](#defects-and-features) +- [Pull requests](#pull-requests) +- [Tests](#tests) +- [License](#license) + + +## Defects and features + +Open an issue on https://github.com/synesissoftware/libpath.Ruby/issues. + + +## Pull requests + +Pull requests are welcome on https://github.com/synesissoftware/libpath.Ruby. Keep diffs local to the change; match existing indentation (2 spaces in Ruby) and the Synesis markdown set (**README.md**, **CHANGES.md**, **NEWS.md**, **TODO.md**, **INSTALL.md**, **CONTRIBUTING.md**, **SECURITY.md**). + + +## Tests + +``` +bundle exec rake test +``` + +or `./run_all_unit_tests.sh`. + + +## License + +Contributions are accepted under the 3-clause BSD license. See [LICENSE](./LICENSE). + + + diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..1937f38 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,41 @@ +# libpath.Ruby - Installation and Use + + +## Table of Contents + +- [Install the gem](#install-the-gem) +- [From a source checkout](#from-a-source-checkout) +- [Using the library](#using-the-library) + + +## Install the gem + +``` +gem install libpath-ruby +``` + +or add to a **Gemfile**: + +```Ruby +gem 'libpath-ruby' +``` + +then `bundle install`. + + +## From a source checkout + +``` +bundle install +bundle exec rake test +``` + + +## Using the library + +```Ruby +require 'libpath' +``` + + + diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..ce0bc31 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,23 @@ +# libpath.Ruby - Security + + +## Table of Contents + +- [Reporting a vulnerability](#reporting-a-vulnerability) +- [Supported versions](#supported-versions) + + +## Reporting a vulnerability + +Please report security issues privately via GitHub Security Advisories on https://github.com/synesissoftware/libpath.Ruby/security, or by opening an issue if an advisory cannot be filed. Do not attach exploit proofs of concept against third-party systems. + + +## Supported versions + +| Version | Supported | +| ------- | --------- | +| 0.2.x | ✅ | +| < 0.2 | ❌ | + + + From 53f01cf47dd463e209d1f75126e18c56c80ad013 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 08:15:02 +1000 Subject: [PATCH 23/32] chore: rake in Gemfile --- Gemfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Gemfile b/Gemfile index be173b2..29f6d2e 100644 --- a/Gemfile +++ b/Gemfile @@ -3,3 +3,14 @@ source "https://rubygems.org" gemspec + +# rake 13 requires Ruby >= 2.3 +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.3") + + gem "rake", '~> 13.0' +else + + gem "rake", '~> 12.3' +end + +gem "test-unit", '~> 3.0' From 5cf3e2e1d0e232dc0e702299395ac3455996738f Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 08:41:42 +1000 Subject: [PATCH 24/32] fix: Add frozen lib/ strings and standardise Ruby gem boilerplate --- CHANGES.md | 2 +- lib/libpath.rb | 2 +- lib/libpath/constants.rb | 2 +- lib/libpath/constants/unix.rb | 3 ++- lib/libpath/constants/windows.rb | 3 ++- lib/libpath/diagnostics.rb | 2 +- lib/libpath/diagnostics/parameter_checking.rb | 2 +- lib/libpath/exceptions.rb | 2 +- lib/libpath/exceptions/libpath_base_exception.rb | 4 ++-- lib/libpath/exceptions/malformed_name_exception.rb | 4 ++-- lib/libpath/form.rb | 2 +- lib/libpath/form/unix.rb | 4 ++-- lib/libpath/form/windows.rb | 4 ++-- lib/libpath/internal_/array.rb | 2 +- lib/libpath/internal_/platform.rb | 2 +- lib/libpath/internal_/string.rb | 2 +- lib/libpath/internal_/unix/form.rb | 2 +- lib/libpath/internal_/windows/drive.rb | 2 +- lib/libpath/internal_/windows/form.rb | 2 +- lib/libpath/libpath.rb | 2 +- lib/libpath/path.rb | 2 +- lib/libpath/path/unix.rb | 4 ++-- lib/libpath/path/windows.rb | 4 ++-- lib/libpath/util.rb | 2 +- lib/libpath/util/unix.rb | 4 ++-- lib/libpath/util/windows.rb | 4 ++-- lib/libpath/version.rb | 1 + 27 files changed, 37 insertions(+), 34 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 24f3d85..f841353 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,7 @@ ## 0.2.3 - 15th August 2026 -T.B.C. +* added `# frozen_string_literal: true` to all **lib/** sources; ## 0.2.2.3 - 13th April 2024 diff --git a/lib/libpath.rb b/lib/libpath.rb index 42e07f0..b97fb3f 100644 --- a/lib/libpath.rb +++ b/lib/libpath.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true require 'libpath/libpath' require 'libpath/form' diff --git a/lib/libpath/constants.rb b/lib/libpath/constants.rb index f4d5e19..cd4344a 100644 --- a/lib/libpath/constants.rb +++ b/lib/libpath/constants.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true require 'libpath/internal_/platform' if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then diff --git a/lib/libpath/constants/unix.rb b/lib/libpath/constants/unix.rb index 5b3ad6c..7c4b480 100644 --- a/lib/libpath/constants/unix.rb +++ b/lib/libpath/constants/unix.rb @@ -1,10 +1,11 @@ +# frozen_string_literal: true # ######################################################################## # # File: libpath/constants/unix.rb # # Purpose: LibPath::Constants::Unix module # # Created: 29th January 2019 -# Updated: 7th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/constants/windows.rb b/lib/libpath/constants/windows.rb index 4e6222e..9814fed 100644 --- a/lib/libpath/constants/windows.rb +++ b/lib/libpath/constants/windows.rb @@ -1,10 +1,11 @@ +# frozen_string_literal: true # ######################################################################## # # File: libpath/constants/windows.rb # # Purpose: LibPath::Constants::Windows module # # Created: 29th January 2019 -# Updated: 7th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/diagnostics.rb b/lib/libpath/diagnostics.rb index 800e6d9..c059a75 100644 --- a/lib/libpath/diagnostics.rb +++ b/lib/libpath/diagnostics.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true require 'libpath/diagnostics/parameter_checking' diff --git a/lib/libpath/diagnostics/parameter_checking.rb b/lib/libpath/diagnostics/parameter_checking.rb index 629e563..10fd490 100644 --- a/lib/libpath/diagnostics/parameter_checking.rb +++ b/lib/libpath/diagnostics/parameter_checking.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true module LibPath # @!visibility private module Diagnostics # :nodoc: diff --git a/lib/libpath/exceptions.rb b/lib/libpath/exceptions.rb index 0e6a76c..3e2a09c 100644 --- a/lib/libpath/exceptions.rb +++ b/lib/libpath/exceptions.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true require 'libpath/exceptions/libpath_base_exception' require 'libpath/exceptions/malformed_name_exception' diff --git a/lib/libpath/exceptions/libpath_base_exception.rb b/lib/libpath/exceptions/libpath_base_exception.rb index b78e333..81ec22a 100644 --- a/lib/libpath/exceptions/libpath_base_exception.rb +++ b/lib/libpath/exceptions/libpath_base_exception.rb @@ -1,11 +1,11 @@ - +# frozen_string_literal: true # ######################################################################## # # File: libpath/exceptions/libpath_base_exception.rb # # Purpose: LibPathBaseException class # # Created: 30th January 2019 -# Updated: 7th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/exceptions/malformed_name_exception.rb b/lib/libpath/exceptions/malformed_name_exception.rb index 6c5deaa..ce72728 100644 --- a/lib/libpath/exceptions/malformed_name_exception.rb +++ b/lib/libpath/exceptions/malformed_name_exception.rb @@ -1,11 +1,11 @@ - +# frozen_string_literal: true # ######################################################################## # # File: libpath/exceptions/malformed_name_exception.rb # # Purpose: MalformedNameException class # # Created: 30th January 2019 -# Updated: 13th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/form.rb b/lib/libpath/form.rb index 8eae668..54325fa 100644 --- a/lib/libpath/form.rb +++ b/lib/libpath/form.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true require 'libpath/internal_/platform' if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then diff --git a/lib/libpath/form/unix.rb b/lib/libpath/form/unix.rb index fad0373..dc0fc3e 100644 --- a/lib/libpath/form/unix.rb +++ b/lib/libpath/form/unix.rb @@ -1,11 +1,11 @@ - +# frozen_string_literal: true # ######################################################################## # # File: libpath/form/unix.rb # # Purpose: LibPath::Form::Unix module # # Created: 8th January 2019 -# Updated: 13th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/form/windows.rb b/lib/libpath/form/windows.rb index a34acd0..83404e0 100644 --- a/lib/libpath/form/windows.rb +++ b/lib/libpath/form/windows.rb @@ -1,11 +1,11 @@ - +# frozen_string_literal: true # ######################################################################## # # File: libpath/form/windows.rb # # Purpose: LibPath::Form::Windows module # # Created: 8th January 2019 -# Updated: 13th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/internal_/array.rb b/lib/libpath/internal_/array.rb index c334b7f..12df2cc 100644 --- a/lib/libpath/internal_/array.rb +++ b/lib/libpath/internal_/array.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true # :stopdoc: diff --git a/lib/libpath/internal_/platform.rb b/lib/libpath/internal_/platform.rb index 568d2f5..adf352f 100644 --- a/lib/libpath/internal_/platform.rb +++ b/lib/libpath/internal_/platform.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true # :stopdoc: diff --git a/lib/libpath/internal_/string.rb b/lib/libpath/internal_/string.rb index bea01c6..075a86a 100644 --- a/lib/libpath/internal_/string.rb +++ b/lib/libpath/internal_/string.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true # :stopdoc: diff --git a/lib/libpath/internal_/unix/form.rb b/lib/libpath/internal_/unix/form.rb index e64222b..51db63e 100644 --- a/lib/libpath/internal_/unix/form.rb +++ b/lib/libpath/internal_/unix/form.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true # :stopdoc: diff --git a/lib/libpath/internal_/windows/drive.rb b/lib/libpath/internal_/windows/drive.rb index 10d0449..d73ba6e 100644 --- a/lib/libpath/internal_/windows/drive.rb +++ b/lib/libpath/internal_/windows/drive.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true # :stopdoc: diff --git a/lib/libpath/internal_/windows/form.rb b/lib/libpath/internal_/windows/form.rb index d0e9908..b385920 100644 --- a/lib/libpath/internal_/windows/form.rb +++ b/lib/libpath/internal_/windows/form.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true # :stopdoc: diff --git a/lib/libpath/libpath.rb b/lib/libpath/libpath.rb index 27b8e87..3407b0c 100644 --- a/lib/libpath/libpath.rb +++ b/lib/libpath/libpath.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true # Top-level module for the *libpath.Ruby* library module LibPath diff --git a/lib/libpath/path.rb b/lib/libpath/path.rb index 4a18716..5ffed2f 100644 --- a/lib/libpath/path.rb +++ b/lib/libpath/path.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true require 'libpath/internal_/platform' if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then diff --git a/lib/libpath/path/unix.rb b/lib/libpath/path/unix.rb index d28ab48..8997069 100644 --- a/lib/libpath/path/unix.rb +++ b/lib/libpath/path/unix.rb @@ -1,11 +1,11 @@ - +# frozen_string_literal: true # ######################################################################## # # File: libpath/path/unix.rb # # Purpose: LibPath::Path::Unix module # # Created: 21st January 2019 -# Updated: 13th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/path/windows.rb b/lib/libpath/path/windows.rb index 00ae36c..23cb79b 100644 --- a/lib/libpath/path/windows.rb +++ b/lib/libpath/path/windows.rb @@ -1,11 +1,11 @@ - +# frozen_string_literal: true # ######################################################################## # # File: libpath/path/windows.rb # # Purpose: LibPath::Path::Windows module # # Created: 21st January 2019 -# Updated: 13th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/util.rb b/lib/libpath/util.rb index 626553d..59f3e15 100644 --- a/lib/libpath/util.rb +++ b/lib/libpath/util.rb @@ -1,4 +1,4 @@ - +# frozen_string_literal: true require 'libpath/internal_/platform' if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then diff --git a/lib/libpath/util/unix.rb b/lib/libpath/util/unix.rb index 99f45ea..50359b2 100644 --- a/lib/libpath/util/unix.rb +++ b/lib/libpath/util/unix.rb @@ -1,11 +1,11 @@ - +# frozen_string_literal: true # ######################################################################## # # File: libpath/util/unix.rb # # Purpose: LibPath::Util::Unix module # # Created: 14th January 2019 -# Updated: 13th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/util/windows.rb b/lib/libpath/util/windows.rb index eed5ac6..cf0470f 100644 --- a/lib/libpath/util/windows.rb +++ b/lib/libpath/util/windows.rb @@ -1,11 +1,11 @@ - +# frozen_string_literal: true # ######################################################################## # # File: libpath/util/windows.rb # # Purpose: LibPath::Util::Windows module # # Created: 10th January 2019 -# Updated: 13th April 2024 +# Updated: 15th August 2026 # # Home: http://github.com/synesissoftware/libpath.Ruby # diff --git a/lib/libpath/version.rb b/lib/libpath/version.rb index 7efda84..8467ea5 100644 --- a/lib/libpath/version.rb +++ b/lib/libpath/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # ######################################################################## # # File: libpath/version.rb # From 5188e58670b58a0c741d27fc72503a492351dc1d Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 08:48:40 +1000 Subject: [PATCH 25/32] standard CI for all projects --- .github/workflows/ruby.yml | 117 +++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 .github/workflows/ruby.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 0000000..f2e4fd2 --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,117 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +# +# Created: 15th August 2026 +# Updated: 15th August 2026 +# + +name: Ruby + +on: + push: + branches: + - master + - dev + - boilerplate + - idiomatic + - rc1 + - rc2 + - rc3 + pull_request: + +permissions: + contents: read + +defaults: + run: + shell: bash + +jobs: + test: + + strategy: + fail-fast: false + + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + + ruby-version: + # - head + - '3.4' + - '3.3' + - '3.2' + - '3.1' + - '3.0' + - '2.7' + - '2.6' + + include: + - os: ubuntu-latest + ruby-version: '2.5' + - os: ubuntu-latest + ruby-version: '2.4' + - os: ubuntu-latest + ruby-version: '2.0' + - os: windows-latest + ruby-version: mingw + + runs-on: ${{ matrix.os }} + + steps: + - name: Checking out code + uses: actions/checkout@v4 + + - name: Remove Gemfile.lock + run: rm -f Gemfile.lock + + - name: Set up Ruby v${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + + - name: Show Ruby version + run: ruby -v + + - name: Run tests + run: bundle exec rake test + + - name: Gem build and install smoke + shell: bash + run: | + gem build libpath.gemspec + gem install --local libpath-ruby-*.gem + ruby -e "require 'libpath/version'; abort('VERSION missing') unless defined?(LibPath::VERSION); puts LibPath::VERSION" + + warnings: + + name: Warnings + + runs-on: ubuntu-latest + + steps: + - name: Checking out code + uses: actions/checkout@v4 + + - name: Remove Gemfile.lock + run: rm -f Gemfile.lock + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + + - name: Show Ruby version + run: ruby -v + + - name: Run unit tests with warnings + run: ./run_all_unit_tests.sh --lib --warnings From 340ca075c906a56f7c759ec3727d5dc6a8813713 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 08:56:55 +1000 Subject: [PATCH 26/32] standard .editorconfig and dependabot for all projects --- .editorconfig | 64 ++++++++++++++++++++++++++++++++++++++++++ .github/dependabot.yml | 10 +++++++ 2 files changed, 74 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/dependabot.yml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8d78c5d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,64 @@ +root = true + +# Language indent/EOL/charset overlap with .vscode/settings.json. +# Rulers, renderWhitespace, detectIndentation, mergeEditor, and +# cmake.configureOnOpen cannot be expressed here — they stay in settings.json. + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true + +# [bat] +[*.{bat,cmd}] +end_of_line = crlf +indent_size = 4 +indent_style = space + +# [c] +[*.{c,h}] +indent_size = 4 +indent_style = space + +# [cmake] +[{CMakeLists.txt,*.cmake}] +indent_size = 4 +indent_style = tab + +# [cpp] +[*.{cpp,cxx,hpp,hxx}] +indent_size = 4 +indent_style = space + +# [json] +[*.json] +indent_size = 2 +indent_style = space + +# [markdown] +[*.md] +indent_size = 2 +indent_style = space +trim_trailing_whitespace = false + +# [ruby] +[*.{gemspec,rb}] +indent_size = 2 +indent_style = space + +[{Gemfile,Rakefile}] +indent_size = 2 +indent_style = space + +# [shellscript] +[*.{bash,sh,zsh}] +indent_size = 2 +indent_style = space + +# [yaml] +[*.{yaml,yml}] +indent_size = 2 +indent_style = space diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3189593 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - directory: / + package-ecosystem: bundler + schedule: + interval: weekly + - directory: / + package-ecosystem: github-actions + schedule: + interval: weekly From 7d152850a3539e1af4f8980a1fcc62defb3ee0bf Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 09:01:52 +1000 Subject: [PATCH 27/32] TODO.md --- TODO.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 942e36b..58f8aa2 100644 --- a/TODO.md +++ b/TODO.md @@ -13,8 +13,7 @@ ## Packaging improvements -* \ - +* [ ] Rename gemspec so the filename stem matches `spec.name` (`libpath.gemspec` → **libpath-ruby.gemspec**); From 7f7b588f410619f1a5d7b1818bb137cd3fa06760 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 09:05:04 +1000 Subject: [PATCH 28/32] examples --- CHANGES.md | 1 + EXAMPLES.md | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f841353..abba806 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ ## 0.2.3 - 15th August 2026 * added `# frozen_string_literal: true` to all **lib/** sources; +* completed **EXAMPLES.md** (EOF marker; table alignment); ## 0.2.2.3 - 13th April 2024 diff --git a/EXAMPLES.md b/EXAMPLES.md index 205bca9..f62248b 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -1,7 +1,8 @@ # libpath.Ruby - Examples -|Name|Source & Description|Summary| -|---|---|---| -|**path_from_arg0**|[examples/path_from_arg0.rb](/examples/path_from_arg0.rb)
[examples/path_from_arg0.md](/examples/path_from_arg0.md)|Simple example illustrating creation of an instance of ``LibPath::Path::ParsedPath``, and obtaining from it its attributes| +| Name | Source & Description | Summary | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| **path_from_arg0** | [examples/path_from_arg0.rb](/examples/path_from_arg0.rb)
[examples/path_from_arg0.md](/examples/path_from_arg0.md) | Simple example illustrating creation of an instance of `LibPath::Path::ParsedPath`, and obtaining its attributes | + From cbf4e2e8670ce3b1a64d4ba861120e3fe2702613 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 09:16:16 +1000 Subject: [PATCH 29/32] CHANGES.md --- CHANGES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index abba806..8d00896 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -166,5 +166,4 @@ * initial version; - From ef57b58902312d9548baae7658057b9e6ebac487 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 09:24:06 +1000 Subject: [PATCH 30/32] NEWS.md --- NEWS.md | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1eedb13..0338e2e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,38 @@ # libpath.Ruby - News -| Date | News Item | -| ------------- | --------- | - +| Date | News Item | +| ----------------- | -------------------------------------------------------------------------------------------- | +| 15th August 2026 | [**libpath.Ruby** 0.2.3](https://github.com/synesissoftware/libpath.Ruby/releases/tag/0.2.3) | +| 13th April 2024 | [**libpath.Ruby** 0.2.2.3](https://github.com/synesissoftware/libpath.Ruby/releases/tag/0.2.2.3) | +| 7th April 2024 | **libpath.Ruby** 0.2.2.2 released | +| 6th April 2024 | **libpath.Ruby** 0.2.2.1 released | +| 18th May 2019 | **libpath.Ruby** 0.2.2 released | +| 16th April 2019 | **libpath.Ruby** 0.2.1 released | +| 16th April 2019 | **libpath.Ruby** 0.2.0.1 released | +| 30th January 2019 | **libpath.Ruby** 0.2.0 released | +| 30th January 2019 | **libpath.Ruby** 0.1.1.2 released | +| 30th January 2019 | **libpath.Ruby** 0.1.1.1 released | +| 28th January 2019 | **libpath.Ruby** 0.1.0 released | +| 27th January 2019 | **libpath.Ruby** 0.0.20 released | +| 27th January 2019 | **libpath.Ruby** 0.0.19 released | +| 27th January 2019 | **libpath.Ruby** 0.0.18 released | +| 27th January 2019 | **libpath.Ruby** 0.0.17 released | +| 27th January 2019 | **libpath.Ruby** 0.0.16 released | +| 25th January 2019 | **libpath.Ruby** 0.0.15 released | +| 25th January 2019 | **libpath.Ruby** 0.0.14 released | +| 25th January 2019 | **libpath.Ruby** 0.0.13 released | +| 21st January 2019 | **libpath.Ruby** 0.0.12 released | +| 21st January 2019 | **libpath.Ruby** 0.0.11 released | +| 20th January 2019 | **libpath.Ruby** 0.0.10 released | +| 20th January 2019 | **libpath.Ruby** 0.0.9 released | +| 20th January 2019 | **libpath.Ruby** 0.0.8 released | +| 19th January 2019 | **libpath.Ruby** 0.0.7 released | +| 17th January 2019 | **libpath.Ruby** 0.0.6 released | +| 9th January 2019 | **libpath.Ruby** 0.0.5 released | +| 9th January 2019 | **libpath.Ruby** 0.0.4 released | +| 9th January 2019 | **libpath.Ruby** 0.0.3 released | +| 8th January 2019 | **libpath.Ruby** 0.0.2 released | +| 8th January 2019 | **libpath.Ruby** 0.0.1 released | From 7b35c746c7f751f1f04545ab45d6152932398de7 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 09:28:42 +1000 Subject: [PATCH 31/32] README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 90f724a..5b9f664 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,15 @@ require 'libpath' ## Components -T.B.C. +The main components of **libpath.Ruby** are: + +* **`LibPath::Form`** — path-form classification and probes (`classify_path`, `path_is_absolute?`, `path_is_homed?`, `path_is_rooted?`, `name_is_malformed?`); +* **`LibPath::Path::ParsedPath`** — structured parse of a path string into directory / file / search-relative attributes (platform-selected Unix or Windows implementation); +* **`LibPath::Util`** — path combination and rewriting (`combine_paths`, `derive_relative_path`, `make_compare_path`, `make_path_absolute`, `make_path_canonical`); +* **`LibPath::Constants`** — platform path-name / path / shell character constants; +* **`LibPath::Exceptions`** — path-related exceptions such as `MalformedNameException`; + +Platform-specific details live under `::Unix` / `::Windows` submodules; the top-level `Form`, `Path`, and `Util` modules select the ambient OS automatically. ## Examples From 7398692bd70dbf722e1d608c4abaca8bd50f6e9e Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sat, 15 Aug 2026 10:08:25 +1000 Subject: [PATCH 32/32] spacing --- lib/libpath.rb | 1 + lib/libpath/constants.rb | 1 + lib/libpath/diagnostics.rb | 1 + lib/libpath/diagnostics/parameter_checking.rb | 1 + lib/libpath/exceptions.rb | 1 + lib/libpath/form.rb | 1 + lib/libpath/path.rb | 1 + lib/libpath/util.rb | 1 + 8 files changed, 8 insertions(+) diff --git a/lib/libpath.rb b/lib/libpath.rb index b97fb3f..4af06dc 100644 --- a/lib/libpath.rb +++ b/lib/libpath.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'libpath/libpath' require 'libpath/form' diff --git a/lib/libpath/constants.rb b/lib/libpath/constants.rb index cd4344a..c908365 100644 --- a/lib/libpath/constants.rb +++ b/lib/libpath/constants.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'libpath/internal_/platform' if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then diff --git a/lib/libpath/diagnostics.rb b/lib/libpath/diagnostics.rb index c059a75..65a9e1c 100644 --- a/lib/libpath/diagnostics.rb +++ b/lib/libpath/diagnostics.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'libpath/diagnostics/parameter_checking' diff --git a/lib/libpath/diagnostics/parameter_checking.rb b/lib/libpath/diagnostics/parameter_checking.rb index 10fd490..7c39799 100644 --- a/lib/libpath/diagnostics/parameter_checking.rb +++ b/lib/libpath/diagnostics/parameter_checking.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module LibPath # @!visibility private module Diagnostics # :nodoc: diff --git a/lib/libpath/exceptions.rb b/lib/libpath/exceptions.rb index 3e2a09c..96a05c6 100644 --- a/lib/libpath/exceptions.rb +++ b/lib/libpath/exceptions.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'libpath/exceptions/libpath_base_exception' require 'libpath/exceptions/malformed_name_exception' diff --git a/lib/libpath/form.rb b/lib/libpath/form.rb index 54325fa..7e37d9f 100644 --- a/lib/libpath/form.rb +++ b/lib/libpath/form.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'libpath/internal_/platform' if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then diff --git a/lib/libpath/path.rb b/lib/libpath/path.rb index 5ffed2f..d549893 100644 --- a/lib/libpath/path.rb +++ b/lib/libpath/path.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'libpath/internal_/platform' if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then diff --git a/lib/libpath/util.rb b/lib/libpath/util.rb index 59f3e15..a066786 100644 --- a/lib/libpath/util.rb +++ b/lib/libpath/util.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'libpath/internal_/platform' if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then