djinni 0.1.16 → 1.0.0
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/builtin/djinni_help_wish.rb +1 -1
- data/lib/builtin/djinni_history_wish.rb +1 -1
- data/lib/builtin/djinni_quit_wish.rb +1 -1
- data/lib/djinni/error.rb +2 -0
- data/lib/djinni/unknwon_wish_error.rb +7 -0
- data/lib/{djinni_wish.rb → djinni/wish.rb} +1 -1
- data/lib/djinni.rb +5 -6
- metadata +5 -4
- data/lib/djinni_error.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a53f002bb38f59690b1ed3e575b06e13f0b42a9b
|
4
|
+
data.tar.gz: 4a533cbd15ff289034611f7960600460af34d94e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 458243eef2e17c6f8fccfa41cf3ae550dc51147666f5c57964d1fd014ee9a6fdd945a97fe13d536e93ad07a242490716d040e496111418a1c69eb472817516d5
|
7
|
+
data.tar.gz: 1764fc8162dcc10e5fbd5fc42117c5376557b6343c1e4cac62e916e3e9f5a8b41fc3f7d0352cf488ac348428e7ee0879f9a85ae5a647a6d2b38cae5101860ed4
|
data/lib/djinni/error.rb
ADDED
data/lib/djinni.rb
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
-
require "djinni_error"
|
2
|
-
require "djinni_wish"
|
3
1
|
require "io/console"
|
4
2
|
require "pathname"
|
5
3
|
require "terminfo"
|
6
4
|
|
7
5
|
class Djinni
|
8
|
-
include DjinniError
|
9
|
-
|
10
6
|
def grant_wish(input, djinni_env = {})
|
11
7
|
return "" if (input.nil? || input.empty?)
|
12
8
|
|
@@ -136,7 +132,7 @@ class Djinni
|
|
136
132
|
begin
|
137
133
|
wish = Object::const_get(clas).new
|
138
134
|
rescue NameError => e
|
139
|
-
raise
|
135
|
+
raise Djinni::UnknownWishError.new(clas)
|
140
136
|
end
|
141
137
|
|
142
138
|
return if (wish.nil?)
|
@@ -156,7 +152,7 @@ class Djinni
|
|
156
152
|
require_relative file
|
157
153
|
|
158
154
|
%x(
|
159
|
-
\grep -E "^ *class .+ \<
|
155
|
+
\grep -E "^ *class .+ \< Djinni::Wish" #{file} | \
|
160
156
|
awk '{print $2}'
|
161
157
|
).each_line do |clas|
|
162
158
|
load_wish(clas)
|
@@ -211,3 +207,6 @@ class Djinni
|
|
211
207
|
end
|
212
208
|
private :store_history
|
213
209
|
end
|
210
|
+
|
211
|
+
require "djinni/error"
|
212
|
+
require "djinni/wish"
|
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.
|
4
|
+
version: 1.0.0
|
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-10-
|
11
|
+
date: 2015-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -62,8 +62,9 @@ files:
|
|
62
62
|
- lib/builtin/djinni_history_wish.rb
|
63
63
|
- lib/builtin/djinni_quit_wish.rb
|
64
64
|
- lib/djinni.rb
|
65
|
-
- lib/
|
66
|
-
- lib/
|
65
|
+
- lib/djinni/error.rb
|
66
|
+
- lib/djinni/unknwon_wish_error.rb
|
67
|
+
- lib/djinni/wish.rb
|
67
68
|
homepage: http://mjwhitta.github.io/djinni
|
68
69
|
licenses:
|
69
70
|
- GPL-3.0
|