bashly 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bashly/models/environment_variable.rb +1 -1
- data/lib/bashly/models/flag.rb +1 -1
- data/lib/bashly/templates/strings.yml +10 -0
- data/lib/bashly/version.rb +1 -1
- data/lib/bashly/views/command/usage.erb +8 -2
- data/lib/bashly/views/command/usage_commands.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51726b1606a72cbed1bd541c1ec4043e1d3ee8fd84dcea162746cb953e6684f9
|
4
|
+
data.tar.gz: 965346a4e52205af43220f893b9c30978df49f376f1067ce4a25d8a4dda3c0b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb165ce7cd9ed5a399d1792993d15e3939879e4462d23b89cb3ebad8e8964d75ab629c2ab5286b293a456a78d9daf567b2ac0235c00fc568da20cd4c201d2137
|
7
|
+
data.tar.gz: b87760cde516cb1964a90ce6017ea922198d67530c741e95c1c75e6568d9bb57653b3ed79b5613307ef188827ada05f4f4c97ba4f7e576e07d15962a126fddbb
|
data/lib/bashly/models/flag.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
# When overriding from the user folder, feel free to delete everything
|
2
|
+
# you do not plan on overriding to keep the default string.
|
3
|
+
|
1
4
|
# Usage captions
|
2
5
|
usage: "Usage:"
|
3
6
|
options: "Options:"
|
@@ -6,6 +9,13 @@ commands: "Commands:"
|
|
6
9
|
examples: "Examples:"
|
7
10
|
environment_variables: "Environment Variables:"
|
8
11
|
|
12
|
+
# Usage helpers
|
13
|
+
command_shortcut: "Shortcut: %{short}"
|
14
|
+
default_command_summary: "%{summary} (default)"
|
15
|
+
required: "(required)"
|
16
|
+
help_flag: "--help | -h"
|
17
|
+
version_flag: "--version"
|
18
|
+
|
9
19
|
# Fixed flags help text
|
10
20
|
help_flag_text: Show this help
|
11
21
|
version_flag_text: Show version number
|
data/lib/bashly/version.rb
CHANGED
@@ -14,15 +14,21 @@
|
|
14
14
|
printf "<%= caption_string %>\n"
|
15
15
|
echo
|
16
16
|
fi
|
17
|
+
|
18
|
+
<%- if short -%>
|
19
|
+
printf "<%= strings[:command_shortcut] % { short: short } %>\n"
|
20
|
+
echo
|
21
|
+
<%- end -%>
|
22
|
+
|
17
23
|
printf "<%= strings[:usage] %>\n"
|
18
24
|
printf " <%= usage_string %>\n"
|
19
25
|
<%- if commands.any? -%>
|
20
26
|
printf " <%= full_name %> [command] --help | -h\n"
|
21
27
|
<%- else -%>
|
22
|
-
printf " <%= full_name %>
|
28
|
+
printf " <%= full_name %> <%= strings[:help_flag] %>\n"
|
23
29
|
<%- end -%>
|
24
30
|
<%- if root_command? -%>
|
25
|
-
printf " <%= full_name %>
|
31
|
+
printf " <%= full_name %> <%= strings[:version_flag] %>\n"
|
26
32
|
<%- end -%>
|
27
33
|
echo
|
28
34
|
<%= render(:usage_commands).indent 2 if commands.any? %>
|
@@ -3,7 +3,7 @@ printf "<%= strings[:commands] %>\n"
|
|
3
3
|
<%- maxlen = command_names.map(&:size).max -%>
|
4
4
|
<%- commands.each do |command| -%>
|
5
5
|
<%- summary = command.summary -%>
|
6
|
-
<%- summary =
|
6
|
+
<%- summary = strings[:default_command_summary] % { summary: summary } if command.default -%>
|
7
7
|
echo " <%= command.name.ljust maxlen %> <%= summary %>"
|
8
8
|
<%- end -%>
|
9
9
|
echo
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bashly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colsole
|