djinni 0.1.12 → 0.1.13

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 +2 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8042fef74743b60da21c3b8b50ba31490545ddf4
4
- data.tar.gz: ca755360b05ba6a4796ebbb19d57b0d082e18bd2
3
+ metadata.gz: 63e49e6e7f4471141892800679e4e406a72ffc57
4
+ data.tar.gz: 82fe3cba90710d8bddb62726b3234bcdbf816f97
5
5
  SHA512:
6
- metadata.gz: 198313c659052175e90ef847dca6a56281e8eb06178f40a48de28f162cab8738f6f2248990a479fe56acd1fea6871a344a8d00239674cb594e07acd2ffa4d756
7
- data.tar.gz: 411b6ae0256472baaaa54332c2d9e1faff172192435c8d876c567e623649e95fd2e1d1e5ea4d07f7029308ed7f135522c18ce3cd173caf9933cd1f98f91243d5
6
+ metadata.gz: 6434bc220e969d532255fd1088c300697cb5be240b7a3f11090faaed3e1437d1f18aaa76fa21cb9748d3488844a3647db17f0656279ef3efa39753f70a85b025
7
+ data.tar.gz: 3f5173d967ed690e16a4a25068ef8c2f4723048df12427092a39f996a6614761edd112806576dc5a08f7d155e84b1a0495a18bde508fd8e743521643f53de6eb
data/lib/djinni.rb CHANGED
@@ -67,11 +67,12 @@ class Djinni
67
67
 
68
68
  case code
69
69
  when "\e[A" # Up arrow
70
+ return "" if (@history.empty?)
70
71
  @hist_index = @history.size if (@hist_index.nil?)
71
72
  @hist_index = 1 if (@hist_index == 0)
72
73
  @hist_index -= 1
73
74
  return @history[@hist_index]
74
- when "\e[B" # Up arrow
75
+ when "\e[B" # Down arrow
75
76
  @hist_index = @history.size if (@hist_index.nil?)
76
77
  @hist_index += 1
77
78
  if (@hist_index < @history.size)
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.12
4
+ version: 0.1.13
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-02 00:00:00.000000000 Z
11
+ date: 2015-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest