Skip to content

refactor: split remaining monoliths, replace string eval, expand tests#80

Merged
ronaldtse merged 1 commit intomainfrom
refactor/split-monoliths-replace-string-eval
Apr 21, 2026
Merged

refactor: split remaining monoliths, replace string eval, expand tests#80
ronaldtse merged 1 commit intomainfrom
refactor/split-monoliths-replace-string-eval

Conversation

@ronaldtse
Copy link
Copy Markdown
Contributor

Summary

  • Split custom_profile.rb (12 classes) into lib/xmi/custom_profile/ directory with autoload hub
  • Split ea_root.rb (447 lines) into lib/xmi/ea_root/ with 5 concern modules (XmlParsing, CodeGeneration, ExtensionLifecycle, TemplateHelpers, NamespaceHandling)
  • Replace Object.class_eval string-based code generation in EaRoot with direct Class.new + const_set + attribute/xml API calls
  • Add test coverage for XmiIdentity, ParserPipeline, GML shared modules, Index, CustomProfile, and EaRoot extension loading

Changes

  • 26 files changed: 12 new class files, 5 concern modules, 6 new spec files, 3 modified files
  • output_rb_file preserved by generating string from live classes
  • Concern modules marked private_constant to avoid polluting EaRoot.constants

Test plan

  • 249 examples, 0 failures, 4 pending (was 186 examples)
  • Rubocop clean on 519 files
  • All 5 extension-loading specs pass (CityGML, ISO19103 MDG, EA UML, GML)
  • bundle exec rubocop -A --auto-gen-config passes
  • GHA CI passes (Ruby 3.2/3.4/4.0 x macos/ubuntu/windows)

Split custom_profile.rb (12 classes) into lib/xmi/custom_profile/ with
autoload hub. Split ea_root.rb (447 lines) into lib/xmi/ea_root/ with
5 concern modules (XmlParsing, CodeGeneration, ExtensionLifecycle,
TemplateHelpers, NamespaceHandling).

Replace EaRoot Object.class_eval string-based code generation with
direct Class.new + const_set + attribute/xml API calls. The
output_rb_file debugging utility is preserved by generating strings
from live classes.

Add test coverage for XmiIdentity, ParserPipeline, GML shared modules,
Index, CustomProfile, and EaRoot extension loading (249 total examples,
+63 from 186).

249 examples, 0 failures. Rubocop clean on 519 files.
@ronaldtse ronaldtse force-pushed the refactor/split-monoliths-replace-string-eval branch from ee39229 to 73cf5bd Compare April 21, 2026 01:58
@ronaldtse ronaldtse merged commit b1c7283 into main Apr 21, 2026
3 checks passed
@ronaldtse ronaldtse deleted the refactor/split-monoliths-replace-string-eval branch April 21, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant