djinni 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/djinni.rb +3 -3
  3. data/lib/djinni_wish.rb +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca50cb7456b4bda6172aa40443d7af25d7a862cb
4
- data.tar.gz: f7d211148a795d3cf1dc3aaab16c254ab73d92ce
3
+ metadata.gz: e031e4ee7414e42f25a08f0077fcc6e960a537be
4
+ data.tar.gz: db51f895b4a3cef184852c8ec8519d36d324133c
5
5
  SHA512:
6
- metadata.gz: d4d6f5a9dde3d96609b09cb39fabeb9c1cdded960194582a9c37b899aa3864fa917f38994f94931f1f553651b9a9fba4f29381d722a99b540411df8a819d0b01
7
- data.tar.gz: 4f301b2e4ea42a53af7f619926301d178e310f328ae0b6f55b8d1ed830638bcd9f34b2f8e8c0e0dd4a6c5e6b3a269b5c0d776095d305a8024e9c53170b696184
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.3
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-08-28 00:00:00.000000000 Z
11
+ date: 2015-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest