bashly 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b9f48152171cac044c5f26ec11f6fcdad64d9bb5fcf3363ab23a609d24c5b3b
4
- data.tar.gz: 7ffcba2d9cc3448f0e08972086c5518dfc7d5c0b2969f5f112045b6b5f114f4f
3
+ metadata.gz: ebe193249a02f2a5d25cd5a80a3172dbbc43ea16d18653368e4687841f19846c
4
+ data.tar.gz: d38bbde76e731eaf5a0455edc8b47ef011c6c8dba40ec9a220f7747bb98b238c
5
5
  SHA512:
6
- metadata.gz: 6fe841722c54b62f72ddce5afdd8448feb30e973a034e623146981b1166be57826238eec5d5e2ac18e3d8357872b5305709110302ae13a7ce5130a0aa46d3a87
7
- data.tar.gz: 6d93748b46b22c2e42f5abcd8751e99454545da4293e7a8deeca28869be8df4eccc980d21ca4e4e2acb6b682a2b5451fddc5e339759f40bbb4202e15923cdceb
6
+ metadata.gz: d0963491e70542e96061395cbe7568d8c77014024ca53bdf2e56c93c3a2588bd5d46ea9e6952d8d0c1166772e46d47f69227c0e45e763970120a805079cd60a8
7
+ data.tar.gz: 9896cbf1635cf43f30c42452273c93bed40fbb4d126d9dcf921fdc6a9609b3db70a0a2cee5e7753e8974a182b550c3976ac8d45d968399ed870f0c27ca43d73e
data/README.md CHANGED
@@ -22,10 +22,10 @@ Create beautiful bash scripts from simple YAML configuration
22
22
  - [Prerequisites](#prerequisites)
23
23
  - [What is Bashly](#what-is-bashly)
24
24
  - [Usage](#usage)
25
- - [Using the input arguemnts in your code](#using-the-input-arguemnts-in-your-code)
25
+ - [Using the input arguments in your code](#using-the-input-arguments-in-your-code)
26
26
  - [Examples](#examples)
27
- - [Sample configuraiton for a script without commands](#sample-configuraiton-for-a-script-without-commands)
28
- - [Sample configuraiton for a script with commands](#sample-configuraiton-for-a-script-with-commands)
27
+ - [Sample configuration for a script without commands](#sample-configuration-for-a-script-without-commands)
28
+ - [Sample configuration for a script with commands](#sample-configuration-for-a-script-with-commands)
29
29
  - [Configuration Reference](#configuration-reference)
30
30
  - [Command options](#command-options)
31
31
  - [Argument options](#argument-options)
@@ -113,7 +113,7 @@ Finally, edit the files in the `src` folder. Each of your script's commands
113
113
  get their own file. Once you edit, run `bashly generate` again to merge the
114
114
  content from your functions back into the script.
115
115
 
116
- ### Using the input arguemnts in your code
116
+ ### Using the input arguments in your code
117
117
 
118
118
  In order to access the parsed arguments in any of your partial scripts, you
119
119
  may simply access the `$args` associative array.
@@ -163,13 +163,13 @@ This is detected automatically by the contents of the configuration: If it
163
163
  contains a `commands` definition, it will generate a script with commands.
164
164
 
165
165
 
166
- ### Sample configuraiton for a script without commands
166
+ ### Sample configuration for a script without commands
167
167
 
168
168
  - Generate this script by running `bashly generate --minimal`
169
169
  - [See the initial sample bashly.yml file](examples/minimal/src/bashly.yml)
170
170
  - [See the generated bash script](examples/minimal/download)
171
171
 
172
- ### Sample configuraiton for a script with commands
172
+ ### Sample configuration for a script with commands
173
173
 
174
174
  - Generate this script by running `bashly generate`
175
175
  - [See the initial sample bashly.yml file](examples/commands/src/bashly.yml)
@@ -193,7 +193,7 @@ The `bashly.yml` configuration file consists of these types:
193
193
 
194
194
  ### Command options
195
195
 
196
- Unless otherwise specified, these definitiona can be used for both the root
196
+ Unless otherwise specified, these definitions can be used for both the root
197
197
  command and subcommands (under the `commands` definition).
198
198
 
199
199
  Option | Description
@@ -202,12 +202,12 @@ command and subcommands (under the `commands` definition).
202
202
  `short` | An additional, optional pattern - usually used to denote a one letter variation of the command name. You can add `*` as a suffix, to denote a "starts with" pattern - for example `short: m*`. *Applicable only in subcommands*.
203
203
  `help` | The header text to display when using `--help`. This option can have multiple lines. In this case, the first line will be used as summary wherever appropriate.
204
204
  `version` | The string to display when using `--version`. *Applicable only in the main command*.
205
- `default` | Setting this to `true` on any command, will make unrecognized command line arguments to be passed to this command. *Applicable only in subcommands*.
205
+ `default` | Setting this to `true` on any command, will cause any unrecognized command line to be passed to this command. *Applicable only in subcommands*.
206
206
  `examples` | Specify an array of examples to show when using `--help`. Each example can have multiple lines.
207
- `environment_variables` | Specify an array of environment variables needed by your script.
208
- `commands` | Specify the array of commands. Each command will have its own args and flags. Note: if `commands` is provided, you cannot specify flags or args at the same level.
209
- `args` | Specify the array of positional arguments this script needs.
210
- `flags` | Specify the array of option flags this script needs.
207
+ `environment_variables` | Specify an array of [environment variables](#environment-variable-options) needed by your script.
208
+ `commands` | Specify the array of [commands](#command-options). Each command will have its own args and flags. Note: if `commands` is provided, you cannot specify flags or args at the same level.
209
+ `args` | Specify the array of [positional arguments](#argument-options) this script needs.
210
+ `flags` | Specify the array of option [flags](#flag-options) this script needs.
211
211
  `catch_all` | Specify that this command should allow for additional arbitrary arguments or flags. It can be set in one of three ways:<br>- Set to `true` to just enable it.<br>- Set to a string, to use this string in the usage help text.<br>- Set to a hash containing `label` and `help` keys, to show a detailed help for it when running with `--help`.
212
212
  `dependencies` | Specify an array of any required external dependencies (commands). The script execution will be halted with a friendly error unless all dependency commands exist.
213
213
  `group` | In case you have many commands, use this option to specify a caption to display before this command. This option is purely for display purposes, and needs to be specified only for the first command in each group.
@@ -274,9 +274,9 @@ set.
274
274
  If you experience any issue, have a question or a suggestion, or if you wish
275
275
  to contribute, feel free to [open an issue][issues].
276
276
 
277
+
278
+
277
279
  [issues]: https://github.com/DannyBen/bashly/issues
278
280
  [rush]: https://github.com/DannyBen/rush-cli
279
281
  [alf]: https://github.com/DannyBen/alf
280
282
  [git-changelog]: https://github.com/DannyBen/git-changelog
281
-
282
-
@@ -16,7 +16,6 @@ class String
16
16
  strip!
17
17
  split("\n").collect! do |line|
18
18
  if line.length > length
19
- line.gsub!(/([^\s]{#{length}})([^\s$])/, "\\1 \\2")
20
19
  line.gsub(/(.{1,#{length}})(\s+|$)/, "\\1\n").rstrip
21
20
  else
22
21
  line
@@ -41,6 +41,7 @@ module Bashly
41
41
  end
42
42
  end
43
43
 
44
+ # Returns a used defined help string for the catch_all directive
44
45
  def catch_all_help
45
46
  return nil unless catch_all
46
47
 
@@ -1,3 +1,3 @@
1
1
  module Bashly
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
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.4.4
4
+ version: 0.4.5
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: 2021-06-01 00:00:00.000000000 Z
11
+ date: 2021-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole