metacosm 0.2.5 → 0.2.6
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 +4 -4
- data/lib/metacosm/simulation.rb +6 -6
- data/lib/metacosm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11c45d07b0eb1564f915c575437bf5c247b9433b
|
|
4
|
+
data.tar.gz: c98e95cb36ab440488ceae3f836cc5c4413b1f19
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90bce273243b2d656aa9dc9928157268c83ba55009465116939399c55537a7ccf760603df27f1da33cd710840347075fe9e6844571c31b04ef0223e0f133359d
|
|
7
|
+
data.tar.gz: 3ff8d44e38fcbdfd50232804667672081191a8dcc9b01bc752187b34f2ec729d58f17939255ad9d4cd80b02c93ef4d387f7c5d431a3509ce4f52670902302717
|
data/lib/metacosm/simulation.rb
CHANGED
|
@@ -21,8 +21,11 @@ module Metacosm
|
|
|
21
21
|
while true
|
|
22
22
|
if (command=command_queue.pop)
|
|
23
23
|
apply(command)
|
|
24
|
+
sleep 0.001
|
|
25
|
+
else
|
|
26
|
+
thread.pass
|
|
27
|
+
sleep 0.1
|
|
24
28
|
end
|
|
25
|
-
sleep 0.01
|
|
26
29
|
end
|
|
27
30
|
end
|
|
28
31
|
|
|
@@ -70,13 +73,10 @@ module Metacosm
|
|
|
70
73
|
end
|
|
71
74
|
|
|
72
75
|
def construct_handler_for(command)
|
|
73
|
-
|
|
74
|
-
module_name = command.class.name.deconstantize # || "Object"
|
|
76
|
+
module_name = command.class.name.deconstantize
|
|
75
77
|
module_name = "Object" if module_name.empty?
|
|
76
78
|
(module_name.constantize).
|
|
77
|
-
#Object.
|
|
78
79
|
const_get(command.class.name.demodulize + "Handler").new
|
|
79
|
-
#Object
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
def listener_for(event)
|
|
@@ -85,7 +85,7 @@ module Metacosm
|
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def construct_listener_for(event)
|
|
88
|
-
module_name = event.class.name.deconstantize
|
|
88
|
+
module_name = event.class.name.deconstantize
|
|
89
89
|
module_name = "Object" if module_name.empty?
|
|
90
90
|
listener = (module_name.constantize).const_get(event.class.name.demodulize + "Listener").new(self)
|
|
91
91
|
listener
|
data/lib/metacosm/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metacosm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joseph Weissman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: passive_record
|