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.
@@ -1,3 +1,6 @@
1
+ == 0.4.1
2
+ * More support for internationalization
3
+
1
4
  == 0.4.0
2
5
  * Support internationalization
3
6
  * Allow #history to be overridden easily
@@ -10,9 +10,9 @@ class Ripl::Runner
10
10
  '-h' => ['-h, --help', 'Print help']
11
11
  }
12
12
  MESSAGES = {
13
- 'run_command' => "`%s' is not a %s command.",
14
- 'start' => "Unused arguments",
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
- ["Usage: #{app} [COMMAND] [ARGS] [OPTIONS]", "\nOptions:", OPTIONS_ARR.
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
 
@@ -1,3 +1,3 @@
1
1
  module Ripl
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
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: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gabriel Horner