cmdparse 3.0.6 → 3.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d760708e547f3f0d5e2400e1e61d4f32b9db166fbaefae5ae21d0d6176e0d671
4
- data.tar.gz: 395fc5e2c4f9e58e23f647c7f7ce33d6686747656ccfde1e89ba024b14cd02b3
3
+ metadata.gz: 9d2caaf516131b40394d24f15510e829208323ceafb73e6bdf66230484c8fc54
4
+ data.tar.gz: 821bc8367ff510850f9cb2e4586d48d49c16d7d4ba0a2af97c8b582c32259dab
5
5
  SHA512:
6
- metadata.gz: de2a3dd9444ef20b6187171fe148a20507f7013597fd3307ef5442d15ffcb713810b2cd7e7aca855a3edddaf59d3c853bee9c26b92f0ca0fc74476ddbc74ff0c
7
- data.tar.gz: d23eb8bb6677fafcd4616d5461364da1f1f781f49e8304c3f54c0ec0eea8b739d963f01639a35f159e5c2c0cc7831f85a8f04a62b7484cde2ae647ad65c1f732
6
+ metadata.gz: 6a02d21a0267e5bb53b3fed534f40949a7d91d76caf3cea443af7d9169c8b88984332004d05c227df2248212a659df1bc0e16148cdfa66e1bc37883e3a236c11
7
+ data.tar.gz: e92d85dc7eb80cd8c4c99bb2937d0a4408e0e522a1716a5263daea3da427056caff4c244b6a1a546e81f6f17884884e414df11b5283998eb876bef06a634ef0d
data/Rakefile CHANGED
@@ -107,7 +107,6 @@ namespace :dev do
107
107
  s.add_development_dependency "webgen", "~> 1.4"
108
108
 
109
109
  #### Documentation
110
- s.has_rdoc = true
111
110
  s.rdoc_options = ['--line-numbers', '--main', 'CmdParse::CommandParser']
112
111
 
113
112
  #### Author and project details
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.6
1
+ 3.0.7
@@ -24,7 +24,7 @@
24
24
 
25
25
  <!-- Sidebar -->
26
26
  <div id="sidebar">
27
- <h1 id="logo"><a href="{relocatable: /}">cmdparse</a><br /><span>v 3.0.6</span></h1>
27
+ <h1 id="logo"><a href="{relocatable: /}">cmdparse</a><br /><span>v 3.0.7</span></h1>
28
28
 
29
29
  <!-- Nav -->
30
30
  <nav id="nav">
@@ -5,6 +5,14 @@ sort_info: 8
5
5
  ---
6
6
  ## News
7
7
 
8
+ ### 2020-12-08 cmdparse 3.0.7 released!
9
+
10
+ Changes:
11
+
12
+ * Behave well when interrupted via <kbd>Control+C</kbd> and when used in a pipe that gets closed
13
+ (thanks to postmodern)
14
+
15
+
8
16
  ### 2020-05-02 cmdparse 3.0.6 released!
9
17
 
10
18
  Changes:
@@ -47,7 +47,7 @@ end
47
47
  module CmdParse
48
48
 
49
49
  # The version of this cmdparse implemention
50
- VERSION = '3.0.6'.freeze
50
+ VERSION = '3.0.7'.freeze
51
51
 
52
52
 
53
53
  # Base class for all cmdparse errors.
@@ -898,6 +898,10 @@ module CmdParse
898
898
  @main_command.commands['help'].execute(*@current_command.command_chain.map(&:name))
899
899
  end
900
900
  exit(64) # FreeBSD standard exit error for "command was used incorrectly"
901
+ rescue Interrupt
902
+ exit(128 + 2)
903
+ rescue Errno::EPIPE
904
+ # Behave well when used in a pipe
901
905
  ensure
902
906
  @current_command = nil
903
907
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmdparse
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 3.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Leitner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-02 00:00:00.000000000 Z
11
+ date: 2020-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webgen