diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 172d28c..f37b4c2 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,7 +7,7 @@ # # Created: 15th August 2026 -# Updated: 27th August 2026 +# Updated: 28th August 2026 # name: Ruby @@ -22,6 +22,7 @@ on: - rc1 - rc2 - rc3 + - warnings pull_request: permissions: diff --git a/CHANGES.md b/CHANGES.md index c842ae7..dc7c4ab 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,14 @@ # cmpfs.Ruby - Changes +## 0.2.6 - 30th August 2026 + +* removed unused local variable assignments from text stream comparison; +* parenthesised the regular expression argument in the version test to eliminate an ambiguous regular expression warning under Ruby 3.4 `-W`; +* added the `warnings` branch to CI push triggers and upgraded **actions/checkout** to v7; +* centralised the project URL in **cmpfs-ruby.gemspec** for the homepage and metadata URLs; + + ## 0.2.5 - 27th August 2026 * renamed **cmpfs.gemspec** to **cmpfs-ruby.gemspec** so the filename stem matches `spec.name`; diff --git a/NEWS.md b/NEWS.md index ffb3aee..d75e3e0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ | Date | News Item | | ---------------- | ---------------------------------------------------------------------------------------- | +| 30th August 2026 | [**cmpfs.Ruby** 0.2.6](https://github.com/synesissoftware/cmpfs.Ruby/releases/tag/0.2.6) | | 27th 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) | diff --git a/TODO.md b/TODO.md index c90fa18..d54611b 100644 --- a/TODO.md +++ b/TODO.md @@ -3,8 +3,8 @@ ## Functional improvements -* [ ] 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); +* [x] ~~~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)~~~ - ✅; +* [x] ~~~quiet the ambiguous `/` regexp warning in **test/unit/tc_version.rb** (Ruby 3.4 `-W` / CI **Warnings** job)~~~ - ✅; ## Performance improvements diff --git a/cmpfs-ruby.gemspec b/cmpfs-ruby.gemspec index 6c3b73c..5f6dc52 100644 --- a/cmpfs-ruby.gemspec +++ b/cmpfs-ruby.gemspec @@ -4,7 +4,7 @@ # Purpose: Gemspec for cmpfs.Ruby library # # Created: 1st March 2019 -# Updated: 27th August 2026 +# Updated: 28th August 2026 # # ######################################################################## # @@ -14,6 +14,9 @@ $:.unshift File.join(File.dirname(__FILE__), 'lib') require 'cmpfs/version' +PROJECT_URL = 'https://github.com/synesissoftware/cmpfs.Ruby' + + Gem::Specification.new do |spec| spec.name = 'cmpfs-ruby' @@ -31,16 +34,16 @@ END_DESC spec.email = [ 'matthew@synesis.com.au', ] - spec.homepage = 'https://github.com/synesissoftware/cmpfs.Ruby' + spec.homepage = PROJECT_URL spec.license = 'BSD-3-Clause' spec.required_ruby_version = [ '>= 1.9.3' ] spec.metadata = { - 'bug_tracker_uri' => 'https://github.com/synesissoftware/cmpfs.Ruby/issues', - 'changelog_uri' => 'https://github.com/synesissoftware/cmpfs.Ruby/blob/master/CHANGES.md', - 'homepage_uri' => 'https://github.com/synesissoftware/cmpfs.Ruby', - 'source_code_uri' => 'https://github.com/synesissoftware/cmpfs.Ruby', + 'bug_tracker_uri' => "#{PROJECT_URL}/issues", + 'changelog_uri' => "#{PROJECT_URL}/blob/master/CHANGES.md", + 'homepage_uri' => PROJECT_URL, + 'source_code_uri' => PROJECT_URL, } spec.files = Dir[ diff --git a/lib/cmpfs/compare/text/internal_.rb b/lib/cmpfs/compare/text/internal_.rb index 3e5ba1c..5dc200f 100644 --- a/lib/cmpfs/compare/text/internal_.rb +++ b/lib/cmpfs/compare/text/internal_.rb @@ -83,13 +83,10 @@ def self.compare_text_streams_ lhs_stm, rhs_stm, options rhs_en.rewind if rhs_stm.respond_to?(:rewind) end - lhs_ix = 0 - rhs_ix = 0 - loop do - lhs_ln, lhs_nr = self.next_line_or_nil_ lhs_en, options - rhs_ln, rhs_nr = self.next_line_or_nil_ rhs_en, options + lhs_ln, = self.next_line_or_nil_ lhs_en, options + rhs_ln, = self.next_line_or_nil_ rhs_en, options if lhs_ln != rhs_ln diff --git a/lib/cmpfs/version.rb b/lib/cmpfs/version.rb index e41b3ba..4b5e3ca 100644 --- a/lib/cmpfs/version.rb +++ b/lib/cmpfs/version.rb @@ -5,7 +5,7 @@ # Purpose: Version for cmpfs.Ruby library # # Created: 1st March 2019 -# Updated: 27th August 2026 +# Updated: 30th August 2026 # # Home: https://github.com/synesissoftware/cmpfs.Ruby # @@ -51,7 +51,7 @@ module CmpFS # Current version of the cmpfs.Ruby library - VERSION = '0.2.5' + VERSION = '0.2.6' private VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc: diff --git a/test/unit/tc_version.rb b/test/unit/tc_version.rb index de72b19..97e98f9 100755 --- a/test/unit/tc_version.rb +++ b/test/unit/tc_version.rb @@ -34,7 +34,7 @@ def test__VERSION_has_consistent_format version = CmpFS::VERSION j_n_p = "#{CmpFS::VERSION_MAJOR}.#{CmpFS::VERSION_MINOR}.#{CmpFS::VERSION_PATCH}" - assert_match /^#{j_n_p}(|\..+)$/, version + assert_match(/^#{j_n_p}(|\..+)$/, version) end end