smart_types 0.2.0 → 0.3.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 +25 -0
- data/Gemfile.lock +33 -32
- data/README.md +161 -16
- data/lib/smart_core/types.rb +2 -0
- data/lib/smart_core/types/errors.rb +12 -0
- data/lib/smart_core/types/primitive.rb +49 -4
- data/lib/smart_core/types/primitive/caster.rb +5 -2
- data/lib/smart_core/types/primitive/checker.rb +5 -2
- data/lib/smart_core/types/primitive/factory.rb +64 -6
- data/lib/smart_core/types/primitive/factory/definition_context.rb +37 -11
- data/lib/smart_core/types/primitive/factory/runtime_type_builder.rb +53 -0
- data/lib/smart_core/types/primitive/invariant_control.rb +6 -3
- data/lib/smart_core/types/primitive/invariant_control/chain.rb +5 -2
- data/lib/smart_core/types/primitive/invariant_control/single.rb +5 -2
- data/lib/smart_core/types/primitive/mult_factory.rb +40 -6
- data/lib/smart_core/types/primitive/mult_factory/definition_context.rb +23 -1
- data/lib/smart_core/types/primitive/mult_validator.rb +8 -0
- data/lib/smart_core/types/primitive/nilable_factory.rb +10 -3
- data/lib/smart_core/types/primitive/runtime_attributes_checker.rb +77 -0
- data/lib/smart_core/types/primitive/sum_factory.rb +40 -6
- data/lib/smart_core/types/primitive/sum_factory/definition_context.rb +23 -1
- data/lib/smart_core/types/primitive/sum_validator.rb +18 -2
- data/lib/smart_core/types/primitive/undefined_caster.rb +4 -1
- data/lib/smart_core/types/primitive/validator.rb +16 -7
- data/lib/smart_core/types/protocol.rb +7 -0
- data/lib/smart_core/types/protocol/instance_of.rb +19 -0
- data/lib/smart_core/types/value/array.rb +3 -0
- data/lib/smart_core/types/value/big_decimal.rb +4 -1
- data/lib/smart_core/types/value/boolean.rb +3 -0
- data/lib/smart_core/types/value/class.rb +3 -0
- data/lib/smart_core/types/value/date.rb +3 -0
- data/lib/smart_core/types/value/date_time.rb +3 -0
- data/lib/smart_core/types/value/enumerable.rb +1 -1
- data/lib/smart_core/types/value/float.rb +3 -0
- data/lib/smart_core/types/value/hash.rb +3 -0
- data/lib/smart_core/types/value/integer.rb +3 -0
- data/lib/smart_core/types/value/module.rb +3 -0
- data/lib/smart_core/types/value/numeric.rb +3 -0
- data/lib/smart_core/types/value/proc.rb +3 -0
- data/lib/smart_core/types/value/set.rb +11 -3
- data/lib/smart_core/types/value/string.rb +3 -0
- data/lib/smart_core/types/value/string_io.rb +2 -0
- data/lib/smart_core/types/value/symbol.rb +3 -0
- data/lib/smart_core/types/value/text.rb +6 -4
- data/lib/smart_core/types/value/time.rb +3 -0
- data/lib/smart_core/types/value/time_based.rb +8 -5
- data/lib/smart_core/types/variadic.rb +7 -0
- data/lib/smart_core/types/variadic/tuple.rb +23 -0
- data/lib/smart_core/types/version.rb +2 -2
- data/smart_types.gemspec +3 -3
- metadata +15 -10
- data/.travis.yml +0 -21
data/smart_types.gemspec
CHANGED
@@ -32,12 +32,12 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
33
|
spec.require_paths = ['lib']
|
34
34
|
|
35
|
-
spec.add_dependency 'smart_engine', '~> 0.
|
35
|
+
spec.add_dependency 'smart_engine', '~> 0.10'
|
36
36
|
|
37
37
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
38
38
|
spec.add_development_dependency 'rake', '~> 13.0'
|
39
39
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
40
|
-
spec.add_development_dependency 'armitage-rubocop', '~> 1.
|
41
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
40
|
+
spec.add_development_dependency 'armitage-rubocop', '~> 1.6'
|
41
|
+
spec.add_development_dependency 'simplecov', '~> 0.20'
|
42
42
|
spec.add_development_dependency 'pry', '~> 0.13'
|
43
43
|
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.3.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: 2020-
|
11
|
+
date: 2020-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smart_engine
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.10'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,28 +72,28 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
75
|
+
version: '1.6'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
82
|
+
version: '1.6'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.20'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
96
|
+
version: '0.20'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pry
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,7 +121,6 @@ files:
|
|
121
121
|
- ".gitignore"
|
122
122
|
- ".rspec"
|
123
123
|
- ".rubocop.yml"
|
124
|
-
- ".travis.yml"
|
125
124
|
- CHANGELOG.md
|
126
125
|
- CODE_OF_CONDUCT.md
|
127
126
|
- Gemfile
|
@@ -138,6 +137,7 @@ files:
|
|
138
137
|
- lib/smart_core/types/primitive/checker.rb
|
139
138
|
- lib/smart_core/types/primitive/factory.rb
|
140
139
|
- lib/smart_core/types/primitive/factory/definition_context.rb
|
140
|
+
- lib/smart_core/types/primitive/factory/runtime_type_builder.rb
|
141
141
|
- lib/smart_core/types/primitive/invariant_control.rb
|
142
142
|
- lib/smart_core/types/primitive/invariant_control/chain.rb
|
143
143
|
- lib/smart_core/types/primitive/invariant_control/chain/result.rb
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- lib/smart_core/types/primitive/nilable_factory.rb
|
154
154
|
- lib/smart_core/types/primitive/nilable_validator.rb
|
155
155
|
- lib/smart_core/types/primitive/nilable_validator/result.rb
|
156
|
+
- lib/smart_core/types/primitive/runtime_attributes_checker.rb
|
156
157
|
- lib/smart_core/types/primitive/sum_factory.rb
|
157
158
|
- lib/smart_core/types/primitive/sum_factory/definition_context.rb
|
158
159
|
- lib/smart_core/types/primitive/sum_validator.rb
|
@@ -160,6 +161,8 @@ files:
|
|
160
161
|
- lib/smart_core/types/primitive/undefined_caster.rb
|
161
162
|
- lib/smart_core/types/primitive/validator.rb
|
162
163
|
- lib/smart_core/types/primitive/validator/result.rb
|
164
|
+
- lib/smart_core/types/protocol.rb
|
165
|
+
- lib/smart_core/types/protocol/instance_of.rb
|
163
166
|
- lib/smart_core/types/struct.rb
|
164
167
|
- lib/smart_core/types/system.rb
|
165
168
|
- lib/smart_core/types/value.rb
|
@@ -193,6 +196,8 @@ files:
|
|
193
196
|
- lib/smart_core/types/value/time.rb
|
194
197
|
- lib/smart_core/types/value/time_based.rb
|
195
198
|
- lib/smart_core/types/value/unbound_method.rb
|
199
|
+
- lib/smart_core/types/variadic.rb
|
200
|
+
- lib/smart_core/types/variadic/tuple.rb
|
196
201
|
- lib/smart_core/types/version.rb
|
197
202
|
- smart_types.gemspec
|
198
203
|
homepage: https://github.com/smart-rb/smart_types
|
@@ -217,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
222
|
- !ruby/object:Gem::Version
|
218
223
|
version: '0'
|
219
224
|
requirements: []
|
220
|
-
rubygems_version: 3.
|
225
|
+
rubygems_version: 3.1.4
|
221
226
|
signing_key:
|
222
227
|
specification_version: 4
|
223
228
|
summary: Full-featured type system for any ruby project.
|
data/.travis.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
---
|
2
|
-
language: ruby
|
3
|
-
cache: bundler
|
4
|
-
os: linux
|
5
|
-
dist: xenial
|
6
|
-
before_install: gem install bundler
|
7
|
-
script:
|
8
|
-
- bundle exec rake rubocop
|
9
|
-
- bundle exec rake rspec
|
10
|
-
jobs:
|
11
|
-
fast_finish: true
|
12
|
-
include:
|
13
|
-
- rvm: 2.4.10
|
14
|
-
- rvm: 2.5.8
|
15
|
-
- rvm: 2.6.6
|
16
|
-
- rvm: 2.7.1
|
17
|
-
- rvm: ruby-head
|
18
|
-
- rvm: jruby-head
|
19
|
-
allow_failures:
|
20
|
-
- rvm: ruby-head
|
21
|
-
- rvm: jruby-head
|