cuboid 0.2.4 → 0.2.4.2

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: 62a4b753db00386ea4858bd2ed61f9ccff0e89cd1aa7fb6c8d7e561e8cda87c3
4
- data.tar.gz: 127005ff2cd7f621f80006f5b75d962ec6b32fb9cfa94f0e4ff86a63e63c7351
3
+ metadata.gz: e1591d4ea28efb0163566ff380d5cb5bd66c6fdb161e70faee67b2fdeda12fc4
4
+ data.tar.gz: 6aba361e06c053f03ae86bca93b322afef249740376fe328710f75fbc7889cb5
5
5
  SHA512:
6
- metadata.gz: 1e70d2d49b40ab668091b8d70edb50ccdce6b2ce2b19be8b85a38293e88bb3537355c89cd671e2c12ca5a8bce9b143557771c24e7e509dfc43e8319f51ea0ece
7
- data.tar.gz: 72df9cb0de101c88229fc96f526fd50499b109611048c603bc1c61aaeadb5d6d60d601665749d9eb37ee91a83b3dd33acc15449c7c16e689a662de92a7eba99a
6
+ metadata.gz: 404d0460e9de33909a3a8c6504e8ed5744ec363ab4e1b4304304b75455037e7a1002129f8c0a0551c7c6fba8bd250f9d5207dc8df93063cc6d3db231ca0bb477
7
+ data.tar.gz: 588642b0dc6ec0f2aff03bde48b6161db0652585d8463536c640fdf864d217998a24016f2dbf3b90c87c1eead7767a890ee487eace72ca57518331d362552f33
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 0.2.4.2
2
+
3
+ * Instance RPC services now decorated with `Server::Services::Base`.
4
+
5
+ # 0.2.4.1
6
+
7
+ * `Application`: Added `#application=` to help with inheritance.
8
+
1
9
  # 0.2.4
2
10
 
3
11
  * Made `Server::Instance` services accessible from `Application`.
data/README.md CHANGED
@@ -263,6 +263,7 @@ _You can replace `host1` with `localhost` and run all examples on the same machi
263
263
  ## Users
264
264
 
265
265
  * [QMap](https://github.com/qadron/qmap) -- A distributed network mapper/security scanner.
266
+ * [Peplum](https://github.com/peplum/peplum) -- A cluster/supercomputer builder.
266
267
 
267
268
  ## License
268
269
 
@@ -214,11 +214,15 @@ class Application
214
214
  super
215
215
 
216
216
  application.prepend PrependMethods
217
- @application = application
217
+ self.application = application
218
218
  end
219
219
 
220
220
  def application
221
- @application ||= nil
221
+ @application
222
+ end
223
+
224
+ def application=( app )
225
+ @application = app
222
226
  end
223
227
 
224
228
  def method_missing( sym, *args, &block )
@@ -12,6 +12,8 @@ require lib + 'rpc/server/active_options'
12
12
  require lib + 'rpc/server/output'
13
13
  require lib + 'rpc/server/application_wrapper'
14
14
 
15
+ require lib + 'rpc/server/services/base'
16
+
15
17
  module RPC
16
18
  class Server
17
19
 
@@ -297,7 +299,7 @@ class Instance
297
299
  end
298
300
  end
299
301
 
300
- # Starts RPC service.
302
+ # Starts RPC services.
301
303
  def _run
302
304
  Raktr.global.on_error do |_, e|
303
305
  print_error "Reactor: #{e}"
@@ -332,7 +334,8 @@ class Instance
332
334
  server.add_handler( 'options', @active_options )
333
335
 
334
336
  Cuboid::Application.application.instance_services.each do |name, service|
335
- si = service.new
337
+ service.include Server::Services::Base
338
+ si = service.new( name, self )
336
339
 
337
340
  Cuboid::Application.application.send :attr_reader, name
338
341
  @application.application.instance_variable_set( "@#{name}".to_sym, si )
@@ -0,0 +1,22 @@
1
+ module Cuboid
2
+ module RPC
3
+ class Server
4
+ module Services
5
+
6
+ module Base
7
+
8
+ attr_reader :name
9
+ attr_reader :instance
10
+
11
+ def initialize( name, instance )
12
+ @name = name
13
+ @instance = instance
14
+ end
15
+
16
+ end
17
+
18
+ end
19
+ end
20
+ end
21
+
22
+ end
data/lib/version CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.4.2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuboid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tasos Laskos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-22 00:00:00.000000000 Z
11
+ date: 2023-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -298,6 +298,7 @@ files:
298
298
  - lib/cuboid/rpc/server/instance.rb
299
299
  - lib/cuboid/rpc/server/output.rb
300
300
  - lib/cuboid/rpc/server/scheduler.rb
301
+ - lib/cuboid/rpc/server/services/base.rb
301
302
  - lib/cuboid/ruby.rb
302
303
  - lib/cuboid/ruby/array.rb
303
304
  - lib/cuboid/ruby/hash.rb