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 +4 -4
- data/README.md +14 -14
- data/lib/bashly/extensions/string.rb +0 -1
- data/lib/bashly/models/command.rb +1 -0
- data/lib/bashly/version.rb +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: ebe193249a02f2a5d25cd5a80a3172dbbc43ea16d18653368e4687841f19846c
|
4
|
+
data.tar.gz: d38bbde76e731eaf5a0455edc8b47ef011c6c8dba40ec9a220f7747bb98b238c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
25
|
+
- [Using the input arguments in your code](#using-the-input-arguments-in-your-code)
|
26
26
|
- [Examples](#examples)
|
27
|
-
- [Sample
|
28
|
-
- [Sample
|
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
|
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
|
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
|
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
|
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
|
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
|
-
|
data/lib/bashly/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colsole
|