textbringer 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/lib/textbringer/buffer.rb +7 -0
- data/lib/textbringer/utils.rb +20 -2
- data/lib/textbringer/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: 43ad091e53d7d19724cd9e0cbeddcd71faa3cef5
|
4
|
+
data.tar.gz: 42455b6be377fee9ca997b77addbfa5fdf85dd9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f54811a073bff5d7583a50dde84b90e91620b6b9e6401ce694746edbad846f6bc2ae6bfdb466306f2ce28ac8221cf5914b827a31ecef077a43d5f27ac0465af6
|
7
|
+
data.tar.gz: 3241db0e8134b199e991a15a9affcad48894d823aad3becea9b48cfce05c99217604fbcbcb76f2d2f4d789146a08462cb94b06413d6bdd73f943ed284312fd68
|
data/CHANGES.md
CHANGED
data/lib/textbringer/buffer.rb
CHANGED
data/lib/textbringer/utils.rb
CHANGED
@@ -61,8 +61,26 @@ module Textbringer
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
-
def next_tick(
|
65
|
-
Controller.current.next_tick(
|
64
|
+
def next_tick(&block)
|
65
|
+
Controller.current.next_tick(&block)
|
66
|
+
end
|
67
|
+
|
68
|
+
def next_tick!
|
69
|
+
q = Queue.new
|
70
|
+
next_tick do
|
71
|
+
begin
|
72
|
+
result = yield
|
73
|
+
q.push([:ok, result])
|
74
|
+
rescue Exception => e
|
75
|
+
q.push([:error, e])
|
76
|
+
end
|
77
|
+
end
|
78
|
+
status, value = q.pop
|
79
|
+
if status == :error
|
80
|
+
raise value
|
81
|
+
else
|
82
|
+
value
|
83
|
+
end
|
66
84
|
end
|
67
85
|
|
68
86
|
def read_event
|
data/lib/textbringer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: textbringer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shugo Maeda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|