smart_types 0.4.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +52 -0
- data/CHANGELOG.md +28 -3
- data/Gemfile.lock +7 -3
- data/LICENSE.txt +1 -1
- data/README.md +59 -18
- data/lib/smart_core/types/primitive/factory/runtime_type_builder.rb +2 -1
- data/lib/smart_core/types/primitive/factory.rb +1 -1
- data/lib/smart_core/types/value/date.rb +2 -2
- data/lib/smart_core/types/value/date_time.rb +2 -2
- data/lib/smart_core/types/variadic/array_of.rb +23 -0
- data/lib/smart_core/types/variadic/enum.rb +11 -0
- data/lib/smart_core/types/variadic.rb +3 -0
- data/lib/smart_core/types/version.rb +2 -2
- data/smart_types.gemspec +2 -1
- metadata +21 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 272f5a15bb76008e456d87ad711a534518fa746369c3c64b8915f09265f75fea
|
4
|
+
data.tar.gz: 53ccc4912ec1577133ccfbe678dba4741a85c5a8521b72f2fca396823c31797d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bb710c2e0f11a8a267a2663fcb9ad75b60352d306b17a8bebad812013531ea1ee7fac4996bc342be245ac09939d862ca0f2dc2a4c26dfd5c9aa064ea41b270f
|
7
|
+
data.tar.gz: a2d03bcc580625b3af5ffe9535cd5b26e972b4d4b6189d71aceaa09c48f527cb2310c8aa68238803093357dee4f8b43817d3b95ddd5c912bd11dc9a6da2bbdf8
|
@@ -0,0 +1,52 @@
|
|
1
|
+
name: ci
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
ci:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby:
|
19
|
+
- version: 2.5
|
20
|
+
continue-on-error: false
|
21
|
+
- version: 2.6
|
22
|
+
continue-on-error: false
|
23
|
+
- version: 2.7
|
24
|
+
continue-on-error: false
|
25
|
+
- version: 3.0
|
26
|
+
continue-on-error: false
|
27
|
+
- version: ruby-head
|
28
|
+
continue-on-error: true
|
29
|
+
- version: jruby-head
|
30
|
+
continue-on-error: true
|
31
|
+
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
- name: Set up Ruby
|
35
|
+
uses: ruby/setup-ruby@v1
|
36
|
+
with:
|
37
|
+
bundler-cache: true
|
38
|
+
ruby-version: ${{ matrix.ruby.version }}
|
39
|
+
- name: Install dependencies
|
40
|
+
run: bundle install
|
41
|
+
continue-on-error: ${{ matrix.ruby.continue-on-error }}
|
42
|
+
- name: Run rubocop
|
43
|
+
run: bundle exec rubocop
|
44
|
+
continue-on-error: ${{ matrix.ruby.continue-on-error }}
|
45
|
+
- name: Run specs
|
46
|
+
run: bundle exec rspec
|
47
|
+
continue-on-error: ${{ matrix.ruby.continue-on-error }}
|
48
|
+
- name: Coveralls
|
49
|
+
uses: coverallsapp/github-action@master
|
50
|
+
continue-on-error: true
|
51
|
+
with:
|
52
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,31 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
# [0.7.1] - 2022-08-31
|
5
|
+
### Fixed
|
6
|
+
- (**TruffelRuby** fix) Fixed `NoMethodError: private method 'initialize_clone'` failing on type object duplication and cloning (`#dup` and `#clone`).
|
7
|
+
`TruffleRuby` implementation makes `initialize_clone` method private by default even if your manually defined method is implicitly public.
|
8
|
+
To fix this we should explicitly define our method as a public method (`public def initialize_clone`).
|
9
|
+
```
|
10
|
+
NoMethodError: private method `initialize_clone' called for SmartCore::Types::Primitive::Factory::RuntimeTypeBuilder:Module
|
11
|
+
```
|
12
|
+
|
13
|
+
# [0.7.0] - 2021-11-22
|
14
|
+
### Added
|
15
|
+
- Added Github Actions CI;
|
16
|
+
- Use `ArgumentError` instead of `DateError` in related type-casters;
|
17
|
+
- Fix typos in documentation;
|
18
|
+
|
19
|
+
# [0.6.0] - 2021-04-29
|
20
|
+
### Added
|
21
|
+
- New type of `SmartCode::Types::Variadic` category:
|
22
|
+
- `SmartCore::Types::Variadic::ArrayOf` (`Array` with element types validation)
|
23
|
+
|
24
|
+
# [0.5.0] - 2021-01-28
|
25
|
+
### Added
|
26
|
+
- New types of `SmartCore::Types::Variadic` category:
|
27
|
+
- `SmartCore::Types::Variadic::Enum` (a simple enumeration on plain values);
|
28
|
+
|
4
29
|
# [0.4.0] - 2021-01-18
|
5
30
|
### Added
|
6
31
|
- Support for *Ruby 3*;
|
@@ -9,7 +34,7 @@ All notable changes to this project will be documented in this file.
|
|
9
34
|
### Added
|
10
35
|
- Extended **Type Definition API**: support for **runtime attributes**:
|
11
36
|
- Type checkers, type casters and type invariants now receives runtime attributes (you can omit these);
|
12
|
-
- Type
|
37
|
+
- Type definition extended with `runtime_attribute_checker`-checker definition (runtime attributes validator);
|
13
38
|
- Types with incorrect runtime attributes will raise `SmartCore::Types::IncorrectRuntimeAttributesError` exception;
|
14
39
|
- Types which has no support for runtime attributes will raise `SmartCore::Types::RuntimeAttributesUnsupportedError` excpetion;
|
15
40
|
- All types by default has a method alias (`()`) which does not allow runtime attributes (for example: `SmartCore::Types::Value::String` has
|
@@ -33,9 +58,9 @@ All notable changes to this project will be documented in this file.
|
|
33
58
|
## [0.2.0] - 2020-11-21
|
34
59
|
### Added
|
35
60
|
- Brand new **Type invariant API**:
|
36
|
-
- globally refactored validation logic (with backward
|
61
|
+
- globally refactored validation logic (with backward compatibility for `#valid?(value)` method);
|
37
62
|
- new type definition DSL: `.invariant(name)` and `.invariant_chain(name)`;
|
38
|
-
- chained invariants will be invoked according to the definition order (second
|
63
|
+
- chained invariants will be invoked according to the definition order (second invocation
|
39
64
|
depends on previous successful invariant check);
|
40
65
|
- new validation API: `validate(value)` (with `#errors` support based on invariant names);
|
41
66
|
- at this moment Invariant API is supported only by primitive types (type sum and type multiplication support coming soon);
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
smart_types (0.
|
4
|
+
smart_types (0.7.1)
|
5
5
|
smart_engine (~> 0.11)
|
6
6
|
|
7
7
|
GEM
|
@@ -81,16 +81,19 @@ GEM
|
|
81
81
|
simplecov-html (~> 0.11)
|
82
82
|
simplecov_json_formatter (~> 0.1)
|
83
83
|
simplecov-html (0.12.3)
|
84
|
+
simplecov-lcov (0.8.0)
|
84
85
|
simplecov_json_formatter (0.1.2)
|
85
|
-
smart_engine (0.
|
86
|
+
smart_engine (0.12.0)
|
86
87
|
tzinfo (2.0.4)
|
87
88
|
concurrent-ruby (~> 1.0)
|
88
89
|
unicode-display_width (1.7.0)
|
89
90
|
zeitwerk (2.4.2)
|
90
91
|
|
91
92
|
PLATFORMS
|
93
|
+
arm64-darwin-21
|
92
94
|
x86_64-darwin-19
|
93
95
|
x86_64-darwin-20
|
96
|
+
x86_64-darwin-21
|
94
97
|
|
95
98
|
DEPENDENCIES
|
96
99
|
armitage-rubocop (~> 1.7)
|
@@ -99,7 +102,8 @@ DEPENDENCIES
|
|
99
102
|
rake (~> 13.0)
|
100
103
|
rspec (~> 3.10)
|
101
104
|
simplecov (~> 0.21)
|
105
|
+
simplecov-lcov (~> 0.8)
|
102
106
|
smart_types!
|
103
107
|
|
104
108
|
BUNDLED WITH
|
105
|
-
2.2.
|
109
|
+
2.2.31
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
-
# SmartCore::Types · [![Gem Version](https://badge.fury.io/rb/smart_types.svg)](https://badge.fury.io/rb/smart_types)
|
1
|
+
# SmartCore::Types · <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_types.svg)](https://badge.fury.io/rb/smart_types) ![ci](https://github.com/smart-rb/smart_types/workflows/ci/badge.svg?branch=master) [![coverage](https://coveralls.io/repos/github/smart-rb/smart_types/badge.svg?branch=master)](https://coveralls.io/github/smart-rb/smart_types?branch=master)
|
2
2
|
|
3
3
|
> A set of objects that acts like types (type checking and type casting) with a support for basic type algebra.
|
4
4
|
|
5
|
-
Minimalistic type system for any ruby project. Supports custom type
|
5
|
+
Minimalistic type system for any ruby project. Supports custom type definition,
|
6
6
|
type validation, type casting and type categorizing. Provides a set of commonly used type
|
7
7
|
categories and general purpose types. Has a flexible and simplest type definition toolchain.
|
8
8
|
|
9
|
+
---
|
10
|
+
|
11
|
+
<p>
|
12
|
+
<a href="https://github.com/Cado-Labs">
|
13
|
+
<img src="https://github.com/Cado-Labs/cado-labs-logos/blob/main/cado_labs_supporting.svg" alt="Supported by Cado Labs" />
|
14
|
+
</a>
|
15
|
+
</p>
|
16
|
+
|
17
|
+
---
|
18
|
+
|
9
19
|
## Installation
|
10
20
|
|
11
21
|
```ruby
|
@@ -120,10 +130,18 @@ SmartCore::Types::Protocol::InstanceOf(::Time, ::DateTime, ::Date) # time or dat
|
|
120
130
|
#### Variadic:
|
121
131
|
|
122
132
|
```ruby
|
133
|
+
SmartCore::Types::Variadic::ArrayOf
|
134
|
+
SmartCore::Types::Variadic::Enum
|
123
135
|
SmartCore::Types::Variadic::Tuple
|
124
136
|
```
|
125
137
|
|
126
138
|
```ruby
|
139
|
+
# example (SmartCore::Types::Variadic::ArrayOf):
|
140
|
+
SmartCore::Types::Variadic::ArrayOf(::String, ::Array) # array of strings or arrays
|
141
|
+
|
142
|
+
# example (SmartCore::Types::Variadic::Enum):
|
143
|
+
SmartCore::Types::Variadic::Enum('string', 1337, :symbol) # one of enumerated values
|
144
|
+
|
127
145
|
# examples (SmartCore::Types::Variadic::Tuple):
|
128
146
|
SmartCore::Types::Variadic::Tuple(::String, ::Integer, ::Time) # array with signature [<string>, <integer>, <time>]
|
129
147
|
SmartCore::Types::Variadic::Tuple(::Symbol, ::Float) # array with signature [<symbol>, <float>]
|
@@ -157,9 +175,9 @@ Invariant is a custom validation block that will work as a logical value checker
|
|
157
175
|
|
158
176
|
Type invariants does not depends on each other (invariant defined out from chain does not depends on other invariants);
|
159
177
|
|
160
|
-
Invariants inside invariant chains will be invoked in order they was defined and each internal invariant depends on the valid previous
|
178
|
+
Invariants inside invariant chains will be invoked in order they was defined and each internal invariant depends on the valid previous invariant check.
|
161
179
|
|
162
|
-
**!IMPORTANT!** Type sum and type multiplication does not support invariant checking and custom invariant
|
180
|
+
**!IMPORTANT!** Type sum and type multiplication does not support invariant checking and custom invariant definition at this moment.
|
163
181
|
Type sum and type mult ignores type invariants in their validation logic (currently this functionality in development yet).
|
164
182
|
|
165
183
|
Invariant checking is a special validation layer (see [#type validation](#type-validation) readme section). Invariant error code pattern:
|
@@ -224,7 +242,7 @@ SmartCore::Types::Value.define_type(:String) do |type|
|
|
224
242
|
end
|
225
243
|
|
226
244
|
# NOTE:
|
227
|
-
# inside a chain each next invariant
|
245
|
+
# inside a chain each next invariant invocation
|
228
246
|
# depends on previous successful invariant check
|
229
247
|
end
|
230
248
|
end
|
@@ -241,14 +259,14 @@ Type validation reflects on two APIs:
|
|
241
259
|
|
242
260
|
Type invariants does not depends on each other (invariant defined out from the chain does not depends on other invariants);
|
243
261
|
|
244
|
-
Invariants inside invariant chains will be invoked in order they was defined and each internal invariant depends on the valid previous
|
262
|
+
Invariants inside invariant chains will be invoked in order they was defined and each internal invariant depends on the valid previous invariant check.
|
245
263
|
|
246
|
-
**!IMPORTANT!** Type sum and type multiplication does not support invariant checking and custom invariant
|
264
|
+
**!IMPORTANT!** Type sum and type multiplication does not support invariant checking and custom invariant definition at this moment.
|
247
265
|
Type sum and type mult ignores type invariants in their validation logic (currently this functionality in development yet).
|
248
266
|
|
249
267
|
Invariant checking is a special validation layer (see [#type validation](#type-validation) readme section) and represents a set of error codes in result object;
|
250
268
|
|
251
|
-
Type
|
269
|
+
Type validation interface:
|
252
270
|
|
253
271
|
- `valid?(value)` - validates value and returns `true` or `false`;
|
254
272
|
- returns `ture` only if the type checker returns `true` and all invariants are valid;
|
@@ -425,6 +443,22 @@ SmartCore::Types::Value::Class.cast(123)
|
|
425
443
|
|
426
444
|
- type refinements:
|
427
445
|
|
446
|
+
```ruby
|
447
|
+
SmartCore::Types.configure do |config|
|
448
|
+
config.warn_on_type_refinements = true # false by default
|
449
|
+
end
|
450
|
+
```
|
451
|
+
|
452
|
+
```ruby
|
453
|
+
SmartCore::Types::Value.refine(:Time) do |type|
|
454
|
+
# new type definition
|
455
|
+
end
|
456
|
+
|
457
|
+
SmartCore::Types::Value::Time.refine do |type|
|
458
|
+
# new type definition
|
459
|
+
end
|
460
|
+
```
|
461
|
+
|
428
462
|
```ruby
|
429
463
|
SmartCore::Types::Value::Time.refine_checker do |value, original_checker|
|
430
464
|
# new type checker
|
@@ -481,13 +515,14 @@ SmartCore::Types::Struct::JSONSchema
|
|
481
515
|
SmartCore::Types::Struct::StrictArray
|
482
516
|
SmartCore::Types::Struct::StrictHash
|
483
517
|
SmartCore::Types::Struct::Map
|
484
|
-
SmartCore::Types::Variadic::Enum
|
485
518
|
SmartCore::Types::Protocol::Interface
|
486
519
|
SmartCore::Types::Protocol::Ancestors
|
487
520
|
SmartCore::Types::Protocol::Enumerable
|
488
521
|
SmartCore::Types::Protocol::Comparable
|
489
522
|
SmartCore::Types::Protocol::Forwardable
|
490
523
|
SmartCore::Types::Protocol::Callable
|
524
|
+
SmartCore::Types::Behavior::Truthy
|
525
|
+
SmartCore::Types::Behavior::Falsy
|
491
526
|
```
|
492
527
|
|
493
528
|
- `#sum` alias for `|` and `#mult` alias for `&` (with a support for type name definition and other API);
|
@@ -503,18 +538,18 @@ SmartCore::Types::Protocol::Callable
|
|
503
538
|
|
504
539
|
- support for type of empty non-defined type (`SmartCore::Types::Primitive::Undefined`);
|
505
540
|
- constrained types;
|
506
|
-
-
|
541
|
+
- module-based type system integration;
|
507
542
|
- constructor implementation and support;
|
508
|
-
- support for invariant checking (and custom
|
509
|
-
- to provide a type comparability and
|
543
|
+
- support for invariant checking (and custom definition) in sum-types;
|
544
|
+
- to provide a type comparability and compatibility between all passed types
|
510
545
|
you should provide `type.reconcilable { |value, *types| .... }` setting;
|
511
|
-
- `type.reconcilable` should be
|
512
|
-
- (**preliminarily**) invariants of the concrete passed type should be valid for
|
513
|
-
- support for invariant checking (and
|
514
|
-
- to provide a type comparability and
|
546
|
+
- `type.reconcilable` should be accessible for type sum and type mult definitions;
|
547
|
+
- (**preliminarily**) invariants of the concrete passed type should be valid for successful invariant check;
|
548
|
+
- support for invariant checking (and definition) in mult-types;
|
549
|
+
- to provide a type comparability and compatibility between all passed types
|
515
550
|
you should provide `type.reconcilable { |value, *types| .... }` setting;
|
516
|
-
- `type.reconcilable` should be
|
517
|
-
- (**preliminarily**) all invariants of all types should be valid for
|
551
|
+
- `type.reconcilable` should be accessible for type sum and type mult definitions;
|
552
|
+
- (**preliminarily**) all invariants of all types should be valid for successful invariant check;
|
518
553
|
|
519
554
|
## Contributing
|
520
555
|
|
@@ -554,6 +589,12 @@ bundle exec rubocop -A
|
|
554
589
|
|
555
590
|
Released under MIT License.
|
556
591
|
|
592
|
+
## Supporting
|
593
|
+
|
594
|
+
<a href="https://github.com/Cado-Labs">
|
595
|
+
<img src="https://github.com/Cado-Labs/cado-labs-logos/blob/main/cado_labs_logo.png" alt="Supported by Cado Labs" />
|
596
|
+
</a>
|
597
|
+
|
557
598
|
## Authors
|
558
599
|
|
559
600
|
[Rustam Ibragimov](https://github.com/0exp)
|
@@ -28,8 +28,9 @@ module SmartCore::Types::Primitive::Factory::RuntimeTypeBuilder
|
|
28
28
|
#
|
29
29
|
# @api private
|
30
30
|
# @since 0.3.0
|
31
|
+
# @version 0.7.1
|
31
32
|
# rubocop:disable Metrics/AbcSize, Layout/LineLength
|
32
|
-
def initialize_clone(new_instance, cloneable_instance)
|
33
|
+
public def initialize_clone(new_instance, cloneable_instance)
|
33
34
|
name_clone = cloneable_instance.instance_variable_get(:@name)
|
34
35
|
category_clone = cloneable_instance.instance_variable_get(:@category)
|
35
36
|
validator_clone = cloneable_instance.instance_variable_get(:@validator).___copy_for___(new_instance)
|
@@ -47,7 +47,7 @@ class SmartCore::Types::Primitive::Factory
|
|
47
47
|
# @api private
|
48
48
|
# @since 0.1.0
|
49
49
|
def build_type_definitions(type_definition)
|
50
|
-
raise 'Type definition is not
|
50
|
+
raise 'Type definition is not provided' unless type_definition.is_a?(Proc)
|
51
51
|
SmartCore::Types::Primitive::Factory::DefinitionContext.new.tap do |context|
|
52
52
|
context.instance_eval(&type_definition)
|
53
53
|
end.tap do |context|
|
@@ -6,7 +6,7 @@ using SmartCore::Ext::BasicObjectAsObject
|
|
6
6
|
|
7
7
|
# @api public
|
8
8
|
# @since 0.1.0
|
9
|
-
# @version 0.
|
9
|
+
# @version 0.7.0
|
10
10
|
SmartCore::Types::Value.define_type(:Date) do |type|
|
11
11
|
type.define_checker do |value|
|
12
12
|
value.is_a?(::Date) || value == ::Date::Infinity
|
@@ -17,7 +17,7 @@ SmartCore::Types::Value.define_type(:Date) do |type|
|
|
17
17
|
|
18
18
|
begin
|
19
19
|
::Date.parse(value)
|
20
|
-
rescue ::
|
20
|
+
rescue ::ArgumentError, ::TypeError
|
21
21
|
raise(SmartCore::Types::TypeCastingError, 'Non-castable to Date')
|
22
22
|
end
|
23
23
|
end
|
@@ -6,7 +6,7 @@ using SmartCore::Ext::BasicObjectAsObject
|
|
6
6
|
|
7
7
|
# @api public
|
8
8
|
# @since 0.1.0
|
9
|
-
# @version 0.
|
9
|
+
# @version 0.7.0
|
10
10
|
SmartCore::Types::Value.define_type(:DateTime) do |type|
|
11
11
|
type.define_checker do |value|
|
12
12
|
value.is_a?(::DateTime) || value == ::DateTime::Infinity
|
@@ -17,7 +17,7 @@ SmartCore::Types::Value.define_type(:DateTime) do |type|
|
|
17
17
|
|
18
18
|
begin
|
19
19
|
::DateTime.parse(value)
|
20
|
-
rescue ::
|
20
|
+
rescue ::ArgumentError, ::TypeError
|
21
21
|
raise(SmartCore::Types::TypeCastingError, 'Non-castable to DateTime')
|
22
22
|
end
|
23
23
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
using SmartCore::Ext::BasicObjectAsObject
|
4
|
+
|
5
|
+
# @api public
|
6
|
+
# @since 0.6.0
|
7
|
+
SmartCore::Types::Variadic.define_type(:ArrayOf) do |type|
|
8
|
+
type.define_caster { |value| SmartCore::Types::Value::Array.cast(value) }
|
9
|
+
|
10
|
+
type.runtime_attributes_checker do |runtime_attrs|
|
11
|
+
runtime_attrs.any? && runtime_attrs.all? do |runtime_attr|
|
12
|
+
runtime_attr.is_a?(::Class)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
type.define_checker do |value, expected_types|
|
17
|
+
next false unless SmartCore::Types::Value::Array.valid?(value)
|
18
|
+
|
19
|
+
value.all? do |elem|
|
20
|
+
expected_types.any? { |expected_type| elem.is_a?(expected_type) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
using SmartCore::Ext::BasicObjectAsObject
|
4
|
+
|
5
|
+
# @api public
|
6
|
+
# @since 0.5.0
|
7
|
+
SmartCore::Types::Variadic.define_type(:Enum) do |type|
|
8
|
+
type.runtime_attributes_checker(&:any?)
|
9
|
+
|
10
|
+
type.define_checker { |value, enum| enum.include?(value) }
|
11
|
+
end
|
data/smart_types.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
|
13
13
|
spec.summary = 'Full-featured type system for any ruby project.'
|
14
14
|
spec.description = <<~DESCRIPTION
|
15
|
-
Full-featured type system for any ruby project. Supports custom type
|
15
|
+
Full-featured type system for any ruby project. Supports custom type definition,
|
16
16
|
type validation, type casting and type categorizing. Provides a set of commonly used type
|
17
17
|
categories and general purpose types. Has a flexible and simplest type definition toolchain.
|
18
18
|
DESCRIPTION
|
@@ -39,5 +39,6 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
40
40
|
spec.add_development_dependency 'armitage-rubocop', '~> 1.7'
|
41
41
|
spec.add_development_dependency 'simplecov', '~> 0.21'
|
42
|
+
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
|
42
43
|
spec.add_development_dependency 'pry', '~> 0.13'
|
43
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.1
|
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-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smart_engine
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.21'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov-lcov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.8'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.8'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: pry
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,7 +123,7 @@ dependencies:
|
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0.13'
|
111
125
|
description: |
|
112
|
-
Full-featured type system for any ruby project. Supports custom type
|
126
|
+
Full-featured type system for any ruby project. Supports custom type definition,
|
113
127
|
type validation, type casting and type categorizing. Provides a set of commonly used type
|
114
128
|
categories and general purpose types. Has a flexible and simplest type definition toolchain.
|
115
129
|
email:
|
@@ -118,6 +132,7 @@ executables: []
|
|
118
132
|
extensions: []
|
119
133
|
extra_rdoc_files: []
|
120
134
|
files:
|
135
|
+
- ".github/workflows/ci.yml"
|
121
136
|
- ".gitignore"
|
122
137
|
- ".rspec"
|
123
138
|
- ".rubocop.yml"
|
@@ -197,6 +212,8 @@ files:
|
|
197
212
|
- lib/smart_core/types/value/time_based.rb
|
198
213
|
- lib/smart_core/types/value/unbound_method.rb
|
199
214
|
- lib/smart_core/types/variadic.rb
|
215
|
+
- lib/smart_core/types/variadic/array_of.rb
|
216
|
+
- lib/smart_core/types/variadic/enum.rb
|
200
217
|
- lib/smart_core/types/variadic/tuple.rb
|
201
218
|
- lib/smart_core/types/version.rb
|
202
219
|
- smart_types.gemspec
|
@@ -222,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
239
|
- !ruby/object:Gem::Version
|
223
240
|
version: '0'
|
224
241
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
242
|
+
rubygems_version: 3.3.11
|
226
243
|
signing_key:
|
227
244
|
specification_version: 4
|
228
245
|
summary: Full-featured type system for any ruby project.
|