symbiont-ruby 0.2.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -1
- data/.rspec +1 -1
- data/.rubocop.yml +17 -112
- data/CHANGELOG.md +32 -0
- data/Gemfile +4 -2
- data/Gemfile.lock +130 -0
- data/LICENSE.txt +1 -1
- data/README.md +70 -30
- data/Rakefile +15 -1
- data/Steepfile +6 -0
- data/bin/console +2 -1
- data/lib/symbiont.rb +1 -0
- data/lib/symbiont/executor.rb +8 -60
- data/lib/symbiont/isolator.rb +185 -0
- data/lib/symbiont/private_trigger.rb +41 -2
- data/lib/symbiont/public_trigger.rb +40 -1
- data/lib/symbiont/teleport.rb +9 -0
- data/lib/symbiont/trigger.rb +20 -5
- data/lib/symbiont/version.rb +1 -1
- data/sig/.keep +0 -0
- data/symbiont-ruby.gemspec +12 -10
- metadata +29 -27
- data/.hound.yml +0 -2
- data/.travis.yml +0 -14
data/lib/symbiont/trigger.rb
CHANGED
@@ -153,9 +153,11 @@ class Symbiont::Trigger < BasicObject
|
|
153
153
|
# @api private
|
154
154
|
# @since 0.1.0
|
155
155
|
def initialize(*initial_contexts, context_direction: IOK, &closure)
|
156
|
+
# :nocov:
|
156
157
|
unless ::Kernel.block_given?
|
157
158
|
::Kernel.raise(UnprovidedClosureAttributeError, 'block attribute should be provided')
|
158
159
|
end
|
160
|
+
# :nocov:
|
159
161
|
|
160
162
|
# rubocop:disable Layout/SpaceAroundKeyword
|
161
163
|
unless(context_direction == IOK || context_direction == OIK || context_direction == OKI ||
|
@@ -230,8 +232,8 @@ class Symbiont::Trigger < BasicObject
|
|
230
232
|
#
|
231
233
|
# @api private
|
232
234
|
# @since 0.1.0
|
233
|
-
def method_missing(method_name, *arguments, &block)
|
234
|
-
__actual_context__(method_name).
|
235
|
+
def method_missing(method_name, *arguments, **options, &block)
|
236
|
+
__actual_context__(method_name).__send__(method_name, *arguments, **options, &block)
|
235
237
|
end
|
236
238
|
|
237
239
|
# Checks that the actual context is able to respond to a required method.
|
@@ -253,7 +255,7 @@ class Symbiont::Trigger < BasicObject
|
|
253
255
|
end
|
254
256
|
# :nocov:
|
255
257
|
|
256
|
-
#
|
258
|
+
# Should return a corresponding method object of the actual context.
|
257
259
|
#
|
258
260
|
# @param method_name [String,Symbol] Method name
|
259
261
|
# @raise ContextNoMethodError
|
@@ -264,9 +266,22 @@ class Symbiont::Trigger < BasicObject
|
|
264
266
|
# @see #respond_to_missing?
|
265
267
|
# @see #__actual_context__
|
266
268
|
#
|
269
|
+
# @see [Symbiont::PrivateTrigget#method]
|
270
|
+
# @see [Symbiont::PublicTrigger#method]
|
271
|
+
#
|
267
272
|
# @api private
|
268
273
|
# @since 0.1.0
|
269
|
-
def method(method_name)
|
270
|
-
|
274
|
+
def method(method_name); end # :nocov:
|
275
|
+
|
276
|
+
# Returns an internal singleton object of the passed object.
|
277
|
+
#
|
278
|
+
# @param object [Any] Extractable object
|
279
|
+
# @return [Class] Singleton class of the passed object
|
280
|
+
#
|
281
|
+
# @api private
|
282
|
+
# @sionce 0.5.0
|
283
|
+
def __extract_singleton_class__(object)
|
284
|
+
# NOTE: `<<` approach is used cuz BasicObject does not support #singleton_class method.
|
285
|
+
class << object; self; end
|
271
286
|
end
|
272
287
|
end
|
data/lib/symbiont/version.rb
CHANGED
data/sig/.keep
ADDED
File without changes
|
data/symbiont-ruby.gemspec
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
lib = File.expand_path('
|
4
|
+
lib = File.expand_path('lib', __dir__)
|
4
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
6
|
require 'symbiont/version'
|
6
7
|
|
7
8
|
Gem::Specification.new do |spec|
|
8
|
-
spec.required_ruby_version = '>= 2.
|
9
|
+
spec.required_ruby_version = '>= 2.3.8'
|
9
10
|
|
10
11
|
spec.name = 'symbiont-ruby'
|
11
12
|
spec.version = Symbiont::VERSION
|
@@ -21,19 +22,20 @@ Gem::Specification.new do |spec|
|
|
21
22
|
|
22
23
|
spec.homepage = 'https://github.com/0exp/symbiont-ruby'
|
23
24
|
spec.license = 'MIT'
|
24
|
-
spec.bindir =
|
25
|
-
spec.require_paths = [
|
25
|
+
spec.bindir = 'bin'
|
26
|
+
spec.require_paths = ['lib']
|
26
27
|
|
27
28
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
28
29
|
f.match(%r{^(spec|features)/})
|
29
30
|
end
|
30
31
|
|
31
|
-
spec.add_development_dependency 'rspec',
|
32
|
-
spec.add_development_dependency '
|
33
|
-
spec.add_development_dependency 'rubocop
|
34
|
-
spec.add_development_dependency '
|
35
|
-
spec.add_development_dependency '
|
36
|
-
spec.add_development_dependency '
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.10'
|
33
|
+
spec.add_development_dependency 'simplecov', '~> 0.21'
|
34
|
+
spec.add_development_dependency 'armitage-rubocop', '~> 1.8'
|
35
|
+
spec.add_development_dependency 'rbs', '~> 1.0'
|
36
|
+
spec.add_development_dependency 'typeprof', '~> 0.12'
|
37
|
+
spec.add_development_dependency 'steep', '~> 0.40'
|
38
|
+
|
37
39
|
spec.add_development_dependency 'pry'
|
38
40
|
spec.add_development_dependency 'rake'
|
39
41
|
spec.add_development_dependency 'bundler'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symbiont-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rustam Ibragimov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -16,84 +16,84 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.10'
|
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: '3.
|
26
|
+
version: '3.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: simplecov
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.21'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.21'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: rubocop
|
42
|
+
name: armitage-rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.8'
|
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: '1.
|
54
|
+
version: '1.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rbs
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
61
|
+
version: '1.0'
|
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: '0
|
68
|
+
version: '1.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: typeprof
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.12'
|
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: '0.
|
82
|
+
version: '0.12'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: steep
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.40'
|
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.40'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pry
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,23 +161,25 @@ extensions: []
|
|
161
161
|
extra_rdoc_files: []
|
162
162
|
files:
|
163
163
|
- ".gitignore"
|
164
|
-
- ".hound.yml"
|
165
164
|
- ".rspec"
|
166
165
|
- ".rubocop.yml"
|
167
|
-
- ".travis.yml"
|
168
166
|
- ".yardopts"
|
169
167
|
- CHANGELOG.md
|
170
168
|
- Gemfile
|
169
|
+
- Gemfile.lock
|
171
170
|
- LICENSE.txt
|
172
171
|
- README.md
|
173
172
|
- Rakefile
|
173
|
+
- Steepfile
|
174
174
|
- bin/console
|
175
175
|
- bin/setup
|
176
176
|
- lib/symbiont.rb
|
177
177
|
- lib/symbiont/context.rb
|
178
178
|
- lib/symbiont/executor.rb
|
179
|
+
- lib/symbiont/isolator.rb
|
179
180
|
- lib/symbiont/private_trigger.rb
|
180
181
|
- lib/symbiont/public_trigger.rb
|
182
|
+
- lib/symbiont/teleport.rb
|
181
183
|
- lib/symbiont/trigger.rb
|
182
184
|
- lib/symbiont/version.rb
|
183
185
|
- logo/render_sample_1.JPG
|
@@ -214,12 +216,13 @@ files:
|
|
214
216
|
- logo/symbiont_logo_hexagon_black.psd
|
215
217
|
- logo/symbiont_logo_hexagon_black.svg
|
216
218
|
- logo/symbiont_logo_hexagon_black.tif
|
219
|
+
- sig/.keep
|
217
220
|
- symbiont-ruby.gemspec
|
218
221
|
homepage: https://github.com/0exp/symbiont-ruby
|
219
222
|
licenses:
|
220
223
|
- MIT
|
221
224
|
metadata: {}
|
222
|
-
post_install_message:
|
225
|
+
post_install_message:
|
223
226
|
rdoc_options: []
|
224
227
|
require_paths:
|
225
228
|
- lib
|
@@ -227,16 +230,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
227
230
|
requirements:
|
228
231
|
- - ">="
|
229
232
|
- !ruby/object:Gem::Version
|
230
|
-
version: 2.
|
233
|
+
version: 2.3.8
|
231
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
232
235
|
requirements:
|
233
236
|
- - ">="
|
234
237
|
- !ruby/object:Gem::Version
|
235
238
|
version: '0'
|
236
239
|
requirements: []
|
237
|
-
|
238
|
-
|
239
|
-
signing_key:
|
240
|
+
rubygems_version: 3.1.2
|
241
|
+
signing_key:
|
240
242
|
specification_version: 4
|
241
243
|
summary: Evaluate proc-objects in many contexts simultaneously
|
242
244
|
test_files: []
|
data/.hound.yml
DELETED