smart_types 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +28 -27
- data/README.md +20 -6
- data/lib/smart_core/types/version.rb +2 -2
- data/smart_types.gemspec +3 -3
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a77f7989b137f4e3e7c319ad0f825f4484329ec4ff87ad04d31b9decae9bdce7
|
4
|
+
data.tar.gz: 7e05552fb246042a12a708089065f0916eac5565bcc4de61e4bbea5cb4d76c21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 800dc2c99f6eeee87f522576483cb7583e8f63a21a98aa5ed6b7106499406336d31b4414a4146a33bd3be251268cf3f916236662398199c2e17ba5c11c4ab0d6
|
7
|
+
data.tar.gz: b771a4a428498a0bad62fc8f2cf67728117f3d47822da01086e70f386f822c4e001bb73ad609bc9ef049d06743ee3dfe13744db4d13964d4def5b058a323ad66
|
data/.rubocop.yml
CHANGED
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.4.0] - 2021-01-18
|
5
|
+
### Added
|
6
|
+
- Support for *Ruby 3*;
|
7
|
+
|
4
8
|
## [0.3.0] - 2020-12-22
|
5
9
|
### Added
|
6
10
|
- Extended **Type Definition API**: support for **runtime attributes**:
|
data/Gemfile.lock
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
smart_types (0.
|
5
|
-
smart_engine (~> 0.
|
4
|
+
smart_types (0.4.0)
|
5
|
+
smart_engine (~> 0.11)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (6.1.
|
10
|
+
activesupport (6.1.1)
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
12
|
i18n (>= 1.6, < 2)
|
13
13
|
minitest (>= 5.1)
|
14
14
|
tzinfo (~> 2.0)
|
15
15
|
zeitwerk (~> 2.3)
|
16
|
-
armitage-rubocop (1.
|
17
|
-
rubocop (= 1.
|
16
|
+
armitage-rubocop (1.7.0.1)
|
17
|
+
rubocop (= 1.7.0)
|
18
18
|
rubocop-performance (= 1.9.1)
|
19
|
-
rubocop-rails (= 2.9.
|
19
|
+
rubocop-rails (= 2.9.1)
|
20
20
|
rubocop-rake (= 0.5.1)
|
21
|
-
rubocop-rspec (= 2.0
|
21
|
+
rubocop-rspec (= 2.1.0)
|
22
22
|
ast (2.4.1)
|
23
23
|
coderay (1.1.3)
|
24
24
|
concurrent-ruby (1.1.7)
|
25
25
|
diff-lcs (1.4.4)
|
26
|
-
docile (1.3.
|
27
|
-
i18n (1.8.
|
26
|
+
docile (1.3.5)
|
27
|
+
i18n (1.8.7)
|
28
28
|
concurrent-ruby (~> 1.0)
|
29
29
|
method_source (1.0.0)
|
30
|
-
minitest (5.14.
|
30
|
+
minitest (5.14.3)
|
31
31
|
parallel (1.20.1)
|
32
|
-
parser (
|
32
|
+
parser (3.0.0.0)
|
33
33
|
ast (~> 2.4.1)
|
34
34
|
pry (0.13.1)
|
35
35
|
coderay (~> 1.1)
|
@@ -37,22 +37,22 @@ GEM
|
|
37
37
|
rack (2.2.3)
|
38
38
|
rainbow (3.0.0)
|
39
39
|
rake (13.0.3)
|
40
|
-
regexp_parser (2.0.
|
40
|
+
regexp_parser (2.0.3)
|
41
41
|
rexml (3.2.4)
|
42
42
|
rspec (3.10.0)
|
43
43
|
rspec-core (~> 3.10.0)
|
44
44
|
rspec-expectations (~> 3.10.0)
|
45
45
|
rspec-mocks (~> 3.10.0)
|
46
|
-
rspec-core (3.10.
|
46
|
+
rspec-core (3.10.1)
|
47
47
|
rspec-support (~> 3.10.0)
|
48
|
-
rspec-expectations (3.10.
|
48
|
+
rspec-expectations (3.10.1)
|
49
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
50
|
rspec-support (~> 3.10.0)
|
51
|
-
rspec-mocks (3.10.
|
51
|
+
rspec-mocks (3.10.1)
|
52
52
|
diff-lcs (>= 1.2.0, < 2.0)
|
53
53
|
rspec-support (~> 3.10.0)
|
54
|
-
rspec-support (3.10.
|
55
|
-
rubocop (1.
|
54
|
+
rspec-support (3.10.1)
|
55
|
+
rubocop (1.7.0)
|
56
56
|
parallel (~> 1.10)
|
57
57
|
parser (>= 2.7.1.5)
|
58
58
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -61,44 +61,45 @@ GEM
|
|
61
61
|
rubocop-ast (>= 1.2.0, < 2.0)
|
62
62
|
ruby-progressbar (~> 1.7)
|
63
63
|
unicode-display_width (>= 1.4.0, < 2.0)
|
64
|
-
rubocop-ast (1.
|
64
|
+
rubocop-ast (1.4.0)
|
65
65
|
parser (>= 2.7.1.5)
|
66
66
|
rubocop-performance (1.9.1)
|
67
67
|
rubocop (>= 0.90.0, < 2.0)
|
68
68
|
rubocop-ast (>= 0.4.0)
|
69
|
-
rubocop-rails (2.9.
|
69
|
+
rubocop-rails (2.9.1)
|
70
70
|
activesupport (>= 4.2.0)
|
71
71
|
rack (>= 1.1)
|
72
72
|
rubocop (>= 0.90.0, < 2.0)
|
73
73
|
rubocop-rake (0.5.1)
|
74
74
|
rubocop
|
75
|
-
rubocop-rspec (2.0
|
75
|
+
rubocop-rspec (2.1.0)
|
76
76
|
rubocop (~> 1.0)
|
77
77
|
rubocop-ast (>= 1.1.0)
|
78
|
-
ruby-progressbar (1.
|
79
|
-
simplecov (0.
|
78
|
+
ruby-progressbar (1.11.0)
|
79
|
+
simplecov (0.21.2)
|
80
80
|
docile (~> 1.1)
|
81
81
|
simplecov-html (~> 0.11)
|
82
82
|
simplecov_json_formatter (~> 0.1)
|
83
83
|
simplecov-html (0.12.3)
|
84
84
|
simplecov_json_formatter (0.1.2)
|
85
|
-
smart_engine (0.
|
85
|
+
smart_engine (0.11.0)
|
86
86
|
tzinfo (2.0.4)
|
87
87
|
concurrent-ruby (~> 1.0)
|
88
88
|
unicode-display_width (1.7.0)
|
89
89
|
zeitwerk (2.4.2)
|
90
90
|
|
91
91
|
PLATFORMS
|
92
|
-
|
92
|
+
x86_64-darwin-19
|
93
|
+
x86_64-darwin-20
|
93
94
|
|
94
95
|
DEPENDENCIES
|
95
|
-
armitage-rubocop (~> 1.
|
96
|
+
armitage-rubocop (~> 1.7)
|
96
97
|
bundler (~> 2.1)
|
97
98
|
pry (~> 0.13)
|
98
99
|
rake (~> 13.0)
|
99
100
|
rspec (~> 3.10)
|
100
|
-
simplecov (~> 0.
|
101
|
+
simplecov (~> 0.21)
|
101
102
|
smart_types!
|
102
103
|
|
103
104
|
BUNDLED WITH
|
104
|
-
2.
|
105
|
+
2.2.3
|
data/README.md
CHANGED
@@ -26,9 +26,11 @@ require 'smart_core/types'
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
-
- [Type interface](#type-interface)
|
30
|
-
- [Basic type algebra](#basic-type-algebra)
|
29
|
+
- [Type interface and basic type algebra](#type-interface-and-basic-type-algebra)
|
31
30
|
- [Supported types](#supported-types)
|
31
|
+
- [Primitives](#primitives) (`SmartCore::Types::Value`)
|
32
|
+
- [Protocols](#protocols) (`SmartCore::Types::Protocol`)
|
33
|
+
- [Variadic](#variadic) (`SmartCore::Types::Variadic`)
|
32
34
|
- [Nilable types](#nilable-types)
|
33
35
|
- [Custom type definition](#custom-type-definition)
|
34
36
|
- [Primitive type definition](#primitive-type-definition)
|
@@ -43,7 +45,7 @@ require 'smart_core/types'
|
|
43
45
|
|
44
46
|
---
|
45
47
|
|
46
|
-
## Type Interface
|
48
|
+
## Type Interface and basic type algebra
|
47
49
|
|
48
50
|
```ruby
|
49
51
|
# documentation is coming
|
@@ -73,7 +75,7 @@ type.valid?([:test, 2]) # => false
|
|
73
75
|
|
74
76
|
## Supported types
|
75
77
|
|
76
|
-
|
78
|
+
#### Primitives:
|
77
79
|
|
78
80
|
```ruby
|
79
81
|
SmartCore::Types::Value::Any
|
@@ -98,7 +100,9 @@ SmartCore::Types::Value::Date
|
|
98
100
|
SmartCore::Types::Value::TimeBased
|
99
101
|
```
|
100
102
|
|
101
|
-
|
103
|
+
---
|
104
|
+
|
105
|
+
#### Protocols:
|
102
106
|
|
103
107
|
```ruby
|
104
108
|
SmartCore::Types::Protocol::InstanceOf
|
@@ -111,7 +115,9 @@ SmartCore::Types::Protocol::InstanceOf(::String, ::Symbol) # string or symbol
|
|
111
115
|
SmartCore::Types::Protocol::InstanceOf(::Time, ::DateTime, ::Date) # time or datetime or date
|
112
116
|
```
|
113
117
|
|
114
|
-
|
118
|
+
---
|
119
|
+
|
120
|
+
#### Variadic:
|
115
121
|
|
116
122
|
```ruby
|
117
123
|
SmartCore::Types::Variadic::Tuple
|
@@ -536,6 +542,14 @@ bundle exec rake rubocop
|
|
536
542
|
bundle exec rubocop
|
537
543
|
```
|
538
544
|
|
545
|
+
- run code style linting with auto-correction:
|
546
|
+
|
547
|
+
```shell
|
548
|
+
bundle exec rake rubcoop -A
|
549
|
+
# --- or ---
|
550
|
+
bundle exec rubocop -A
|
551
|
+
```
|
552
|
+
|
539
553
|
## License
|
540
554
|
|
541
555
|
Released under MIT License.
|
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.11'
|
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.7'
|
41
|
+
spec.add_development_dependency 'simplecov', '~> 0.21'
|
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.4.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: 2021-01-17 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.11'
|
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.11'
|
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.7'
|
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.7'
|
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.21'
|
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.21'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pry
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
- !ruby/object:Gem::Version
|
223
223
|
version: '0'
|
224
224
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
225
|
+
rubygems_version: 3.2.3
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: Full-featured type system for any ruby project.
|