Skip to content

Commit 0dbedc9

Browse files
committed
Allow default_serializers to be overridden
1 parent cbad5f9 commit 0dbedc9

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.0.10] - 2025-01-25
2+
3+
- Allow default_serializers to be changed
4+
15
## [0.0.9] - 2025-01-07
26

37
- Bump Ruby to 3.4.1

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
foobara-http-command-connector (0.0.9)
4+
foobara-http-command-connector (0.0.10)
55
foobara
66

77
GEM
@@ -54,7 +54,7 @@ GEM
5454
foobara-type-generator
5555
foobara-typescript-react-command-form-generator
5656
foobara-typescript-remote-command-generator
57-
foobara (0.0.47)
57+
foobara (0.0.50)
5858
bigdecimal
5959
foobara-util
6060
foobara-autocrud-generator (0.0.1)
@@ -145,7 +145,7 @@ GEM
145145
listen (3.9.0)
146146
rb-fsevent (~> 0.10, >= 0.10.3)
147147
rb-inotify (~> 0.9, >= 0.9.10)
148-
logger (1.6.4)
148+
logger (1.6.5)
149149
lumberjack (1.2.10)
150150
method_source (1.1.0)
151151
nenv (0.3.0)
@@ -154,7 +154,7 @@ GEM
154154
shellany (~> 0.0)
155155
ostruct (0.6.1)
156156
parallel (1.26.3)
157-
parser (3.3.6.0)
157+
parser (3.3.7.0)
158158
ast (~> 2.4.1)
159159
racc
160160
pry (0.14.2)
@@ -188,7 +188,7 @@ GEM
188188
diff-lcs (>= 1.2.0, < 2.0)
189189
rspec-support (~> 3.13.0)
190190
rspec-support (3.13.2)
191-
rubocop (1.69.2)
191+
rubocop (1.71.0)
192192
json (~> 2.3)
193193
language_server-protocol (>= 3.17.0)
194194
parallel (~> 1.10)
@@ -202,7 +202,7 @@ GEM
202202
parser (>= 3.3.1.0)
203203
rubocop-rake (0.6.0)
204204
rubocop (~> 1.0)
205-
rubocop-rspec (3.3.0)
205+
rubocop-rspec (3.4.0)
206206
rubocop (~> 1.61)
207207
ruby-prof (1.7.1)
208208
ruby-progressbar (1.13.0)
@@ -214,7 +214,7 @@ GEM
214214
simplecov-html (0.13.1)
215215
simplecov_json_formatter (0.1.4)
216216
thor (1.3.2)
217-
unicode-display_width (3.1.3)
217+
unicode-display_width (3.1.4)
218218
unicode-emoji (~> 4.0, >= 4.0.4)
219219
unicode-emoji (4.0.4)
220220
vcr (6.3.1)

boot/start.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "bundler/setup"
44

5-
if ENV["FOOBARA_ENV"] == "development" || ENV["FOOBARA_ENV"] == "test"
5+
if %w[development test].include?(ENV["FOOBARA_ENV"])
66
require "pry"
77
require "pry-byebug"
88
end

src/http.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@ module CommandConnectors
33
class Http < CommandConnector
44
include TruncatedInspect
55

6+
class << self
7+
attr_accessor :default_serializers
8+
end
9+
10+
self.default_serializers = [
11+
Foobara::CommandConnectors::Serializers::ErrorsSerializer,
12+
Foobara::CommandConnectors::Serializers::AtomicSerializer,
13+
Foobara::CommandConnectors::Serializers::JsonSerializer
14+
]
15+
616
attr_accessor :prefix
717

818
def initialize(
919
prefix: nil,
10-
default_serializers: [
11-
Foobara::CommandConnectors::Serializers::ErrorsSerializer,
12-
Foobara::CommandConnectors::Serializers::AtomicSerializer,
13-
Foobara::CommandConnectors::Serializers::JsonSerializer
14-
],
20+
default_serializers: self.class.default_serializers,
1521
**
1622
)
1723
if prefix

version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Foobara
22
module HttpCommandConnector
3-
VERSION = "0.0.9".freeze
3+
VERSION = "0.0.10".freeze
44

55
local_ruby_version = File.read("#{__dir__}/.ruby-version").chomp
66
local_ruby_version_minor = local_ruby_version[/\A(\d+\.\d+)\.\d+\z/, 1]

0 commit comments

Comments
 (0)