smart_schema 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +31 -9
- data/lib/smart_core/schema/version.rb +2 -2
- data/lib/smart_core/schema.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89347fe2acb38785b58cb21628ddf5bec2512d7be25210a45c1295366e0cf425
|
4
|
+
data.tar.gz: fab7f7ec14eef73b8706a90c20d0e64ade3fb94b13679e67e88c35e7974664bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c300a0c4cf87e8f6129b0752fc1e2832a0eeafe209ee8d9ef34adca543174ee3c5c5a1e4fdfd0838bc0a11e4f5326eba31b840b3dc814f3b9d3be0bfec207459
|
7
|
+
data.tar.gz: e6279e1ef40881cfe40356d963a897b7cd34ebd2d5ff5b90a149c58192568c9480c643982872b75222c766e876a82459abc7c69b1f420d33f52ab9b6c21532fb
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
# [0.6.0] - 2022-09-27
|
5
|
+
## Added
|
6
|
+
- Now `Forwardable` module has explicit requiring in order to support *Ruby@3.1* (`lib/smart_core/smart_schema.rb#6`);
|
7
|
+
|
4
8
|
# [0.5.0] - 2021-01-18
|
5
9
|
## Changed
|
6
10
|
- Updated `smart_types` dependency (`~> 0.4.0`) to guarantee **Ruby@3** compatability;
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# SmartCore::Schema [![Gem Version](https://badge.fury.io/rb/smart_schema.svg)](https://badge.fury.io/rb/smart_schema)
|
1
|
+
# SmartCore::Schema · <a target="_blank" href="https://github.com/Cado-Labs"><img src="https://github.com/Cado-Labs/cado-labs-logos/raw/main/cado_labs_badge.svg" alt="Supported by Cado Labs" style="max-width: 100%; height: 20px"></a> · [![Gem Version](https://badge.fury.io/rb/smart_schema.svg)](https://badge.fury.io/rb/smart_schema)
|
2
2
|
|
3
|
-
`SmartCore::Schema` is a schema validator for `Hash`-like data structures in declarative DSL-powered style.
|
3
|
+
`SmartCore::Schema` is a schema validator for `Hash`-like data structures (`Array`-like - coming soon) in declarative DSL-powered style.
|
4
4
|
|
5
5
|
Provides convenient and concise DSL to define complex schemas in easiest way and public validation interface to achieve a comfortable work with detailed validation result.
|
6
6
|
|
@@ -8,6 +8,16 @@ Supports nested structures, type validation (via `smart_types`), required- and o
|
|
8
8
|
|
9
9
|
Works in predicate style and in OOP/Monadic result object style. Enjoy :)
|
10
10
|
|
11
|
+
---
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<a href="https://github.com/Cado-Labs">
|
15
|
+
<img src="https://github.com/Cado-Labs/cado-labs-logos/blob/main/cado_labs_supporting.svg" alt="Supported by Cado Labs" />
|
16
|
+
</a>
|
17
|
+
</p>
|
18
|
+
|
19
|
+
---
|
20
|
+
|
11
21
|
## Installation
|
12
22
|
|
13
23
|
```ruby
|
@@ -162,16 +172,22 @@ Possible errors:
|
|
162
172
|
|
163
173
|
## Roadmap
|
164
174
|
|
175
|
+
- **(x.x.x)** - mutable schemas (value convertion during schema checking with returning the new coerced data structure);
|
176
|
+
- **(x.x.x)** - public interface for type aliasing (custom type alias registration API);
|
177
|
+
- **(x.x.x)** - support for `Array`-like data structures;
|
178
|
+
- **(0.x.0)** - an abiltiy to represent the required schema as a string (conviniet way to check what schema is defained internally when we work wtih a dynamic schema definition or in a console);
|
165
179
|
- **(0.x.0)** - migrate to `GitHub Actions` (CI);
|
166
180
|
- **(0.x.0)** - value-validation layer;
|
167
181
|
- **(0.x.0)** - error messages (that are consistent with error codes), with a support for error-code-auto-mappings for error messages via explicit hashes or via file (yaml, json and other formats);
|
168
|
-
- **(0.
|
169
|
-
- **(0.
|
170
|
-
- **(0.
|
171
|
-
- **(0.
|
172
|
-
- **(0.
|
173
|
-
- **(0.
|
174
|
-
- **(0.
|
182
|
+
- **(0.6.0)** - support for `Array`-type in schema definition;
|
183
|
+
- **(0.6.0)** - spread keys of non-strict schemas in validation result;
|
184
|
+
- **(0.7.0)** - schema inheritance;
|
185
|
+
- **(0.7.0)** - schema composition (`required(:key).schema(SchemaClass)`) (`compose_with(AnotherSchema)`);
|
186
|
+
- **(0.7.0)** - dependable schema checking (sample: if one key exist (or not) we should check another (or not), and vice verca) (mb `if(:_key_)` rule);
|
187
|
+
- **(0.8.0)** - `smart_type-system` integration;
|
188
|
+
- **(0.9.0)** - support for another data structures (such as YAML strings, JSON strings, `Struct`, `OpenStruct`s, custom `Object`s and etc);
|
189
|
+
- **(0.10.0)** - mixin-based implementation;
|
190
|
+
- **(0.x.0)** - think about pattern matching;
|
175
191
|
|
176
192
|
---
|
177
193
|
|
@@ -209,6 +225,12 @@ bundle exec rake rubocop -A
|
|
209
225
|
|
210
226
|
Released under MIT License.
|
211
227
|
|
228
|
+
## Supporting
|
229
|
+
|
230
|
+
<a href="https://github.com/Cado-Labs">
|
231
|
+
<img src="https://github.com/Cado-Labs/cado-labs-logos/blob/main/cado_labs_logo.png" alt="Supported by Cado Labs" />
|
232
|
+
</a>
|
233
|
+
|
212
234
|
## Authors
|
213
235
|
|
214
236
|
[Rustam Ibragimov](https://github.com/0exp)
|
data/lib/smart_core/schema.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rustam Ibragimov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smart_engine
|
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
201
|
- !ruby/object:Gem::Version
|
202
202
|
version: '0'
|
203
203
|
requirements: []
|
204
|
-
rubygems_version: 3.
|
204
|
+
rubygems_version: 3.3.0.dev
|
205
205
|
signing_key:
|
206
206
|
specification_version: 4
|
207
207
|
summary: SmartCore::Schema is a schema validator for Hash-like data structures
|