Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6608451
**run_all_unit_tests.sh** : ~ updated to latest (from https://github.…
synesissoftware Aug 14, 2026
d045585
boilerplate: markdown files
synesissoftware Aug 14, 2026
de7da58
boilerplate: .gitattributes
synesissoftware Aug 14, 2026
3216c36
boilerplate: LICENSE
synesissoftware Aug 14, 2026
9c7c42e
boilerplate: .vscode/settings.json
synesissoftware Aug 14, 2026
84bd78d
boilerplate: .vimrc
synesissoftware Aug 14, 2026
447c540
boilerplate: build_gem.cmd, build_gem.sh, generate_rdoc.cmd, generate…
synesissoftware Aug 14, 2026
241252b
boilerplate: LICENSE
synesissoftware Aug 14, 2026
d5e235f
bolierplate: updating Gemfile
synesissoftware Aug 14, 2026
9244a43
boilerplate: placeholder markdown files
synesissoftware Aug 14, 2026
3cb069c
chore: removed .ruby-version from repository
synesissoftware Aug 14, 2026
90ebc48
boilerplate: .gitignore
synesissoftware Aug 14, 2026
8081fd4
version dependencies
synesissoftware Aug 14, 2026
5012945
boilerplate: .ruby-version-exclusions
synesissoftware Aug 14, 2026
ed57423
Add canonical AUTHORS, FAQ, NEWS, and TODO markdown skeletons
synesissoftware Aug 14, 2026
0c7260a
Fill CHANGES.md from release tags and git history
synesissoftware Aug 14, 2026
ac09aef
Add ruby.yml CI badge and switch Gemfile to gemspec
synesissoftware Aug 14, 2026
1092cd0
chore: dependencies
synesissoftware Aug 14, 2026
29c203d
gemspec updates
synesissoftware Aug 14, 2026
360e74f
chore: AUTHORS.md
synesissoftware Aug 14, 2026
3d92bf8
fix: gemspec metadata
synesissoftware Aug 14, 2026
2330b33
added/updated Rakefile
synesissoftware Aug 14, 2026
aef9303
chore: CONTRIBUTING.md, INSTALL.md, SECURITY.md
synesissoftware Aug 14, 2026
4891cb0
chore: rake in Gemfile
synesissoftware Aug 14, 2026
6d67e62
fix: Add frozen lib/ strings and standardise Ruby gem boilerplate
synesissoftware Aug 14, 2026
d150d7d
standard CI for all projects
synesissoftware Aug 14, 2026
0c8113c
standard .editorconfig and dependabot for all projects
synesissoftware Aug 14, 2026
10e5aa0
TODO.md
synesissoftware Aug 14, 2026
7ff2b82
examples
synesissoftware Aug 14, 2026
4b47b46
CHANGES.md
synesissoftware Aug 14, 2026
4ad4171
NEWS.md
synesissoftware Aug 14, 2026
f37e947
README.md
synesissoftware Aug 14, 2026
300afb8
spacing
synesissoftware Aug 15, 2026
ff80eda
0.2.5
synesissoftware Aug 19, 2026
b32971a
TODO.md
synesissoftware Aug 19, 2026
35e7370
Merge branch 'dev' into 'bp-2'
synesissoftware Aug 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#
# Created: 15th August 2026
# Updated: 15th August 2026
# Updated: 19th August 2026
#

name: Ruby
Expand Down Expand Up @@ -70,13 +70,20 @@ jobs:
uses: actions/checkout@v4

- name: Remove Gemfile.lock
shell: bash
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
# Bundler 4 honours Gemfile `lockfile false`, so no Gemfile.lock
# is written. bundler-cache cats that file after `bundle lock`
# and fails on Windows 3.2+ (setup-ruby installs Bundler ~> 4).
bundler-cache: false

- name: Install gems
run: bundle install

- name: Show Ruby version
run: ruby -v
Expand All @@ -87,7 +94,7 @@ jobs:
- name: Gem build and install smoke
shell: bash
run: |
gem build cmpfs.gemspec
gem build cmpfs-ruby.gemspec
gem install --local cmpfs-ruby-*.gem
ruby -e "require 'cmpfs/version'; abort('VERSION missing') unless defined?(CmpFS::VERSION); puts CmpFS::VERSION"

Expand All @@ -102,13 +109,17 @@ jobs:
uses: actions/checkout@v4

- name: Remove Gemfile.lock
shell: bash
run: rm -f Gemfile.lock

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
ruby-version: '3.4'
bundler-cache: false

- name: Install gems
run: bundle install

- name: Show Ruby version
run: ruby -v
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

/.bzr/
/.bundle/
/.bzr/
/.config/
/.svn/
/.vscode/
/.yardoc/

/_build/
/_yardoc/

/InstalledFiles/
Expand All @@ -23,17 +26,22 @@
/tmp/
/vendor/bundle/


# directories (by pattern)


# files (by name)

.DS_Store
.repl_history
.ruby-version
.rvmrc

Gemfile.lock

/spec/examples.txt


# files (by pattern)

*~
Expand Down
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# cmpfs.Ruby - Changes <!-- omit in toc -->


## 0.2.5 - 19th August 2026

* renamed **cmpfs.gemspec** to **cmpfs-ruby.gemspec** so the filename stem matches `spec.name`;
* **cmpfs-ruby.gemspec**: `spec.summary` matches the README tagline; packaged **AUTHORS**, **CHANGES**, **CONTRIBUTING**, **EXAMPLES**, **FAQ**, **INSTALL**, **NEWS**, **SECURITY**, and **TODO**; **Gemfile.lock** and **.ruby-version** excluded from `spec.files`;
* stop tracking **Gemfile.lock**; **Gemfile** sets `lockfile false` when Bundler supports it; CI uses `bundler-cache: false` because Bundler 4 then writes no lockfile and **ruby/setup-ruby** cache cats **Gemfile.lock**;
* CI **Warnings** job now runs on Ruby **3.4**; `gem build cmpfs-ruby.gemspec`;
* updated **run_all_unit_tests.sh** (from https://github.com/synesissoftware/misc-dev-scripts) to skip **tput** when **$TERM** is unset or stdout is not a TTY;
* reordered **README.md** (tagline before badges; TOC after badges), added Language / License / Last Commit badges and **Dependencies** (Efferent / Afferent);
* **EXAMPLES.md** example links are repo-relative (`./examples/…`);
* library source **Home:** URLs now use `https`;


## 0.2.4 - 15th August 2026

* added `# frozen_string_literal: true` to all **lib/** sources;
Expand Down
8 changes: 4 additions & 4 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# cmpfs.Ruby - Examples <!-- omit in toc -->

| Name | Source & Description | Summary |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| **compare_two_binary_files** | [examples/compare_two_binary_files.rb](/examples/compare_two_binary_files.rb)<br/>[examples/compare_two_binary_files.md](/examples/compare_two_binary_files.md) | Compares two files for binary equality via `compare_binary` |
| **compare_two_text_files** | [examples/compare_two_text_files.rb](/examples/compare_two_text_files.rb)<br/>[examples/compare_two_text_files.md](/examples/compare_two_text_files.md) | Compares two files for text equality via `compare_text` (skip blank lines; trim) |
|Name|Source & Description|Summary|
|---|---|---|
|**compare_two_binary_files**|[examples/compare_two_binary_files.rb](./examples/compare_two_binary_files.rb)<br/>[examples/compare_two_binary_files.md](./examples/compare_two_binary_files.md)|Compares two files for binary equality via `compare_binary`|
|**compare_two_text_files**|[examples/compare_two_text_files.rb](./examples/compare_two_text_files.rb)<br/>[examples/compare_two_text_files.md](./examples/compare_two_text_files.md)|Compares two files for text equality via `compare_text` (skip blank lines; trim)|


<!-- ########################### end of file ########################### -->
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

source "https://rubygems.org"

# Suppress lockfile on Bundler 4+ (gem: do not pin the graph). No-op on
# Bundler that lacks the DSL (Ruby 2.x CI). Do not combine with
# ruby/setup-ruby `bundler-cache: true` — that action cats Gemfile.lock
# after `bundle lock` and fails when no file is written (Windows 3.2+,
# where setup-ruby installs Bundler ~> 4).
lockfile false if respond_to?(:lockfile)

gemspec

# rake 13 requires Ruby >= 2.3
Expand Down
20 changes: 0 additions & 20 deletions Gemfile.lock

This file was deleted.

1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

| Date | News Item |
| ---------------- | ---------------------------------------------------------------------------------------- |
| 19th August 2026 | [**cmpfs.Ruby** 0.2.5](https://github.com/synesissoftware/cmpfs.Ruby/releases/tag/0.2.5) |
| 15th August 2026 | [**cmpfs.Ruby** 0.2.4](https://github.com/synesissoftware/cmpfs.Ruby/releases/tag/0.2.4) |
| 4th April 2024 | [**cmpfs.Ruby** 0.2.3](https://github.com/synesissoftware/cmpfs.Ruby/releases/tag/0.2.3) |
| 4th April 2024 | **cmpfs.Ruby** 0.2.2.1 released |
Expand Down
71 changes: 64 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

**Com**pare **F**ile-**S**ystem entities, for **Ruby**

![Language](https://img.shields.io/badge/Ruby-CC342D?style=flat&logo=ruby&logoColor=white)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Gem Version](https://badge.fury.io/rb/cmpfs-ruby.svg)](https://badge.fury.io/rb/cmpfs-ruby)
[![Last Commit](https://img.shields.io/github/last-commit/synesissoftware/cmpfs.Ruby)](https://github.com/synesissoftware/cmpfs.Ruby/commits/master)
[![Ruby](https://github.com/synesissoftware/cmpfs.Ruby/actions/workflows/ruby.yml/badge.svg)](https://github.com/synesissoftware/cmpfs.Ruby/actions/workflows/ruby.yml)


## Introduction

Provides platform-independent facilities for comparing file contents, for both binary and text files


## Table of Contents <!-- omit in toc -->

- [Introduction](#introduction)
Expand All @@ -21,13 +19,38 @@ Provides platform-independent facilities for comparing file contents, for both b
- [Where to get help](#where-to-get-help)
- [Contribution guidelines](#contribution-guidelines)
- [Dependencies](#dependencies)
- [Efferent (fan-out)](#efferent-fan-out)
- [Runtime Dependencies (aka "Normal Dependencies")](#runtime-dependencies-aka-normal-dependencies)
- [Development Dependencies](#development-dependencies)
- [Afferent (fan-in)](#afferent-fan-in)
- [Runtime dependents](#runtime-dependents)
- [Development dependents](#development-dependents)
- [Related projects](#related-projects)
- [License](#license)


## Introduction

**cmpfs.Ruby** provides platform-independent facilities for comparing file contents, for both binary and text files.

It has **no dependencies** on any other non-standard library.


## Installation

Install using `gem install cmpfs-ruby` or add it to your `Gemfile`.
Install via **gem** as in:

```
gem install cmpfs-ruby
```

or add it to your `Gemfile`.

Use via **require**, as in:

```Ruby
require 'cmpfs'
```


## Components
Expand All @@ -46,6 +69,8 @@ all of which are obtained when `extend`ing or `include`ing the `CmpFS` module.

## Examples

Examples are provided in the ```examples``` directory, along with a markdown description for each. A detailed list TOC of them is provided in [EXAMPLES.md](./EXAMPLES.md).

**examples/compare_two_binary_files.rb**:
```Ruby
#! /usr/bin/env ruby
Expand Down Expand Up @@ -143,6 +168,7 @@ $stdout.puts "files are #{compare_text(lhs_path, rhs_path, skip_blank_lines: tru

## Project Information


### Where to get help

[GitHub Page](https://github.com/synesissoftware/cmpfs.Ruby "GitHub Page")
Expand All @@ -156,6 +182,38 @@ Defect reports, feature requests, and pull requests are welcome on https://githu
### Dependencies


#### Efferent (fan-out)

Libraries upon which **cmpfs.Ruby** depends:


##### Runtime Dependencies (aka "Normal Dependencies")

* \<none>;


##### Development Dependencies

* [**rake**](https://rubygems.org/gems/rake);
* [**test-unit**](https://rubygems.org/gems/test-unit);
* [**xqsr3**](https://github.com/synesissoftware/xqsr3);


#### Afferent (fan-in)

Projects that depend on **cmpfs.Ruby**:


##### Runtime dependents

* \<none>;


##### Development dependents

* \<none>;


### Related projects

* C/C++ **cmpfs** — same product idea (binary/text file and stream comparison); recovery into freelibs is planned beside this gem (not yet published as a sibling tree here);
Expand All @@ -167,4 +225,3 @@ Defect reports, feature requests, and pull requests are welcome on https://githu


<!-- ########################### end of file ########################### -->

9 changes: 7 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

## Functional improvements

* \<none>
* [ ] quiet assigned-but-unused variable warnings in **lib/cmpfs/compare/text/internal_.rb** (`lhs_ix`, `rhs_ix`, `lhs_nr`, `rhs_nr`; Ruby 3.4 `-W` / CI **Warnings** job);
* [ ] quiet the ambiguous `/` regexp warning in **test/unit/tc_version.rb** (Ruby 3.4 `-W` / CI **Warnings** job);


## Performance improvements
Expand All @@ -13,7 +14,11 @@

## Packaging improvements

* [ ] Rename gemspec so the filename stem matches `spec.name` (`cmpfs.gemspec` → **cmpfs-ruby.gemspec**);
* [x] ~~~updated **run_all_unit_tests.sh** (from **misc-dev-scripts**) to skip `tput` when `$TERM` is unset or stdout is not a TTY~~~;
* [x] ~~~**Gemfile** `lockfile false`; stop tracking **Gemfile.lock**; CI `bundler-cache: false`~~~;
* [x] ~~~gemspec polish: README tagline as `spec.summary`, package docs, exclude **Gemfile.lock** / **.ruby-version**; renamed **cmpfs.gemspec** → **cmpfs-ruby.gemspec**~~~;
* [x] ~~~README canonical structure (tagline before badges; **Dependencies**; CI badge → **ruby.yml**)~~~;
* [x] ~~~after the packaging/boilerplate/CI baseline: bump **VERSION** and align **CHANGES**/**NEWS**~~~;


<!-- ########################### end of file ########################### -->
33 changes: 26 additions & 7 deletions cmpfs.gemspec → cmpfs-ruby.gemspec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# ######################################################################### #
# File: cmpfs.gemspec
# ######################################################################## #
# File: cmpfs-ruby.gemspec
#
# Purpose: Gemspec for cmpfs.Ruby library
#
# Created: 1st March 2019
# Updated: 15th August 2026
# Updated: 19th August 2026
#
# ######################################################################### #
# ######################################################################## #


$:.unshift File.join(File.dirname(__FILE__), 'lib')
Expand All @@ -17,8 +17,8 @@ require 'cmpfs/version'
Gem::Specification.new do |spec|

spec.name = 'cmpfs-ruby'
spec.summary = 'Compare File-System entities, for Ruby'
spec.version = CmpFS::VERSION
spec.summary = 'CmpFS.Ruby'
spec.description = <<END_DESC
Compare File-System entities, for Ruby is a library that provides comparison
functions for file-system entities - files and streams - including binary and
Expand All @@ -33,7 +33,6 @@ END_DESC
]
spec.homepage = 'https://github.com/synesissoftware/cmpfs.Ruby'
spec.license = 'BSD-3-Clause'
spec.files = Dir[ 'Rakefile', '{bin,examples,lib,man,spec,test}/**/*', 'README*', 'LICENSE*' ] & `git ls-files -z`.split("\0")

spec.required_ruby_version = [ '>= 1.9.3' ]

Expand All @@ -44,7 +43,27 @@ END_DESC
'source_code_uri' => 'https://github.com/synesissoftware/cmpfs.Ruby',
}

spec.add_development_dependency "xqsr3", [ '>= 0.39.5', '< 1.0' ]
spec.files = Dir[
'Rakefile',
'{bin,examples,lib,man,spec,test}/**/*',
'AUTHORS*',
'CHANGES*',
'CONTRIBUTING*',
'EXAMPLES*',
'FAQ*',
'INSTALL*',
'LICENSE*',
'NEWS*',
'README*',
'SECURITY*',
'TODO*',
] & `git ls-files -z`.split("\0")
spec.files -= [
'.ruby-version',
'Gemfile.lock',
]

spec.add_development_dependency 'xqsr3', [ '>= 0.39.5', '< 1.0' ]
end


Expand Down
4 changes: 2 additions & 2 deletions lib/cmpfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# Purpose: Primary require for cmpfs.Ruby library
#
# Created: 1st March 2019
# Updated: 15th August 2026
# Updated: 19th August 2026
#
# Home: http://github.com/synesissoftware/cmpfs.Ruby
# Home: https://github.com/synesissoftware/cmpfs.Ruby
#
# Author: Matthew Wilson
#
Expand Down
Loading
Loading