hammer_cli 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/README.md +13 -5
- data/config/cli_config.template.yml +12 -3
- data/doc/creating_apipie_commands.md +53 -56
- data/doc/creating_commands.md +25 -19
- data/doc/developer_docs.md +3 -2
- data/doc/development_tips.md +3 -3
- data/doc/i18n.md +3 -3
- data/doc/installation.md +24 -207
- data/doc/installation_deb.md +48 -0
- data/doc/installation_gem.md +30 -0
- data/doc/installation_rpm.md +53 -0
- data/doc/installation_source.md +31 -0
- data/doc/option_builders.md +77 -0
- data/doc/option_normalizers.md +5 -5
- data/doc/writing_a_plugin.md +9 -9
- data/lib/hammer_cli.rb +1 -0
- data/lib/hammer_cli/abstract.rb +21 -8
- data/lib/hammer_cli/apipie.rb +1 -2
- data/lib/hammer_cli/apipie/command.rb +37 -64
- data/lib/hammer_cli/apipie/option_builder.rb +69 -0
- data/lib/hammer_cli/apipie/options.rb +1 -61
- data/lib/hammer_cli/clamp.rb +15 -0
- data/lib/hammer_cli/i18n.rb +14 -2
- data/lib/hammer_cli/logger.rb +1 -1
- data/lib/hammer_cli/option_builder.rb +43 -0
- data/lib/hammer_cli/options/option_definition.rb +6 -0
- data/lib/hammer_cli/output/adapter/abstract.rb +2 -2
- data/lib/hammer_cli/output/adapter/base.rb +6 -3
- data/lib/hammer_cli/output/adapter/table.rb +19 -2
- data/lib/hammer_cli/output/definition.rb +4 -0
- data/lib/hammer_cli/output/fields.rb +9 -0
- data/lib/hammer_cli/output/formatters.rb +20 -8
- data/lib/hammer_cli/utils.rb +1 -1
- data/lib/hammer_cli/version.rb +1 -1
- data/locale/hammer-cli.pot +103 -79
- data/test/unit/abstract_test.rb +62 -0
- data/test/unit/apipie/command_test.rb +12 -197
- data/test/unit/apipie/option_builder_test.rb +110 -0
- data/test/unit/i18n_test.rb +50 -0
- data/test/unit/option_builder_test.rb +33 -0
- data/test/unit/output/adapter/abstract_test.rb +26 -3
- data/test/unit/output/adapter/base_test.rb +20 -3
- data/test/unit/output/adapter/csv_test.rb +2 -2
- data/test/unit/output/adapter/table_test.rb +24 -1
- data/test/unit/output/definition_test.rb +13 -0
- data/test/unit/output/formatters_test.rb +17 -1
- data/test/unit/utils_test.rb +1 -1
- metadata +101 -88
- data/lib/hammer_cli/apipie/read_command.rb +0 -41
- data/lib/hammer_cli/apipie/write_command.rb +0 -49
- data/test/unit/apipie/read_command_test.rb +0 -37
- data/test/unit/apipie/write_command_test.rb +0 -41
@@ -2,10 +2,6 @@
|
|
2
2
|
module HammerCLI::Apipie
|
3
3
|
module Options
|
4
4
|
|
5
|
-
def self.included(base)
|
6
|
-
base.extend(ClassMethods)
|
7
|
-
end
|
8
|
-
|
9
5
|
def all_method_options
|
10
6
|
method_options_for_params(resource.action(action).params, true)
|
11
7
|
end
|
@@ -23,6 +19,7 @@ module HammerCLI::Apipie
|
|
23
19
|
opts[p.name] = get_option_value(p.name)
|
24
20
|
end
|
25
21
|
end
|
22
|
+
|
26
23
|
opts.reject! {|key, value| value.nil? } unless include_nil
|
27
24
|
opts
|
28
25
|
end
|
@@ -35,62 +32,5 @@ module HammerCLI::Apipie
|
|
35
32
|
end
|
36
33
|
end
|
37
34
|
|
38
|
-
module ClassMethods
|
39
|
-
|
40
|
-
def apipie_options(options={})
|
41
|
-
setup_identifier_options
|
42
|
-
if resource_defined?
|
43
|
-
filter = options[:without] || []
|
44
|
-
filter = Array(filter)
|
45
|
-
filter += declared_identifiers.keys
|
46
|
-
|
47
|
-
options_for_params(resource.action(action).params, filter)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
protected
|
52
|
-
|
53
|
-
def options_for_params(params, filter)
|
54
|
-
params.each do |p|
|
55
|
-
next if filter.include?(p.name) || filter.include?(p.name.to_sym)
|
56
|
-
if p.expected_type == :hash
|
57
|
-
options_for_params(p.params, filter)
|
58
|
-
else
|
59
|
-
create_option p
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def create_option(param)
|
65
|
-
option(
|
66
|
-
option_switches(param),
|
67
|
-
option_type(param),
|
68
|
-
option_desc(param),
|
69
|
-
option_opts(param)
|
70
|
-
)
|
71
|
-
end
|
72
|
-
|
73
|
-
def option_switches(param)
|
74
|
-
'--' + param.name.gsub('_', '-')
|
75
|
-
end
|
76
|
-
|
77
|
-
def option_type(param)
|
78
|
-
param.name.upcase.gsub('-', '_')
|
79
|
-
end
|
80
|
-
|
81
|
-
def option_desc(param)
|
82
|
-
param.description || " "
|
83
|
-
end
|
84
|
-
|
85
|
-
def option_opts(param)
|
86
|
-
opts = {}
|
87
|
-
opts[:required] = true if param.required?
|
88
|
-
# FIXME: There is a bug in apipie, it does not produce correct expected type for Arrays
|
89
|
-
# When it's fixed, we should test param["expected_type"] == "array"
|
90
|
-
opts[:format] = HammerCLI::Options::Normalizers::List.new if param.validator.include? "Array"
|
91
|
-
return opts
|
92
|
-
end
|
93
|
-
|
94
|
-
end
|
95
35
|
end
|
96
36
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'clamp'
|
2
|
+
|
3
|
+
if Clamp.respond_to?(:messages=)
|
4
|
+
Clamp.messages = {
|
5
|
+
:too_many_arguments => _("too many arguments"),
|
6
|
+
:option_required => _("option '%<option>s' is required"),
|
7
|
+
:option_or_env_required => _("option '%<option>s' (or env %<env>s) is required"),
|
8
|
+
:option_argument_error => _("option '%<switch>s': %<message>s"),
|
9
|
+
:parameter_argument_error => _("parameter '%<param>s': %<message>s"),
|
10
|
+
:env_argument_error => _("%<env>s: %<message>s"),
|
11
|
+
:unrecognised_option => _("Unrecognised option '%<switch>s'"),
|
12
|
+
:no_such_subcommand => _("No such sub-command '%<name>s'"),
|
13
|
+
:no_value_provided => _("no value provided")
|
14
|
+
}
|
15
|
+
end
|
data/lib/hammer_cli/i18n.rb
CHANGED
@@ -37,6 +37,10 @@ module HammerCLI
|
|
37
37
|
:mo
|
38
38
|
end
|
39
39
|
|
40
|
+
def available?
|
41
|
+
File.exist?(locale_dir)
|
42
|
+
end
|
43
|
+
|
40
44
|
attr_reader :locale_dir, :domain_name
|
41
45
|
end
|
42
46
|
|
@@ -76,12 +80,20 @@ module HammerCLI
|
|
76
80
|
@domains
|
77
81
|
end
|
78
82
|
|
83
|
+
|
79
84
|
def self.add_domain(domain)
|
80
|
-
|
81
|
-
|
85
|
+
if domain.available?
|
86
|
+
domains << domain
|
87
|
+
FastGettext.add_text_domain(domain.domain_name, :path => domain.locale_dir, :type => domain.type, :report_warning => false)
|
88
|
+
end
|
82
89
|
end
|
83
90
|
|
84
91
|
|
92
|
+
def self.clear
|
93
|
+
FastGettext.translation_repositories.clear
|
94
|
+
domains.clear
|
95
|
+
end
|
96
|
+
|
85
97
|
Encoding.default_external='UTF-8' if defined? Encoding
|
86
98
|
FastGettext.locale = locale
|
87
99
|
|
data/lib/hammer_cli/logger.rb
CHANGED
@@ -36,7 +36,7 @@ module HammerCLI
|
|
36
36
|
:layout => NOCOLOR_LAYOUT,
|
37
37
|
:truncate => false,
|
38
38
|
:keep => 5,
|
39
|
-
:size => HammerCLI::Settings.get(:log_size) || 1024*1024) # 1MB
|
39
|
+
:size => (HammerCLI::Settings.get(:log_size) || 1)*1024*1024) # 1MB
|
40
40
|
# set owner and group (it's ignored if attribute is nil)
|
41
41
|
FileUtils.chown HammerCLI::Settings.get(:log_owner), HammerCLI::Settings.get(:log_group), filename
|
42
42
|
rescue ArgumentError => e
|
@@ -0,0 +1,43 @@
|
|
1
|
+
|
2
|
+
module HammerCLI
|
3
|
+
|
4
|
+
class AbstractOptionBuilder
|
5
|
+
|
6
|
+
def build(builder_params={})
|
7
|
+
end
|
8
|
+
|
9
|
+
protected
|
10
|
+
|
11
|
+
def option(*args)
|
12
|
+
HammerCLI::Options::OptionDefinition.new(*args)
|
13
|
+
end
|
14
|
+
|
15
|
+
def optionamize(name_candidate)
|
16
|
+
name_candidate.gsub('_', '-')
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
class OptionBuilderContainer < AbstractOptionBuilder
|
23
|
+
|
24
|
+
def build(builder_params={})
|
25
|
+
options = []
|
26
|
+
builders.each do |b|
|
27
|
+
options += b.build(builder_params)
|
28
|
+
end
|
29
|
+
options
|
30
|
+
end
|
31
|
+
|
32
|
+
def builders
|
33
|
+
@builders ||= []
|
34
|
+
@builders
|
35
|
+
end
|
36
|
+
|
37
|
+
def builders=(builders)
|
38
|
+
@builders=builders
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -21,6 +21,12 @@ module HammerCLI
|
|
21
21
|
attr_accessor :value_formatter
|
22
22
|
attr_accessor :context_target
|
23
23
|
|
24
|
+
def initialize(switches, type, description, options = {})
|
25
|
+
self.value_formatter = options.delete(:format)
|
26
|
+
self.context_target = options.delete(:context_target)
|
27
|
+
super
|
28
|
+
end
|
29
|
+
|
24
30
|
def complete(value)
|
25
31
|
if value_formatter.nil?
|
26
32
|
[]
|
@@ -45,9 +45,9 @@ module HammerCLI::Output::Adapter
|
|
45
45
|
path = field.path
|
46
46
|
|
47
47
|
path.inject(record) do |record, path_key|
|
48
|
-
if record.has_key?
|
48
|
+
if record && record.kind_of?(Hash) && record.has_key?(path_key.to_sym)
|
49
49
|
record[path_key.to_sym]
|
50
|
-
elsif record.has_key?
|
50
|
+
elsif record && record.kind_of?(Hash) && record.has_key?(path_key.to_s)
|
51
51
|
record[path_key.to_s]
|
52
52
|
else
|
53
53
|
return nil
|
@@ -52,7 +52,6 @@ module HammerCLI::Output::Adapter
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def render_field(field, data, label_width)
|
55
|
-
|
56
55
|
if field.is_a? Fields::ContainerField
|
57
56
|
output = ""
|
58
57
|
|
@@ -61,7 +60,9 @@ module HammerCLI::Output::Adapter
|
|
61
60
|
data.each do |d|
|
62
61
|
idx += 1
|
63
62
|
fields_output = render_fields(field.fields, d).indent_with(GROUP_INDENT)
|
64
|
-
|
63
|
+
if field.is_a?(Fields::Collection) && field.parameters[:numbered]
|
64
|
+
fields_output = fields_output.sub(/^[ ]{4}/, " %-3s" % "#{idx})")
|
65
|
+
end
|
65
66
|
|
66
67
|
output += fields_output
|
67
68
|
output += "\n"
|
@@ -84,7 +85,9 @@ module HammerCLI::Output::Adapter
|
|
84
85
|
|
85
86
|
def render_value(field, data)
|
86
87
|
formatter = @formatters.formatter_for_type(field.class)
|
87
|
-
|
88
|
+
parameters = field.parameters
|
89
|
+
parameters[:context] = @context
|
90
|
+
data = formatter.format(data, field.parameters) if formatter
|
88
91
|
data.to_s
|
89
92
|
end
|
90
93
|
|
@@ -2,6 +2,23 @@ require 'table_print'
|
|
2
2
|
|
3
3
|
module HammerCLI::Output::Adapter
|
4
4
|
|
5
|
+
class WrapperFormatter
|
6
|
+
|
7
|
+
def initialize(formatter, params)
|
8
|
+
@formatter = formatter
|
9
|
+
@params = params
|
10
|
+
end
|
11
|
+
|
12
|
+
def format(value)
|
13
|
+
if @formatter
|
14
|
+
@formatter.format(value, @params)
|
15
|
+
else
|
16
|
+
value
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
5
22
|
class Table < Abstract
|
6
23
|
|
7
24
|
MAX_COLUMN_WIDTH = 80
|
@@ -21,14 +38,14 @@ module HammerCLI::Output::Adapter
|
|
21
38
|
rows = collection.collect do |d|
|
22
39
|
row = {}
|
23
40
|
fields.each do |f|
|
24
|
-
row[label_for(f)] =
|
41
|
+
row[label_for(f)] = WrapperFormatter.new(
|
42
|
+
@formatters.formatter_for_type(f.class), f.parameters).format(data_for_field(f, d) || "")
|
25
43
|
end
|
26
44
|
row
|
27
45
|
end
|
28
46
|
|
29
47
|
options = fields.collect do |f|
|
30
48
|
{ label_for(f) => {
|
31
|
-
:formatters => Array(@formatters.formatter_for_type(f.class)),
|
32
49
|
:width => max_width_for(f)
|
33
50
|
}
|
34
51
|
}
|
@@ -84,6 +84,15 @@ module Fields
|
|
84
84
|
end
|
85
85
|
|
86
86
|
class Collection < ContainerField
|
87
|
+
|
88
|
+
def initialize(options={}, &block)
|
89
|
+
options[:numbered] = true if options[:numbered].nil?
|
90
|
+
super(options, &block)
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
class Boolean < Field
|
87
96
|
end
|
88
97
|
|
89
98
|
end
|
@@ -43,7 +43,7 @@ module HammerCLI::Output
|
|
43
43
|
tags & other_tags == tags
|
44
44
|
end
|
45
45
|
|
46
|
-
def format(data)
|
46
|
+
def format(data, field_params={})
|
47
47
|
data
|
48
48
|
end
|
49
49
|
end
|
@@ -58,8 +58,8 @@ module HammerCLI::Output
|
|
58
58
|
@formatters += formatters
|
59
59
|
end
|
60
60
|
|
61
|
-
def format(data)
|
62
|
-
@formatters.inject(data) { |d,f| f.format(d) }
|
61
|
+
def format(data, field_params={})
|
62
|
+
@formatters.inject(data) { |d,f| f.format(d, field_params) }
|
63
63
|
end
|
64
64
|
|
65
65
|
end
|
@@ -73,7 +73,7 @@ module HammerCLI::Output
|
|
73
73
|
[:screen, :flat]
|
74
74
|
end
|
75
75
|
|
76
|
-
def format(data)
|
76
|
+
def format(data, field_params={})
|
77
77
|
c = HighLine.color(data.to_s, @color)
|
78
78
|
end
|
79
79
|
end
|
@@ -84,7 +84,7 @@ module HammerCLI::Output
|
|
84
84
|
[:flat]
|
85
85
|
end
|
86
86
|
|
87
|
-
def format(string_date)
|
87
|
+
def format(string_date, field_params={})
|
88
88
|
t = DateTime.parse(string_date.to_s)
|
89
89
|
t.strftime("%Y/%m/%d %H:%M:%S")
|
90
90
|
rescue ArgumentError
|
@@ -98,7 +98,7 @@ module HammerCLI::Output
|
|
98
98
|
[:flat]
|
99
99
|
end
|
100
100
|
|
101
|
-
def format(list)
|
101
|
+
def format(list, field_params={})
|
102
102
|
if list.is_a? Array
|
103
103
|
list.join(", ")
|
104
104
|
elsif list
|
@@ -115,7 +115,7 @@ module HammerCLI::Output
|
|
115
115
|
[:screen, :flat]
|
116
116
|
end
|
117
117
|
|
118
|
-
def format(params)
|
118
|
+
def format(params, field_params={})
|
119
119
|
if params.is_a? Hash
|
120
120
|
name = params[:name] || params["name"]
|
121
121
|
value = params[:value] || params["value"]
|
@@ -138,16 +138,28 @@ module HammerCLI::Output
|
|
138
138
|
[:screen]
|
139
139
|
end
|
140
140
|
|
141
|
-
def format(text)
|
141
|
+
def format(text, field_params={})
|
142
142
|
text = text.to_s.indent_with(INDENT) if @indent
|
143
143
|
"\n#{text}"
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
|
+
class BooleanFormatter < FieldFormatter
|
148
|
+
|
149
|
+
def tags
|
150
|
+
[:flat, :screen]
|
151
|
+
end
|
152
|
+
|
153
|
+
def format(value, field_params={})
|
154
|
+
!value || value == "" ? _("no") : _("yes")
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
147
158
|
HammerCLI::Output::Output.register_formatter(DateFormatter.new, :Date)
|
148
159
|
HammerCLI::Output::Output.register_formatter(ListFormatter.new, :List)
|
149
160
|
HammerCLI::Output::Output.register_formatter(KeyValueFormatter.new, :KeyValue)
|
150
161
|
HammerCLI::Output::Output.register_formatter(LongTextFormatter.new, :LongText)
|
162
|
+
HammerCLI::Output::Output.register_formatter(BooleanFormatter.new, :Boolean)
|
151
163
|
|
152
164
|
end
|
153
165
|
end
|
data/lib/hammer_cli/utils.rb
CHANGED
data/lib/hammer_cli/version.rb
CHANGED
data/locale/hammer-cli.pot
CHANGED
@@ -6,20 +6,44 @@
|
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: hammer-cli 0.0
|
9
|
+
"Project-Id-Version: hammer-cli 0.1.0\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
|
-
"POT-Creation-Date: 2014-
|
11
|
+
"POT-Creation-Date: 2014-05-09 16:07-0400\n"
|
12
12
|
"PO-Revision-Date: 2014-03-04 16:38+0000\n"
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15
|
+
"Language: \n"
|
15
16
|
"MIME-Version: 1.0\n"
|
16
17
|
"Content-Type: text/plain; charset=UTF-8\n"
|
17
18
|
"Content-Transfer-Encoding: 8bit\n"
|
18
|
-
"Language: \n"
|
19
19
|
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
20
20
|
|
21
|
-
#: lib/hammer_cli/
|
22
|
-
msgid "
|
21
|
+
#: lib/hammer_cli/validator.rb:41
|
22
|
+
msgid "Unknown option name '%s'"
|
23
|
+
msgstr ""
|
24
|
+
|
25
|
+
#: lib/hammer_cli/validator.rb:62
|
26
|
+
msgid "You can't set all options %s at one time"
|
27
|
+
msgstr ""
|
28
|
+
|
29
|
+
#: lib/hammer_cli/validator.rb:63
|
30
|
+
msgid "Options %s are required"
|
31
|
+
msgstr ""
|
32
|
+
|
33
|
+
#: lib/hammer_cli/validator.rb:79
|
34
|
+
msgid "You can't set any of options %s"
|
35
|
+
msgstr ""
|
36
|
+
|
37
|
+
#: lib/hammer_cli/validator.rb:80
|
38
|
+
msgid "At least one of options %s is required"
|
39
|
+
msgstr ""
|
40
|
+
|
41
|
+
#: lib/hammer_cli/output/formatters.rb:154
|
42
|
+
msgid "no"
|
43
|
+
msgstr ""
|
44
|
+
|
45
|
+
#: lib/hammer_cli/output/formatters.rb:154
|
46
|
+
msgid "yes"
|
23
47
|
msgstr ""
|
24
48
|
|
25
49
|
#: lib/hammer_cli/output/adapter/csv.rb:47
|
@@ -34,116 +58,118 @@ msgstr ""
|
|
34
58
|
msgid "Name"
|
35
59
|
msgstr ""
|
36
60
|
|
37
|
-
#: lib/hammer_cli/
|
38
|
-
msgid "
|
39
|
-
msgstr ""
|
40
|
-
|
41
|
-
#: lib/hammer_cli/shell.rb:22
|
42
|
-
msgid "Exit interactive shell"
|
61
|
+
#: lib/hammer_cli/exception_handler.rb:60
|
62
|
+
msgid "Error: %s"
|
43
63
|
msgstr ""
|
44
64
|
|
45
|
-
#: lib/hammer_cli/
|
46
|
-
msgid "
|
65
|
+
#: lib/hammer_cli/exception_handler.rb:66
|
66
|
+
msgid "Error: %{message}\\n\\nSee: '%{path} --help'"
|
47
67
|
msgstr ""
|
48
68
|
|
49
|
-
#: lib/hammer_cli/
|
50
|
-
msgid "
|
69
|
+
#: lib/hammer_cli/exception_handler.rb:83
|
70
|
+
msgid "Invalid username or password"
|
51
71
|
msgstr ""
|
52
72
|
|
53
|
-
#: lib/hammer_cli/
|
54
|
-
msgid "
|
73
|
+
#: lib/hammer_cli/exception_handler.rb:90
|
74
|
+
msgid ""
|
75
|
+
"Could not load API description from the server\\n - is your server down?\\n"
|
76
|
+
"\\\\n \" - was \\\"#{rake_command}\\\" run on the server when "
|
77
|
+
"using apipie cache? (typical production settings))\\n\""
|
55
78
|
msgstr ""
|
56
79
|
|
57
|
-
#: lib/hammer_cli/
|
58
|
-
msgid "
|
80
|
+
#: lib/hammer_cli/logger.rb:28
|
81
|
+
msgid "No permissions to create log dir %s"
|
59
82
|
msgstr ""
|
60
83
|
|
61
|
-
#: lib/hammer_cli/
|
62
|
-
msgid "
|
84
|
+
#: lib/hammer_cli/logger.rb:43
|
85
|
+
msgid "File %s not writeable, won't log anything to the file!"
|
63
86
|
msgstr ""
|
64
87
|
|
65
|
-
#: lib/hammer_cli/
|
66
|
-
msgid "
|
88
|
+
#: lib/hammer_cli/modules.rb:10
|
89
|
+
msgid ""
|
90
|
+
"Legacy configuration of modules detected. Check section about configuration "
|
91
|
+
"in user manual"
|
67
92
|
msgstr ""
|
68
93
|
|
69
|
-
#: lib/hammer_cli/
|
70
|
-
msgid "
|
94
|
+
#: lib/hammer_cli/modules.rb:42
|
95
|
+
msgid "Warning: An error occured while loading module %s"
|
71
96
|
msgstr ""
|
72
97
|
|
73
|
-
#: lib/hammer_cli/
|
74
|
-
msgid "
|
98
|
+
#: lib/hammer_cli/shell.rb:10
|
99
|
+
msgid "Print help for commands"
|
75
100
|
msgstr ""
|
76
101
|
|
77
|
-
#: lib/hammer_cli/
|
78
|
-
msgid "
|
102
|
+
#: lib/hammer_cli/shell.rb:22
|
103
|
+
msgid "Exit interactive shell"
|
79
104
|
msgstr ""
|
80
105
|
|
81
|
-
#: lib/hammer_cli/
|
82
|
-
msgid "
|
106
|
+
#: lib/hammer_cli/shell.rb:120
|
107
|
+
msgid "Welcome to the hammer interactive shell"
|
83
108
|
msgstr ""
|
84
109
|
|
85
|
-
#: lib/hammer_cli/
|
86
|
-
msgid "
|
110
|
+
#: lib/hammer_cli/shell.rb:121
|
111
|
+
msgid "Type 'help' for usage information"
|
87
112
|
msgstr ""
|
88
113
|
|
89
|
-
#: lib/hammer_cli/
|
90
|
-
msgid "
|
114
|
+
#: lib/hammer_cli/shell.rb:122
|
115
|
+
msgid ""
|
116
|
+
"Command completion is disabled on ruby < 1.9 due to compatibility problems."
|
91
117
|
msgstr ""
|
92
118
|
|
93
|
-
#: lib/hammer_cli/
|
94
|
-
msgid "
|
119
|
+
#: lib/hammer_cli/shell.rb:138
|
120
|
+
msgid "Interactive shell"
|
95
121
|
msgstr ""
|
96
122
|
|
97
|
-
#: lib/hammer_cli/options/option_definition.rb:
|
123
|
+
#: lib/hammer_cli/options/option_definition.rb:68
|
98
124
|
msgid "Can be specified multiple times. "
|
99
125
|
msgstr ""
|
100
126
|
|
101
|
-
#: lib/hammer_cli/options/option_definition.rb:
|
127
|
+
#: lib/hammer_cli/options/option_definition.rb:69
|
102
128
|
msgid "Default: "
|
103
129
|
msgstr ""
|
104
130
|
|
105
|
-
#: lib/hammer_cli/options/option_definition.rb:
|
131
|
+
#: lib/hammer_cli/options/option_definition.rb:69
|
106
132
|
msgid ", or "
|
107
133
|
msgstr ""
|
108
134
|
|
109
|
-
#: lib/hammer_cli/
|
110
|
-
msgid "
|
135
|
+
#: lib/hammer_cli/options/normalizers.rb:26
|
136
|
+
msgid "Comma-separated list of key=value."
|
111
137
|
msgstr ""
|
112
138
|
|
113
|
-
#: lib/hammer_cli/
|
114
|
-
msgid "
|
139
|
+
#: lib/hammer_cli/options/normalizers.rb:35
|
140
|
+
msgid "value must be defined as a comma-separated list of key=value"
|
115
141
|
msgstr ""
|
116
142
|
|
117
|
-
#: lib/hammer_cli/
|
118
|
-
msgid "
|
143
|
+
#: lib/hammer_cli/options/normalizers.rb:46
|
144
|
+
msgid "Comma separated list of values."
|
119
145
|
msgstr ""
|
120
146
|
|
121
|
-
#: lib/hammer_cli/
|
122
|
-
msgid "
|
147
|
+
#: lib/hammer_cli/options/normalizers.rb:58
|
148
|
+
msgid "One of true/false, yes/no, 1/0."
|
123
149
|
msgstr ""
|
124
150
|
|
125
|
-
#: lib/hammer_cli/
|
126
|
-
msgid "
|
151
|
+
#: lib/hammer_cli/options/normalizers.rb:68
|
152
|
+
msgid "value must be one of true/false, yes/no, 1/0"
|
127
153
|
msgstr ""
|
128
154
|
|
129
|
-
#: lib/hammer_cli/
|
130
|
-
msgid "
|
155
|
+
#: lib/hammer_cli/options/normalizers.rb:107
|
156
|
+
msgid "Unable to parse JSON input"
|
131
157
|
msgstr ""
|
132
158
|
|
133
|
-
#: lib/hammer_cli/
|
134
|
-
msgid "
|
159
|
+
#: lib/hammer_cli/options/normalizers.rb:120
|
160
|
+
msgid "One of %s"
|
135
161
|
msgstr ""
|
136
162
|
|
137
|
-
#: lib/hammer_cli/
|
138
|
-
msgid "
|
163
|
+
#: lib/hammer_cli/options/normalizers.rb:127
|
164
|
+
msgid "value must be one of '%s'"
|
139
165
|
msgstr ""
|
140
166
|
|
141
|
-
#: lib/hammer_cli/
|
142
|
-
msgid "
|
167
|
+
#: lib/hammer_cli/options/normalizers.rb:146
|
168
|
+
msgid "Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format"
|
143
169
|
msgstr ""
|
144
170
|
|
145
|
-
#: lib/hammer_cli/
|
146
|
-
msgid "
|
171
|
+
#: lib/hammer_cli/options/normalizers.rb:153
|
172
|
+
msgid "'%s' is not a valid date"
|
147
173
|
msgstr ""
|
148
174
|
|
149
175
|
#: lib/hammer_cli/main.rb:7
|
@@ -151,53 +177,51 @@ msgid "be verbose"
|
|
151
177
|
msgstr ""
|
152
178
|
|
153
179
|
#: lib/hammer_cli/main.rb:8
|
180
|
+
msgid "show debugging output "
|
181
|
+
msgstr ""
|
182
|
+
|
183
|
+
#: lib/hammer_cli/main.rb:9
|
154
184
|
msgid "path to custom config file"
|
155
185
|
msgstr ""
|
156
186
|
|
157
|
-
#: lib/hammer_cli/main.rb:
|
187
|
+
#: lib/hammer_cli/main.rb:11
|
158
188
|
msgid "username to access the remote system"
|
159
189
|
msgstr ""
|
160
190
|
|
161
|
-
#: lib/hammer_cli/main.rb:
|
191
|
+
#: lib/hammer_cli/main.rb:13
|
162
192
|
msgid "password to access the remote system"
|
163
193
|
msgstr ""
|
164
194
|
|
165
|
-
#: lib/hammer_cli/main.rb:
|
195
|
+
#: lib/hammer_cli/main.rb:16
|
166
196
|
msgid "show version"
|
167
197
|
msgstr ""
|
168
198
|
|
169
|
-
#: lib/hammer_cli/main.rb:
|
199
|
+
#: lib/hammer_cli/main.rb:25
|
170
200
|
msgid "Show ids of associated resources"
|
171
201
|
msgstr ""
|
172
202
|
|
173
|
-
#: lib/hammer_cli/main.rb:
|
203
|
+
#: lib/hammer_cli/main.rb:27
|
174
204
|
msgid "Explicitly turn interactive mode on/off"
|
175
205
|
msgstr ""
|
176
206
|
|
177
|
-
#: lib/hammer_cli/main.rb:
|
207
|
+
#: lib/hammer_cli/main.rb:31
|
178
208
|
msgid "Output as CSV (same as --output=csv)"
|
179
209
|
msgstr ""
|
180
210
|
|
181
|
-
#: lib/hammer_cli/main.rb:
|
211
|
+
#: lib/hammer_cli/main.rb:32
|
182
212
|
msgid "Set output format. One of [%s]"
|
183
213
|
msgstr ""
|
184
214
|
|
185
|
-
#: lib/hammer_cli/main.rb:
|
215
|
+
#: lib/hammer_cli/main.rb:35
|
186
216
|
msgid "Character to separate the values"
|
187
217
|
msgstr ""
|
188
218
|
|
189
|
-
#: lib/hammer_cli/main.rb:
|
219
|
+
#: lib/hammer_cli/main.rb:39
|
190
220
|
msgid "Get list of possible endings"
|
191
221
|
msgstr ""
|
192
222
|
|
193
|
-
#: lib/hammer_cli/
|
194
|
-
msgid "
|
195
|
-
|
196
|
-
|
197
|
-
#: lib/hammer_cli/exception_handler.rb:65
|
198
|
-
msgid "Error: %s\\n\\nSee: '%s --help'"
|
199
|
-
msgstr ""
|
200
|
-
|
201
|
-
#: lib/hammer_cli/exception_handler.rb:82
|
202
|
-
msgid "Invalid username or password"
|
223
|
+
#: lib/hammer_cli/settings.rb:28
|
224
|
+
msgid ""
|
225
|
+
"Warning: location hammer.modules.d is deprecated, move your module "
|
226
|
+
"configurations to cli.modules.d"
|
203
227
|
msgstr ""
|