easy_talk 1.0.4 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 365a704ac1e34ef3ae2796712c0eb13a15030bb9f6184578dc17ac9b2611c2d2
4
- data.tar.gz: 94b6ed4d70c16a1ff74b519dfcf6833eb00573a5dc532d6ec7bb3565dc39d208
3
+ metadata.gz: ce558538c73afc10d98c0c6b5e38e68ce033a79d1c212bb91fede27f10fb3523
4
+ data.tar.gz: e46a7a67b6c1a3209108a800cefca8659381236c23ce14986e971babd874908d
5
5
  SHA512:
6
- metadata.gz: 1af20c3dffdc153ac5b251f6170280b46c5ee1d9d068cea2ab74f4a3a585110c820ea4d1b831eee3e0adda974ac0f10f33d7e424df4174b94246c722c0ed9119
7
- data.tar.gz: aab1c378d3a1bacbeed497b5613f3e9a45d75a4a7288788ca5b6628aad19b27411895f8c414ff92734920018e87618f70af1a20ac61b6090981764c6c332fec6
6
+ metadata.gz: b523e6cd50edc0594d98fffdb8a9de0616e5f58a2af435a23e5f4a81ac54b25692cd0bccba71c93eca812022efd298b2a9d654b34e3b8f37301ea8e7b16a4de3
7
+ data.tar.gz: 7f287df819b0e09ddf5fce9506f045860dea876b0653cf7ede7dfb58e7a1d78e545933946921f0dfb4f1f02709357629f0b071c53e7c4ff945cdcf1908f5c2b6
data/.rubocop.yml CHANGED
@@ -1,36 +1,116 @@
1
- require:
2
- - rubocop-rake
1
+ plugins:
3
2
  - rubocop-rspec
3
+ - rubocop-rake
4
4
 
5
5
  AllCops:
6
+ NewCops: enable
6
7
  TargetRubyVersion: 3.2
8
+ SuggestExtensions: false
9
+ Exclude:
10
+ - 'db/**/*'
11
+ - 'config/**/*'
12
+ - 'script/**/*'
13
+ - 'bin/**/*'
14
+ - 'vendor/**/*'
7
15
 
8
- RSpec/SpecFilePathFormat:
9
- Enabled: true
16
+ Style/Documentation:
17
+ Enabled: false
10
18
 
11
- RSpec/SpecFilePathSuffix:
12
- Enabled: true
19
+ Style/OptionalBooleanParameter:
20
+ Enabled: false
13
21
 
14
- RSpec/ExampleLength:
15
- Max: 10
22
+ Layout/CaseIndentation:
23
+ Enabled: false
24
+
25
+ Layout/LineLength:
26
+ Max: 180
16
27
  Exclude:
17
- - 'spec/easy_talk/examples/**/*'
28
+ - lib/easy_talk/configuration.rb
29
+ - spec/**/*
30
+
31
+ Style/StringLiterals:
32
+ Enabled: false
33
+
34
+ Metrics/ClassLength:
35
+ Max: 240
36
+
37
+ Metrics/MethodLength:
38
+ Max: 60
39
+
40
+ Metrics/AbcSize:
41
+ Max: 50
42
+
43
+ Metrics/CyclomaticComplexity:
44
+ Max: 20
45
+
46
+ Metrics/PerceivedComplexity:
47
+ Max: 20
48
+
49
+ Metrics/ModuleLength:
50
+ Max: 150
51
+
52
+ Metrics/BlockNesting:
53
+ Max: 10
18
54
 
19
55
  Metrics/BlockLength:
20
56
  Exclude:
21
- - 'spec/**/*'
57
+ - spec/**/*
58
+
59
+ Layout/EndAlignment:
60
+ Enabled: false
61
+
62
+ Layout/ExtraSpacing:
63
+ Enabled: false
22
64
 
23
65
  Lint/ConstantDefinitionInBlock:
24
66
  Exclude:
25
- - 'spec/**/*'
67
+ - spec/**/*
26
68
 
27
- Layout/LineLength:
69
+ Lint/EmptyBlock:
28
70
  Exclude:
29
- - 'spec/**/*'
30
-
71
+ - spec/**/*
72
+
31
73
  RSpec/DescribeClass:
32
- Exclude:
33
- - 'spec/easy_talk/examples/**/*'
74
+ Enabled: false
34
75
 
35
- RSpec/MultipleExpectations:
76
+ RSpec/LeakyConstantDeclaration:
77
+ Enabled: false
78
+
79
+ RSpec/RemoveConst:
80
+ Enabled: false
81
+
82
+ RSpec/BeforeAfterAll:
83
+ Enabled: false
84
+
85
+ RSpec/NestedGroups:
36
86
  Max: 4
87
+
88
+ RSpec/RepeatedDescription:
89
+ Enabled: false
90
+
91
+ RSpec/PendingWithoutReason:
92
+ Enabled: false
93
+
94
+ RSpec/MultipleDescribes:
95
+ Enabled: false
96
+
97
+ RSpec/ContextWording:
98
+ Enabled: false
99
+
100
+ RSpec/MultipleMemoizedHelpers:
101
+ Max: 10
102
+
103
+ RSpec/ExampleLength:
104
+ Max: 40
105
+
106
+ RSpec/MultipleExpectations:
107
+ Max: 10
108
+
109
+ RSpec/SpecFilePathFormat:
110
+ Enabled: false
111
+
112
+ Lint/DuplicateBranch:
113
+ Enabled: false
114
+
115
+ Gemspec/DevelopmentDependencies:
116
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,3 +1,69 @@
1
+ ## [3.0.0] - 2025-01-03
2
+
3
+ ### BREAKING CHANGES
4
+ - **Removed ActiveRecord Support**: Completely removed ActiveRecord integration including:
5
+ - Deleted `ActiveRecordSchemaBuilder` class and database schema introspection
6
+ - Removed `enhance_schema` method for ActiveRecord models
7
+ - Removed ActiveRecord-specific configuration options (`excluded_columns`, `exclude_foreign_keys`,
8
+ `exclude_primary_key`, `exclude_timestamps`, `exclude_associations`)
9
+ - Deleted all ActiveRecord integration tests
10
+
11
+ ### Changed
12
+ - **Simplified Architecture**: EasyTalk now focuses exclusively on Plain Ruby classes with ActiveModel integration
13
+ - **Unified Integration Path**: All models now follow the same integration pattern using `ActiveModel::API` and `ActiveModel::Validations`
14
+ - **Streamlined Configuration**: Removed ActiveRecord-specific configuration options, keeping only core options
15
+ - **Updated Documentation**: Removed ActiveRecord examples and configuration references from README
16
+
17
+ ### Fixed
18
+ - **Code Quality**: Fixed ValidationBuilder class length violation by consolidating format validation methods
19
+ - **Documentation**: Updated all examples to use `define_schema` pattern instead of removed `enhance_schema`
20
+
21
+ ### Migration Guide
22
+ If you were using EasyTalk with ActiveRecord models:
23
+ - Replace `enhance_schema` calls with `define_schema` blocks
24
+ - Manually define properties instead of relying on database schema introspection
25
+ - Remove ActiveRecord-specific configuration options from your EasyTalk.configure blocks
26
+
27
+ ## [2.0.0] - 2025-06-05
28
+
29
+ ### Added
30
+ - Automatic ActiveModel Validations: Added ValidationBuilder class that automatically generates
31
+ ActiveModel validations from JSON Schema constraints
32
+ - Auto-validation Configuration: Added auto_validations configuration option (defaults to true) to
33
+ control automatic validation generation
34
+ - Enhanced Model Initialization: Improved model initialization to support nested EasyTalk::Model
35
+ instantiation from hash attributes
36
+ - Hash Comparison Support: Added equality comparison between EasyTalk models and hash objects
37
+
38
+ ### Changed
39
+ - BREAKING: Removed support for inline hash nested objects (block-style sub-schemas) - use class
40
+ references as types instead
41
+ - Improved Documentation: Enhanced inline documentation throughout the codebase with detailed
42
+ examples and API documentation
43
+ - Configuration Enhancement: Expanded configuration system with better organization and clearer
44
+ option descriptions
45
+ - Development Dependencies: Moved development dependencies from gemspec to Gemfile for better
46
+ dependency management
47
+ - CI/CD Improvements: Enhanced GitHub Actions workflow to support Ruby 3.3.0 and run on both main
48
+ and development branches
49
+ - Code Quality: Updated RuboCop configuration with more lenient rules for better developer
50
+ experience
51
+
52
+ ### Fixed
53
+ - Property Validation: Improved property name validation with better error messages and edge case
54
+ handling
55
+ - Type Builder Resolution: Enhanced type-to-builder mapping logic for more reliable schema
56
+ generation
57
+ - Nilable Type Handling: Fixed nilable type processing to correctly handle union types with null
58
+ - Empty Array Validation: Added validation to prevent empty arrays as property types
59
+
60
+ ### Internal
61
+
62
+ - Gem Security: Added MFA requirement for gem publishing
63
+ - Code Organization: Improved module and class organization with better separation of concerns
64
+ - Test Coverage: Enhanced test suite organization and coverage
65
+ - Error Handling: Improved error messages and validation throughout the system
66
+
1
67
  ## [1.0.4] - 2024-03-12
2
68
  ### Changed
3
69
  - Combined composition builders into a single file (#47)