foobara-sh-cli-connector 1.0.2 → 1.1.1
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: 58d3fd83b530ea3ba876112fee18c05fc5d84dad4399ca52403c011f21eea6d5
|
|
4
|
+
data.tar.gz: fea12f7c629467c9e41505909a1228a02af76a194793c11f5ec59dc60390769d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd0afcbcfccf171ee874a17288f9b65899a53afac838c5d702fda8e58bb6063adbf3dae19688836691b814b9ee1c4f4e491df63a9e3546e92ec8692e77f66d28
|
|
7
|
+
data.tar.gz: f0ad7b171126eef0ae5dfa5142ac3c312fbda1c2b859672cc39b4623b7b1567bc2a5c3775efe9e618fe4bc31c6ea5959be0704e5a72f513b766c407e04c36ea9
|
data/CHANGELOG.md
CHANGED
|
@@ -18,7 +18,7 @@ module Foobara
|
|
|
18
18
|
always_prefix_inputs:
|
|
19
19
|
)
|
|
20
20
|
sub_required_attributes = if is_required
|
|
21
|
-
attribute_type.declaration_data[:required]
|
|
21
|
+
attribute_type.declaration_data[:required]
|
|
22
22
|
end || []
|
|
23
23
|
|
|
24
24
|
defaults = attribute_type.declaration_data[:defaults] || {}
|
|
@@ -150,6 +150,10 @@ module Foobara
|
|
|
150
150
|
!default.nil?
|
|
151
151
|
end
|
|
152
152
|
|
|
153
|
+
def primitive?
|
|
154
|
+
attribute_type.primitive?
|
|
155
|
+
end
|
|
156
|
+
|
|
153
157
|
def description
|
|
154
158
|
desc = []
|
|
155
159
|
attributes_description = attribute_type.description
|
|
@@ -162,21 +166,24 @@ module Foobara
|
|
|
162
166
|
desc << "Required"
|
|
163
167
|
end
|
|
164
168
|
|
|
165
|
-
|
|
169
|
+
unless primitive?
|
|
170
|
+
one_of = attribute_type.declaration_data[:one_of]
|
|
166
171
|
|
|
167
|
-
|
|
168
|
-
|
|
172
|
+
if one_of && !one_of.empty?
|
|
173
|
+
desc << "One of: #{one_of.join(", ")}"
|
|
174
|
+
end
|
|
169
175
|
end
|
|
170
176
|
|
|
171
177
|
if has_default?
|
|
172
|
-
|
|
178
|
+
displayable_str = to_bash_str(default)
|
|
179
|
+
desc << "Default: #{displayable_str}"
|
|
173
180
|
end
|
|
174
181
|
|
|
175
182
|
unless desc.empty?
|
|
176
183
|
desc.map!.with_index do |d, index|
|
|
177
184
|
break if index == desc.size - 1
|
|
178
185
|
|
|
179
|
-
if d =~ /[
|
|
186
|
+
if d =~ /[.!?\]}:]$/
|
|
180
187
|
d
|
|
181
188
|
else
|
|
182
189
|
"#{d}."
|
|
@@ -186,6 +193,18 @@ module Foobara
|
|
|
186
193
|
desc.join(" ")
|
|
187
194
|
end
|
|
188
195
|
end
|
|
196
|
+
|
|
197
|
+
private
|
|
198
|
+
|
|
199
|
+
def to_bash_str(inp_str)
|
|
200
|
+
stripped_str = inp_str.to_s.strip
|
|
201
|
+
|
|
202
|
+
if stripped_str.match?(/\s/)
|
|
203
|
+
stripped_str.inspect
|
|
204
|
+
else
|
|
205
|
+
stripped_str
|
|
206
|
+
end
|
|
207
|
+
end
|
|
189
208
|
end
|
|
190
209
|
end
|
|
191
210
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foobara-sh-cli-connector
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miles Georgi
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: foobara
|
|
@@ -15,7 +15,7 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.1.1
|
|
19
19
|
- - "<"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: 2.0.0
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
requirements:
|
|
26
26
|
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: 0.
|
|
28
|
+
version: 0.1.1
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
31
|
version: 2.0.0
|
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
83
|
version: '0'
|
|
84
84
|
requirements: []
|
|
85
|
-
rubygems_version: 3.6.
|
|
85
|
+
rubygems_version: 3.6.9
|
|
86
86
|
specification_version: 4
|
|
87
87
|
summary: Command-line connector for Foobara
|
|
88
88
|
test_files: []
|