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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '087b1dbf9ee51ac25529cffbb42796a6fcf9fefe5a6450dd55b422f731f24ea5'
4
- data.tar.gz: 4ec414dbbf3f033a2051a8f88b9b9304f0741f8b7330d65238dcd4a6b95e4f5f
3
+ metadata.gz: dc3dd0221b83c217c01e45d3f46604971eb84d04d49be0632ce49f755218d76d
4
+ data.tar.gz: 5b441d31174be2b6d449f7075abea95b5f0ede317db8e416f07245f9d2e3e83c
5
5
  SHA512:
6
- metadata.gz: 0ed532ab1c5d773bdc8b9a2156f70d41b8b68725e812a5a89c5f2576c8595e60c081756dc6427cfe5f53c758cb094078c994aa614c76b3e057f99e87ed0a7e3d
7
- data.tar.gz: 3748b43ed40a12b4d65e32b85a87d9ff790791c1987962b2377751a2e6a66d9a877b33dd450b8d2aadaad192d03f3183d272b555236afac538b86ee149d4376f
6
+ metadata.gz: 3da36f25ec0827992a15bbbb2b20ffdbddc7233ace64ec2cbcfe5c6f7d12cf5a95b35d065b8b47d362df8de5b1dd799b8d473ca7459b414b81f651afb43c3db4
7
+ data.tar.gz: d8efcca5893345b3fb32a0fc0bbe014c9e99bf66d70a6b3bf561a6e037b50ec1f4886894913fc6bb6bc334a92661f4f81face5ce9aec01e7587c71beb1bd7bdb
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ inherit_gem:
5
5
  - lib/rubocop.rspec.yml
6
6
 
7
7
  AllCops:
8
- TargetRubyVersion: 2.7.2
8
+ TargetRubyVersion: 3.0.0
9
9
  NewCops: enable
10
10
  Include:
11
11
  - lib/**/*.rb
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 *Ruby@3*;
11
+ - Support for **Ruby@3**;
7
12
 
8
13
  ## [0.10.0] - 2020-12-22
9
14
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smart_engine (0.11.0)
4
+ smart_engine (0.12.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -99,4 +99,4 @@ DEPENDENCIES
99
99
  smart_engine!
100
100
 
101
101
  BUNDLED WITH
102
- 2.2.3
102
+ 2.2.27
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,7 +1,17 @@
1
- # SmartCore::Engine · [![Gem Version](https://badge.fury.io/rb/smart_engine.svg)](https://badge.fury.io/rb/smart_engine) [![Build Status](https://travis-ci.org/smart-rb/smart_engine.svg?branch=master)](https://travis-ci.org/smart-rb/smart_engine)
1
+ # SmartCore::Engine &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_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)
@@ -6,7 +6,7 @@ module SmartCore
6
6
  #
7
7
  # @api public
8
8
  # @since 0.1.0
9
- # @version 0.11.0
10
- VERSION = '0.11.0'
9
+ # @version 0.12.0
10
+ VERSION = '0.12.0'
11
11
  end
12
12
  end
@@ -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.11.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-01-17 00:00:00.000000000 Z
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.3
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.