bashly 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bashly/commands/validate.rb +7 -1
- data/lib/bashly/config_validator.rb +5 -0
- data/lib/bashly/script/command.rb +2 -2
- data/lib/bashly/version.rb +1 -1
- metadata +23 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df22bc90e5ea6fa9878280dfdafbd39614e11ca6c8d6db1cda17b838518033e8
|
4
|
+
data.tar.gz: 5633f2f1c7f06a9c3adf75db634cf0b045be7d743bfd6829bc3fa4ab9843ea71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a726b52ecddba1503a2246192f95426b49c89e1c2c890052920e61248249266a5f4c74beb4e21e204c703568a835cfcc7a35e704c8c4a7036e35ffb83f3d2657
|
7
|
+
data.tar.gz: 498b8fd4f7865eacd2078b150e1338110ab5f6e16b28a92ff82efa62466d0f5dd1c1cc3346e5ab3f80517e6c88b50546c1d109ceeda8331c9451148e0f27e27d
|
@@ -3,12 +3,18 @@ module Bashly
|
|
3
3
|
class Validate < Base
|
4
4
|
help "Scan the configuration file for errors"
|
5
5
|
|
6
|
-
usage "bashly validate"
|
6
|
+
usage "bashly validate [--verbose]"
|
7
7
|
usage "bashly validate (-h|--help)"
|
8
8
|
|
9
|
+
option "-v --verbose", "Show the bashly configuration file prior to validating. This is useful when using split config (import) since it will show the final compiled configuration."
|
10
|
+
|
9
11
|
environment "BASHLY_SOURCE_DIR", "The path containing the bashly configuration and source files [default: src]"
|
10
12
|
|
11
13
|
def run
|
14
|
+
if args['--verbose']
|
15
|
+
lp config
|
16
|
+
puts "---"
|
17
|
+
end
|
12
18
|
validate_config
|
13
19
|
show_deprecations
|
14
20
|
deprecations = config_validator.deprecations
|
@@ -119,6 +119,7 @@ module Bashly
|
|
119
119
|
assert_optional_string "#{key}.footer", value['footer']
|
120
120
|
assert_optional_string "#{key}.group", value['group']
|
121
121
|
assert_optional_string "#{key}.filename", value['filename']
|
122
|
+
assert_optional_string "#{key}.function", value['function']
|
122
123
|
|
123
124
|
assert_boolean "#{key}.private", value['private']
|
124
125
|
assert_boolean "#{key}.default", value['default']
|
@@ -142,6 +143,10 @@ module Bashly
|
|
142
143
|
assert_uniq "#{key}.flags", value['flags'], 'short'
|
143
144
|
assert_uniq "#{key}.args", value['args'], 'name'
|
144
145
|
|
146
|
+
if value['function']
|
147
|
+
assert value['function'].match(/^[a-z0-9_]+$/), "#{key}.function must contain lowercase alphanumeric characters and underscores only"
|
148
|
+
end
|
149
|
+
|
145
150
|
if value['default']
|
146
151
|
assert value['args'], "#{key}.default makes no sense without args"
|
147
152
|
end
|
@@ -9,7 +9,7 @@ module Bashly
|
|
9
9
|
alias args catch_all commands completions
|
10
10
|
default dependencies environment_variables examples
|
11
11
|
extensible expose filename filters flags
|
12
|
-
footer group help name
|
12
|
+
footer function group help name
|
13
13
|
private version
|
14
14
|
short
|
15
15
|
]
|
@@ -168,7 +168,7 @@ module Bashly
|
|
168
168
|
|
169
169
|
# Returns a unique name, suitable to be used in a bash function
|
170
170
|
def function_name
|
171
|
-
full_name.to_underscore
|
171
|
+
options['function'] || full_name.to_underscore
|
172
172
|
end
|
173
173
|
|
174
174
|
# Returns the name of the command, including its parent name (in case
|
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: 0.8.
|
4
|
+
version: 0.8.9
|
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: 2022-10-
|
11
|
+
date: 2022-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: completely
|
@@ -53,21 +53,21 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.7'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: filewatcher
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
61
|
+
version: '2.0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
68
|
+
version: '2.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: lp
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
@@ -81,19 +81,33 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.2'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: mister_bin
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0.7'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0.7'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: requires
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.2'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.2'
|
97
111
|
description: Generate bash command line tools using YAML configuration
|
98
112
|
email: db@dannyben.com
|
99
113
|
executables:
|