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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d47d612d086eb28e3984c46a50249a5b95e4352332fcf84b71150af448e6c928
4
- data.tar.gz: 56a485fd25bcbc342f0d52f8a5c4a2aa061787115f74cdcd2bef1229c363486a
3
+ metadata.gz: 89347fe2acb38785b58cb21628ddf5bec2512d7be25210a45c1295366e0cf425
4
+ data.tar.gz: fab7f7ec14eef73b8706a90c20d0e64ade3fb94b13679e67e88c35e7974664bd
5
5
  SHA512:
6
- metadata.gz: 4a25855f0dd7f3fa82fc8c786ee1c76862e42765149fa98b88f20e052a32fdcbf39854aa1384cb3fcb8dc665abe8a26d6a5642f65e81167af143070e4eee084a
7
- data.tar.gz: '0961c98733a1449e9a38f0d29f2caf85638c04d8a918e172f42f79cc91399db4f7f7b483988a0ea519b0a5c769c84df6264cafbdcda63fd8f95c77773552c151'
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
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Rustam Ibragimov
3
+ Copyright (c) 2020-2021 Rustam Ibragimov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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 &middot; <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> &middot; [![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.3.0)** - spread keys of non-strict schemas in validation result;
169
- - **(0.4.0)** - schema inheritance;
170
- - **(0.4.0)** - schema composition (`required(:key).schema(SchemaClass)`) (`compose_with(AnotherSchema)`);
171
- - **(0.4.0)** - dependable schema checking (sample: if one key exist (or not) we should check another (or not), and vice verca) (mb `if(:_key_)` rule);
172
- - **(0.6.0)** - `smart_type-system` integration;
173
- - **(0.7.0)** - support for another data structures (such as YAML strings, JSON strings, `Struct`, `OpenStruct`s, custom `Object`s and etc);
174
- - **(0.8.0)** - think about pattern matching;
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)
@@ -7,8 +7,8 @@ module SmartCore
7
7
  #
8
8
  # @api public
9
9
  # @since 0.1.0
10
- # @version 0.5.0
11
- VERSION = '0.5.0'
10
+ # @version 0.6.0
11
+ VERSION = '0.6.0'
12
12
  end
13
13
  # rubocop:enable Style/StaticClass
14
14
  end
@@ -3,6 +3,7 @@
3
3
  require 'smart_core'
4
4
  require 'smart_core/types'
5
5
  require 'set'
6
+ require 'forwardable'
6
7
 
7
8
  # @api pulic
8
9
  # @since 0.1.0
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.5.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: 2021-01-17 00:00:00.000000000 Z
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.2.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