bashly 1.2.0 → 1.2.2

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bashly/commands/shell.rb +1 -1
  3. data/lib/bashly/concerns/completions.rb +3 -3
  4. data/lib/bashly/config_validator.rb +4 -0
  5. data/lib/bashly/docs/env.yml +10 -0
  6. data/lib/bashly/docs/flag.yml +23 -0
  7. data/lib/bashly/extensions/array.rb +6 -0
  8. data/lib/bashly/libraries/render/mandoc/mandoc.gtx +7 -4
  9. data/lib/bashly/libraries/render/markdown/markdown.gtx +7 -3
  10. data/lib/bashly/libraries/settings/settings.yml +5 -0
  11. data/lib/bashly/libraries/strings/strings.yml +4 -0
  12. data/lib/bashly/script/command.rb +9 -208
  13. data/lib/bashly/script/environment_variable.rb +5 -1
  14. data/lib/bashly/script/flag.rb +5 -2
  15. data/lib/bashly/script/introspection/arguments.rb +41 -0
  16. data/lib/bashly/script/introspection/commands.rb +111 -0
  17. data/lib/bashly/script/introspection/dependencies.rb +16 -0
  18. data/lib/bashly/script/introspection/environment_variables.rb +47 -0
  19. data/lib/bashly/script/introspection/examples.rb +14 -0
  20. data/lib/bashly/script/introspection/flags.rb +58 -0
  21. data/lib/bashly/script/introspection/visibility.rb +19 -0
  22. data/lib/bashly/settings.rb +5 -0
  23. data/lib/bashly/version.rb +1 -1
  24. data/lib/bashly/views/argument/usage.gtx +3 -3
  25. data/lib/bashly/views/argument/validations.gtx +1 -0
  26. data/lib/bashly/views/command/command_filter.gtx +3 -1
  27. data/lib/bashly/views/command/environment_variables_filter.gtx +6 -0
  28. data/lib/bashly/views/command/long_usage.gtx +8 -4
  29. data/lib/bashly/views/command/needy_flags_filter.gtx +9 -0
  30. data/lib/bashly/views/command/normalize_input_function.gtx +5 -1
  31. data/lib/bashly/views/command/parse_requirements.gtx +1 -0
  32. data/lib/bashly/views/command/usage_commands.gtx +10 -3
  33. data/lib/bashly/views/command/usage_environment_variables.gtx +20 -4
  34. data/lib/bashly/views/command/usage_flags.gtx +10 -2
  35. data/lib/bashly/views/command/whitelist_filter.gtx +2 -0
  36. data/lib/bashly/views/environment_variable/usage.gtx +2 -2
  37. data/lib/bashly/views/environment_variable/validations.gtx +9 -0
  38. data/lib/bashly/views/flag/needs.gtx +22 -0
  39. data/lib/bashly/views/flag/usage.gtx +11 -3
  40. data/lib/bashly/views/flag/validations.gtx +1 -0
  41. data/lib/bashly.rb +27 -40
  42. metadata +27 -3
@@ -0,0 +1,111 @@
1
+ module Bashly
2
+ module Script
3
+ module Introspection
4
+ module Commands
5
+ # Returns a full list of the Command names and aliases combined
6
+ def command_aliases
7
+ commands.map(&:aliases).flatten
8
+ end
9
+
10
+ # Returns a data structure for displaying subcommands help
11
+ def command_help_data
12
+ result = {}
13
+
14
+ commands.each do |command|
15
+ result[command.group_string] ||= {}
16
+ result[command.group_string][command.name] = {
17
+ summary: command.summary_string,
18
+ visibility: command.visibility,
19
+ }
20
+ next unless command.expose
21
+
22
+ command.commands.each do |subcommand|
23
+ result[command.group_string]["#{command.name} #{subcommand.name}"] = {
24
+ summary: subcommand.summary_string,
25
+ visibility: subcommand.visibility,
26
+ help_only: command.expose != 'always',
27
+ }
28
+ end
29
+ end
30
+
31
+ result
32
+ end
33
+
34
+ # Returns only the names of the Commands
35
+ def command_names
36
+ commands.map(&:name)
37
+ end
38
+
39
+ # Returns an array of the Commands
40
+ def commands
41
+ return [] unless options['commands']
42
+
43
+ options['commands'].map do |options|
44
+ result = Command.new options
45
+ result.parents = parents + [name]
46
+ result.parent_command = self
47
+ result
48
+ end
49
+ end
50
+
51
+ # Returns a flat array containing all the commands in this tree.
52
+ # This includes children + grandchildren (recursive), and may include self
53
+ def deep_commands(include_self: false)
54
+ result = []
55
+ result << self if include_self
56
+ commands.each do |command|
57
+ result << command
58
+ if command.commands.any?
59
+ result += command.deep_commands
60
+ end
61
+ end
62
+ result
63
+ end
64
+
65
+ # If any of this command's subcommands has the default option set to
66
+ # true, this default command will be returned, nil otherwise.
67
+ def default_command
68
+ commands.find(&:default)
69
+ end
70
+
71
+ # Returns subcommands by group
72
+ def grouped_commands
73
+ result = {}
74
+
75
+ visible_commands.each do |command|
76
+ result[command.group_string] ||= []
77
+ result[command.group_string] << command
78
+ next unless command.expose
79
+
80
+ command.visible_commands.each do |subcommand|
81
+ result[command.group_string] << subcommand
82
+ end
83
+ end
84
+
85
+ result
86
+ end
87
+
88
+ # Returns only commands that are not private
89
+ def public_commands
90
+ commands.reject(&:private)
91
+ end
92
+
93
+ # Returns a full list of the public Command names and aliases combined
94
+ def public_command_aliases
95
+ public_commands.map(&:aliases).flatten
96
+ end
97
+
98
+ # Returns only public commands, or both public and private commands
99
+ # if Settings.private_reveal_key is set
100
+ def visible_commands
101
+ Settings.private_reveal_key ? commands : public_commands
102
+ end
103
+
104
+ # Returns a full list of the visible Command names and aliases combined
105
+ def visible_command_aliases
106
+ visible_commands.map(&:aliases).flatten
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,16 @@
1
+ module Bashly
2
+ module Script
3
+ module Introspection
4
+ module Dependencies
5
+ # Returns an array of Dependency objects
6
+ def dependencies
7
+ return [] unless options['dependencies']
8
+
9
+ @dependencies ||= options['dependencies'].map do |key, value|
10
+ Dependency.from_config key, value
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,47 @@
1
+ module Bashly
2
+ module Script
3
+ module Introspection
4
+ module EnvironmentVariables
5
+ # Returns an array of all the Environment Variables with default values
6
+ def default_environment_variables
7
+ environment_variables.select(&:default)
8
+ end
9
+
10
+ # Returns an array of EnvironmentVariable objects
11
+ def environment_variables
12
+ return [] unless options['environment_variables']
13
+
14
+ options['environment_variables'].map do |options|
15
+ EnvironmentVariable.new options
16
+ end
17
+ end
18
+
19
+ # Returns only environment variables that are not private
20
+ def public_environment_variables
21
+ environment_variables.reject(&:private)
22
+ end
23
+
24
+ # Returns an array of all the required EnvironmentVariables
25
+ def required_environment_variables
26
+ environment_variables.select(&:required)
27
+ end
28
+
29
+ # Returns an array of all the environment_variables with a validation
30
+ def validated_environment_variables
31
+ environment_variables.select(&:validate)
32
+ end
33
+
34
+ # Returns only public environment variables, or both public and private
35
+ # environment variables if Settings.private_reveal_key is set
36
+ def visible_environment_variables
37
+ Settings.private_reveal_key ? environment_variables : public_environment_variables
38
+ end
39
+
40
+ # Returns an array of all the environment_variables with a whitelist arg
41
+ def whitelisted_environment_variables
42
+ environment_variables.select(&:allowed)
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,14 @@
1
+ module Bashly
2
+ module Script
3
+ module Introspection
4
+ module Examples
5
+ # Returns an array of examples
6
+ def examples
7
+ return nil unless options['examples']
8
+
9
+ options['examples'].is_a?(Array) ? options['examples'] : [options['examples']]
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,58 @@
1
+ module Bashly
2
+ module Script
3
+ module Introspection
4
+ module Flags
5
+ # Returns an array of all the default Flags
6
+ def default_flags
7
+ flags.select(&:default)
8
+ end
9
+
10
+ # Returns an array of Flags
11
+ def flags
12
+ return [] unless options['flags']
13
+
14
+ options['flags'].map do |options|
15
+ Flag.new options
16
+ end
17
+ end
18
+
19
+ # Returns true if this command's flags should be considered as gloal
20
+ # flags, and cascade to subcommands
21
+ def global_flags?
22
+ flags.any? and commands.any?
23
+ end
24
+
25
+ # Returns an array of all fpags that need other flags
26
+ def needy_flags
27
+ flags.select(&:needs)
28
+ end
29
+
30
+ # Returns only flags that are not private
31
+ def public_flags
32
+ flags.reject(&:private)
33
+ end
34
+
35
+ # Returns an array of all the required Flags
36
+ def required_flags
37
+ flags.select(&:required)
38
+ end
39
+
40
+ # Returns true if one of the flags matches the provided short code
41
+ def short_flag_exist?(flag)
42
+ flags.any? { |f| f.short == flag }
43
+ end
44
+
45
+ # Returns only public flags, or both public and private flags if
46
+ # Settings.private_reveal_key is set
47
+ def visible_flags
48
+ Settings.private_reveal_key ? flags : public_flags
49
+ end
50
+
51
+ # Returns an array of all the flags with a whitelist arg
52
+ def whitelisted_flags
53
+ flags.select(&:allowed)
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,19 @@
1
+ module Bashly
2
+ module Script
3
+ module Introspection
4
+ module Visibility
5
+ # Returns :public, :private, or :semi_private based on the `private`
6
+ # option of the host, in conjunction with `Settings.private_reveal_key`.
7
+ def visibility
8
+ if !options['private']
9
+ :public
10
+ elsif Settings.private_reveal_key
11
+ :semi_private
12
+ else
13
+ :private
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -10,6 +10,7 @@ module Bashly
10
10
  :config_path,
11
11
  :lib_dir,
12
12
  :partials_extension,
13
+ :private_reveal_key,
13
14
  :show_examples_on_error,
14
15
  :source_dir,
15
16
  :strict,
@@ -54,6 +55,10 @@ module Bashly
54
55
  @partials_extension ||= get :partials_extension
55
56
  end
56
57
 
58
+ def private_reveal_key
59
+ @private_reveal_key ||= get :private_reveal_key
60
+ end
61
+
57
62
  def production?
58
63
  env == :production
59
64
  end
@@ -1,3 +1,3 @@
1
1
  module Bashly
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.2'
3
3
  end
@@ -4,14 +4,14 @@
4
4
  > printf "{{ help.wrap(76).indent(4).sanitize_for_print }}\n"
5
5
 
6
6
  if allowed
7
- > printf " {{ strings[:allowed] % { values: allowed.join(', ') } }}\n"
7
+ > printf " %s\n" "{{ strings[:allowed] % { values: allowed.join(', ') } }}"
8
8
  end
9
9
 
10
10
  if default
11
11
  if default.is_a? Array
12
- > printf " {{ strings[:default] % { value: default.join(', ') } }}\n"
12
+ > printf " %s\n" "{{ strings[:default] % { value: default.join(', ') } }}"
13
13
  else
14
- > printf " {{ strings[:default] % { value: default } }}\n"
14
+ > printf " %s\n" "{{ strings[:default] % { value: default } }}"
15
15
  end
16
16
  end
17
17
 
@@ -3,6 +3,7 @@ if validate
3
3
 
4
4
  if repeatable
5
5
  > if [[ -v args['{{ name }}'] ]]; then
6
+ > values=''
6
7
  > eval "values=(${args['{{ name }}']})"
7
8
  > for value in "${values[@]}"; do
8
9
  > if [[ -n $(validate_{{ validate }} "$value") ]]; then
@@ -4,7 +4,9 @@ if commands.any?
4
4
  > action=${1:-}
5
5
  >
6
6
  > case $action in
7
- > -*) ;;
7
+ unless default_command
8
+ > -*) ;;
9
+ end
8
10
  >
9
11
 
10
12
  commands.each do |command|
@@ -24,3 +24,9 @@ if whitelisted_environment_variables.any?
24
24
  > fi
25
25
  end
26
26
  end
27
+
28
+ if validated_environment_variables.any?
29
+ validated_environment_variables.each do |env_var|
30
+ = env_var.render(:validations)
31
+ end
32
+ end
@@ -1,13 +1,17 @@
1
1
  = view_marker
2
2
 
3
- > if [[ -n $long_usage ]]; then
4
- options_caption = public_commands.any? && public_flags.any? ? strings[:global_options] : strings[:options]
3
+ > if [[ -n "$long_usage" ]]; then
4
+ options_caption = strings[:options]
5
+ if commands.any? && (public_flags.any? || (flags.any? && Settings.private_reveal_key))
6
+ options_caption = strings[:global_options]
7
+ end
8
+
5
9
  > printf "%s\n" "{{ options_caption.color(:caption) }}"
6
10
  >
7
- = render(:usage_flags).indent 2 if public_flags.any?
11
+ = render(:usage_flags).indent 2 if flags.any?
8
12
  = render(:usage_fixed_flags).indent 2
9
13
  = render(:usage_args).indent 2 if args.any? or catch_all.help
10
- = render(:usage_environment_variables).indent 2 if public_environment_variables.any?
14
+ = render(:usage_environment_variables).indent 2 if environment_variables.any?
11
15
  = render(:usage_examples).indent 2 if examples
12
16
  = render(:footer).indent 2 if footer
13
17
  >
@@ -0,0 +1,9 @@
1
+ if needy_flags.any?
2
+ = view_marker
3
+
4
+ needy_flags.each do |flag|
5
+ = flag.render(:needs)
6
+ end
7
+
8
+ >
9
+ end
@@ -1,7 +1,11 @@
1
1
  = view_marker
2
2
 
3
3
  > normalize_input() {
4
- > local arg flags passthru
4
+ if Settings.compact_short_flags
5
+ > local arg passthru flags
6
+ else
7
+ > local arg passthru
8
+ end
5
9
  > passthru=false
6
10
  >
7
11
  > while [[ $# -gt 0 ]]; do
@@ -13,6 +13,7 @@ end
13
13
  = render(:parse_requirements_while).indent 2
14
14
  = render(:required_args_filter).indent 2
15
15
  = render(:required_flags_filter).indent 2
16
+ = render(:needy_flags_filter).indent 2
16
17
  = render(:catch_all_filter).indent 2
17
18
  = render(:default_assignments).indent 2
18
19
  = render(:validations).indent 2
@@ -6,11 +6,18 @@ command_help_data.each do |group, commands|
6
6
  > printf "%s\n" "{{ group.color(:caption) }}"
7
7
 
8
8
  commands.each do |command, info|
9
+ next if info[:visibility] == :private
10
+
11
+ line = %Q[printf " %s #{info[:summary].sanitize_for_print}\\n" "#{command.ljust(maxlen).color(:command)}"]
9
12
  if info[:help_only]
10
- > [[ -n $long_usage ]] && printf " %s {{ info[:summary].sanitize_for_print }}\n" "{{ command.ljust(maxlen).color(:command) }}"
11
- else
12
- > printf " %s {{ info[:summary].sanitize_for_print }}\n" "{{ command.ljust(maxlen).color(:command) }}"
13
+ line = %Q[[[ -n "$long_usage" ]] && #{line}]
14
+ end
15
+
16
+ if info[:visibility] == :semi_private
17
+ line = %Q[[[ -n "${#{Settings.private_reveal_key}:-}" ]] && #{line}]
13
18
  end
19
+
20
+ = line
14
21
  end
15
22
 
16
23
  > echo
@@ -1,10 +1,26 @@
1
1
  = view_marker
2
2
 
3
- > printf "%s\n" "{{ strings[:environment_variables].color(:caption) }}"
4
- >
3
+ caption = %Q[printf "%s\\n" "#{strings[:environment_variables].color(:caption)}"]
4
+ if public_environment_variables.any?
5
+ = caption
6
+ >
7
+ elsif environment_variables.any? && Settings.private_reveal_key
8
+ > if [[ -n "${{{ Settings.private_reveal_key }}:-}" ]]; then
9
+ = caption.indent(2)
10
+ > fi
11
+ >
12
+ end
13
+
14
+ environment_variables.each do |env_var|
15
+ next if env_var.visibility == :private
5
16
 
6
- public_environment_variables.each do |env_var|
7
- = env_var.render :usage
17
+ if env_var.visibility == :semi_private
18
+ > if [[ -n "${{{ Settings.private_reveal_key }}:-}" ]]; then
19
+ = env_var.render(:usage).indent(2)
20
+ > fi
21
+ else
22
+ = env_var.render :usage
23
+ end
8
24
  end
9
25
 
10
26
  >
@@ -1,7 +1,15 @@
1
1
  = view_marker
2
2
 
3
- public_flags.each do |flag|
4
- = flag.render :usage
3
+ flags.each do |flag|
4
+ next if flag.visibility == :private
5
+
6
+ if flag.visibility == :semi_private
7
+ > if [[ -n "${{{ Settings.private_reveal_key }}:-}" ]]; then
8
+ = flag.render(:usage).indent(2)
9
+ > fi
10
+ else
11
+ = flag.render :usage
12
+ end
5
13
  end
6
14
 
7
15
  >
@@ -3,6 +3,7 @@ if whitelisted_args.any? or whitelisted_flags.any?
3
3
 
4
4
  whitelisted_args.each do |arg|
5
5
  if arg.repeatable
6
+ > input_array=''
6
7
  > eval "input_array=(${args[{{ arg.name }}]})"
7
8
  > for i in "${input_array[@]}"; do
8
9
  > if [[ ! $i =~ ^({{ arg.allowed.join '|' }})$ ]]; then
@@ -22,6 +23,7 @@ if whitelisted_args.any? or whitelisted_flags.any?
22
23
 
23
24
  whitelisted_flags.each do |flag|
24
25
  if flag.repeatable
26
+ > input_array=''
25
27
  > eval "input_array=(${args[{{ flag.name }}]})"
26
28
  > for i in "${input_array[@]}"; do
27
29
  > if [[ ! $i =~ ^({{ flag.allowed.join '|' }})$ ]]; then
@@ -4,11 +4,11 @@
4
4
  > printf "{{ help.wrap(76).indent(4).sanitize_for_print }}\n"
5
5
 
6
6
  if allowed
7
- > printf " {{ strings[:allowed] % { values: allowed.join(', ') } }}\n"
7
+ > printf " %s\n" "{{ strings[:allowed] % { values: allowed.join(', ') } }}"
8
8
  end
9
9
 
10
10
  if default
11
- > printf " {{ strings[:default] % { value: default } }}\n"
11
+ > printf " %s\n" "{{ strings[:default] % { value: default } }}"
12
12
  end
13
13
 
14
14
  > echo
@@ -0,0 +1,9 @@
1
+ if validate
2
+ = view_marker
3
+
4
+ > if [[ -v {{ name.upcase }} && -n $(validate_{{ validate }} "${{ name.upcase }}") ]]; then
5
+ > printf "{{ strings[:environment_variable_validation_error] }}\n" "{{ usage_string }}" "$(validate_{{ validate }} "${{ name.upcase }}")" >&2
6
+ > exit 1
7
+ > fi
8
+ >
9
+ end
@@ -0,0 +1,22 @@
1
+ if needs
2
+
3
+ = view_marker
4
+
5
+ if needs.count == 1
6
+ > if [[ -n ${args['{{ name }}']+x} ]] && [[ -z "${args[{{ needs.first }}]:-}" ]]; then
7
+ > printf "%s\n" "{{ strings[:flag_needs_another] % { name: name, need: needs.first } }}" >&2
8
+ > exit 1
9
+ > fi
10
+ >
11
+ else
12
+ > if [[ -n ${args['{{ name }}']+x} ]]; then
13
+ > for need in {{ needs.join ' ' }}; do
14
+ > if [[ -z "${args[$need]:-}" ]]; then
15
+ > printf "%s\n" "{{ strings[:flag_needs_another] % { name: name, need: "$need" } }}" >&2
16
+ > exit 1
17
+ > fi
18
+ > done
19
+ > fi
20
+ >
21
+ end
22
+ end
@@ -4,16 +4,24 @@
4
4
  > printf "{{ help.wrap(76).indent(4).sanitize_for_print }}\n"
5
5
 
6
6
  if allowed
7
- > printf " {{ strings[:allowed] % { values: allowed.join(', ') } }}\n"
7
+ > printf " %s\n" "{{ strings[:allowed] % { values: allowed.join(', ') } }}"
8
8
  end
9
9
 
10
10
  if default
11
11
  if default.is_a? Array
12
- > printf " {{ strings[:default] % { value: default.join(', ') } }}\n"
12
+ > printf " %s\n" "{{ strings[:default] % { value: default.join(', ') } }}"
13
13
  else
14
- > printf " {{ strings[:default] % { value: default } }}\n"
14
+ > printf " %s\n" "{{ strings[:default] % { value: default } }}"
15
15
  end
16
16
  end
17
17
 
18
+ if needs
19
+ > printf " %s\n" "{{ strings[:needs] % { values: needs.join(', ') } }}"
20
+ end
21
+
22
+ if conflicts
23
+ > printf " %s\n" "{{ strings[:conflicts] % { values: conflicts.join(', ') } }}"
24
+ end
25
+
18
26
  > echo
19
27
  >
@@ -3,6 +3,7 @@ if validate
3
3
 
4
4
  if repeatable
5
5
  > if [[ -v args['{{ long }}'] ]]; then
6
+ > values=''
6
7
  > eval "values=(${args['{{ long }}']})"
7
8
  > for value in "${values[@]}"; do
8
9
  > if [[ -n $(validate_{{ validate }} "$value") ]]; then
data/lib/bashly.rb CHANGED
@@ -3,53 +3,40 @@ if ENV['DEBUGGER']
3
3
  require 'lp'
4
4
  end
5
5
 
6
- require 'bashly/extensions/array'
7
- require 'bashly/extensions/file'
8
- require 'bashly/extensions/string'
9
- require 'bashly/extensions/yaml'
10
- require 'bashly/exceptions'
6
+ require 'requires'
7
+ requires 'bashly/extensions'
8
+ requires 'bashly/exceptions'
11
9
 
12
10
  module Bashly
13
- autoload :CLI, 'bashly/cli'
14
- autoload :Config, 'bashly/config'
15
- autoload :ConfigValidator, 'bashly/config_validator'
16
- autoload :Library, 'bashly/library'
17
- autoload :LibrarySource, 'bashly/library_source'
18
- autoload :LibrarySourceConfig, 'bashly/library_source_config'
19
- autoload :MessageStrings, 'bashly/message_strings'
20
- autoload :RenderContext, 'bashly/render_context'
21
- autoload :RenderSource, 'bashly/render_source'
22
- autoload :VERSION, 'bashly/version'
23
-
24
- autoload :AssetHelper, 'bashly/concerns/asset_helper'
25
- autoload :Completions, 'bashly/concerns/completions'
26
- autoload :ComposeRefinements, 'bashly/refinements/compose_refinements'
27
- autoload :Renderable, 'bashly/concerns/renderable'
28
- autoload :Settings, 'bashly/settings'
29
- autoload :ValidationHelpers, 'bashly/concerns/validation_helpers'
11
+ autoloads 'bashly/refinements', %i[ComposeRefinements]
12
+
13
+ autoloads 'bashly', %i[
14
+ CLI Config ConfigValidator Library LibrarySource LibrarySourceConfig
15
+ MessageStrings RenderContext RenderSource Settings VERSION
16
+ ]
17
+
18
+ autoloads 'bashly/concerns', %i[
19
+ AssetHelper Completions Renderable ValidationHelpers
20
+ ]
30
21
 
31
22
  module Script
32
- autoload :Argument, 'bashly/script/argument'
33
- autoload :Base, 'bashly/script/base'
34
- autoload :CatchAll, 'bashly/script/catch_all'
35
- autoload :Command, 'bashly/script/command'
36
- autoload :Dependency, 'bashly/script/dependency'
37
- autoload :EnvironmentVariable, 'bashly/script/environment_variable'
38
- autoload :Flag, 'bashly/script/flag'
39
- autoload :Wrapper, 'bashly/script/wrapper'
23
+ autoloads 'bashly/script', %i[
24
+ Argument Base CatchAll Command Dependency EnvironmentVariable Flag
25
+ Wrapper
26
+ ]
27
+
28
+ module Introspection
29
+ autoloads 'bashly/script/introspection', %i[
30
+ Arguments Commands Dependencies EnvironmentVariables Examples Flags
31
+ Visibility
32
+ ]
33
+ end
40
34
  end
41
35
 
42
36
  module Commands
43
- autoload :Add, 'bashly/commands/add'
44
- autoload :Base, 'bashly/commands/base'
45
- autoload :Completions, 'bashly/commands/completions'
46
- autoload :Doc, 'bashly/commands/doc'
47
- autoload :Generate, 'bashly/commands/generate'
48
- autoload :Init, 'bashly/commands/init'
49
- autoload :Preview, 'bashly/commands/preview'
50
- autoload :Render, 'bashly/commands/render'
51
- autoload :Shell, 'bashly/commands/shell'
52
- autoload :Validate, 'bashly/commands/validate'
37
+ autoloads 'bashly/commands', %i[
38
+ Add Base Completions Doc Generate Init Preview Render Shell Validate
39
+ ]
53
40
  end
54
41
 
55
42
  module Libraries