Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,63 @@
require:
- rubocop-rspec

AllCops:
NewCops: enable
TargetRubyVersion: 3.1
Exclude:
- "spec/**/*"
SuggestExtensions: false

Style/Documentation:
Enabled: true

Metrics/MethodLength:
Max: 15

Metrics/AbcSize:
Max: 20

Metrics/CyclomaticComplexity:
Max: 10

Metrics/PerceivedComplexity:
Max: 10

Layout/LineLength:
Max: 120

Layout/LineEndStringConcatenationIndentation:
EnforcedStyle: aligned

Style/StringLiterals:
EnforcedStyle: double_quotes

Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/SymbolArray:
EnforcedStyle: percent

Style/WordArray:
EnforcedStyle: percent

Style/HashSyntax:
EnforcedStyle: ruby19

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma

Style/ClassAndModuleChildren:
EnforcedStyle: nested

Style/ArgumentsForwarding:
Enabled: true

Naming/BlockForwarding:
Enabled: true

Gemspec/RequireMFA:
Enabled: false

Gemspec/DevelopmentDependencies:
Enabled: false
50 changes: 47 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
## [Unreleased]
# Changelog

## [0.1.0] - 2025-03-27
All notable changes to this project will be documented in this file.

- Initial release
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2024-03-27

### Added
- Initial release of Morphix
- Core transformation methods:
- `rename`: Rename keys with optional value transformation
- `map`: Transform values while preserving keys
- `reject`: Remove specific keys from the hash
- `reshape`: Transform nested hash structures
- `map_collection`: Transform arrays of hashes
- Support for complex data transformations:
- Nested structure handling
- Collection transformations
- Conditional transformations
- Data type conversions
- Robust error handling for edge cases
- Performance optimizations for large data structures
- Comprehensive test suite with RSpec
- Detailed documentation and examples

### Features
- Fluent DSL for data transformation
- Immutable transformations (original data remains unchanged)
- Support for deeply nested data structures
- Efficient handling of large collections
- Flexible and extensible transformation blocks
- Type-safe transformations with error handling

### Documentation
- Comprehensive README with examples
- Best practices and troubleshooting guide
- Common use cases documentation
- API documentation
- Performance considerations

### Development
- Ruby 3.1.0 or higher required
- RSpec for testing
- RuboCop for code style enforcement
- Base64 dependency for encoding/decoding support

[0.1.0]: https://github.com/OkayDave/morphix/releases/tag/v0.1.0
9 changes: 4 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ source "https://rubygems.org"
gemspec

gem "irb"
gem "rake", "~> 13.0"

gem "rspec", "~> 3.0"

gem "rubocop", "~> 1.21"
gem "rake"
gem "rspec"
gem "rubocop"
gem "rubocop-rspec"
100 changes: 100 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
PATH
remote: .
specs:
morphix (0.1.0)
base64 (~> 0.2.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.3)
base64 (0.2.0)
date (3.4.1)
diff-lcs (1.6.1)
io-console (0.8.0)
irb (1.15.1)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.10.2)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
parallel (1.26.3)
parser (3.3.7.3)
ast (~> 2.4.1)
racc
pp (0.6.2)
prettyprint
prettyprint (0.2.0)
prism (1.4.0)
psych (5.2.3)
date
stringio
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.13.0)
psych (>= 4.0.0)
regexp_parser (2.10.0)
reline (0.6.0)
io-console (~> 0.5)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.3)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.2)
rubocop (1.75.1)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.43.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.43.0)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-capybara (2.22.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-factory_bot (2.27.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (2.31.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.29.1)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
stringio (3.1.6)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
irb
morphix!
rake
rspec
rubocop
rubocop-rspec

BUNDLED WITH
2.6.6
Loading