chg: Performance, Modernisierung & Dokumentation#54
Open
Skulli wants to merge 37 commits into
Open
Conversation
Hier die PLZ-Datensätze einer älteren PLZ-Datenbank. Ein Ort kann hier n PLZs besitzen. Sollte aber kein Problem darstellen für den Anwendungsfall, nach Eingabe einer PLZ, den Ort in Formularen vorauszufüllen. Der umgekehrte Fall wäre auch denkbar, muss aber nicht unbedingt sein...
Update DE.yml
neuer Versuch aus utf-8 txt-Datei...
Update DE.yml, 2. Versuch
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Berliner und Hamburger Bezirke
- codes() uses O(1) reverse city index instead of O(n) full scan - YAML.load_file with permitted_classes replaces File.open leak - like() uses start_with? for clarity and speed - Tests erweitert: 6 → 13 Specs (nil-lookup, edge cases, like-search) - README auf Deutsch übersetzt, Datenfelder dokumentiert - gemspec: Autor, Homepage, Ruby >= 3.0, Bundler >= 2.0 aktualisiert - Rakefile: US-convert-Task durch DE-Converter ersetzt - CLAUDE.md ergänzt mit Projektstruktur und Datenpflege-Doku - Alle Gems auf aktuelle Versionen aktualisiert Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ation fetch(city, []) statt Hash-Default-Block verhindert zudem, dass unbekannte Städte leere Arrays im Index hinterlassen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lasses) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Übersicht
Dieses PR bündelt mehrere Verbesserungen: Performance-Optimierungen im Kern, erweiterte Testabdeckung, eine vollständig überarbeitete Dokumentation auf Deutsch sowie aktualisierte Abhängigkeiten.
Änderungen
Performance
codes(city)nutzt jetzt einen lazy gecachten Reverse-Index (city → [codes]) statt eines O(n)-Scans über alle EinträgeYAML.load(File.open(...))ersetzt durchYAML.load_file(..., permitted_classes: [Symbol])— schließt das File-Handle korrekt und ist kompatibel mit Psych 4 (Ruby 3.1+)likeverwendetstart_with?stattkey.index(code) == 0Tests
nil), unbekannte Stadt (leeres Array),like_search: trueaufidentify, Prefix-Suche ohne TrefferDokumentation
README.mdvollständig auf Deutsch übersetzt, mit Datenfeld-Tabelle und Rails-Initializer-BeispielCLAUDE.mdneu: Projektstruktur, Datenformat, Datenpflege viarake convert, Hinweis auf Symbol-Keys in YAMLGem & Metadaten
gemspec: Autor, E-Mail, Homepage, Description auf diesen Fork angepasst;required_ruby_version >= 3.0.0,bundler >= 2.0Rakefile: US-spezifischenconvert-Task durch echten DE-Converter-Aufruf ersetztrake,json,parallel,rubocop,standardu.a.)Testplan
bundle exec rspec— 13 Beispiele, 0 Fehlerbundle exec standardrb— keine Beanstandungen🤖 Generated with Claude Code