djinni 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/djinni.rb +10 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba9a7aa0be1cacf772934737cb9229fbc02207b1
|
4
|
+
data.tar.gz: 39ae226e7127c943b5ae0cb493e6ed027aaaca28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46365265bcab6099effea42a362cd06094886b1ba8235a8e6ebc58b1b30289f01cc389a0a986fdfd18b8df67de89772326b265e63afbc25f1edec0d3fe78474d
|
7
|
+
data.tar.gz: 01f5aa57708f8a7da7abc528d91fcce53bde0a5a0a6025ed6e85c102656e8c1fbb5438c56395ba5a0182208543c316d68699538f511ca209b0dfab79a91fd23d
|
data/lib/djinni.rb
CHANGED
@@ -71,9 +71,11 @@ class Djinni
|
|
71
71
|
return nil
|
72
72
|
when "\e" # Arrow keys
|
73
73
|
code = "\e"
|
74
|
-
Thread.new do
|
74
|
+
t = Thread.new do
|
75
75
|
code += STDIN.getch + STDIN.getch
|
76
|
-
end
|
76
|
+
end
|
77
|
+
t.join(0.001) if (t)
|
78
|
+
t.kill if (t)
|
77
79
|
|
78
80
|
case code
|
79
81
|
when "\e[A" # Up arrow
|
@@ -158,7 +160,12 @@ class Djinni
|
|
158
160
|
print "\r#{djinni_prompt}#{buff}"
|
159
161
|
|
160
162
|
# Process input
|
161
|
-
|
163
|
+
begin
|
164
|
+
buff = grant_wish(buff + STDIN.getch, djinni_env)
|
165
|
+
rescue
|
166
|
+
puts if (@interactive)
|
167
|
+
return ""
|
168
|
+
end
|
162
169
|
|
163
170
|
if (buff.nil?)
|
164
171
|
puts "Command not found!"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: djinni
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- lib/djinni/wish/help.rb
|
106
106
|
- lib/djinni/wish/history.rb
|
107
107
|
- lib/djinni/wish/quit.rb
|
108
|
-
homepage:
|
108
|
+
homepage: https://mjwhitta.github.io/djinni
|
109
109
|
licenses:
|
110
110
|
- GPL-3.0
|
111
111
|
metadata: {}
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.1
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: A Ruby command handler
|