foobara-http-command-connector 0.0.9 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/src/http.rb +21 -5
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0dc77f38d21a462d9c89385aab1410ddf4b73f5b6d9f102863cff41af103ed1
4
- data.tar.gz: 2ab32d4fd1f33b3eecb98193c7f1ba934e979e3c80aebf55897cd122867752a3
3
+ metadata.gz: f79e8c2f3c9eedd1a96c4f5ff94ae2fe7be100f34d22dce4cf4e871ed1f68e8a
4
+ data.tar.gz: b3aa76ff2940a8a484c6423ca34aa0931603a636fce220166f47cccea96a8af9
5
5
  SHA512:
6
- metadata.gz: 36336bb47724c1abd4a670e905cb6565344af7d3e2565d6048e6f26a72808dd82fdefe6e89ba8342465686d4531d577c9e3c11efc2fbc582bc61c53c733355ee
7
- data.tar.gz: 95d6cf2266ee411f786a09c44d27b89bea7bbe883913e3591e5ece1dec23ace75a0deeab86b6216411d3ba6626dff0db8b91391d15203acb9186d9057ad5f172
6
+ metadata.gz: da39db3b3e5b737c3af6779537703c1b7ddbd1b83b77e9cf8efd0081ba20a655c945403ad38074f69cbc6469a06e34fbc7c999aa25d534e1802ef66eb8233d10
7
+ data.tar.gz: 9642b9765721d12939f7ec17206fd345e8400b471116f2f767fe94fbfb3fbd4222ba0a7af31f572b8ae6db4def1dccd72246c891ca6c80db9f6550fb5a4df42e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.11] - 2025-01-25
2
+
3
+ - Allow default_serializers to be changed
4
+
1
5
  ## [0.0.9] - 2025-01-07
2
6
 
3
7
  - Bump Ruby to 3.4.1
data/src/http.rb CHANGED
@@ -3,15 +3,31 @@ module Foobara
3
3
  class Http < CommandConnector
4
4
  include TruncatedInspect
5
5
 
6
+ class << self
7
+ attr_writer :default_serializers
8
+
9
+ def default_serializers
10
+ return @default_serializers if @default_serializers
11
+
12
+ if superclass.respond_to?(:default_serializers)
13
+ serializers = superclass.default_serializers
14
+
15
+ return serializers if serializers
16
+ end
17
+
18
+ @default_serializers = [
19
+ Foobara::CommandConnectors::Serializers::ErrorsSerializer,
20
+ Foobara::CommandConnectors::Serializers::AtomicSerializer,
21
+ Foobara::CommandConnectors::Serializers::JsonSerializer
22
+ ]
23
+ end
24
+ end
25
+
6
26
  attr_accessor :prefix
7
27
 
8
28
  def initialize(
9
29
  prefix: nil,
10
- default_serializers: [
11
- Foobara::CommandConnectors::Serializers::ErrorsSerializer,
12
- Foobara::CommandConnectors::Serializers::AtomicSerializer,
13
- Foobara::CommandConnectors::Serializers::JsonSerializer
14
- ],
30
+ default_serializers: self.class.default_serializers,
15
31
  **
16
32
  )
17
33
  if prefix
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-http-command-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-07 00:00:00.000000000 Z
10
+ date: 2025-01-25 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: foobara