bashly 1.0.3 → 1.0.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/concerns/completions.rb +3 -3
- data/lib/bashly/script/command.rb +5 -0
- data/lib/bashly/settings.rb +10 -4
- data/lib/bashly/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8541b3056b57bf3b312972de9468334a8590dbf9c759a0a099de12230b164e4
|
|
4
|
+
data.tar.gz: 2ad5a9367d40f95fed80dcb5da2743469237f24e7935ba1d7530459adbc9dfc8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1bd9c8ce895b05bae99c0fa658a23816426c10d33ea965cd0186460da5de6e088f3a1c9f6acf5969ef84022db3c10321163a0740966162646b39744855c1984f
|
|
7
|
+
data.tar.gz: 12a626b4e5875110003c5a8b22ea9b289e63b0e05638ba37d25c353e73b86149e65b7e5b9e5460ae5c356c971057a2cef8d73a472f09f851533d64c665b71f2d
|
|
@@ -29,7 +29,7 @@ module Bashly
|
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
public_commands.each do |command|
|
|
33
33
|
result.merge! command.completion_data(with_version: false)
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -62,7 +62,7 @@ module Bashly
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def completion_flag_names
|
|
65
|
-
|
|
65
|
+
public_flags.map(&:name) + public_flags.map(&:short)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def completion_allowed_args
|
|
@@ -73,7 +73,7 @@ module Bashly
|
|
|
73
73
|
trivial_flags = %w[--help -h]
|
|
74
74
|
trivial_flags += %w[--version -v] if with_version
|
|
75
75
|
all = (
|
|
76
|
-
|
|
76
|
+
public_command_aliases + trivial_flags +
|
|
77
77
|
completion_flag_names + completion_allowed_args
|
|
78
78
|
)
|
|
79
79
|
|
|
@@ -223,6 +223,11 @@ module Bashly
|
|
|
223
223
|
commands.reject(&:private)
|
|
224
224
|
end
|
|
225
225
|
|
|
226
|
+
# Returns a full list of the public Command names and aliases combined
|
|
227
|
+
def public_command_aliases
|
|
228
|
+
public_commands.map(&:aliases).flatten
|
|
229
|
+
end
|
|
230
|
+
|
|
226
231
|
# Returns only environment variables that are not private
|
|
227
232
|
def public_environment_variables
|
|
228
233
|
environment_variables.reject(&:private)
|
data/lib/bashly/settings.rb
CHANGED
|
@@ -56,9 +56,9 @@ module Bashly
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
def strict_string
|
|
59
|
-
if
|
|
60
|
-
|
|
61
|
-
elsif
|
|
59
|
+
if strict.is_a? String
|
|
60
|
+
strict
|
|
61
|
+
elsif strict
|
|
62
62
|
'set -euo pipefail'
|
|
63
63
|
else
|
|
64
64
|
'set -e'
|
|
@@ -101,7 +101,13 @@ module Bashly
|
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
def user_settings_path
|
|
104
|
-
ENV['BASHLY_SETTINGS_PATH']
|
|
104
|
+
@user_settings_path ||= if ENV['BASHLY_SETTINGS_PATH']
|
|
105
|
+
ENV['BASHLY_SETTINGS_PATH']
|
|
106
|
+
elsif File.exist? 'bashly-settings.yml'
|
|
107
|
+
'bashly-settings.yml'
|
|
108
|
+
else
|
|
109
|
+
'settings.yml'
|
|
110
|
+
end
|
|
105
111
|
end
|
|
106
112
|
|
|
107
113
|
def defsult_settings
|
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: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
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: 2023-
|
|
11
|
+
date: 2023-05-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colsole
|
|
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
262
262
|
- !ruby/object:Gem::Version
|
|
263
263
|
version: '0'
|
|
264
264
|
requirements: []
|
|
265
|
-
rubygems_version: 3.
|
|
265
|
+
rubygems_version: 3.3.26
|
|
266
266
|
signing_key:
|
|
267
267
|
specification_version: 4
|
|
268
268
|
summary: Bash Command Line Tool Generator
|