bashly 1.1.1 → 1.1.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c90e3d5380ed91982c50ec46ff37c490e6b00785b80b75c60c4ddbb163902099
|
4
|
+
data.tar.gz: b1777dac4776226205c27781cf86af045deed8f25a282e0e2a1a8fd3848e0115
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24c19fb49d0cfe9a1ed96bfd0fa3d77973136ed2dfda747c11aa54244c30d2af17384f6aa4f7604c1a41562e41ffe9e5c1ad2a204a7dd85ac6e2d797c588d65b
|
7
|
+
data.tar.gz: b2020a3dcf36073049511f4484d32542a5e54037a464c9e838c7a3ffb2fb48141223ea96ecf334aeb8b4609bedaeca3491d23901d02a481c5fb621354e695936
|
@@ -8,7 +8,6 @@
|
|
8
8
|
## - Use any of the following functions to access and manipulate the values.
|
9
9
|
## - INI sections are optional (i.e., sectionless key=value pairs are allowed).
|
10
10
|
##
|
11
|
-
|
12
11
|
## Show all the key=value pairs from your config file
|
13
12
|
config_show() {
|
14
13
|
config_load
|
@@ -28,8 +27,8 @@ config_show() {
|
|
28
27
|
## theme="$(config_get interface.theme)"
|
29
28
|
##
|
30
29
|
config_get() {
|
31
|
-
local key="$1"
|
32
|
-
local default_value="$2"
|
30
|
+
local key="${1-}"
|
31
|
+
local default_value="${2-}"
|
33
32
|
|
34
33
|
config_load
|
35
34
|
echo "${ini["$key"]:-$default_value}"
|
@@ -40,7 +39,7 @@ config_get() {
|
|
40
39
|
## config_set cloud.provider aws
|
41
40
|
##
|
42
41
|
config_set() {
|
43
|
-
local key="$1"
|
42
|
+
local key="${1-}"
|
44
43
|
shift
|
45
44
|
local value="$*"
|
46
45
|
|
@@ -54,7 +53,7 @@ config_set() {
|
|
54
53
|
## config_del login.email
|
55
54
|
##
|
56
55
|
config_del() {
|
57
|
-
local key="$1"
|
56
|
+
local key="${1-}"
|
58
57
|
|
59
58
|
config_load
|
60
59
|
unset "ini[$key]"
|
@@ -93,7 +92,7 @@ config_reload() {
|
|
93
92
|
## Load an INI file (unless loaded) and populate the associative array
|
94
93
|
## NOTE: Normally there is no need to call this function, it is called as needed
|
95
94
|
config_load() {
|
96
|
-
[[ "$config_loaded" == "true" ]] && return
|
95
|
+
[[ "${config_loaded-}" == "true" ]] && return
|
97
96
|
|
98
97
|
declare -g CONFIG_FILE=${CONFIG_FILE:=config.ini}
|
99
98
|
declare -g config_loaded=true
|
data/lib/bashly/version.rb
CHANGED
@@ -12,7 +12,7 @@ if whitelisted_args.any? or whitelisted_flags.any?
|
|
12
12
|
> done
|
13
13
|
|
14
14
|
else
|
15
|
-
> if [[ -n ${args['{{ arg.name }}']} ]] && [[ ! ${args['{{ arg.name }}']} =~ ^({{ arg.allowed.join '|' }})$ ]]; then
|
15
|
+
> if [[ -n ${args['{{ arg.name }}']:-} ]] && [[ ! ${args['{{ arg.name }}']:-} =~ ^({{ arg.allowed.join '|' }})$ ]]; then
|
16
16
|
> printf "%s\n" "{{ strings[:disallowed_argument] % { name: arg.name, allowed: arg.allowed.join(', ') } }}" >&2
|
17
17
|
> exit 1
|
18
18
|
> fi
|
@@ -31,7 +31,7 @@ if whitelisted_args.any? or whitelisted_flags.any?
|
|
31
31
|
> done
|
32
32
|
|
33
33
|
else
|
34
|
-
> if [[ ${args['{{ flag.name }}']} ]] && [[ ! ${args['{{ flag.name }}']} =~ ^({{ flag.allowed.join '|' }})$ ]]; then
|
34
|
+
> if [[ ${args['{{ flag.name }}']:-} ]] && [[ ! ${args['{{ flag.name }}']:-} =~ ^({{ flag.allowed.join '|' }})$ ]]; then
|
35
35
|
> printf "%s\n" "{{ strings[:disallowed_flag] % { name: flag.name, allowed: flag.allowed.join(', ') } }}" >&2
|
36
36
|
> exit 1
|
37
37
|
> fi
|
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.1.
|
4
|
+
version: 1.1.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: 2023-
|
11
|
+
date: 2023-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colsole
|