nub 0.0.27 → 0.0.28
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/lib/nub/commander.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 016841fd882525bfb3325351d440b2e55a0657a596fba9678a322521292779e7
|
4
|
+
data.tar.gz: 78bcbe33e95f0abb4adf322845e31adf796f8a75ae30d2c4b31ca74f0d58c826
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30a79b7d0b62241bdc8895abefb65c25f64cc2d7785b1184d1167e6d79c509747d2737cb143c77aa5954831f4b05de0be8e94c51e5903f05f65e026cbaeb00d1
|
7
|
+
data.tar.gz: e6410024d881ff21d1d3cce45464e9f33819484da7189228988e0b8da8792cf41fb9ebd49b8a82ac29043c16ff33b318c8c499a33fec2187d5ee3a318d297d06
|
data/lib/nub/commander.rb
CHANGED
@@ -157,7 +157,8 @@ class Commander
|
|
157
157
|
# @returns [String] the app's help string
|
158
158
|
def help
|
159
159
|
help = "#{banner}\n"
|
160
|
-
|
160
|
+
newline = (!@examples.nil? && !@examples.empty? && @examples[-1] != "\n") ? "\n" : ""
|
161
|
+
help += "Examples:\n#{@examples}\n#{newline}" if !@examples.nil? && !@examples.empty?
|
161
162
|
help += "Usage: ./#{@app} [commands] [options]\n"
|
162
163
|
help += " #{'-h|--help'.ljust(@just)}Print command/options help: Flag\n"
|
163
164
|
help += "COMMANDS:\n"
|