linen 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/linen.rb CHANGED
@@ -18,8 +18,8 @@ require 'string_extensions'
18
18
 
19
19
 
20
20
  module Linen
21
- VERSION = "0.6.3"
22
- SVNRev = %q$Rev: 142 $
21
+ VERSION = "0.6.4"
22
+ SVNRev = %q$Rev: 223 $
23
23
 
24
24
 
25
25
  def self::plugins
@@ -32,7 +32,7 @@ class Linen::Plugin::Argument
32
32
  end
33
33
  end
34
34
 
35
- raise Linen::Plugin::ArgumentError unless value =~ @regex
35
+ raise Linen::Plugin::ArgumentError, "Invalid entry." unless value =~ @regex
36
36
  return value unless @process
37
37
 
38
38
  begin
@@ -316,5 +316,3 @@ To get help with a plugin, enter "help <plugin>". You may also enter
316
316
  end
317
317
  end
318
318
  end
319
-
320
- Signal.trap( 'INT' ) { raise Interrupt }
@@ -137,8 +137,7 @@ class Linen::Plugin::SimpleCommand
137
137
  "The value you entered ('#{arg}') is invalid for all arguments." if
138
138
  results.values.compact.empty?
139
139
  rescue Linen::Plugin::ArgumentError => e
140
- print "#{e} "
141
-
140
+ puts e.message
142
141
  arg = Linen::CLI.reprompt.split.first
143
142
 
144
143
  retry
@@ -160,6 +159,8 @@ class Linen::Plugin::SimpleCommand
160
159
 
161
160
  results[ arg_name ] = argument.process( arg_value )
162
161
  rescue Linen::Plugin::ArgumentError => e
162
+ puts e.message
163
+
163
164
  # reset arg_value to nil so we get prompted on retry
164
165
  arg_value = nil
165
166
 
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: linen
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.6.3
6
+ version: 0.6.4
7
7
  date: 2007-09-10 00:00:00 -07:00
8
8
  summary: Linen - A pluggable command-line interface library
9
9
  require_paths: