Skip to content

Commit

Permalink
feat: Add support for parsing Gaelic names
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewelsby committed Jun 28, 2024
1 parent 4dd7732 commit 7eb4a86
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2024-06-28

### Added

- Support for parsing Gaelic names

## [0.1.0] - 2024-06-28
Initial realase

### Added

- Support for parsing complex names with prefixes, suffixes, particles and beyond.

[0.2.0]: https://github.com/kylewelsby/name_formatter/releases/tag/v0.2.0
[0.1.0]: https://github.com/kylewelsby/name_formatter/releases/tag/v0.1.0
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NameFormatter is a Ruby gem that provides robust name parsing and formatting cap

## ✨ Features

- Handles personal names from various cultures (Western, Spanish, German, etc.)
- Handles personal names from various cultures (Gaelic, Western, Spanish, German, etc.)
- Supports company names and legal entities
- Correctly formats prefixes, suffixes, and particles (e.g., "van", "de", "von")
- Preserves capitalization for names like "McDonald" or "DeVito"
Expand Down Expand Up @@ -44,7 +44,7 @@ formatted = formatter.format("JOHN DOE")
puts formatted # Output: "John Doe"

# Parse and Format a name
parsed = formatter.parse_formatted("Dr. Jane Smith Jr.")
parsed = formatter.parse_formatted("DR. JANE SMITH JR.")
puts parsed
# Output: {
# prefix: "Dr.",
Expand All @@ -54,13 +54,13 @@ puts parsed
# }

# Parse skip formatting a name
parsed = formatter.parse("Dr. Jane Smith Jr.")
parsed = formatter.parse("DR. JANE SMITH JR.")
puts parsed
# Output: {
# prefix: "Dr.",
# first_name: "Jane",
# last_name: "Smith",
# suffix: "Jr."
# prefix: "DR.",
# first_name: "JANE",
# last_name: "SMITH",
# suffix: "JR."
# }

# Handle complex names
Expand Down
2 changes: 1 addition & 1 deletion lib/name_formatter/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module NameFormatterModule
VERSION = "0.1.0"
VERSION = "0.2.0"
end

0 comments on commit 7eb4a86

Please sign in to comment.