Skip to content

Commit

Permalink
update rbs to 3.2 and enable typechecking for Gzip module
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Oct 16, 2023
1 parent f0c8ebe commit 0bb2377
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ gem "simplecov-cobertura", "~> 2.1.0"

# type checking
group :check do
if RUBY_PLATFORM != "java"
gem "rbs", "~> 3.1.0", require: false
if RUBY_VERSION >= "3.0.0" && RUBY_PLATFORM != "java"
gem "rbs", "~> 3.2.0", require: false
gem "steep", "~> 1.4.0", require: false
end
end
2 changes: 1 addition & 1 deletion Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ target :lib do
check "lib"

ignore "lib/datadog/ci/configuration/settings.rb"
ignore "lib/datadog/ci/transport/gzip.rb"

library "pathname"
library "json"
library "logger"
library "date"
library "minitest"
library "net-http"
library "zlib"

repo_path "vendor/rbs"
library "ddtrace"
Expand Down
6 changes: 4 additions & 2 deletions lib/datadog/ci/transport/gzip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ module Gzip
module_function

def compress(input)
gzip_writer = Zlib::GzipWriter.new(StringIO.new)
sio = StringIO.new
gzip_writer = Zlib::GzipWriter.new(sio, Zlib::DEFAULT_COMPRESSION, Zlib::DEFAULT_STRATEGY)
gzip_writer << input
gzip_writer.close.string
gzip_writer.close
sio.string
end
end
end
Expand Down

0 comments on commit 0bb2377

Please sign in to comment.