bashly 0.7.0 → 0.7.4
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 +4 -4
- data/lib/bashly/cli.rb +1 -0
- data/lib/bashly/commands/add.rb +14 -25
- data/lib/bashly/commands/generate.rb +20 -19
- data/lib/bashly/commands/validate.rb +19 -0
- data/lib/bashly/concerns/command_scopes.rb +68 -0
- data/lib/bashly/config_validator.rb +143 -0
- data/lib/bashly/extensions/string.rb +4 -0
- data/lib/bashly/libraries/base.rb +19 -0
- data/lib/bashly/libraries/completions.rb +14 -0
- data/lib/bashly/{library → libraries}/completions_function.rb +18 -6
- data/lib/bashly/libraries/completions_script.rb +29 -0
- data/lib/bashly/libraries/completions_yaml.rb +27 -0
- data/lib/bashly/libraries.yml +39 -0
- data/lib/bashly/library.rb +63 -0
- data/lib/bashly/refinements/compose_refinements.rb +45 -0
- data/lib/bashly/script/base.rb +5 -3
- data/lib/bashly/script/catch_all.rb +49 -0
- data/lib/bashly/script/command.rb +9 -111
- data/lib/bashly/version.rb +1 -1
- data/lib/bashly/views/command/catch_all_filter.erb +2 -2
- data/lib/bashly/views/command/command_filter.erb +1 -1
- data/lib/bashly/views/command/default_assignments.erb +2 -2
- data/lib/bashly/views/command/default_initialize_script.erb +6 -6
- data/lib/bashly/views/command/default_root_script.erb +1 -1
- data/lib/bashly/views/command/environment_variables_filter.erb +1 -1
- data/lib/bashly/views/command/fixed_flags_filter.erb +1 -1
- data/lib/bashly/views/command/initialize.erb +1 -1
- data/lib/bashly/views/command/parse_requirements.erb +1 -0
- data/lib/bashly/views/command/parse_requirements_case.erb +2 -2
- data/lib/bashly/views/command/parse_requirements_while.erb +2 -2
- data/lib/bashly/views/command/root_command.erb +1 -1
- data/lib/bashly/views/command/run.erb +4 -4
- data/lib/bashly/views/command/usage.erb +1 -1
- data/lib/bashly/views/command/usage_args.erb +3 -3
- data/lib/bashly/views/command/usage_commands.erb +1 -1
- data/lib/bashly/views/command/user_filter.erb +11 -0
- data/lib/bashly.rb +2 -1
- metadata +18 -16
- data/lib/bashly/library/base.rb +0 -57
- data/lib/bashly/library/colors.rb +0 -9
- data/lib/bashly/library/completions.rb +0 -28
- data/lib/bashly/library/completions_script.rb +0 -17
- data/lib/bashly/library/completions_yaml.rb +0 -15
- data/lib/bashly/library/config.rb +0 -9
- data/lib/bashly/library/sample.rb +0 -9
- data/lib/bashly/library/strings.rb +0 -12
- data/lib/bashly/library/validations.rb +0 -9
- data/lib/bashly/library/yaml.rb +0 -9
@@ -1,28 +0,0 @@
|
|
1
|
-
module Bashly
|
2
|
-
module Library
|
3
|
-
class Completions < Base
|
4
|
-
def content
|
5
|
-
{ path: target_path, content: file_content }
|
6
|
-
end
|
7
|
-
|
8
|
-
def file_content
|
9
|
-
raise NotImplementedError, "Please implement #file_content"
|
10
|
-
end
|
11
|
-
|
12
|
-
protected
|
13
|
-
|
14
|
-
def completions
|
15
|
-
@completions ||= command.completion_data
|
16
|
-
end
|
17
|
-
|
18
|
-
def config
|
19
|
-
@config ||= Bashly::Config.new "#{Settings.source_dir}/bashly.yml"
|
20
|
-
end
|
21
|
-
|
22
|
-
def command
|
23
|
-
@command ||= Script::Command.new config
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module Bashly
|
2
|
-
module Library
|
3
|
-
class CompletionsScript < Completions
|
4
|
-
def file_content
|
5
|
-
command.completion_script
|
6
|
-
end
|
7
|
-
|
8
|
-
def post_install_message
|
9
|
-
<<~EOF
|
10
|
-
In order to enable completions, run:
|
11
|
-
|
12
|
-
!txtpur!$ source #{target_path}
|
13
|
-
EOF
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Bashly
|
2
|
-
module Library
|
3
|
-
class CompletionsYAML < Completions
|
4
|
-
def file_content
|
5
|
-
completions.to_yaml
|
6
|
-
end
|
7
|
-
|
8
|
-
def post_install_message
|
9
|
-
<<~EOF
|
10
|
-
This file can be converted to a completions script using the !txtgrn!completely!txtrst! gem.
|
11
|
-
EOF
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|