djinni 0.1.9 → 0.1.10

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/djinni.rb +11 -11
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 054d09c1a59329243cc68fd838539f7886a73099
4
- data.tar.gz: 90bed7d10befe6e76a61c495d2837ea6b93eb2c8
3
+ metadata.gz: ec712ec140052ac46cadf1536e6d01677ad2f3b6
4
+ data.tar.gz: 0871df60e4464dfa7fd1aa4f4da1a3177d241807
5
5
  SHA512:
6
- metadata.gz: dc21126e3e26610d8988c05ea07f22ccadeaab6f6f1f2567b2ae9b9bf7ff899d04ae7095d10dc8761c49b6ede2f3062c1ec8220cc767dedc7c1687eafb290820
7
- data.tar.gz: a98be004548eb6bf5d48915b66d2a49c9df10b47c952d3193298eb1ff7025328cce4ee99675edc8f11d3456314917769717b7d1cd26865c9e31210956e57461e
6
+ metadata.gz: 133735ba86e75da94280b638a09dcee2e425a296e5060900d094acbebdccd298a9066b5a8a6b8eb9a810f75ee567bd301b12420d9ae4eaa97fd15a4aae4ade57
7
+ data.tar.gz: 4f38d9654bb91c7a44d2a22a9e76298f3067a7db55c334ce47d7aff78fc7f1600a4c5feec9d77d8b2f00388a82a715c4ea0cbee9043542344b045f0ee017260e
@@ -151,18 +151,18 @@ class Djinni
151
151
  @loaded_from.push(dir)
152
152
  end
153
153
 
154
- def prompt(djinni_env = {}, prompt_sym = "$ ")
154
+ def prompt(djinni_env = {}, djinni_prompt = "$ ")
155
155
  @interactive = true
156
156
 
157
- djinni_env["prompt_sym"] = prompt_sym
158
- buffer = ""
157
+ djinni_env["djinni_prompt"] = djinni_prompt
158
+ buff = ""
159
159
  loop do
160
- prompt_sym = djinni_env["prompt_sym"]
160
+ djinni_prompt = djinni_env["djinni_prompt"]
161
161
  blank_line = Array.new(@width, " ").join
162
- fill_len = @width - prompt_sym.length - buffer.length + 1
162
+ fill_len = @width - djinni_prompt.length - buff.length + 1
163
163
 
164
164
  # Handle long line-wrapped prompts
165
- lines = (prompt_sym.length + buffer.length) / @width
165
+ lines = (djinni_prompt.length + buff.length) / @width
166
166
  lines.times do
167
167
  print "\r#{blank_line}"
168
168
  print "\e[F"
@@ -170,18 +170,18 @@ class Djinni
170
170
 
171
171
  # Redisplay prompt
172
172
  print "\r#{blank_line}"
173
- print "\r#{prompt_sym}#{buffer}"
173
+ print "\r#{djinni_prompt}#{buff}"
174
174
 
175
175
  # Process input
176
- buffer = grant_wish(buffer + STDIN.getch, djinni_env)
176
+ buff = grant_wish(buff + STDIN.getch, djinni_env)
177
177
 
178
- if (buffer.nil?)
178
+ if (buff.nil?)
179
179
  puts "Wish not found!"
180
- buffer = ""
180
+ buff = ""
181
181
  end
182
182
 
183
183
  # Exit on ^D
184
- if (buffer == "\x04")
184
+ if (buff == "\x04")
185
185
  return
186
186
  end
187
187
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: djinni
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker