smart_engine 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc3dd0221b83c217c01e45d3f46604971eb84d04d49be0632ce49f755218d76d
4
- data.tar.gz: 5b441d31174be2b6d449f7075abea95b5f0ede317db8e416f07245f9d2e3e83c
3
+ metadata.gz: 912e841987ba6da79b04609e0f86580d900676b10711d5e38b614099782702cf
4
+ data.tar.gz: 395c81f467a482cde8042dfb207df5aa70b7a865f317fcd068e110b127dfe95e
5
5
  SHA512:
6
- metadata.gz: 3da36f25ec0827992a15bbbb2b20ffdbddc7233ace64ec2cbcfe5c6f7d12cf5a95b35d065b8b47d362df8de5b1dd799b8d473ca7459b414b81f651afb43c3db4
7
- data.tar.gz: d8efcca5893345b3fb32a0fc0bbe014c9e99bf66d70a6b3bf561a6e037b50ec1f4886894913fc6bb6bc334a92661f4f81face5ce9aec01e7587c71beb1bd7bdb
6
+ metadata.gz: '080a49d84507ca934dcf9435bcbe724cf8146167039e1ebbf0a56343249fbd4c39893a79508a0e08826fb9496eb6a721f5e335a0a9b19149263c8a73c4ebf9bf'
7
+ data.tar.gz: 0eb86cfe731f1911969025db50560148858f03d8b8842da9c3bac49fbd3c4dfe74c0c86392438c060c2ec43ff0453da8c9fc3eeed4076bc11c772e59c931ee7c
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ inherit_gem:
5
5
  - lib/rubocop.rspec.yml
6
6
 
7
7
  AllCops:
8
- TargetRubyVersion: 3.0.0
8
+ TargetRubyVersion: 3.1.0
9
9
  NewCops: enable
10
10
  Include:
11
11
  - lib/**/*.rb
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [0.14.0] - 2022-09-30
5
+ ### Added
6
+ - Read/Write locking mechanizm: `SmartCore::Engine::ReadWriteLock`;
7
+
8
+ ## [0.13.0] - 2022-09-30
9
+ ### Added
10
+ - Simplest in-memory cache storage implementation: `SmartCore::Engine::Cache`;
11
+ ### Changed
12
+ - Minimal Ruby version is `2.5` (`>= 2.5`);
13
+ - Better `BasicObject`'s refinement extention specs;
14
+ - Updated development dependencies;
15
+
4
16
  ## [0.12.0] - 2021-12-09
5
17
  ### Added
6
18
  - `using SmartCore::Ext::BasicObjectAsObject` provides native support for:
data/Gemfile.lock CHANGED
@@ -1,102 +1,99 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smart_engine (0.12.0)
4
+ smart_engine (0.14.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- activesupport (6.1.1)
9
+ activesupport (7.0.4)
10
10
  concurrent-ruby (~> 1.0, >= 1.0.2)
11
11
  i18n (>= 1.6, < 2)
12
12
  minitest (>= 5.1)
13
13
  tzinfo (~> 2.0)
14
- zeitwerk (~> 2.3)
15
- armitage-rubocop (1.7.0.1)
16
- rubocop (= 1.7.0)
17
- rubocop-performance (= 1.9.1)
18
- rubocop-rails (= 2.9.1)
19
- rubocop-rake (= 0.5.1)
20
- rubocop-rspec (= 2.1.0)
21
- ast (2.4.1)
14
+ armitage-rubocop (1.30.1.1)
15
+ rubocop (= 1.30.1)
16
+ rubocop-performance (= 1.14.2)
17
+ rubocop-rails (= 2.15.0)
18
+ rubocop-rake (= 0.6.0)
19
+ rubocop-rspec (= 2.11.1)
20
+ ast (2.4.2)
22
21
  coderay (1.1.3)
23
- concurrent-ruby (1.1.7)
24
- diff-lcs (1.4.4)
25
- docile (1.3.5)
26
- i18n (1.8.7)
22
+ concurrent-ruby (1.1.10)
23
+ diff-lcs (1.5.0)
24
+ docile (1.4.0)
25
+ i18n (1.12.0)
27
26
  concurrent-ruby (~> 1.0)
28
27
  method_source (1.0.0)
29
- minitest (5.14.3)
30
- parallel (1.20.1)
31
- parser (3.0.0.0)
28
+ minitest (5.16.3)
29
+ parallel (1.22.1)
30
+ parser (3.1.2.1)
32
31
  ast (~> 2.4.1)
33
- pry (0.13.1)
32
+ pry (0.14.1)
34
33
  coderay (~> 1.1)
35
34
  method_source (~> 1.0)
36
- rack (2.2.3)
37
- rainbow (3.0.0)
38
- rake (13.0.3)
39
- regexp_parser (2.0.3)
40
- rexml (3.2.4)
41
- rspec (3.10.0)
42
- rspec-core (~> 3.10.0)
43
- rspec-expectations (~> 3.10.0)
44
- rspec-mocks (~> 3.10.0)
45
- rspec-core (3.10.1)
46
- rspec-support (~> 3.10.0)
47
- rspec-expectations (3.10.1)
35
+ rack (3.0.0)
36
+ rainbow (3.1.1)
37
+ rake (13.0.6)
38
+ regexp_parser (2.6.0)
39
+ rexml (3.2.5)
40
+ rspec (3.11.0)
41
+ rspec-core (~> 3.11.0)
42
+ rspec-expectations (~> 3.11.0)
43
+ rspec-mocks (~> 3.11.0)
44
+ rspec-core (3.11.0)
45
+ rspec-support (~> 3.11.0)
46
+ rspec-expectations (3.11.1)
48
47
  diff-lcs (>= 1.2.0, < 2.0)
49
- rspec-support (~> 3.10.0)
50
- rspec-mocks (3.10.1)
48
+ rspec-support (~> 3.11.0)
49
+ rspec-mocks (3.11.1)
51
50
  diff-lcs (>= 1.2.0, < 2.0)
52
- rspec-support (~> 3.10.0)
53
- rspec-support (3.10.1)
54
- rubocop (1.7.0)
51
+ rspec-support (~> 3.11.0)
52
+ rspec-support (3.11.1)
53
+ rubocop (1.30.1)
55
54
  parallel (~> 1.10)
56
- parser (>= 2.7.1.5)
55
+ parser (>= 3.1.0.0)
57
56
  rainbow (>= 2.2.2, < 4.0)
58
57
  regexp_parser (>= 1.8, < 3.0)
59
- rexml
60
- rubocop-ast (>= 1.2.0, < 2.0)
58
+ rexml (>= 3.2.5, < 4.0)
59
+ rubocop-ast (>= 1.18.0, < 2.0)
61
60
  ruby-progressbar (~> 1.7)
62
- unicode-display_width (>= 1.4.0, < 2.0)
63
- rubocop-ast (1.4.0)
64
- parser (>= 2.7.1.5)
65
- rubocop-performance (1.9.1)
66
- rubocop (>= 0.90.0, < 2.0)
61
+ unicode-display_width (>= 1.4.0, < 3.0)
62
+ rubocop-ast (1.21.0)
63
+ parser (>= 3.1.1.0)
64
+ rubocop-performance (1.14.2)
65
+ rubocop (>= 1.7.0, < 2.0)
67
66
  rubocop-ast (>= 0.4.0)
68
- rubocop-rails (2.9.1)
67
+ rubocop-rails (2.15.0)
69
68
  activesupport (>= 4.2.0)
70
69
  rack (>= 1.1)
71
- rubocop (>= 0.90.0, < 2.0)
72
- rubocop-rake (0.5.1)
73
- rubocop
74
- rubocop-rspec (2.1.0)
70
+ rubocop (>= 1.7.0, < 2.0)
71
+ rubocop-rake (0.6.0)
75
72
  rubocop (~> 1.0)
76
- rubocop-ast (>= 1.1.0)
73
+ rubocop-rspec (2.11.1)
74
+ rubocop (~> 1.19)
77
75
  ruby-progressbar (1.11.0)
78
76
  simplecov (0.21.2)
79
77
  docile (~> 1.1)
80
78
  simplecov-html (~> 0.11)
81
79
  simplecov_json_formatter (~> 0.1)
82
80
  simplecov-html (0.12.3)
83
- simplecov_json_formatter (0.1.2)
84
- tzinfo (2.0.4)
81
+ simplecov_json_formatter (0.1.4)
82
+ tzinfo (2.0.5)
85
83
  concurrent-ruby (~> 1.0)
86
- unicode-display_width (1.7.0)
87
- zeitwerk (2.4.2)
84
+ unicode-display_width (2.3.0)
88
85
 
89
86
  PLATFORMS
90
- ruby
87
+ arm64-darwin-21
91
88
 
92
89
  DEPENDENCIES
93
- armitage-rubocop (~> 1.7)
94
- bundler (~> 2.2)
95
- pry (~> 0.13)
90
+ armitage-rubocop (~> 1.30)
91
+ bundler (~> 2.3)
92
+ pry (~> 0.14)
96
93
  rake (~> 13.0)
97
- rspec (~> 3.10)
94
+ rspec (~> 3.11)
98
95
  simplecov (~> 0.21)
99
96
  smart_engine!
100
97
 
101
98
  BUNDLED WITH
102
- 2.2.27
99
+ 2.3.17
data/README.md CHANGED
@@ -34,11 +34,14 @@ require 'smart_core'
34
34
 
35
35
  - [Global set of error types](#global-set-of-error-types)
36
36
  - [Simple reentrant lock](#simple-reentrant-lock)
37
+ - [Read/Write Lock](#read-write-lock)
38
+ - [Cache Storage](#cache-storage)
37
39
  - [Atomic thread-safe value container](#atomic-thread-safe-value-container)
38
40
  - [Any Object Frozener](#any-object-frozener) (classic c-level `frozen?`/`freeze`)
39
41
  - [Basic Object Refinements](#basic-object-refinements) (`SmartCore::Ext::BasicObjectAsObject`)
40
42
  - [Inline rescue pipe](#inline-rescue-pipe)
41
43
 
44
+
42
45
  ---
43
46
 
44
47
  ### Global set of error types
@@ -60,6 +63,79 @@ lock.synchronize { your_code }
60
63
 
61
64
  ---
62
65
 
66
+ ### Read/Write Lock
67
+
68
+ - non-controlable reader count;
69
+ - readers does not lock each other;
70
+ - readers waits for writer;
71
+ - writer waits for readers;
72
+
73
+ ```ruby
74
+ lock = SmartCore::Engine::ReadWriteLock.new
75
+
76
+ lock.read_sync { ...some-read-op... } # waits for writer
77
+ lock.read_sync { ...some-read-op... } # waits for writer
78
+ lock.write_sync { ... some-write-op... } # waits for all readers and current writer
79
+ ```
80
+
81
+ ---
82
+
83
+ ### Cache Storage
84
+
85
+ - you can use any object as a cache key;
86
+ - you can store any object as a cache value;
87
+ - you can cache `nil` object too;
88
+
89
+ - cache `read` has `fetch` semantics:
90
+ - signature: `#read(key, &fallback)`;
91
+ - in the event of cache miss the `&fallback` black will be invoked;
92
+ - the return value of the fallback block will be written to the cache, and that return value will be returned;
93
+ - cache `write`:
94
+ - signature: `#write(key, value)`;
95
+ - you can use any object as a cache key;
96
+ - you can store any object as a value;
97
+ - you can write `nil` object too;
98
+ - cache clear:
99
+ - signature: `#clear`;
100
+
101
+ ```ruby
102
+ cache = SmartCore::Engine::Cache.new
103
+
104
+ # write and read
105
+ cache.write(:amount, 123.456) # => 123.456
106
+ cache.read(:amount) # => 123.456
107
+
108
+ # read non-existing with a fallback
109
+ cache.read('name') # => nil
110
+ cache.read('name') { 'D@iVeR' } # => 'D@iVeR'
111
+ cache.read('name') # => 'D@iVeR'
112
+
113
+ # store nil object
114
+ cache.write(:nil_value, nil) # => nil
115
+ cache.read(:nil_value) # => nil
116
+ cache.read(:nil_value) { 'rewritten' } # => nil
117
+ cache.read(:nil_value) # => nil
118
+
119
+ # clear cache
120
+ cache.clear # => nil
121
+ ```
122
+
123
+ ```ruby
124
+ # aliases:
125
+
126
+ # write:
127
+ cache[:key1] = 'test'
128
+
129
+ # read:
130
+ cache[:key1] # => 'test'
131
+
132
+ # read with fallback:
133
+ cache[:key2] { 'test2' } # => 'test2'
134
+ cache[:key2] # => 'test2'
135
+ ```
136
+
137
+ ---
138
+
63
139
  ### Atomic thread-safe value container
64
140
 
65
141
  ```ruby
@@ -116,6 +192,7 @@ Ruby's `BasicObject` class does not have some fundamental (extremely important f
116
192
  - `freeze` / `frozen?`
117
193
  - `hash`
118
194
  - `nil?`
195
+ - `inspect`
119
196
 
120
197
  `SmartCore::Ext::BasicObjectAsObject` refinement solves this problem (by Ruby's internal API without any manualy-emulated behavior).
121
198
 
@@ -130,6 +207,7 @@ basic_obj.freeze # raises ::NoMethodError
130
207
  basic_obj.frozen? # raises ::NoMethodError
131
208
  basic_object.hash # raises ::NoMethodError
132
209
  basic_object.nil? # raises ::NoMethodError
210
+ basic_object.inspect # raises ::NoMethodError
133
211
  ```
134
212
 
135
213
  ```ruby
@@ -152,6 +230,8 @@ basic_obj.frozen? # => true
152
230
  basic_obj.nil? # => false
153
231
 
154
232
  basic_obj.hash # => 2682859680348634421 (some Integer value)
233
+
234
+ basic_obj.inspect # => "#<BasicObject:0x00007fe428018628>"
155
235
  ```
156
236
 
157
237
  ---
@@ -206,6 +286,15 @@ end
206
286
 
207
287
  - migrate to Github Actions in CI;
208
288
  - thread-safety for BasicObject extensions;
289
+ - `SmartCore::Engine::Cache`:
290
+ - thread-safety;
291
+ - support for `ttl:` option for `#write` and for fallback block attribute of `#read`;
292
+ - support for key-value-pair iteration;
293
+ - support for `#keys` method;
294
+ - support for `#key?` method;
295
+ - think about some layer of cache object serialization;
296
+ - `SmartCore::Engine::ReadWriteLock`:
297
+ - an ability to set a maximum count of readers;
209
298
 
210
299
  ---
211
300
 
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @api public
4
+ # @since 0.13.0
5
+ class SmartCore::Engine::Cache
6
+ # @return [void]
7
+ #
8
+ # @api public
9
+ # @since 0.13.0
10
+ def initialize
11
+ @store = {}
12
+ # TODO: thread-safety (use SmartCore::Engine::Lock)
13
+ end
14
+
15
+ # @param key [Any]
16
+ # @apram value [Any]
17
+ # @return [Any]
18
+ #
19
+ # @api public
20
+ # @since 0.13.0
21
+ def write(key, value)
22
+ @store[key] = value
23
+ end
24
+ alias_method :[]=, :write
25
+
26
+ # @param key [Any]
27
+ # @param fallback [Block]
28
+ # @return [Any, NilClass]
29
+ #
30
+ # @api public
31
+ # @since 0.13.0
32
+ # rubocop:disable Style/NestedTernaryOperator
33
+ def read(key, &fallback)
34
+ # @note
35
+ # key?-flow is a compromise used to provide an ability to cache `nil` objects too.
36
+ @store.key?(key) ? @store[key] : (block_given? ? write(key, yield) : nil)
37
+ end
38
+ alias_method :[], :read
39
+ # rubocop:enable Style/NestedTernaryOperator
40
+
41
+ # @return [NilClass]
42
+ #
43
+ # @api public
44
+ # @since 0.13.0
45
+ def clear
46
+ @store.clear
47
+ nil
48
+ end
49
+ end
@@ -44,7 +44,10 @@ module SmartCore::Engine::Frozener
44
44
  # @since 0.8.0
45
45
  # @version 0.9.0
46
46
  def freeze(object)
47
+ # rubocop:disable Performance/BindCall
48
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
47
49
  FROZENER.bind(object).call
50
+ # rubocop:enable Performance/BindCall
48
51
  end
49
52
 
50
53
  # @param object [Any]
@@ -54,7 +57,10 @@ module SmartCore::Engine::Frozener
54
57
  # @since 0.8.0
55
58
  # @version 0.9.0
56
59
  def frozen?(object)
60
+ # rubocop:disable Performance/BindCall
61
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
57
62
  FROZEN_CHECK.bind(object).call
63
+ # rubocop:enable Performance/BindCall
58
64
  end
59
65
  end
60
66
  end
@@ -8,7 +8,7 @@ class SmartCore::Engine::Lock
8
8
  # @api public
9
9
  # @since 0.4.0
10
10
  def initialize
11
- @lock = Mutex.new
11
+ @lock = ::Mutex.new
12
12
  end
13
13
 
14
14
  # @param block [Block]
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @api public
4
+ # @since 0.14.0
5
+ class SmartCore::Engine::ReadWriteLock
6
+ # @return [void]
7
+ #
8
+ # @api public
9
+ # @sicne 0.14.0
10
+ def initialize
11
+ # NOTE:
12
+ # ivars has no readers cuz we want to avoid
13
+ # Ruby VM's context-switching during reade-method invokation.
14
+ @active_reader = false
15
+ @write_lock = ::Mutex.new
16
+ end
17
+
18
+ # @param block [Block]
19
+ # @return [Any]
20
+ #
21
+ # @api public
22
+ # @since 0.14.0
23
+ def read_sync(&block)
24
+ @active_reader = true
25
+ while @write_lock.locked? do; end
26
+ yield
27
+ ensure
28
+ @active_reader = false
29
+ end
30
+
31
+ # @param block [Block]
32
+ # @return [Any]
33
+ #
34
+ # @api public
35
+ # @since 0.14.0
36
+ def write_sync(&block)
37
+ while @active_reader do; end
38
+ @write_lock.synchronize do
39
+ @active_reader = true
40
+ begin
41
+ yield
42
+ ensure
43
+ @active_reader = false
44
+ end
45
+ end
46
+ end
47
+ end
@@ -6,7 +6,7 @@ module SmartCore
6
6
  #
7
7
  # @api public
8
8
  # @since 0.1.0
9
- # @version 0.12.0
10
- VERSION = '0.12.0'
9
+ # @version 0.14.0
10
+ VERSION = '0.14.0'
11
11
  end
12
12
  end
@@ -5,7 +5,9 @@
5
5
  module SmartCore::Engine
6
6
  require_relative 'engine/version'
7
7
  require_relative 'engine/lock'
8
+ require_relative 'engine/read_write_lock'
8
9
  require_relative 'engine/rescue_ext'
9
10
  require_relative 'engine/atom'
10
11
  require_relative 'engine/frozener'
12
+ require_relative 'engine/cache'
11
13
  end
@@ -19,13 +19,14 @@ module SmartCore
19
19
 
20
20
  # @api public
21
21
  # @since 0.2.0
22
- FrozenError = begin # rubocop:disable Naming/ConstantName
22
+ FrozenError = # rubocop:disable Naming/ConstantName
23
23
  # :nocov:
24
+ # rubocop:disable Layout/CommentIndentation
24
25
  if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5.0')
25
26
  Class.new(::FrozenError)
26
27
  else
27
28
  Class.new(::RuntimeError)
28
29
  end
29
30
  # :nocov:
30
- end
31
+ # rubocop:enable Layout/CommentIndentation
31
32
  end
@@ -22,7 +22,10 @@ module SmartCore::Ext::BasicObjectAsObject
22
22
  # @api public
23
23
  # @since 0.9.0
24
24
  define_method(:is_a?) do |klass|
25
+ # rubocop:disable Performance/BindCall
26
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
25
27
  _is_a.bind(self).call(klass)
28
+ # rubocop:enable Performance/BindCall
26
29
  end
27
30
  alias_method :kind_of?, :is_a?
28
31
 
@@ -32,7 +35,10 @@ module SmartCore::Ext::BasicObjectAsObject
32
35
  # @api public
33
36
  # @since 0.9.0
34
37
  define_method(:freeze) do
38
+ # rubocop:disable Performance/BindCall
39
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
35
40
  _freeze.bind(self).call
41
+ # rubocop:enable Performance/BindCall
36
42
  end
37
43
 
38
44
  # @note Object#frozen? behavior copy
@@ -41,7 +47,10 @@ module SmartCore::Ext::BasicObjectAsObject
41
47
  # @api public
42
48
  # @since 0.9.0
43
49
  define_method(:frozen?) do
50
+ # rubocop:disable Performance/BindCall
51
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
44
52
  _frozen.bind(self).call
53
+ # rubocop:enable Performance/BindCall
45
54
  end
46
55
 
47
56
  # @return [Integer]
@@ -49,7 +58,10 @@ module SmartCore::Ext::BasicObjectAsObject
49
58
  # @api public
50
59
  # @since 0.10.0
51
60
  define_method(:hash) do
61
+ # rubocop:disable Performance/BindCall
62
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
52
63
  _hash.bind(self).call
64
+ # rubocop:enable Performance/BindCall
53
65
  end
54
66
 
55
67
  # @return [Boolean]
@@ -57,7 +69,10 @@ module SmartCore::Ext::BasicObjectAsObject
57
69
  # @api public
58
70
  # @since 0.10.0
59
71
  define_method(:nil?) do
72
+ # rubocop:disable Performance/BindCall
73
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
60
74
  _nil.bind(self).call
75
+ # rubocop:enable Performance/BindCall
61
76
  end
62
77
 
63
78
  # @return [Boolean]
@@ -65,7 +80,10 @@ module SmartCore::Ext::BasicObjectAsObject
65
80
  # @api public
66
81
  # @since 0.1.0
67
82
  define_method(:instance_of?) do |klass|
83
+ # rubocop:disable Performance/BindCall
84
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
68
85
  _instance_of.bind(self).call(klass)
86
+ # rubocop:enable Performance/BindCall
69
87
  end
70
88
 
71
89
  # @return [String]
@@ -73,7 +91,10 @@ module SmartCore::Ext::BasicObjectAsObject
73
91
  # @api public
74
92
  # @since 0.12.0
75
93
  define_method(:inspect) do
94
+ # rubocop:disable Performance/BindCall
95
+ # NOTE: disabled in order to support older Ruby versions than Ruby@3
76
96
  _inspect.bind(self).call
97
+ # rubocop:enable Performance/BindCall
77
98
  end
78
99
  end
79
100
  end
data/smart_engine.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  require_relative 'lib/smart_core/engine/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.required_ruby_version = Gem::Requirement.new('>= 2.4.10')
6
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5')
7
7
 
8
8
  spec.name = 'smart_engine'
9
9
  spec.version = SmartCore::Engine::VERSION
@@ -34,10 +34,10 @@ Gem::Specification.new do |spec|
34
34
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
35
  spec.require_paths = ['lib']
36
36
 
37
- spec.add_development_dependency 'bundler', '~> 2.2'
37
+ spec.add_development_dependency 'bundler', '~> 2.3'
38
38
  spec.add_development_dependency 'rake', '~> 13.0'
39
- spec.add_development_dependency 'rspec', '~> 3.10'
40
- spec.add_development_dependency 'armitage-rubocop', '~> 1.7'
39
+ spec.add_development_dependency 'rspec', '~> 3.11'
40
+ spec.add_development_dependency 'armitage-rubocop', '~> 1.30'
41
41
  spec.add_development_dependency 'simplecov', '~> 0.21'
42
- spec.add_development_dependency 'pry', '~> 0.13'
42
+ spec.add_development_dependency 'pry', '~> 0.14'
43
43
  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.12.0
4
+ version: 0.14.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-12-09 00:00:00.000000000 Z
11
+ date: 2022-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.2'
19
+ version: '2.3'
20
20
  type: :development
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: '2.2'
26
+ version: '2.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.10'
47
+ version: '3.11'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.10'
54
+ version: '3.11'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: armitage-rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.7'
61
+ version: '1.30'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.7'
68
+ version: '1.30'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.13'
89
+ version: '0.14'
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.13'
96
+ version: '0.14'
97
97
  description: 'SmartCore Engine - a set of core functionality shared beetwen a series
98
98
  of SmartCore gems.
99
99
 
@@ -119,9 +119,11 @@ files:
119
119
  - lib/smart_core.rb
120
120
  - lib/smart_core/engine.rb
121
121
  - lib/smart_core/engine/atom.rb
122
+ - lib/smart_core/engine/cache.rb
122
123
  - lib/smart_core/engine/ext.rb
123
124
  - lib/smart_core/engine/frozener.rb
124
125
  - lib/smart_core/engine/lock.rb
126
+ - lib/smart_core/engine/read_write_lock.rb
125
127
  - lib/smart_core/engine/rescue_ext.rb
126
128
  - lib/smart_core/engine/version.rb
127
129
  - lib/smart_core/errors.rb
@@ -143,14 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
145
  requirements:
144
146
  - - ">="
145
147
  - !ruby/object:Gem::Version
146
- version: 2.4.10
148
+ version: '2.5'
147
149
  required_rubygems_version: !ruby/object:Gem::Requirement
148
150
  requirements:
149
151
  - - ">="
150
152
  - !ruby/object:Gem::Version
151
153
  version: '0'
152
154
  requirements: []
153
- rubygems_version: 3.2.22
155
+ rubygems_version: 3.3.11
154
156
  signing_key:
155
157
  specification_version: 4
156
158
  summary: SmartCore Engine - a generic subset of SmartCore's functionality.