tcollier-commando 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b409b80542b9797e8624584c37b6850b16ae7834
4
- data.tar.gz: 7379329a9a815040d178da7008625add71b56d97
3
+ metadata.gz: 5068609960424981817aae65f87d2bb72aff7e6c
4
+ data.tar.gz: c29d26dfa5bbc1cb4d8520282978afa12ded2c6b
5
5
  SHA512:
6
- metadata.gz: 876079a43c673ac8e7817ea08da0222ccda8cecca6e98cc4f5ac17655f17c2b000e0a57aa3e4add91f46890239a47c4be8eef90d2ae7111d484e1ccfae4a7bab
7
- data.tar.gz: d1baa3112c277c030cb8d35fe80447aa7fe0d5bf3fe647288c597d541a44cbed9265ab24e3b907b44c7cda3d5eceee396260b8c057031f9671428ce550f2606e
6
+ metadata.gz: bc279c68c0428d8189770de8ecaf093dc5426cd14f23aca2fa8832906c2a13c68ec7828c608945130bc403e4a5c06c0d9c07ee9976a26e72af33a4d4a7e5c8fa
7
+ data.tar.gz: a2a589ed3016084bf27f3eb3ece1613fea5dbd2dcaa92c6010b580dbf90cf08df96ac49c8ddad4e948eb8db0db84139f0d6d3e7b85efdde487d878011b7d4b01
data/README.md CHANGED
@@ -6,6 +6,7 @@ A command line interface builder with Readline support
6
6
 
7
7
  * `0.1.0` - Initial release
8
8
  * `0.1.1` - Alphabetize commands printed via `help`
9
+ * `0.1.2` - Remove empty lines from history
9
10
 
10
11
  ## Installation
11
12
 
data/commando.gemspec CHANGED
@@ -10,6 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['collier@apartmentlist.com']
11
11
 
12
12
  spec.summary = 'A simple command line interface builder.'
13
+ spec.homepage = 'https://github.com/tcollier/commando'
13
14
  spec.license = 'MIT'
14
15
 
15
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -1,3 +1,3 @@
1
1
  module Commando
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/lib/commando.rb CHANGED
@@ -41,7 +41,11 @@ module Commando
41
41
  # case we want to exit
42
42
  output.puts
43
43
  break
44
- elsif line.strip != ''
44
+ elsif line.strip == ''
45
+ # If the user just hit enter without typing a command, remove that line
46
+ # from history.
47
+ Readline::HISTORY.pop
48
+ else
45
49
  # When the user enters a non-empty string, pass the line to the
46
50
  # interpreter and handle the command.
47
51
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tcollier-commando
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Collier
@@ -79,7 +79,7 @@ files:
79
79
  - lib/commando/quit_exception.rb
80
80
  - lib/commando/validation_error.rb
81
81
  - lib/commando/version.rb
82
- homepage:
82
+ homepage: https://github.com/tcollier/commando
83
83
  licenses:
84
84
  - MIT
85
85
  metadata: {}