foobara-sh-cli-connector 0.0.10 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b947cee595a654d406a661d30431063454d79f6c6af716e98be1ac6dc710884c
4
- data.tar.gz: b5738adbb22bde8105ba81a5e72672c4de819cb7db897b01e920ac51be3c9329
3
+ metadata.gz: df5c4fd103cab9693642c588edfbabbb886b72415744891b49d527777191d502
4
+ data.tar.gz: 570b3e18e965e139ef7a490c82b45a84e31f59ec5090d8b2762b57e69c94ca5e
5
5
  SHA512:
6
- metadata.gz: c8c99d022c86899d8cbdb0d026a6db3073d3ec85e9cae677a1a6ec34e1233897e7688992b6e7ab138442f8ba2670a5398771e5b3f23f726e5f1095ab226135a3
7
- data.tar.gz: ed5e06abe72c37b470ed73946411c368076d7e6dc9cdcd99e38fb49adca133ed5023a2be71414019e19839759e0ede6366a51020f6481848c3c98e98b67916fa
6
+ metadata.gz: b55e725797013e2f711776d0281724ff80fc0cb9d8aa33dfbafcf629e3541e8c9530f5ecf15a115a76aea01c67ed6b6b03157a34e7a15b9b98997c9043bccf40
7
+ data.tar.gz: 7f0ca76f1e4c4c5711aa0ee20352fd13fbbab793472444b4193df0fe3506a128f0283dc6985ce50e4276372cd82a9b6bdcee558c06b6a8521f1b4ef350eedfd9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
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
+
1
9
  ## [0.0.10] - 2024-12-09
2
10
 
3
11
  - Do not explode when serializing an empty table
@@ -144,9 +144,9 @@ module Foobara
144
144
  end
145
145
 
146
146
  def validate_parse_result!
147
- if action == "help" || action == "list"
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 = globalish_parser.parse(inputs_argv)
149
+ result = globalish_parser.parse(inputs_argv)
150
150
 
151
151
  if result.remainder.any?
152
152
  # :nocov:
@@ -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
- self.single_command_mode = single_command_mode
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
- # add_default_inputs_transformer ModelsToAttributesInputsTransformer
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.10
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: 2024-12-09 00:00:00.000000000 Z
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.2.2
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.23
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: []