bashly 0.6.8 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -2
  3. data/lib/bashly/cli.rb +1 -0
  4. data/lib/bashly/commands/add.rb +35 -82
  5. data/lib/bashly/commands/generate.rb +49 -8
  6. data/lib/bashly/commands/init.rb +1 -1
  7. data/lib/bashly/commands/preview.rb +2 -2
  8. data/lib/bashly/commands/validate.rb +19 -0
  9. data/lib/bashly/concerns/asset_helper.rb +4 -0
  10. data/lib/bashly/concerns/command_scopes.rb +68 -0
  11. data/lib/bashly/concerns/completions.rb +5 -1
  12. data/lib/bashly/config_validator.rb +135 -0
  13. data/lib/bashly/extensions/file.rb +13 -0
  14. data/lib/bashly/extensions/string.rb +5 -1
  15. data/lib/bashly/libraries/base.rb +19 -0
  16. data/lib/bashly/libraries/completions.rb +14 -0
  17. data/lib/bashly/libraries/completions_function.rb +38 -0
  18. data/lib/bashly/libraries/completions_script.rb +29 -0
  19. data/lib/bashly/libraries/completions_yaml.rb +27 -0
  20. data/lib/bashly/libraries.yml +39 -0
  21. data/lib/bashly/library.rb +63 -0
  22. data/lib/bashly/refinements/compose_refinements.rb +45 -0
  23. data/lib/bashly/{models → script}/argument.rb +1 -1
  24. data/lib/bashly/{models → script}/base.rb +4 -2
  25. data/lib/bashly/script/catch_all.rb +49 -0
  26. data/lib/bashly/{models → script}/command.rb +9 -111
  27. data/lib/bashly/{models → script}/environment_variable.rb +1 -1
  28. data/lib/bashly/{models → script}/flag.rb +1 -1
  29. data/lib/bashly/{models/script.rb → script/wrapper.rb} +2 -2
  30. data/lib/bashly/templates/lib/colors.sh +41 -31
  31. data/lib/bashly/templates/lib/config.sh +34 -35
  32. data/lib/bashly/templates/lib/sample_function.sh +10 -10
  33. data/lib/bashly/templates/lib/validations/validate_dir_exists.sh +4 -0
  34. data/lib/bashly/templates/lib/validations/validate_file_exists.sh +4 -0
  35. data/lib/bashly/templates/lib/validations/validate_integer.sh +4 -0
  36. data/lib/bashly/templates/lib/validations/validate_not_empty.sh +4 -0
  37. data/lib/bashly/templates/lib/yaml.sh +12 -15
  38. data/lib/bashly/templates/strings.yml +1 -0
  39. data/lib/bashly/version.rb +1 -1
  40. data/lib/bashly/views/argument/validations.erb +8 -0
  41. data/lib/bashly/views/command/catch_all_filter.erb +2 -2
  42. data/lib/bashly/views/command/command_filter.erb +1 -1
  43. data/lib/bashly/views/command/default_assignments.erb +2 -2
  44. data/lib/bashly/views/command/default_initialize_script.erb +6 -6
  45. data/lib/bashly/views/command/environment_variables_filter.erb +1 -1
  46. data/lib/bashly/views/command/fixed_flags_filter.erb +1 -1
  47. data/lib/bashly/views/command/initialize.erb +1 -1
  48. data/lib/bashly/views/command/parse_requirements.erb +1 -1
  49. data/lib/bashly/views/command/parse_requirements_case.erb +4 -3
  50. data/lib/bashly/views/command/parse_requirements_while.erb +2 -2
  51. data/lib/bashly/views/command/required_args_filter.erb +1 -5
  52. data/lib/bashly/views/command/required_flags_filter.erb +1 -4
  53. data/lib/bashly/views/command/run.erb +4 -4
  54. data/lib/bashly/views/command/usage.erb +1 -1
  55. data/lib/bashly/views/command/usage_args.erb +3 -3
  56. data/lib/bashly/views/command/usage_commands.erb +1 -1
  57. data/lib/bashly/views/flag/case.erb +2 -1
  58. data/lib/bashly/views/flag/validations.erb +8 -0
  59. data/lib/bashly/views/{script → wrapper}/bash3_bouncer.erb +0 -0
  60. data/lib/bashly/views/{script → wrapper}/header.erb +0 -0
  61. data/lib/bashly/views/{script → wrapper}/wrapper.erb +0 -0
  62. data/lib/bashly.rb +3 -1
  63. metadata +33 -14
@@ -1,24 +1,23 @@
1
- # ---
2
- # Config functions
3
- # This file is a part of Bashly standard library
4
- #
5
- # Usage:
6
- # - In your script, set the CONFIG_FILE variable. For rxample:
7
- # CONFIG_FILE=settings.ini.
8
- # If it is unset, it will default to 'config.ini'.
9
- # - Use any of the functions below to access the config file.
10
- # ---
11
-
12
- # Create a new config file.
13
- # There is normally no need to use this function, it is used by other
14
- # functions as needed.
1
+ ## Config functions [@bashly-upgrade config]
2
+ ## This file is a part of Bashly standard library
3
+ ##
4
+ ## Usage:
5
+ ## - In your script, set the CONFIG_FILE variable. For rxample:
6
+ ## CONFIG_FILE=settings.ini.
7
+ ## If it is unset, it will default to 'config.ini'.
8
+ ## - Use any of the functions below to access the config file.
9
+ ##
10
+ ## Create a new config file.
11
+ ## There is normally no need to use this function, it is used by other
12
+ ## functions as needed.
13
+ ##
15
14
  config_init() {
16
15
  CONFIG_FILE=${CONFIG_FILE:=config.ini}
17
16
  [[ -f "$CONFIG_FILE" ]] || touch "$CONFIG_FILE"
18
17
  }
19
18
 
20
- # Get a value from the config.
21
- # Usage: result=$(config_get hello)
19
+ ## Get a value from the config.
20
+ ## Usage: result=$(config_get hello)
22
21
  config_get() {
23
22
  local key=$1
24
23
  local regex="^$key *= *(.+)$"
@@ -36,8 +35,8 @@ config_get() {
36
35
  echo "$value"
37
36
  }
38
37
 
39
- # Add or update a key=value pair in the config.
40
- # Usage: config_set key value
38
+ ## Add or update a key=value pair in the config.
39
+ ## Usage: config_set key value
41
40
  config_set() {
42
41
  local key=$1
43
42
  shift
@@ -68,8 +67,8 @@ config_set() {
68
67
  printf "%b\n" "$output" > "$CONFIG_FILE"
69
68
  }
70
69
 
71
- # Delete a key from the config.
72
- # Usage: config_del key
70
+ ## Delete a key from the config.
71
+ ## Usage: config_del key
73
72
  config_del() {
74
73
  local key=$1
75
74
 
@@ -87,19 +86,19 @@ config_del() {
87
86
  printf "%b\n" "$output" > "$CONFIG_FILE"
88
87
  }
89
88
 
90
- # Show the config file
89
+ ## Show the config file
91
90
  config_show() {
92
91
  config_init
93
92
  cat "$CONFIG_FILE"
94
93
  }
95
94
 
96
- # Return an array of the keys in the config file.
97
- # Usage:
98
- #
99
- # for k in $(config_keys); do
100
- # echo "- $k = $(config_get "$k")";
101
- # done
102
- #
95
+ ## Return an array of the keys in the config file.
96
+ ## Usage:
97
+ ##
98
+ ## for k in $(config_keys); do
99
+ ## echo "- $k = $(config_get "$k")";
100
+ ## done
101
+ ##
103
102
  config_keys() {
104
103
  local regex="^([a-zA-Z0-9_\-\/\.]+) *="
105
104
 
@@ -117,13 +116,13 @@ config_keys() {
117
116
  echo "${keys[@]}"
118
117
  }
119
118
 
120
- # Returns true if the specified key exists in the config file.
121
- # Usage:
122
- #
123
- # if config_has_key "key" ; then
124
- # echo "key exists"
125
- # fi
126
- #
119
+ ## Returns true if the specified key exists in the config file.
120
+ ## Usage:
121
+ ##
122
+ ## if config_has_key "key" ; then
123
+ ## echo "key exists"
124
+ ## fi
125
+ ##
127
126
  config_has_key() {
128
127
  [[ $(config_get "$1") ]]
129
128
  }
@@ -1,13 +1,13 @@
1
- # Add any function here that is needed in more than one parts of your
2
- # application, or that you otherwise wish to extract from the main function
3
- # scripts.
4
- #
5
- # Note that code here should be wrapped inside bash functions, and it is
6
- # recommended to have a separate file for each function.
7
- #
8
- # Subdirectories will also be scanned for *.sh, so you have no reason not
9
- # to organize your code neatly.
10
- #
1
+ ## Add any function here that is needed in more than one parts of your
2
+ ## application, or that you otherwise wish to extract from the main function
3
+ ## scripts.
4
+ ##
5
+ ## Note that code here should be wrapped inside bash functions, and it is
6
+ ## recommended to have a separate file for each function.
7
+ ##
8
+ ## Subdirectories will also be scanned for *.sh, so you have no reason not
9
+ ## to organize your code neatly.
10
+ ##
11
11
  sample_function() {
12
12
  echo "it works"
13
13
  }
@@ -0,0 +1,4 @@
1
+ ## [@bashly-upgrade validations]
2
+ validate_dir_exists() {
3
+ [[ -d "$1" ]] || echo "must be an existing directory"
4
+ }
@@ -0,0 +1,4 @@
1
+ ## [@bashly-upgrade validations]
2
+ validate_file_exists() {
3
+ [[ -f "$1" ]] || echo "must be an existing file"
4
+ }
@@ -0,0 +1,4 @@
1
+ ## [@bashly-upgrade validations]
2
+ validate_integer() {
3
+ [[ "$1" =~ ^[0-9]+$ ]] || echo "must be an integer"
4
+ }
@@ -0,0 +1,4 @@
1
+ ## [@bashly-upgrade validations]
2
+ validate_not_empty() {
3
+ [[ -z "$1" ]] && echo "must not be empty"
4
+ }
@@ -1,18 +1,15 @@
1
- # ---
2
- # YAML parser
3
- # This file is a part of Bashly standard library
4
- # Does not support arrays, only hashes
5
- #
6
- # Source: https://stackoverflow.com/a/21189044/413924
7
- #
8
- # Usage:
9
- #
10
- # yaml_load "settings.yml" # print variables
11
- # yaml_load "settings.yml" "config_" # use prefix
12
- # eval $(yaml_load "settings.yml") # create variables in scope
13
- #
14
- # ---
15
-
1
+ ## YAML parser [@bashly-upgrade yaml]
2
+ ## This file is a part of Bashly standard library
3
+ ## Does not support arrays, only hashes
4
+ ##
5
+ ## Source: https://stackoverflow.com/a/21189044/413924
6
+ ##
7
+ ## Usage:
8
+ ##
9
+ ## yaml_load "settings.yml" # print variables
10
+ ## yaml_load "settings.yml" "config_" # use prefix
11
+ ## eval $(yaml_load "settings.yml") # create variables in scope
12
+ ##
16
13
  yaml_load() {
17
14
  local prefix=$2
18
15
  local s='[[:space:]]*' w='[a-zA-Z0-9_]*'
@@ -32,3 +32,4 @@ missing_dependency: "missing dependency: %{dependency}"
32
32
  disallowed_flag: "%{name} must be one of: %{allowed}"
33
33
  disallowed_argument: "%{name} must be one of: %{allowed}"
34
34
  unsupported_bash_version: "bash version 4 or higher is required"
35
+ validation_error: "validation error in %s:\\n%s"
@@ -1,3 +1,3 @@
1
1
  module Bashly
2
- VERSION = "0.6.8"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -0,0 +1,8 @@
1
+ # :argument.validations
2
+ % if validate
3
+ if [[ -n $(validate_<%= validate %> "$1") ]]; then
4
+ printf "<%= strings[:validation_error] %>\n" "<%= name.upcase %>" "$(validate_<%= validate %> "$1")"
5
+ exit 1
6
+ fi
7
+
8
+ % end
@@ -1,7 +1,7 @@
1
1
  # :command.catch_all_filter
2
- % if catch_all_required?
2
+ % if catch_all.required?
3
3
  if [[ ${#other_args[@]} -eq 0 ]]; then
4
- printf "<%= strings[:missing_required_argument] % { arg: catch_all_label, usage: usage_string } %>\n"
4
+ printf "<%= strings[:missing_required_argument] % { arg: catch_all.label, usage: usage_string } %>\n"
5
5
  exit 1
6
6
  fi
7
7
  % end
@@ -1,6 +1,6 @@
1
1
  # :command.command_filter
2
2
  % if commands.any?
3
- action=$1
3
+ action=${1:-}
4
4
 
5
5
  case $action in
6
6
  -* )
@@ -1,7 +1,7 @@
1
1
  # :command.default_assignments
2
2
  % default_args.each do |arg|
3
- [[ -n ${args[<%= arg.name %>]} ]] || args[<%= arg.name %>]="<%= arg.default %>"
3
+ [[ -n ${args[<%= arg.name %>]:-} ]] || args[<%= arg.name %>]="<%= arg.default %>"
4
4
  % end
5
5
  % default_flags.each do |flag|
6
- [[ -n ${args[<%= flag.long %>]} ]] || args[<%= flag.long %>]="<%= flag.default %>"
6
+ [[ -n ${args[<%= flag.long %>]:-} ]] || args[<%= flag.long %>]="<%= flag.default %>"
7
7
  % end
@@ -1,6 +1,6 @@
1
- # Code here runs inside the initialize() function
2
- # Use it for anything that you need to run before any other function, like
3
- # setting environment vairables:
4
- # CONFIG_FILE=settings.ini
5
- #
6
- # Feel free to empty (but not delete) this file.
1
+ ## Code here runs inside the initialize() function
2
+ ## Use it for anything that you need to run before any other function, like
3
+ ## setting environment vairables:
4
+ ## CONFIG_FILE=settings.ini
5
+ ##
6
+ ## Feel free to empty (but not delete) this file.
@@ -6,7 +6,7 @@ export <%= env_var.name.upcase %>="${<%= env_var.name.upcase %>:-<%= env_var.def
6
6
  % end
7
7
  % if required_environment_variables.any?
8
8
  % required_environment_variables.each do |env_var|
9
- if [[ -z "$<%= env_var.name.upcase %>" ]]; then
9
+ if [[ -z "${<%= env_var.name.upcase %>:-}" ]]; then
10
10
  printf "<%= strings[:missing_required_environment_variable] % { var: env_var.name.upcase } %>\n"
11
11
  exit 1
12
12
  fi
@@ -1,5 +1,5 @@
1
1
  # :command.fixed_flag_filter
2
- case "$1" in
2
+ case "${1:-}" in
3
3
  % if short_flag_exist? "-v"
4
4
  --version )
5
5
  % else
@@ -2,7 +2,7 @@
2
2
  initialize() {
3
3
  version="<%= version %>"
4
4
  long_usage=''
5
- set -e
5
+ <%= ENV['BASHLY_STRICT'] ? "set -euo pipefail" : "set -e" %>
6
6
 
7
7
  <%= load_user_file("initialize.sh", placeholder: false).indent 2 %>
8
8
  }
@@ -8,9 +8,9 @@ parse_requirements() {
8
8
  <%= render(:environment_variables_filter).indent 2 %>
9
9
  <%= render(:dependencies_filter).indent 2 %>
10
10
  <%= render(:command_filter).indent 2 %>
11
+ <%= render(:parse_requirements_while).indent 2 %>
11
12
  <%= render(:required_args_filter).indent 2 %>
12
13
  <%= render(:required_flags_filter).indent 2 %>
13
- <%= render(:parse_requirements_while).indent 2 %>
14
14
  <%= render(:catch_all_filter).indent 2 %>
15
15
  <%= render(:default_assignments).indent 2 %>
16
16
  <%= render(:whitelist_filter).indent 2 %>
@@ -2,13 +2,14 @@
2
2
  % if args.any?
3
3
  % condition = "if"
4
4
  % args.each do |arg|
5
- <%= condition %> [[ ! ${args[<%= arg.name %>]} ]]; then
5
+ <%= condition %> [[ -z ${args[<%= arg.name %>]+x} ]]; then
6
+ <%= arg.render(:validations).indent 2 %>
6
7
  args[<%= arg.name %>]=$1
7
8
  shift
8
9
  % condition = "elif"
9
10
  % end
10
11
  else
11
- % if catch_all
12
+ % if catch_all.enabled?
12
13
  other_args+=("$1")
13
14
  shift
14
15
  % else
@@ -16,7 +17,7 @@ else
16
17
  exit 1
17
18
  % end
18
19
  fi
19
- % elsif catch_all
20
+ % elsif catch_all.enabled?
20
21
  other_args+=("$1")
21
22
  shift
22
23
  % else
@@ -7,8 +7,8 @@ while [[ $# -gt 0 ]]; do
7
7
 
8
8
  % end
9
9
 
10
- -* )
11
- % if catch_all
10
+ -?* )
11
+ % if catch_all.enabled?
12
12
  other_args+=("$1")
13
13
  shift
14
14
  ;;
@@ -1,11 +1,7 @@
1
1
  # :command.required_args_filter
2
2
  % required_args.each do |arg|
3
- if [[ $1 && $1 != -* ]]; then
4
- args[<%= arg.name %>]=$1
5
- shift
6
- else
3
+ if [[ -z ${args[<%= arg.name %>]+x} ]]; then
7
4
  printf "<%= strings[:missing_required_argument] % { arg: arg.name.upcase, usage: usage_string } %>\n"
8
5
  exit 1
9
6
  fi
10
-
11
7
  % end
@@ -1,9 +1,6 @@
1
1
  # :command.required_flags_filter
2
- % if required_flags.any?
3
- argstring="$*"
4
- % end
5
2
  % required_flags.each do |flag|
6
- if [[ <%= flag.aliases.map { |a| %Q["$argstring" != *#{a}*] }.join " && " %> ]]; then
3
+ if [[ -z ${args[<%= flag.long %>]+x} ]]; then
7
4
  printf "<%= strings[:missing_required_flag] % { usage: flag.usage_string } %>\n"
8
5
  exit 1
9
6
  fi
@@ -1,15 +1,15 @@
1
1
  # :command.run
2
2
  run() {
3
- declare -A args
4
- declare -a other_args
5
- declare -a input
3
+ declare -A args=()
4
+ declare -a other_args=()
5
+ declare -a input=()
6
6
  normalize_input "$@"
7
7
  parse_requirements "${input[@]}"
8
8
 
9
9
  <%- condition = "if" -%>
10
10
  <%- deep_commands.each do |command| -%>
11
11
  <%= condition %> [[ $action == "<%= command.action_name %>" ]]; then
12
- if [[ ${args[--help]} ]]; then
12
+ if [[ ${args[--help]:-} ]]; then
13
13
  long_usage=yes
14
14
  <%= command.function_name %>_usage
15
15
  else
@@ -37,7 +37,7 @@
37
37
  printf "<%= strings[:options] %>\n"
38
38
  <%= render(:usage_fixed_flags).indent 4 %>
39
39
  <%= render(:usage_flags).indent 4 if flags.any? %>
40
- <%= render(:usage_args).indent 4 if args.any? or catch_all_help %>
40
+ <%= render(:usage_args).indent 4 if args.any? or catch_all.help %>
41
41
  <%= render(:usage_environment_variables).indent 4 if environment_variables.any? %>
42
42
  <%= render(:usage_examples).indent 4 if examples %>
43
43
  <%= render(:footer).indent 4 if footer %>
@@ -6,9 +6,9 @@ printf "<%= strings[:arguments] %>\n"
6
6
  <%= arg.render(:usage) %>
7
7
  % end
8
8
  % end
9
- % if catch_all_help
9
+ % if catch_all.help
10
10
 
11
- echo " <%= catch_all_label %>"
12
- printf "<%= catch_all_help.wrap(76).indent(4).sanitize_for_print %>\n"
11
+ echo " <%= catch_all.label %>"
12
+ printf "<%= catch_all.help.wrap(76).indent(4).sanitize_for_print %>\n"
13
13
  echo
14
14
  % end
@@ -3,7 +3,7 @@
3
3
  printf "<%= strings[:commands] %>\n"
4
4
  % end
5
5
  % maxlen = command_names.map(&:size).max
6
- % commands.each do |command|
6
+ % commands.reject(&:private).each do |command|
7
7
  % summary = command.summary
8
8
  % summary = strings[:default_command_summary] % { summary: summary } if command.default
9
9
  % if command.group
@@ -1,7 +1,8 @@
1
1
  # :flag.case
2
2
  <%= aliases.join " | " %> )
3
3
  % if arg
4
- if [[ $2 ]]; then
4
+ if [[ -n ${2+x} ]]; then
5
+ <%= render(:validations).indent 4 %>
5
6
  args[<%= name %>]="$2"
6
7
  shift
7
8
  shift
@@ -0,0 +1,8 @@
1
+ # :flag.validations
2
+ % if validate
3
+ if [[ -n $(validate_<%= validate %> "$2") ]]; then
4
+ printf "<%= strings[:validation_error] %>\n" "<%= usage_string %>" "$(validate_<%= validate %> "$2")"
5
+ exit 1
6
+ fi
7
+
8
+ % end
File without changes
File without changes
data/lib/bashly.rb CHANGED
@@ -9,6 +9,8 @@ requires 'bashly/concerns'
9
9
 
10
10
  requires 'bashly/settings'
11
11
  requires 'bashly/exceptions'
12
- requires 'bashly/models/base'
12
+ requires 'bashly/refinements'
13
+ requires 'bashly/script/base'
13
14
  requires 'bashly/commands/base'
15
+ requires 'bashly/libraries/base'
14
16
  requires 'bashly'
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.6.8
4
+ version: 0.7.2
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-10-12 00:00:00.000000000 Z
11
+ date: 2022-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.2'
33
+ version: '0.3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.2'
40
+ version: '0.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mister_bin
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -82,30 +82,48 @@ files:
82
82
  - lib/bashly/commands/generate.rb
83
83
  - lib/bashly/commands/init.rb
84
84
  - lib/bashly/commands/preview.rb
85
+ - lib/bashly/commands/validate.rb
85
86
  - lib/bashly/concerns/asset_helper.rb
87
+ - lib/bashly/concerns/command_scopes.rb
86
88
  - lib/bashly/concerns/completions.rb
87
89
  - lib/bashly/concerns/renderable.rb
88
90
  - lib/bashly/config.rb
91
+ - lib/bashly/config_validator.rb
89
92
  - lib/bashly/exceptions.rb
90
93
  - lib/bashly/extensions/array.rb
94
+ - lib/bashly/extensions/file.rb
91
95
  - lib/bashly/extensions/string.rb
96
+ - lib/bashly/libraries.yml
97
+ - lib/bashly/libraries/base.rb
98
+ - lib/bashly/libraries/completions.rb
99
+ - lib/bashly/libraries/completions_function.rb
100
+ - lib/bashly/libraries/completions_script.rb
101
+ - lib/bashly/libraries/completions_yaml.rb
102
+ - lib/bashly/library.rb
92
103
  - lib/bashly/message_strings.rb
93
- - lib/bashly/models/argument.rb
94
- - lib/bashly/models/base.rb
95
- - lib/bashly/models/command.rb
96
- - lib/bashly/models/environment_variable.rb
97
- - lib/bashly/models/flag.rb
98
- - lib/bashly/models/script.rb
104
+ - lib/bashly/refinements/compose_refinements.rb
105
+ - lib/bashly/script/argument.rb
106
+ - lib/bashly/script/base.rb
107
+ - lib/bashly/script/catch_all.rb
108
+ - lib/bashly/script/command.rb
109
+ - lib/bashly/script/environment_variable.rb
110
+ - lib/bashly/script/flag.rb
111
+ - lib/bashly/script/wrapper.rb
99
112
  - lib/bashly/settings.rb
100
113
  - lib/bashly/templates/bashly.yml
101
114
  - lib/bashly/templates/lib/colors.sh
102
115
  - lib/bashly/templates/lib/config.sh
103
116
  - lib/bashly/templates/lib/sample_function.sh
117
+ - lib/bashly/templates/lib/validations/validate_dir_exists.sh
118
+ - lib/bashly/templates/lib/validations/validate_file_exists.sh
119
+ - lib/bashly/templates/lib/validations/validate_integer.sh
120
+ - lib/bashly/templates/lib/validations/validate_not_empty.sh
104
121
  - lib/bashly/templates/lib/yaml.sh
105
122
  - lib/bashly/templates/minimal.yml
106
123
  - lib/bashly/templates/strings.yml
107
124
  - lib/bashly/version.rb
108
125
  - lib/bashly/views/argument/usage.erb
126
+ - lib/bashly/views/argument/validations.erb
109
127
  - lib/bashly/views/command/catch_all_filter.erb
110
128
  - lib/bashly/views/command/command_fallback.erb
111
129
  - lib/bashly/views/command/command_filter.erb
@@ -143,9 +161,10 @@ files:
143
161
  - lib/bashly/views/environment_variable/usage.erb
144
162
  - lib/bashly/views/flag/case.erb
145
163
  - lib/bashly/views/flag/usage.erb
146
- - lib/bashly/views/script/bash3_bouncer.erb
147
- - lib/bashly/views/script/header.erb
148
- - lib/bashly/views/script/wrapper.erb
164
+ - lib/bashly/views/flag/validations.erb
165
+ - lib/bashly/views/wrapper/bash3_bouncer.erb
166
+ - lib/bashly/views/wrapper/header.erb
167
+ - lib/bashly/views/wrapper/wrapper.erb
149
168
  homepage: https://github.com/dannyben/bashly
150
169
  licenses:
151
170
  - MIT
@@ -169,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
188
  - !ruby/object:Gem::Version
170
189
  version: '0'
171
190
  requirements: []
172
- rubygems_version: 3.2.25
191
+ rubygems_version: 3.2.15
173
192
  signing_key:
174
193
  specification_version: 4
175
194
  summary: Bash Command Line Tool Generator