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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6073763678bdbc5315b5ade9dd3488159932de8d4235f11e02b6a6d2fe7a505d
4
+ data.tar.gz: 3e379f55d003101c99e8ace3e826094d69769925c3296d56f1fe126378f9fea8
5
+ SHA512:
6
+ metadata.gz: 8374ef2c3a57f7c0c0730c1be9df5cb1ea1ab59fb4653a9120306e272da09058b777a3f36c1477c8c9e3e254157ea06b986e5b89243a6ee25a355b7844c2fc13
7
+ data.tar.gz: cc690abd00f8df3cefbc754060f09d4cf77c3e1df1f5bf5dd0ddf77ae3efde0cea995949e2c8da9e7c8b51e9a943f077b854e60d2309a7044a3109a8acc11345
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rspec_status ADDED
@@ -0,0 +1,208 @@
1
+ example_id | status | run_time |
2
+ --------------------------------------------------------------------- | ------ | --------------- |
3
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:1:1] | passed | 0.00294 seconds |
4
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:1:2:1] | passed | 0.00005 seconds |
5
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:1:3:1] | passed | 0.00004 seconds |
6
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:1:4:1] | passed | 0.00004 seconds |
7
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:2:1:1] | passed | 0.00088 seconds |
8
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:2:2:1] | passed | 0.00006 seconds |
9
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:2:3:1] | passed | 0.00004 seconds |
10
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:3:1] | passed | 0.00004 seconds |
11
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:3:2] | passed | 0.00003 seconds |
12
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:3:3] | passed | 0.00003 seconds |
13
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:3:4] | passed | 0.00003 seconds |
14
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:3:5] | passed | 0.00003 seconds |
15
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:4:1:1] | passed | 0.00004 seconds |
16
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:4:2:1] | passed | 0.0001 seconds |
17
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:4:3:1] | passed | 0.00004 seconds |
18
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:5:1] | passed | 0.00003 seconds |
19
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:5:2] | passed | 0.00003 seconds |
20
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:5:3] | passed | 0.00003 seconds |
21
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:6:1:1] | passed | 0.00004 seconds |
22
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:6:2:1] | passed | 0.00003 seconds |
23
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:6:3:1] | passed | 0.00003 seconds |
24
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:7:1:1] | passed | 0.00003 seconds |
25
+ ./spec/castkit/attribute_extensions/access_spec.rb[1:7:2:1] | passed | 0.00004 seconds |
26
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:1:1] | passed | 0.00005 seconds |
27
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:2:1] | passed | 0.0036 seconds |
28
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:2:2] | passed | 0.00015 seconds |
29
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:2:3] | passed | 0.00061 seconds |
30
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:3:1] | passed | 0.00013 seconds |
31
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:4:1] | passed | 0.00007 seconds |
32
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:5:1] | passed | 0.00006 seconds |
33
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:6:1] | passed | 0.00011 seconds |
34
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:7:1] | passed | 0.00005 seconds |
35
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:8:1] | passed | 0.00005 seconds |
36
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:9:1] | passed | 0.00004 seconds |
37
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:10:1] | passed | 0.00004 seconds |
38
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:10:2] | passed | 0.00005 seconds |
39
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:10:3] | passed | 0.00005 seconds |
40
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:11:1] | passed | 0.00014 seconds |
41
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:12:1] | passed | 0.00045 seconds |
42
+ ./spec/castkit/attribute_extensions/casting_spec.rb[1:1:13:1] | passed | 0.00007 seconds |
43
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:1:1:1] | passed | 0.00004 seconds |
44
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:1:2:1] | passed | 0.00004 seconds |
45
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:2:1:1] | passed | 0.00004 seconds |
46
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:2:2:1] | passed | 0.00004 seconds |
47
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:3:1:1] | passed | 0.00005 seconds |
48
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:3:2:1] | passed | 0.00005 seconds |
49
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:3:3:1] | passed | 0.00005 seconds |
50
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:4:1] | passed | 0.00004 seconds |
51
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:5:1] | passed | 0.00004 seconds |
52
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:5:2:1] | passed | 0.00004 seconds |
53
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:6:1] | passed | 0.00004 seconds |
54
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:7:1] | passed | 0.00004 seconds |
55
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:7:2:1] | passed | 0.00004 seconds |
56
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:8:1] | passed | 0.00004 seconds |
57
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:8:2:1] | passed | 0.00004 seconds |
58
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:9:1:1] | passed | 0.00004 seconds |
59
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:9:2:1] | passed | 0.00004 seconds |
60
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:9:3:1] | passed | 0.00008 seconds |
61
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:10:1:1] | passed | 0.00004 seconds |
62
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:10:2:1] | passed | 0.00004 seconds |
63
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:11:1:1] | passed | 0.00004 seconds |
64
+ ./spec/castkit/attribute_extensions/options_spec.rb[1:11:2:1] | passed | 0.00004 seconds |
65
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:1:1:1] | passed | 0.00006 seconds |
66
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:1:2:1] | passed | 0.00006 seconds |
67
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:1:3:1] | passed | 0.00004 seconds |
68
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:2:1] | passed | 0.00004 seconds |
69
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:2:2] | passed | 0.00006 seconds |
70
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:2:3] | passed | 0.00004 seconds |
71
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:3:1] | passed | 0.00005 seconds |
72
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:3:2] | passed | 0.00004 seconds |
73
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:3:3] | passed | 0.00012 seconds |
74
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:3:4] | passed | 0.00004 seconds |
75
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:4:1] | passed | 0.00047 seconds |
76
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:4:2] | passed | 0.00004 seconds |
77
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:5:1] | passed | 0.00005 seconds |
78
+ ./spec/castkit/attribute_extensions/serialization_spec.rb[1:5:2] | passed | 0.00005 seconds |
79
+ ./spec/castkit/attribute_extensions/validation_spec.rb[1:1:1:1] | passed | 0.00014 seconds |
80
+ ./spec/castkit/attribute_extensions/validation_spec.rb[1:1:2:1:1] | passed | 0.00011 seconds |
81
+ ./spec/castkit/attribute_extensions/validation_spec.rb[1:1:2:2:1] | passed | 0.00018 seconds |
82
+ ./spec/castkit/attribute_extensions/validation_spec.rb[1:1:3:1] | passed | 0.00009 seconds |
83
+ ./spec/castkit/attribute_extensions/validation_spec.rb[1:1:4:1:1] | passed | 0.00026 seconds |
84
+ ./spec/castkit/attribute_extensions/validation_spec.rb[1:1:4:2:1] | passed | 0.00023 seconds |
85
+ ./spec/castkit/attribute_extensions/validation_spec.rb[1:1:5:1:1] | passed | 0.00011 seconds |
86
+ ./spec/castkit/attribute_extensions/validation_spec.rb[1:1:5:2:1] | passed | 0.00013 seconds |
87
+ ./spec/castkit/attribute_spec.rb[1:1:1] | passed | 0.00006 seconds |
88
+ ./spec/castkit/attribute_spec.rb[1:1:2] | passed | 0.00003 seconds |
89
+ ./spec/castkit/attribute_spec.rb[1:1:3] | passed | 0.00003 seconds |
90
+ ./spec/castkit/attribute_spec.rb[1:1:4] | passed | 0.00003 seconds |
91
+ ./spec/castkit/attribute_spec.rb[1:2:1] | passed | 0.00128 seconds |
92
+ ./spec/castkit/attribute_spec.rb[1:3:1:1] | passed | 0.00007 seconds |
93
+ ./spec/castkit/attribute_spec.rb[1:3:2:1] | passed | 0.00004 seconds |
94
+ ./spec/castkit/attribute_spec.rb[1:3:3:1] | passed | 0.00006 seconds |
95
+ ./spec/castkit/attribute_spec.rb[1:4:1] | passed | 0.00004 seconds |
96
+ ./spec/castkit/attribute_spec.rb[1:4:2] | passed | 0.00004 seconds |
97
+ ./spec/castkit/attribute_spec.rb[1:4:3] | passed | 0.00003 seconds |
98
+ ./spec/castkit/attribute_spec.rb[1:4:4] | passed | 0.00004 seconds |
99
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:1] | passed | 0.00004 seconds |
100
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:2] | passed | 0.00003 seconds |
101
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:3] | passed | 0.00004 seconds |
102
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:4] | passed | 0.00003 seconds |
103
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:5] | passed | 0.00003 seconds |
104
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:6] | passed | 0.00003 seconds |
105
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:7] | passed | 0.00003 seconds |
106
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:8] | passed | 0.00003 seconds |
107
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:9] | passed | 0.00004 seconds |
108
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:10] | passed | 0.00004 seconds |
109
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:11] | passed | 0.00003 seconds |
110
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:12] | passed | 0.00003 seconds |
111
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:13] | passed | 0.00003 seconds |
112
+ ./spec/castkit/data_object_extensions/attribute_types_spec.rb[1:1:14] | passed | 0.00003 seconds |
113
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:1:1] | passed | 0.00005 seconds |
114
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:1:2] | passed | 0.00005 seconds |
115
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:1:3] | passed | 0.00006 seconds |
116
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:2:1] | passed | 0.00004 seconds |
117
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:3:1] | passed | 0.00004 seconds |
118
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:4:1] | passed | 0.00052 seconds |
119
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:5:1] | passed | 0.00006 seconds |
120
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:6:1] | passed | 0.00006 seconds |
121
+ ./spec/castkit/data_object_extensions/attributes_spec.rb[1:7:1] | passed | 0.00004 seconds |
122
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:1:1] | passed | 0.00004 seconds |
123
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:1:2] | passed | 0.00004 seconds |
124
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:2:1] | passed | 0.00003 seconds |
125
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:2:2] | passed | 0.00003 seconds |
126
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:3:1] | passed | 0.00004 seconds |
127
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:3:2] | passed | 0.00003 seconds |
128
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:4:1] | passed | 0.00004 seconds |
129
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:5:1] | passed | 0.00003 seconds |
130
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:5:2] | passed | 0.00003 seconds |
131
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:6:1] | passed | 0.00004 seconds |
132
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:6:2] | passed | 0.00003 seconds |
133
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:7:1] | passed | 0.00004 seconds |
134
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:8:1] | passed | 0.00004 seconds |
135
+ ./spec/castkit/data_object_extensions/config_spec.rb[1:8:2] | passed | 0.00003 seconds |
136
+ ./spec/castkit/data_object_extensions/deserialization_spec.rb[1:1:1] | passed | 0.0001 seconds |
137
+ ./spec/castkit/data_object_extensions/deserialization_spec.rb[1:2:1] | passed | 0.00005 seconds |
138
+ ./spec/castkit/data_object_extensions/deserialization_spec.rb[1:2:2] | passed | 0.00005 seconds |
139
+ ./spec/castkit/data_object_extensions/deserialization_spec.rb[1:3:1] | passed | 0.00017 seconds |
140
+ ./spec/castkit/data_object_extensions/deserialization_spec.rb[1:4:1] | passed | 0.00119 seconds |
141
+ ./spec/castkit/data_object_spec.rb[1:1:1] | passed | 0.00012 seconds |
142
+ ./spec/castkit/data_object_spec.rb[1:1:2] | passed | 0.00008 seconds |
143
+ ./spec/castkit/data_object_spec.rb[1:1:3] | passed | 0.00006 seconds |
144
+ ./spec/castkit/data_object_spec.rb[1:2:1] | passed | 0.00005 seconds |
145
+ ./spec/castkit/data_object_spec.rb[1:2:2] | passed | 0.00005 seconds |
146
+ ./spec/castkit/data_object_spec.rb[1:3:1] | passed | 0.00011 seconds |
147
+ ./spec/castkit/data_object_spec.rb[1:4:1] | passed | 0.00006 seconds |
148
+ ./spec/castkit/data_object_spec.rb[1:4:2] | passed | 0.00006 seconds |
149
+ ./spec/castkit/data_object_spec.rb[1:4:3] | passed | 0.00006 seconds |
150
+ ./spec/castkit/data_object_spec.rb[1:4:4] | passed | 0.00343 seconds |
151
+ ./spec/castkit/data_object_spec.rb[1:5:1] | passed | 0.00013 seconds |
152
+ ./spec/castkit/data_object_spec.rb[1:6:1] | passed | 0.00008 seconds |
153
+ ./spec/castkit/default_serializer_spec.rb[1:1:1] | passed | 0.0001 seconds |
154
+ ./spec/castkit/default_serializer_spec.rb[1:2:1] | passed | 0.00024 seconds |
155
+ ./spec/castkit/default_serializer_spec.rb[1:2:2] | passed | 0.00007 seconds |
156
+ ./spec/castkit/default_serializer_spec.rb[1:3:1] | passed | 0.00009 seconds |
157
+ ./spec/castkit/default_serializer_spec.rb[1:3:2] | passed | 0.00014 seconds |
158
+ ./spec/castkit/default_serializer_spec.rb[1:3:3] | passed | 0.00024 seconds |
159
+ ./spec/castkit/default_serializer_spec.rb[1:3:4] | passed | 0.00011 seconds |
160
+ ./spec/castkit/default_serializer_spec.rb[1:4:1] | passed | 0.00007 seconds |
161
+ ./spec/castkit/default_serializer_spec.rb[1:5:1] | passed | 0.00007 seconds |
162
+ ./spec/castkit/default_serializer_spec.rb[1:5:2] | passed | 0.00006 seconds |
163
+ ./spec/castkit/default_serializer_spec.rb[1:5:3] | passed | 0.00013 seconds |
164
+ ./spec/castkit/serializer_spec.rb[1:1:1] | passed | 0.00004 seconds |
165
+ ./spec/castkit/serializer_spec.rb[1:2:1] | passed | 0.00012 seconds |
166
+ ./spec/castkit/serializer_spec.rb[1:3:1] | passed | 0.00006 seconds |
167
+ ./spec/castkit/serializer_spec.rb[1:3:2] | passed | 0.00005 seconds |
168
+ ./spec/castkit/serializer_spec.rb[1:4:1] | passed | 0.00004 seconds |
169
+ ./spec/castkit/validator_spec.rb[1:1:1] | passed | 0.00004 seconds |
170
+ ./spec/castkit/validator_spec.rb[1:2:1] | passed | 0.00003 seconds |
171
+ ./spec/castkit/validators/numeric_validator_spec.rb[1:1:1:1] | passed | 0.00004 seconds |
172
+ ./spec/castkit/validators/numeric_validator_spec.rb[1:1:2:1] | passed | 0.00004 seconds |
173
+ ./spec/castkit/validators/numeric_validator_spec.rb[1:1:3:1] | passed | 0.00003 seconds |
174
+ ./spec/castkit/validators/numeric_validator_spec.rb[1:1:4:1] | passed | 0.00003 seconds |
175
+ ./spec/castkit/validators/string_validator_spec.rb[1:1:1:1:1] | passed | 0.00004 seconds |
176
+ ./spec/castkit/validators/string_validator_spec.rb[1:1:1:1:2] | passed | 0.00004 seconds |
177
+ ./spec/castkit/validators/string_validator_spec.rb[1:1:2:1] | passed | 0.00004 seconds |
178
+ ./spec/castkit/validators/string_validator_spec.rb[1:1:2:2] | passed | 0.00003 seconds |
179
+ ./spec/castkit/validators/string_validator_spec.rb[1:1:3:1] | passed | 0.00004 seconds |
180
+ ./spec/castkit/validators/string_validator_spec.rb[1:1:3:2] | passed | 0.00003 seconds |
181
+ ./spec/castkit/validators/string_validator_spec.rb[1:1:4:1] | passed | 0.00004 seconds |
182
+ ./spec/castkit_spec.rb[1:1] | passed | 0.00003 seconds |
183
+ ./spec/castkit_spec.rb[1:2:1:1] | passed | 0.00009 seconds |
184
+ ./spec/castkit_spec.rb[1:2:1:2] | passed | 0.00006 seconds |
185
+ ./spec/castkit_spec.rb[1:2:1:3] | passed | 0.00008 seconds |
186
+ ./spec/castkit_spec.rb[1:2:1:4] | passed | 0.00007 seconds |
187
+ ./spec/castkit_spec.rb[1:2:2:1] | passed | 0.00006 seconds |
188
+ ./spec/castkit_spec.rb[1:2:2:2] | passed | 0.00009 seconds |
189
+ ./spec/castkit_spec.rb[1:2:2:3] | passed | 0.00005 seconds |
190
+ ./spec/castkit_spec.rb[1:2:3:1] | passed | 0.00005 seconds |
191
+ ./spec/castkit_spec.rb[1:2:3:2] | passed | 0.00005 seconds |
192
+ ./spec/castkit_spec.rb[1:2:3:3] | passed | 0.00004 seconds |
193
+ ./spec/castkit_spec.rb[1:2:4:1] | passed | 0.00006 seconds |
194
+ ./spec/castkit_spec.rb[1:3:1] | passed | 0.00014 seconds |
195
+ ./spec/castkit_spec.rb[1:3:2] | passed | 0.00029 seconds |
196
+ ./spec/castkit_spec.rb[1:3:3] | passed | 0.00016 seconds |
197
+ ./spec/castkit_spec.rb[1:3:4] | passed | 0.00012 seconds |
198
+ ./spec/castkit_spec.rb[1:3:5] | passed | 0.00016 seconds |
199
+ ./spec/castkit_spec.rb[1:3:6] | passed | 0.0001 seconds |
200
+ ./spec/castkit_spec.rb[1:3:7] | passed | 0.0001 seconds |
201
+ ./spec/castkit_spec.rb[1:3:8] | passed | 0.00017 seconds |
202
+ ./spec/configuration_spec.rb[1:1:1] | passed | 0.00005 seconds |
203
+ ./spec/configuration_spec.rb[1:2:1] | passed | 0.00004 seconds |
204
+ ./spec/configuration_spec.rb[1:3:1] | passed | 0.00004 seconds |
205
+ ./spec/configuration_spec.rb[1:3:2] | passed | 0.00003 seconds |
206
+ ./spec/configuration_spec.rb[1:3:3] | passed | 0.00003 seconds |
207
+ ./spec/configuration_spec.rb[1:3:4] | passed | 0.00005 seconds |
208
+ ./spec/configuration_spec.rb[1:4:1] | passed | 0.00004 seconds |
data/.rubocop.yml ADDED
@@ -0,0 +1,33 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.7.0
3
+ NewCops: enable
4
+ SuggestExtensions: true
5
+
6
+ Style/Documentation:
7
+ Exclude:
8
+ - spec/castkit/**/*.rb
9
+
10
+ Style/StringLiterals:
11
+ Enabled: true
12
+ EnforcedStyle: double_quotes
13
+
14
+ Style/StringLiteralsInInterpolation:
15
+ Enabled: true
16
+ EnforcedStyle: double_quotes
17
+
18
+ Gemspec/DevelopmentDependencies:
19
+ EnforcedStyle: gemspec
20
+
21
+ Layout/LineLength:
22
+ Max: 120
23
+
24
+ Metrics/ClassLength:
25
+ Max: 200
26
+
27
+ Metrics/BlockLength:
28
+ Exclude:
29
+ - castkit.gemspec
30
+ - spec/**/*.rb
31
+
32
+ Metrics/MethodLength:
33
+ Max: 20
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-04-10
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at bnlucas@outlook.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Nathan Lucas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,195 @@
1
+
2
+ # Castkit
3
+
4
+ **Castkit** is a lightweight, type-safe Ruby DSL for defining and validating data objects.
5
+
6
+ Itโ€™s inspired by DTO (data transfer object) patterns and brings clarity, safety, and structure to how you define and manipulate structured data in Ruby โ€” with support for casting, validation, access control, serialization, and extensibility.
7
+
8
+ ---
9
+
10
+ ## โœจ Features
11
+
12
+ - โœ… Declarative type-safe attribute definitions
13
+ - ๐Ÿ” Built-in casting for primitive and custom types
14
+ - ๐Ÿ” Pluggable validation (with per-type default validators)
15
+ - ๐Ÿ” Attribute-level access control (`read`, `write`)
16
+ - ๐Ÿ“ฆ Serialization and deserialization with optional unwrapping and root keys
17
+ - โ™ป๏ธ Circular reference detection during serialization
18
+ - ๐Ÿ”ง Configurable enforcement and custom validators
19
+
20
+ ---
21
+
22
+ ## ๐Ÿ”ง Installation
23
+
24
+ Add this line to your Gemfile:
25
+
26
+ ```ruby
27
+ gem 'castkit'
28
+ ```
29
+
30
+ Then install:
31
+
32
+ ```bash
33
+ bundle install
34
+ ```
35
+
36
+ Or install manually:
37
+
38
+ ```bash
39
+ gem install castkit
40
+ ```
41
+
42
+ ---
43
+
44
+ ## ๐Ÿš€ Quick Start
45
+
46
+ ```ruby
47
+ class UserDto < Castkit::DataObject
48
+ string :name
49
+ integer :age, required: false
50
+ boolean :admin, default: false
51
+
52
+ unwrapped :profile, ProfileDto, prefix: "profile_"
53
+ end
54
+
55
+ user = UserDto.new(name: "Alice", age: 30, profile_name: "Dev")
56
+ user.to_h
57
+ # => { name: "Alice", age: 30, admin: false, profile_name: "Dev" }
58
+
59
+ user.to_json
60
+ # => '{"name":"Alice","age":30,"admin":false,"profile_name":"Dev"}'
61
+ ```
62
+
63
+ ---
64
+
65
+ ## ๐Ÿงฑ Defining Attributes
66
+
67
+ | Type | Example |
68
+ |-------------|--------------------------------|
69
+ | `string` | `string :name` |
70
+ | `integer` | `integer :age` |
71
+ | `boolean` | `boolean :active` |
72
+ | `float` | `float :rating` |
73
+ | `date` | `date :published_on` |
74
+ | `datetime` | `datetime :created_at` |
75
+ | `array` | `array :tags, of: :string` |
76
+ | `hash` | `hash :metadata` |
77
+ | `dataobject`| `dataobject :profile, ProfileDto` |
78
+
79
+ ---
80
+
81
+ ## ๐Ÿงช Validation
82
+
83
+ Validators can be built-in or custom:
84
+
85
+ ```ruby
86
+ class ZipValidator
87
+ def call(value, options:, context:)
88
+ raise Castkit::AttributeError, "#{context} is not a valid ZIP" unless value =~ /^\d{5}$/
89
+ end
90
+ end
91
+
92
+ class AddressDto < Castkit::DataObject
93
+ string :zip, validator: ZipValidator.new
94
+ end
95
+ ```
96
+
97
+ You can also register per-type defaults globally:
98
+
99
+ ```ruby
100
+ Castkit.configuration.register_validator(:zip, ZipValidator.new)
101
+ ```
102
+
103
+ ---
104
+
105
+ ## ๐Ÿ” Access Control
106
+
107
+ ```ruby
108
+ class CredentialsDto < Castkit::DataObject
109
+ string :username
110
+ string :password, access: [:write] # only writeable, not serialized
111
+ end
112
+ ```
113
+
114
+ ---
115
+
116
+ ## ๐Ÿช„ Serialization Options
117
+
118
+ - `ignore_nil: true` โ€“ skip nils
119
+ - `ignore_blank: true` โ€“ skip `[]`, `{}`, `""`, etc.
120
+ - `unwrapped: true, prefix: "foo_"` โ€“ flatten nested objects
121
+ - `root "user"` โ€“ wrap in `{ "user": { ... } }`
122
+
123
+ ---
124
+
125
+ ## ๐Ÿ”„ Custom Serializers
126
+
127
+ ```ruby
128
+ class SimpleSerializer < Castkit::Serializer
129
+ private
130
+
131
+ def call
132
+ obj.class.attributes.keys.map { |k| [k, obj.public_send(k)] }.to_h
133
+ end
134
+ end
135
+
136
+ class EventDto < Castkit::DataObject
137
+ string :type
138
+ string :timestamp
139
+
140
+ serializer SimpleSerializer
141
+ end
142
+ ```
143
+
144
+ ---
145
+
146
+ ## โš™๏ธ Configuration
147
+
148
+ ```ruby
149
+ Castkit.configuration.enforce_array_of_type = true
150
+ Castkit.configuration.enforce_boolean_casting = false
151
+ Castkit.configuration.register_validator(:uuid, UuidValidator.new)
152
+
153
+ Castkit.configure do |config|
154
+ config.enforce_array_of_type = true
155
+ end
156
+ ```
157
+
158
+ ---
159
+
160
+ ## ๐Ÿ’ฅ Error Handling
161
+
162
+ - `Castkit::AttributeError` โ€“ invalid attribute value
163
+ - `Castkit::DataObjectError` โ€“ object-level failure (e.g., unknown key)
164
+ - `Castkit::SerializationError` โ€“ circular reference or serialization failure
165
+
166
+ ---
167
+
168
+ ## ๐Ÿงช Testing
169
+
170
+ You can test DTOs by instantiating them like POROs:
171
+
172
+ ```ruby
173
+ dto = MyDto.new(input_data)
174
+ expect(dto.name).to eq("expected")
175
+ ```
176
+
177
+ ---
178
+
179
+ ## ๐Ÿ“ฆ Compatibility
180
+
181
+ - Ruby 2.7+
182
+ - Zero dependencies (uses core Ruby)
183
+
184
+ ---
185
+
186
+ ## ๐Ÿ“ƒ License
187
+
188
+ MIT. See [LICENSE](LICENSE).
189
+
190
+ ---
191
+
192
+ ## ๐Ÿ™ Credits
193
+
194
+ Created with โค๏ธ by [Nathan Lucas](https://github.com/you)
195
+ Inspired by Java DTOs, dry-rb, and the need for clean, reliable data structures in APIs.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/castkit.gemspec ADDED
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/castkit/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "castkit"
7
+ spec.version = Castkit::VERSION
8
+ spec.authors = ["Nathan Lucas"]
9
+ spec.email = ["bnlucas@outlook.com"]
10
+
11
+ spec.summary = "Type-safe, validated data objects for Ruby"
12
+ spec.description = "Castkit is a lightweight, type-safe Ruby DSL for defining, validating, and serializing " \
13
+ "structured data objects. Inspired by DTO patterns, it supports nested types, access " \
14
+ "control, custom serializers, and more."
15
+ spec.homepage = "https://github.com/bnlucas/castkit"
16
+ spec.license = "MIT"
17
+ spec.required_ruby_version = ">= 2.7.0"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/bnlucas/castkit"
21
+ spec.metadata["changelog_uri"] = "https://github.com/bnlucas/castkit/blob/main/CHANGELOG.md"
22
+ spec.metadata["rubygems_mfa_required"] = "true"
23
+
24
+ spec.files = Dir.chdir(__dir__) do
25
+ `git ls-files -z`.split("\x0").reject do |f|
26
+ (File.expand_path(f) == __FILE__) ||
27
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
28
+ end
29
+ end
30
+
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+
35
+ # Runtime dependencies
36
+
37
+ # Development dependencies
38
+ spec.add_development_dependency "rspec"
39
+ spec.add_development_dependency "rubocop"
40
+ spec.add_development_dependency "yard"
41
+ end