easy_talk 1.0.4 → 2.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 +4 -4
- data/.rubocop.yml +97 -17
- data/CHANGELOG.md +40 -0
- data/README.md +323 -68
- data/easy_talk.gemspec +38 -0
- data/lib/easy_talk/active_record_schema_builder.rb +5 -1
- data/lib/easy_talk/builders/composition_builder.rb +12 -1
- data/lib/easy_talk/builders/object_builder.rb +9 -23
- data/lib/easy_talk/configuration.rb +4 -3
- data/lib/easy_talk/errors_helper.rb +1 -0
- data/lib/easy_talk/model.rb +75 -14
- data/lib/easy_talk/property.rb +108 -32
- data/lib/easy_talk/schema_definition.rb +13 -18
- data/lib/easy_talk/types/composer.rb +7 -6
- data/lib/easy_talk/validation_builder.rb +339 -0
- data/lib/easy_talk/version.rb +1 -1
- metadata +11 -149
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6244697afea285526b5b9cd3b58d036f3dd00e99ba25703777076a2c21a8f49
|
4
|
+
data.tar.gz: 6cc2cc8f918d064d0907f56f234bc8e4cfa30497292559d9690bfc0dd8377522
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e6c5f5eee7497bb4cddc0eb7f13beceafb551b0b7e5a2322467ec41e18ac66524ec4162307c881db65c6dc39a8e465fea8ddfcfcb6373ba07b4daf4ed68358
|
7
|
+
data.tar.gz: 6d1b2f9635436aa41b8eb83c3eb40d9af9ce8f984e76d3ad36bf9f4025e26e3c774e286ca6886ad48e5fa48f38142fcf3208a9b2b2b201e936fde07d8e91283a
|
data/.rubocop.yml
CHANGED
@@ -1,36 +1,116 @@
|
|
1
|
-
|
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
|
-
|
9
|
-
Enabled:
|
16
|
+
Style/Documentation:
|
17
|
+
Enabled: false
|
10
18
|
|
11
|
-
|
12
|
-
Enabled:
|
19
|
+
Style/OptionalBooleanParameter:
|
20
|
+
Enabled: false
|
13
21
|
|
14
|
-
|
15
|
-
|
22
|
+
Layout/CaseIndentation:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Layout/LineLength:
|
26
|
+
Max: 180
|
16
27
|
Exclude:
|
17
|
-
-
|
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
|
-
-
|
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
|
-
-
|
67
|
+
- spec/**/*
|
26
68
|
|
27
|
-
|
69
|
+
Lint/EmptyBlock:
|
28
70
|
Exclude:
|
29
|
-
-
|
30
|
-
|
71
|
+
- spec/**/*
|
72
|
+
|
31
73
|
RSpec/DescribeClass:
|
32
|
-
|
33
|
-
- 'spec/easy_talk/examples/**/*'
|
74
|
+
Enabled: false
|
34
75
|
|
35
|
-
RSpec/
|
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,43 @@
|
|
1
|
+
## [2.0.0] - 2025-06-05
|
2
|
+
|
3
|
+
### Added
|
4
|
+
- Automatic ActiveModel Validations: Added ValidationBuilder class that automatically generates
|
5
|
+
ActiveModel validations from JSON Schema constraints
|
6
|
+
- Auto-validation Configuration: Added auto_validations configuration option (defaults to true) to
|
7
|
+
control automatic validation generation
|
8
|
+
- Enhanced Model Initialization: Improved model initialization to support nested EasyTalk::Model
|
9
|
+
instantiation from hash attributes
|
10
|
+
- Hash Comparison Support: Added equality comparison between EasyTalk models and hash objects
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
- BREAKING: Removed support for inline hash nested objects (block-style sub-schemas) - use class
|
14
|
+
references as types instead
|
15
|
+
- Improved Documentation: Enhanced inline documentation throughout the codebase with detailed
|
16
|
+
examples and API documentation
|
17
|
+
- Configuration Enhancement: Expanded configuration system with better organization and clearer
|
18
|
+
option descriptions
|
19
|
+
- Development Dependencies: Moved development dependencies from gemspec to Gemfile for better
|
20
|
+
dependency management
|
21
|
+
- CI/CD Improvements: Enhanced GitHub Actions workflow to support Ruby 3.3.0 and run on both main
|
22
|
+
and development branches
|
23
|
+
- Code Quality: Updated RuboCop configuration with more lenient rules for better developer
|
24
|
+
experience
|
25
|
+
|
26
|
+
### Fixed
|
27
|
+
- Property Validation: Improved property name validation with better error messages and edge case
|
28
|
+
handling
|
29
|
+
- Type Builder Resolution: Enhanced type-to-builder mapping logic for more reliable schema
|
30
|
+
generation
|
31
|
+
- Nilable Type Handling: Fixed nilable type processing to correctly handle union types with null
|
32
|
+
- Empty Array Validation: Added validation to prevent empty arrays as property types
|
33
|
+
|
34
|
+
### Internal
|
35
|
+
|
36
|
+
- Gem Security: Added MFA requirement for gem publishing
|
37
|
+
- Code Organization: Improved module and class organization with better separation of concerns
|
38
|
+
- Test Coverage: Enhanced test suite organization and coverage
|
39
|
+
- Error Handling: Improved error messages and validation throughout the system
|
40
|
+
|
1
41
|
## [1.0.4] - 2024-03-12
|
2
42
|
### Changed
|
3
43
|
- Combined composition builders into a single file (#47)
|