foobara-http-command-connector 0.0.10 → 0.0.12

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 +5 -1
  3. data/src/http.rb +22 -7
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5f34089ed75dae01a8094235bf86d14fa5af5945e259d73a6868020e70279fd
4
- data.tar.gz: 31198004409b08f4339c0231d81daf340153e7c8d511a65550a3487e47ac4cc8
3
+ metadata.gz: db47cd08eb17139eefdbd42c51140e13fa61ec56fd3f04f911daba08a6a621ac
4
+ data.tar.gz: fda1c0ef72f7764ce9e19b8f9d1c4b6e137ee67022de6dac9850bbbc7480dcd8
5
5
  SHA512:
6
- metadata.gz: 9a67ce105559b09a8789198107590d6912383c3d790fdd5d0a96fe80eeee4c277738f79d8e8bab4d28a6f8359164bd1820ac1444523b051347efc496eeeba047
7
- data.tar.gz: c243677ab7140b04d4d00ad2e287fde8ebfe8641c524f0882e438bdfedd2464736ba8b8e9b8da10074b25e1e3f9e1dcb43a57518e793ba9d9baa44961bc51642
6
+ metadata.gz: 698f426b09ac42066a84744d8a1f1767fb51bbbd76e9a5680e060be7851e457c87ea767b2c1b753030885214902c494d87e79434bbc20d145e999ddad63d4c4c
7
+ data.tar.gz: 1e38ecb70aa10ce89ccc345530bbe5b95e19949d0c5838f0af8f3a68b6e379b0721e6ce380cf7e74df50c14f3a46e0c596901b07d54988b10cb83c91faba72bf
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## [0.0.10] - 2025-01-25
1
+ ## [0.0.12] - 2025-01-28
2
+
3
+ - Fix potential issue with default serializer inheritance/overriding
4
+
5
+ ## [0.0.11] - 2025-01-25
2
6
 
3
7
  - Allow default_serializers to be changed
4
8
 
data/src/http.rb CHANGED
@@ -4,14 +4,29 @@ module Foobara
4
4
  include TruncatedInspect
5
5
 
6
6
  class << self
7
- attr_accessor :default_serializers
8
- end
7
+ attr_writer :default_serializers
8
+
9
+ def default_serializers
10
+ return @default_serializers if @default_serializers
11
+
12
+ superklass = superclass
13
+ serializers = nil
14
+
15
+ while superklass.respond_to?(:default_serializers)
16
+ serializers = superclass.instance_variable_get(:@default_serializers)
17
+
18
+ return serializers if serializers
9
19
 
10
- self.default_serializers = [
11
- Foobara::CommandConnectors::Serializers::ErrorsSerializer,
12
- Foobara::CommandConnectors::Serializers::AtomicSerializer,
13
- Foobara::CommandConnectors::Serializers::JsonSerializer
14
- ]
20
+ superklass = superklass.superclass
21
+ end
22
+
23
+ @default_serializers = [
24
+ Foobara::CommandConnectors::Serializers::ErrorsSerializer,
25
+ Foobara::CommandConnectors::Serializers::AtomicSerializer,
26
+ Foobara::CommandConnectors::Serializers::JsonSerializer
27
+ ]
28
+ end
29
+ end
15
30
 
16
31
  attr_accessor :prefix
17
32
 
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.10
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-25 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: foobara