smart_engine 0.11.0 → 0.12.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 +6 -1
- data/Gemfile.lock +2 -2
- data/LICENSE.txt +1 -1
- data/README.md +24 -2
- data/lib/smart_core/engine/version.rb +2 -2
- data/lib/smart_core/ext/basic_object_as_object.rb +9 -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: dc3dd0221b83c217c01e45d3f46604971eb84d04d49be0632ce49f755218d76d
|
4
|
+
data.tar.gz: 5b441d31174be2b6d449f7075abea95b5f0ede317db8e416f07245f9d2e3e83c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3da36f25ec0827992a15bbbb2b20ffdbddc7233ace64ec2cbcfe5c6f7d12cf5a95b35d065b8b47d362df8de5b1dd799b8d473ca7459b414b81f651afb43c3db4
|
7
|
+
data.tar.gz: d8efcca5893345b3fb32a0fc0bbe014c9e99bf66d70a6b3bf561a6e037b50ec1f4886894913fc6bb6bc334a92661f4f81face5ce9aec01e7587c71beb1bd7bdb
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [0.12.0] - 2021-12-09
|
5
|
+
### Added
|
6
|
+
- `using SmartCore::Ext::BasicObjectAsObject` provides native support for:
|
7
|
+
- `BasicObject#inspect`;
|
8
|
+
|
4
9
|
## [0.11.0] - 2021-01-17
|
5
10
|
### Added
|
6
|
-
- Support for
|
11
|
+
- Support for **Ruby@3**;
|
7
12
|
|
8
13
|
## [0.10.0] - 2020-12-22
|
9
14
|
### Added
|
data/Gemfile.lock
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,17 @@
|
|
1
|
-
# SmartCore::Engine ·
|
1
|
+
# SmartCore::Engine · <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_engine.svg)](https://badge.fury.io/rb/smart_engine)
|
2
2
|
|
3
3
|
Generic SmartCore functionality.
|
4
4
|
|
5
|
+
---
|
6
|
+
|
7
|
+
<p>
|
8
|
+
<a href="https://github.com/Cado-Labs">
|
9
|
+
<img src="https://github.com/Cado-Labs/cado-labs-logos/blob/main/cado_labs_supporting.svg" alt="Supported by Cado Labs" />
|
10
|
+
</a>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
---
|
14
|
+
|
5
15
|
## Installation
|
6
16
|
|
7
17
|
```ruby
|
@@ -28,7 +38,6 @@ require 'smart_core'
|
|
28
38
|
- [Any Object Frozener](#any-object-frozener) (classic c-level `frozen?`/`freeze`)
|
29
39
|
- [Basic Object Refinements](#basic-object-refinements) (`SmartCore::Ext::BasicObjectAsObject`)
|
30
40
|
- [Inline rescue pipe](#inline-rescue-pipe)
|
31
|
-
- [Roadmap](#roadmap)
|
32
41
|
|
33
42
|
---
|
34
43
|
|
@@ -119,6 +128,8 @@ basic_obj.kind_of?(::BasicObject) # raises ::NoMethodError
|
|
119
128
|
basic_obj.instance_of?(::BasicObject) # rasies ::NoMethodError
|
120
129
|
basic_obj.freeze # raises ::NoMethodError
|
121
130
|
basic_obj.frozen? # raises ::NoMethodError
|
131
|
+
basic_object.hash # raises ::NoMethodError
|
132
|
+
basic_object.nil? # raises ::NoMethodError
|
122
133
|
```
|
123
134
|
|
124
135
|
```ruby
|
@@ -137,6 +148,10 @@ basic_obj.kind_of?(::Integer) # => false
|
|
137
148
|
basic_obj.frozen? # => false
|
138
149
|
basic_obj.freeze # => self
|
139
150
|
basic_obj.frozen? # => true
|
151
|
+
|
152
|
+
basic_obj.nil? # => false
|
153
|
+
|
154
|
+
basic_obj.hash # => 2682859680348634421 (some Integer value)
|
140
155
|
```
|
141
156
|
|
142
157
|
---
|
@@ -189,6 +204,7 @@ end
|
|
189
204
|
|
190
205
|
## Roadmap
|
191
206
|
|
207
|
+
- migrate to Github Actions in CI;
|
192
208
|
- thread-safety for BasicObject extensions;
|
193
209
|
|
194
210
|
---
|
@@ -205,6 +221,12 @@ end
|
|
205
221
|
|
206
222
|
Released under MIT License.
|
207
223
|
|
224
|
+
## Supporting
|
225
|
+
|
226
|
+
<a href="https://github.com/Cado-Labs">
|
227
|
+
<img src="https://github.com/Cado-Labs/cado-labs-logos/blob/main/cado_labs_logo.png" alt="Supported by Cado Labs" />
|
228
|
+
</a>
|
229
|
+
|
208
230
|
## Authors
|
209
231
|
|
210
232
|
[Rustam Ibragimov](https://github.com/0exp)
|
@@ -13,6 +13,7 @@ module SmartCore::Ext::BasicObjectAsObject
|
|
13
13
|
_hash = _m_obj.method(:hash).unbind.tap(&:freeze)
|
14
14
|
_nil = _m_obj.method(:nil?).unbind.tap(&:freeze)
|
15
15
|
_instance_of = _m_obj.method(:instance_of?).unbind.tap(&:freeze)
|
16
|
+
_inspect = _m_obj.method(:inspect).unbind.tap(&:freeze)
|
16
17
|
|
17
18
|
# @note Object#is_a? behavior copy
|
18
19
|
# @param klass [Class]
|
@@ -66,5 +67,13 @@ module SmartCore::Ext::BasicObjectAsObject
|
|
66
67
|
define_method(:instance_of?) do |klass|
|
67
68
|
_instance_of.bind(self).call(klass)
|
68
69
|
end
|
70
|
+
|
71
|
+
# @return [String]
|
72
|
+
#
|
73
|
+
# @api public
|
74
|
+
# @since 0.12.0
|
75
|
+
define_method(:inspect) do
|
76
|
+
_inspect.bind(self).call
|
77
|
+
end
|
69
78
|
end
|
70
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.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-
|
11
|
+
date: 2021-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
|
-
rubygems_version: 3.2.
|
153
|
+
rubygems_version: 3.2.22
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: SmartCore Engine - a generic subset of SmartCore's functionality.
|