babascript 0.2.3 → 0.2.4

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
  SHA1:
3
- metadata.gz: 20d99b91a66d5e51f4d399b53ac83c08d05abe78
4
- data.tar.gz: a50d34c3084cd917a5bc349c59bdd17e093ae2b6
3
+ metadata.gz: 3daa35e5e0a729cf767fc93dbc4cc8227210a54b
4
+ data.tar.gz: c74a70b6f51b99a285eb2c18b82c9efe213047bd
5
5
  SHA512:
6
- metadata.gz: 468250ac8debfecbb82859ac9a763983d5c2497bf362d7bd8bc0ddbc6bdf9d4d90930552f2cc5981c82880a2d76f490d1501a999f4be27ee8e797ac192a181dd
7
- data.tar.gz: db1d8eb0d48119c883fb89191ef41b3d87a8830ec0730dda41a12b1d0a853ff86e15fb22c49583953370b67fc9af60de8a8dfd7f02acfe9a0311cb770130163d
6
+ metadata.gz: adcdd149c8f92f992c8aeb4d95e4d5be7b20d7442c9c4169afa185de18bd90a4e387cac8c5c4dc1d8f14a7ea1881852a57e30f8079ce576db6a574f0f028a87d
7
+ data.tar.gz: 7f08115c3d974c2982153ac58b1d03f76e5f3c719e61de1b48728a3e7fe71cf44af446fed06bd927ffb10a667c2f636dc7f680aec76971ad00aa9ce916bfc05f
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.2.4 2013-08-07
2
+
3
+ * not stop EventMachine if it's already running.
4
+
1
5
  === 0.2.3 2013-08-07
2
6
 
3
7
  * show Linda connection status on ibb and baba-vm
@@ -11,6 +11,7 @@ module BabaScript
11
11
 
12
12
  def self.run(code=nil, &block)
13
13
  raise ArgumentError "block or code require" unless block_given? or code.kind_of? String
14
+ already_eventmachine_running = EM::reactor_running?
14
15
  EM::run do
15
16
  linda.io.once :connect do
16
17
  EM::defer do
@@ -19,8 +20,10 @@ module BabaScript
19
20
  else
20
21
  ::BabaScript::Baba.instance_eval code
21
22
  end
22
- EM::add_timer 1 do
23
- EM::stop
23
+ unless already_eventmachine_running
24
+ EM::add_timer 1 do
25
+ EM::stop
26
+ end
24
27
  end
25
28
  end
26
29
  end
@@ -1,3 +1,3 @@
1
1
  module BabaScript
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babascript
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto