ripl 0.4.0 → 0.4.1
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.
- data/CHANGELOG.rdoc +3 -0
- data/lib/ripl/runner.rb +6 -4
- data/lib/ripl/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
data/lib/ripl/runner.rb
CHANGED
|
@@ -10,9 +10,9 @@ class Ripl::Runner
|
|
|
10
10
|
'-h' => ['-h, --help', 'Print help']
|
|
11
11
|
}
|
|
12
12
|
MESSAGES = {
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'load_rc' => 'Error while loading %s',
|
|
13
|
+
'usage' => 'Usage', 'options' => 'Options', 'args' => 'ARGS',
|
|
14
|
+
'command' => 'COMMAND', 'run_command' => "`%s' is not a %s command.",
|
|
15
|
+
'start' => "Unused arguments", 'load_rc' => 'Error while loading %s',
|
|
16
16
|
'parse_option' => 'invalid option'
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -74,7 +74,9 @@ class Ripl::Runner
|
|
|
74
74
|
return("#{app} #{$1} [ARGS] [OPTIONS]") if $0[/#{app}-(\w+)/]
|
|
75
75
|
name_max = OPTIONS.values.map {|e| e[0].length }.max
|
|
76
76
|
desc_max = OPTIONS.values.map {|e| e[1].length }.max
|
|
77
|
-
|
|
77
|
+
m = MESSAGES
|
|
78
|
+
["%s: #{app} [%s] [%s] [%s]" % ( [m['usage'], m['command'], m['args'],
|
|
79
|
+
m['options'].upcase] ), "\n#{m['options']}:", OPTIONS_ARR.
|
|
78
80
|
map {|e| n,d = OPTIONS[e]; " %-*s %-*s" % [name_max, n, desc_max, d] }]
|
|
79
81
|
end
|
|
80
82
|
|
data/lib/ripl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ripl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 13
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 4
|
|
9
|
-
-
|
|
10
|
-
version: 0.4.
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.4.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Gabriel Horner
|