bashly 1.2.9 → 1.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 835cd138c47f6519a1fc6ca21c5dfc4b3a9b276e8ea8d082104d7206cc1ed75e
4
- data.tar.gz: 8688035834ceb891b28cc6b22f6f9a9a215332a674e5f900e89339862e49d993
3
+ metadata.gz: 69bab1b1c954940d944ed30bbf0b30627cf02cb793bed1220006d0e232e69871
4
+ data.tar.gz: d2219c883f7f12ca243f5cd60aac8feeb1eb7659811ee3f3ae6a48ec0fd33e1d
5
5
  SHA512:
6
- metadata.gz: b01a2ece1903bafb37e2dcf8fd28797272ec99e226484e34bf8a4927aa9368cef31a6f21a89cc51b807d5ba3da53eaaf83fb0683a929a5e43de07899334e82c6
7
- data.tar.gz: 47a1aa8c24dba99340d98f3f348b1aa24b4c2907ba6ffd37968ce6b4aa54c74dca75057397d1ba58c73934e49b63aad20a3f62b3d1e228af903fe90a8ddf6f97
6
+ metadata.gz: '096d99390ec2f1e00501f86e062d22d3a4ea85b545e504afd631615bea0e09e6c802d4e40a9fb29ada02f5ec2353ce2c6d0a936259b496c02563fc78a85857f5'
7
+ data.tar.gz: f258e0a87ccf7ab2a4972bc6f784e909a9b6289d5eb00906fd58ebb21972d0e14611599716191dee3115e5c4d544758f4828328020db993105abaadb54097ba9
@@ -3,7 +3,7 @@ require 'filewatcher'
3
3
  module Bashly
4
4
  module Commands
5
5
  class Generate < Base
6
- summary "Generate the bash script and required files"
6
+ summary 'Generate the bash script and required files'
7
7
  help "This command is also aliased as 'build'"
8
8
 
9
9
  usage 'bashly generate [options]'
@@ -186,6 +186,7 @@ module Bashly
186
186
 
187
187
  assert_string "#{key}.name", value['name']
188
188
  assert_optional_string "#{key}.help", value['help']
189
+ assert_optional_string "#{key}.help_header_override", value['help_header_override']
189
190
  assert_optional_string "#{key}.footer", value['footer']
190
191
  assert_optional_string "#{key}.group", value['group']
191
192
  assert_optional_string "#{key}.filename", value['filename']
@@ -289,6 +289,20 @@ command.help:
289
289
  - name: images
290
290
  help: Manage images
291
291
 
292
+ command.help_header_override:
293
+ help: Provide an alternative bash code (or function call) that will be executed at the beginning of the help message.
294
+
295
+ url: https://bashly.dev/configuration/command/#help_header_override
296
+ example: |-
297
+ name: font-explorer
298
+ help: Font manager utility
299
+
300
+ help_header_override: |
301
+ echo '┏┓ ┏┓ ┓ '
302
+ echo '┣ ┏┓┏┓╋ ┣ ┓┏┏┓┃┏┓┏┓┏┓┏┓'
303
+ echo '┻ ┗┛┛┗┗ ┗┛┛┗┣┛┗┗┛┛ ┗ ┛ '
304
+ echo ' ┛ v1.0'
305
+
292
306
  command.name:
293
307
  help: Specify the name of the command. This option is required.
294
308
  url: https://bashly.dev/configuration/command/#name
@@ -17,7 +17,7 @@ module Bashly
17
17
  alias args catch_all commands completions
18
18
  default dependencies environment_variables examples
19
19
  extensible expose filename filters flags
20
- footer function group help name
20
+ footer function group help help_header_override name
21
21
  private variables version
22
22
  ]
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module Bashly
2
- VERSION = '1.2.9'
2
+ VERSION = '1.2.10'
3
3
  end
@@ -1,12 +1,16 @@
1
1
  = view_marker
2
2
 
3
3
  > {{ function_name }}_usage() {
4
- if summary == help
4
+ if summary == help && !help_header_override
5
5
  > printf "{{ caption_string.sanitize_for_print }}\n\n"
6
6
  else
7
7
  > if [[ -n $long_usage ]]; then
8
- > printf "{{ full_name }}\n\n"
9
- > printf "{{ help.wrap(78).indent(2).sanitize_for_print }}\n\n"
8
+ if help_header_override
9
+ = help_header_override.indent 4
10
+ else
11
+ > printf "{{ full_name }}\n\n"
12
+ > printf "{{ help.wrap(78).indent(2).sanitize_for_print }}\n\n"
13
+ end
10
14
  > else
11
15
  > printf "{{ caption_string.sanitize_for_print }}\n\n"
12
16
  > fi
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bashly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-27 00:00:00.000000000 Z
10
+ date: 2025-02-22 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: colsole
@@ -362,7 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
362
362
  - !ruby/object:Gem::Version
363
363
  version: '0'
364
364
  requirements: []
365
- rubygems_version: 3.6.2
365
+ rubygems_version: 3.6.3
366
366
  specification_version: 4
367
367
  summary: Bash Command Line Tool Generator
368
368
  test_files: []