Skip to content

Commit 90786e2

Browse files
committed
Add Ruby 3.4 to test matrix
1 parent 4ac974c commit 90786e2

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix:
1515
ruby:
1616
- '2.6'
17-
- '3.3'
17+
- '3.4'
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v4

rbi/zip_kit.rbi

+13-4
Original file line numberDiff line numberDiff line change
@@ -1897,13 +1897,11 @@ end, T.untyped)
18971897

18981898
# Add a fake entry to the archive, to see how big it is going to be in the end.
18991899
#
1900-
# data descriptor to specify size
1901-
#
19021900
# _@param_ `filename` — the name of the file (filenames are variable-width in the ZIP)
19031901
#
19041902
# _@param_ `size` — size of the uncompressed entry
19051903
#
1906-
# _@param_ `use_data_descriptor` — whether the entry uses a postfix
1904+
# _@param_ `use_data_descriptor` — whether there is going to be a data descriptor written after the entry body, to specify size. You must enable this if you are going to be using {Streamer#write_stored_file} as otherwise your estimated size is not going to be accurate
19071905
#
19081906
# _@return_ — self
19091907
sig { params(filename: String, size: Integer, use_data_descriptor: T::Boolean).returns(T.untyped) }
@@ -1917,7 +1915,7 @@ end, T.untyped)
19171915
#
19181916
# _@param_ `compressed_size` — size of the compressed entry
19191917
#
1920-
# _@param_ `use_data_descriptor` — whether the entry uses a postfix data descriptor to specify size
1918+
# _@param_ `use_data_descriptor` — whether there is going to be a data descriptor written after the entry body, to specify size. You must enable this if you are going to be using {Streamer#write_deflated_file} as otherwise your estimated size is not going to be accurate
19211919
#
19221920
# _@return_ — self
19231921
sig do
@@ -2102,6 +2100,17 @@ end, T.untyped)
21022100
# ones - for example, specific content types are needed for files which are, technically, ZIP files
21032101
# but are of a file format built "on top" of ZIPs - such as ODTs, [pkpass files](https://developer.apple.com/documentation/walletpasses/building_a_pass)
21042102
# and ePubs.
2103+
#
2104+
# More value, however, is in the "technical" headers this method will provide. It will take the following steps to make sure streaming works correctly.
2105+
#
2106+
# * `Last-Modified` will be set to "now" so that the response is considered "fresh" by `Rack::ETag`. This is done so that `Rack::ETag` won't try to
2107+
# calculate a lax ETag value and thus won't start buffering your response out of nowhere
2108+
# * `Content-Encoding` will be set to `identity`. This is so that proxies or the Rack middleware that applies compression to the response (like gzip)
2109+
# is not going to try to compress your response. It also tells the receiving browsers (or downstream proxies) that they should not attempt to
2110+
# open or uncompress the response before saving it or passing it onwards.
2111+
# * `X-Accel-Buffering` will be set to 'no` - this tells both nginx and the Google Cloud load balancer that the response should not be buffered
2112+
#
2113+
# These header values are known to get as close as possible to guaranteeing streaming on most environments where Ruby web applications may be hosted.
21052114
sig { returns(T::Hash[T.untyped, T.untyped]) }
21062115
def self.streaming_http_headers; end
21072116

zip_kit.gemspec

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ Gem::Specification.new do |spec|
4040
spec.add_development_dependency "standard", "1.28.5" # Very specific version of standard for 2.6 with _known_ settings
4141
spec.add_development_dependency "magic_frozen_string_literal"
4242
spec.add_development_dependency "puma"
43+
spec.add_development_dependency "mutex_m" # Some deps use it but it is no longer in stdlib since 3.4
44+
spec.add_development_dependency "bigdecimal" # Some deps use it but it is no longer in stdlib since 3.4
4345
spec.add_development_dependency "rails", "~> 5" # For testing RailsStreaming against an actual Rails controller
4446
spec.add_development_dependency "actionpack", "~> 5" # For testing RailsStreaming against an actual Rails controller
4547
spec.add_development_dependency "nokogiri", "~> 1", ">= 1.13" # Rails 5 does by mistake use an older Nokogiri otherwise

0 commit comments

Comments
 (0)