foobara-sh-cli-connector 0.0.9 → 0.0.12
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/CHANGELOG.md +20 -8
- data/src/sh_cli_connector/request.rb +2 -2
- data/src/sh_cli_connector/serializers/cli_tabular_serialzier.rb +2 -0
- data/src/sh_cli_connector.rb +14 -2
- metadata +4 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df5c4fd103cab9693642c588edfbabbb886b72415744891b49d527777191d502
|
4
|
+
data.tar.gz: 570b3e18e965e139ef7a490c82b45a84e31f59ec5090d8b2762b57e69c94ca5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b55e725797013e2f711776d0281724ff80fc0cb9d8aa33dfbafcf629e3541e8c9530f5ecf15a115a76aea01c67ed6b6b03157a34e7a15b9b98997c9043bccf40
|
7
|
+
data.tar.gz: 7f0ca76f1e4c4c5711aa0ee20352fd13fbbab793472444b4193df0fe3506a128f0283dc6985ce50e4276372cd82a9b6bdcee558c06b6a8521f1b4ef350eedfd9
|
data/CHANGELOG.md
CHANGED
@@ -1,28 +1,40 @@
|
|
1
|
+
## [0.0.12] - 2025-03-06
|
2
|
+
|
3
|
+
- Allow passing a command or connect args to single_command_mode:
|
4
|
+
|
5
|
+
## [0.0.11] - 2025-01-07
|
6
|
+
|
7
|
+
- Bump Ruby to 3.4.1
|
8
|
+
|
9
|
+
## [0.0.10] - 2024-12-09
|
10
|
+
|
11
|
+
- Do not explode when serializing an empty table
|
12
|
+
|
1
13
|
## [0.0.9] - 2024-11-30
|
2
14
|
|
3
|
-
|
4
|
-
|
15
|
+
- Add descriptions to available commands
|
16
|
+
- Add support for indent: option
|
5
17
|
|
6
18
|
## [0.0.6] - 2024-10-28
|
7
19
|
|
8
|
-
|
20
|
+
- Handle CommandConnector namespace change
|
9
21
|
|
10
22
|
## [0.0.4] - 2024-10-07
|
11
23
|
|
12
|
-
|
24
|
+
- Introduce --no- options to negate boolean flags
|
13
25
|
|
14
26
|
## [0.0.3]
|
15
27
|
|
16
|
-
|
28
|
+
- Make use of single-command mode in Help command
|
17
29
|
|
18
30
|
## [0.0.2]
|
19
31
|
|
20
|
-
|
32
|
+
- Add single-command mode
|
21
33
|
|
22
34
|
## [0.0.1]
|
23
35
|
|
24
|
-
|
36
|
+
- Add Apache-2.0 license, resulting in a dual-licensed project
|
25
37
|
|
26
38
|
## [0.0.0] - 2024-01-26
|
27
39
|
|
28
|
-
|
40
|
+
- Project birth
|
@@ -144,9 +144,9 @@ module Foobara
|
|
144
144
|
end
|
145
145
|
|
146
146
|
def validate_parse_result!
|
147
|
-
if
|
147
|
+
if %w[help list].include?(action)
|
148
148
|
# This gives some leniency around where the global options are when there's no command
|
149
|
-
result
|
149
|
+
result = globalish_parser.parse(inputs_argv)
|
150
150
|
|
151
151
|
if result.remainder.any?
|
152
152
|
# :nocov:
|
data/src/sh_cli_connector.rb
CHANGED
@@ -7,10 +7,22 @@ module Foobara
|
|
7
7
|
|
8
8
|
def initialize(*, program_name: File.basename($PROGRAM_NAME), single_command_mode: false, **, &)
|
9
9
|
self.program_name = program_name
|
10
|
-
|
10
|
+
|
11
|
+
connect_args = if single_command_mode
|
12
|
+
self.single_command_mode = true
|
13
|
+
|
14
|
+
if single_command_mode.is_a?(::Array)
|
15
|
+
single_command_mode
|
16
|
+
elsif single_command_mode.is_a?(::Class) && single_command_mode < Foobara::Command
|
17
|
+
[single_command_mode]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
11
21
|
super(*, **, &)
|
12
22
|
|
13
|
-
|
23
|
+
if connect_args
|
24
|
+
connect(*connect_args)
|
25
|
+
end
|
14
26
|
end
|
15
27
|
|
16
28
|
def connect(...)
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-sh-cli-connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: foobara
|
@@ -24,7 +23,6 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '0'
|
27
|
-
description:
|
28
26
|
email:
|
29
27
|
- azimux@gmail.com
|
30
28
|
executables: []
|
@@ -64,7 +62,6 @@ metadata:
|
|
64
62
|
source_code_uri: https://github.com/foobara/sh-cli-connector
|
65
63
|
changelog_uri: https://github.com/foobara/sh-cli-connector/blob/main/CHANGELOG.md
|
66
64
|
rubygems_mfa_required: 'true'
|
67
|
-
post_install_message:
|
68
65
|
rdoc_options: []
|
69
66
|
require_paths:
|
70
67
|
- lib
|
@@ -72,15 +69,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
69
|
requirements:
|
73
70
|
- - ">="
|
74
71
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.
|
72
|
+
version: 3.4.0
|
76
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
74
|
requirements:
|
78
75
|
- - ">="
|
79
76
|
- !ruby/object:Gem::Version
|
80
77
|
version: '0'
|
81
78
|
requirements: []
|
82
|
-
rubygems_version: 3.5
|
83
|
-
signing_key:
|
79
|
+
rubygems_version: 3.6.5
|
84
80
|
specification_version: 4
|
85
81
|
summary: Command-line connector for Foobara
|
86
82
|
test_files: []
|