foobara-sh-cli-connector 0.0.17 → 0.0.18

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: 59a7b3a60573d7c637f5526e2a6d028c48906c7b5a865f2d204d64a48a25cf1f
4
- data.tar.gz: dfc47f6db70767c09e9cab51c0c569d0ddc291f2d1abe3e29e5c7a4ecb7c9e11
3
+ metadata.gz: 321c16a5eb440c4866618f3692059e2214cc4542c423b1f61cb10919b41d20f2
4
+ data.tar.gz: 186278107ea0d9d418750d0c22af5ed6498d57fda383f36e5f33796bbe4992d2
5
5
  SHA512:
6
- metadata.gz: 6846e7d9362da9319f52d7c281feb802511199cdd0000aa6e7f40a161dc44fabc3a7676f66aee4e7795cccd6b29795efffaa2685db4e731d3f49777a9b1b91e6
7
- data.tar.gz: 43c0b652981b6b113f92ebaaaa5f639e2915e02cb78a6e930e3e499b5524c1aa674eae9a5d7e99a603af08fff9e70c4cae1fe7c390d22db33f643acdee7cf412
6
+ metadata.gz: c605f79f67c4f8888b2d744eabef55413a07960cd463cf801c8c0649a3b4a441f9f624cf76f12f7130993f3e73a16dff3efbecc756cd29395dcab7169d7e8e53
7
+ data.tar.gz: ad83c744c31c7b780dd894558849fdfa6821bbc57c663e83a2b485c1079870761cb9d40b1413423f7bf09e00a35a59eabcad76dfec3ee5a42736e4e739a27adf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.18] - 2025-06-16
2
+
3
+ - Support Time/Date/DateTime in CliResultSerializer
4
+
1
5
  ## [0.0.17] - 2025-05-03
2
6
 
3
7
  - Deal with recent CommandConnector interface changes
@@ -93,7 +93,7 @@ module Foobara
93
93
  end
94
94
 
95
95
  def supported_actions
96
- %w[run describe manifest help list]
96
+ ["run", "describe", "manifest", "help", "list"]
97
97
  end
98
98
 
99
99
  private
@@ -129,13 +129,13 @@ module Foobara
129
129
 
130
130
  # TODO: maybe move this up the hierarchy?
131
131
  def known_actions
132
- %w[
133
- run
134
- describe
135
- manifest
136
- ping
137
- query_git_commit_info
138
- help
132
+ [
133
+ "run",
134
+ "describe",
135
+ "manifest",
136
+ "ping",
137
+ "query_git_commit_info",
138
+ "help"
139
139
  ]
140
140
  end
141
141
 
@@ -70,7 +70,7 @@ module Foobara
70
70
  result.parsed[:verbose] = true
71
71
  end
72
72
 
73
- allowed_entity_depths = %w[aggregate atomic record-store]
73
+ allowed_entity_depths = ["aggregate", "atomic", "record-store"]
74
74
  parser.on("--entity-depth DEPTH", allowed_entity_depths, "Set the entity depth") do |depth|
75
75
  depth = "record_store" if depth == "record-store"
76
76
  result.parsed[:entity_depth] = depth
@@ -147,7 +147,7 @@ module Foobara
147
147
  end
148
148
 
149
149
  def validate_parse_result!
150
- if %w[help list].include?(action)
150
+ if ["help", "list"].include?(action)
151
151
  # This gives some leniency around where the global options are when there's no command
152
152
  result = globalish_parser.parse(inputs_argv)
153
153
 
@@ -77,7 +77,7 @@ module Foobara
77
77
  if padding
78
78
  io.write "#{padding}}"
79
79
  end
80
- when ::String, ::Symbol, ::Numeric, ::TrueClass, ::FalseClass, ::NilClass
80
+ when ::String, ::Symbol, ::Numeric, ::TrueClass, ::FalseClass, ::NilClass, ::Time
81
81
  if after_colon
82
82
  io.write " "
83
83
  else
@@ -86,9 +86,14 @@ module Foobara
86
86
 
87
87
  io.write object.inspect
88
88
  else
89
- # :nocov:
90
- raise "Unsupported type: #{object.class}"
91
- # :nocov:
89
+ if (defined?(::Date) && object.is_a?(::Date)) || (defined?(::DateTime) && object.is_a?(::DateTime))
90
+ io.write after_colon ? " " : padding
91
+ io.write object.to_s
92
+ else
93
+ # :nocov:
94
+ raise "Unsupported type: #{object.class}"
95
+ # :nocov:
96
+ end
92
97
  end
93
98
  end
94
99
  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: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: foobara
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.6.2
79
+ rubygems_version: 3.6.9
80
80
  specification_version: 4
81
81
  summary: Command-line connector for Foobara
82
82
  test_files: []