djinni 0.1.3 → 0.1.4
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/djinni.rb +3 -3
- data/lib/djinni_wish.rb +2 -2
- 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: e031e4ee7414e42f25a08f0077fcc6e960a537be
|
4
|
+
data.tar.gz: db51f895b4a3cef184852c8ec8519d36d324133c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67fb4c595e7aa24c76a83fa001683a062ad66219f0e747596cbd1b871e4967645ebd7e229c066e34d1ad2dbdb341594f60b4edc8370218eb9b9c6b956d81bc26
|
7
|
+
data.tar.gz: 9a1a9e4aaba67567e5e70ad0e90c2771e8175c14963ac30fcfa0f59628de9af88f343154b6ee0f640a4167aaf49c93129fe9ccbb7537f5ba722b86af6e4d6536
|
data/lib/djinni.rb
CHANGED
@@ -10,7 +10,7 @@ class Exit
|
|
10
10
|
end
|
11
11
|
|
12
12
|
class Djinni
|
13
|
-
def grant_wish(input)
|
13
|
+
def grant_wish(input, env = {})
|
14
14
|
return "" if (input.nil? || input.empty?)
|
15
15
|
|
16
16
|
case input[-1]
|
@@ -30,7 +30,7 @@ class Djinni
|
|
30
30
|
name, args = input.split(" ", 2)
|
31
31
|
return input if (!@wishes.has_key?(name))
|
32
32
|
wish = @wishes[name]
|
33
|
-
return "#{name} #{wish.tab_complete(args)}"
|
33
|
+
return "#{name} #{wish.tab_complete(args, env)}"
|
34
34
|
else
|
35
35
|
wishes = @wishes.keys
|
36
36
|
wishes.push("help")
|
@@ -66,7 +66,7 @@ class Djinni
|
|
66
66
|
|
67
67
|
@wishes.sort.map do |aliaz, wish|
|
68
68
|
if (aliaz == name)
|
69
|
-
wish.execute(args)
|
69
|
+
wish.execute(args, env)
|
70
70
|
return ""
|
71
71
|
end
|
72
72
|
end
|
data/lib/djinni_wish.rb
CHANGED
@@ -14,13 +14,13 @@ class DjinniWish
|
|
14
14
|
)
|
15
15
|
end
|
16
16
|
|
17
|
-
def execute(args)
|
17
|
+
def execute(args, env = {})
|
18
18
|
raise InterfaceNotImplementedError.new(
|
19
19
|
"execute() not implemented!"
|
20
20
|
)
|
21
21
|
end
|
22
22
|
|
23
|
-
def tab_complete(input)
|
23
|
+
def tab_complete(input, env = {})
|
24
24
|
raise InterfaceNotImplementedError.new(
|
25
25
|
"tab_complete() not implemented!"
|
26
26
|
)
|
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: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|