castkit 0.1.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 +7 -0
- data/.rspec +3 -0
- data/.rspec_status +208 -0
- data/.rubocop.yml +33 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +195 -0
- data/Rakefile +12 -0
- data/castkit.gemspec +41 -0
- data/lib/castkit/attribute.rb +131 -0
- data/lib/castkit/attribute_extensions/access.rb +65 -0
- data/lib/castkit/attribute_extensions/casting.rb +147 -0
- data/lib/castkit/attribute_extensions/error_handling.rb +83 -0
- data/lib/castkit/attribute_extensions/options.rb +124 -0
- data/lib/castkit/attribute_extensions/serialization.rb +89 -0
- data/lib/castkit/attribute_extensions/validation.rb +72 -0
- data/lib/castkit/castkit.rb +44 -0
- data/lib/castkit/configuration.rb +96 -0
- data/lib/castkit/data_object.rb +153 -0
- data/lib/castkit/data_object_extensions/attribute_types.rb +108 -0
- data/lib/castkit/data_object_extensions/attributes.rb +179 -0
- data/lib/castkit/data_object_extensions/config.rb +105 -0
- data/lib/castkit/data_object_extensions/deserialization.rb +110 -0
- data/lib/castkit/default_serializer.rb +99 -0
- data/lib/castkit/error.rb +42 -0
- data/lib/castkit/serializer.rb +92 -0
- data/lib/castkit/validator.rb +37 -0
- data/lib/castkit/validators/numeric_validator.rb +29 -0
- data/lib/castkit/validators/string_validator.rb +34 -0
- data/lib/castkit/validators.rb +4 -0
- data/lib/castkit/version.rb +5 -0
- data/lib/castkit.rb +19 -0
- data/sig/castkit.rbs +4 -0
- metadata +124 -0
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: castkit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nathan Lucas
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-04-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: yard
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Castkit is a lightweight, type-safe Ruby DSL for defining, validating,
|
56
|
+
and serializing structured data objects. Inspired by DTO patterns, it supports nested
|
57
|
+
types, access control, custom serializers, and more.
|
58
|
+
email:
|
59
|
+
- bnlucas@outlook.com
|
60
|
+
executables: []
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".rspec"
|
65
|
+
- ".rspec_status"
|
66
|
+
- ".rubocop.yml"
|
67
|
+
- CHANGELOG.md
|
68
|
+
- CODE_OF_CONDUCT.md
|
69
|
+
- LICENSE.txt
|
70
|
+
- README.md
|
71
|
+
- Rakefile
|
72
|
+
- castkit.gemspec
|
73
|
+
- lib/castkit.rb
|
74
|
+
- lib/castkit/attribute.rb
|
75
|
+
- lib/castkit/attribute_extensions/access.rb
|
76
|
+
- lib/castkit/attribute_extensions/casting.rb
|
77
|
+
- lib/castkit/attribute_extensions/error_handling.rb
|
78
|
+
- lib/castkit/attribute_extensions/options.rb
|
79
|
+
- lib/castkit/attribute_extensions/serialization.rb
|
80
|
+
- lib/castkit/attribute_extensions/validation.rb
|
81
|
+
- lib/castkit/castkit.rb
|
82
|
+
- lib/castkit/configuration.rb
|
83
|
+
- lib/castkit/data_object.rb
|
84
|
+
- lib/castkit/data_object_extensions/attribute_types.rb
|
85
|
+
- lib/castkit/data_object_extensions/attributes.rb
|
86
|
+
- lib/castkit/data_object_extensions/config.rb
|
87
|
+
- lib/castkit/data_object_extensions/deserialization.rb
|
88
|
+
- lib/castkit/default_serializer.rb
|
89
|
+
- lib/castkit/error.rb
|
90
|
+
- lib/castkit/serializer.rb
|
91
|
+
- lib/castkit/validator.rb
|
92
|
+
- lib/castkit/validators.rb
|
93
|
+
- lib/castkit/validators/numeric_validator.rb
|
94
|
+
- lib/castkit/validators/string_validator.rb
|
95
|
+
- lib/castkit/version.rb
|
96
|
+
- sig/castkit.rbs
|
97
|
+
homepage: https://github.com/bnlucas/castkit
|
98
|
+
licenses:
|
99
|
+
- MIT
|
100
|
+
metadata:
|
101
|
+
homepage_uri: https://github.com/bnlucas/castkit
|
102
|
+
source_code_uri: https://github.com/bnlucas/castkit
|
103
|
+
changelog_uri: https://github.com/bnlucas/castkit/blob/main/CHANGELOG.md
|
104
|
+
rubygems_mfa_required: 'true'
|
105
|
+
post_install_message:
|
106
|
+
rdoc_options: []
|
107
|
+
require_paths:
|
108
|
+
- lib
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: 2.7.0
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
requirements: []
|
120
|
+
rubygems_version: 3.5.4
|
121
|
+
signing_key:
|
122
|
+
specification_version: 4
|
123
|
+
summary: Type-safe, validated data objects for Ruby
|
124
|
+
test_files: []
|