From 65ff359892f9ed0bc623cb0506cd2eff58689c09 Mon Sep 17 00:00:00 2001 From: suleman-uzair Date: Fri, 17 Jul 2026 18:02:41 +0500 Subject: [PATCH 1/4] Fix CI: add lint-script bash shebang + rename Windows-illegal MSI stream file --- bin/lint-no-raw-mdc | 1 + .../Parcel Maker5.2.1/SummaryInformation | Bin 2 files changed, 1 insertion(+) rename "reference-docs/parcelmaker/Parcel Maker5.2.1/\005SummaryInformation" => reference-docs/parcelmaker/Parcel Maker5.2.1/SummaryInformation (100%) diff --git a/bin/lint-no-raw-mdc b/bin/lint-no-raw-mdc index b1bbdfb..c9b91f6 100755 --- a/bin/lint-no-raw-mdc +++ b/bin/lint-no-raw-mdc @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # lint-no-raw-mdc — fail if any raw MDC_P### / MDC_C### / EXT_P### / # EXT_C### / CIM_P### string literal appears in lib/opencdd/ outside # the designated SSOT files. diff --git "a/reference-docs/parcelmaker/Parcel Maker5.2.1/\005SummaryInformation" b/reference-docs/parcelmaker/Parcel Maker5.2.1/SummaryInformation similarity index 100% rename from "reference-docs/parcelmaker/Parcel Maker5.2.1/\005SummaryInformation" rename to reference-docs/parcelmaker/Parcel Maker5.2.1/SummaryInformation From d36b48f966534213700b0d2927bf8521c7f8e56e Mon Sep 17 00:00:00 2001 From: suleman-uzair Date: Fri, 17 Jul 2026 18:29:12 +0500 Subject: [PATCH 2/4] Fix EntityStore path spec on Windows: expand_path prepends the drive letter --- spec/model/entity_store_spec.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/model/entity_store_spec.rb b/spec/model/entity_store_spec.rb index 447246d..6c44cd1 100644 --- a/spec/model/entity_store_spec.rb +++ b/spec/model/entity_store_spec.rb @@ -73,9 +73,11 @@ end describe Opencdd::Model::EntityStore do - it "initializes with a path" do - store = described_class.new("/tmp/test-store") - expect(store.path).to eq("/tmp/test-store") + it "initializes with an expanded path" do + Dir.mktmpdir("entity-store") do |dir| + store = described_class.new(dir) + expect(store.path).to eq(File.expand_path(dir)) + end end it "save_database writes files to disk" do From 5e20020745d6d8cbd648e4aba789a4d78dd3a274 Mon Sep 17 00:00:00 2001 From: suleman-uzair Date: Fri, 17 Jul 2026 18:43:18 +0500 Subject: [PATCH 3/4] Run lint-no-raw-mdc through bash so Windows can execute it --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index aab51c4..af75d06 100644 --- a/Rakefile +++ b/Rakefile @@ -42,7 +42,7 @@ end namespace :lint do desc "Verify no raw MDC_P### / MDC_C### literals outside the registry files" task :registry do - sh "bin/lint-no-raw-mdc" + sh "bash", "bin/lint-no-raw-mdc" end end From 98a71c2a6b6e33e58aeef9637bb02c1157e34851 Mon Sep 17 00:00:00 2001 From: suleman-uzair Date: Fri, 17 Jul 2026 19:04:12 +0500 Subject: [PATCH 4/4] Exercise EntityStore path expansion with a relative path --- spec/model/entity_store_spec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/model/entity_store_spec.rb b/spec/model/entity_store_spec.rb index 6c44cd1..6d972d7 100644 --- a/spec/model/entity_store_spec.rb +++ b/spec/model/entity_store_spec.rb @@ -73,10 +73,13 @@ end describe Opencdd::Model::EntityStore do - it "initializes with an expanded path" do + it "expands a relative path against the working directory" do Dir.mktmpdir("entity-store") do |dir| - store = described_class.new(dir) - expect(store.path).to eq(File.expand_path(dir)) + Dir.chdir(dir) do + store = described_class.new("nested-store") + expect(store.path).to eq(File.expand_path("nested-store")) + expect(store.path).not_to eq("nested-store") + end end end