hanami-controller 2.1.0.beta2 → 2.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fc2d8c6c6c5d8427e000d3a9644ca79ebb06528052d9d85796aad26f12c00dd
4
- data.tar.gz: 689ba6ba0655450344f3e87f9a7723760a4673df0b3beb6e7b21fca8a18f7fcd
3
+ metadata.gz: daf2c6091f7e6fbff6ffbdd826b548250b32b0e52a475b8c7c9c1997fb307fa8
4
+ data.tar.gz: 43729833cfcac37032afafbab8172b82b00e5280b1e5c3e5a28432a25b4c17db
5
5
  SHA512:
6
- metadata.gz: 1e8bf47095abf0da69058e26e0d627cbb664c9b861a35de3b84173836f8cb76773bdf78ff233aedf8e09819de8f4ca5cc53f5116f73dd7d63fb54b1ae9c90656
7
- data.tar.gz: b09e1c0506ef1e309e6c53bc37ad503dd8821b159d4a60bd1142be3b105cb24ff67abd57871005eddc807451712dbf507e24c95e0c2ff0f38b8e53d9160329b8
6
+ metadata.gz: af07362be43e8174a48f90abb1c77fecc4abb221f95c4e38db0a7f9848e5763e58f3d03e56adfc4fd14892b8e81ee0dd3860731c4c26c8b5ff1df3214cc16d38
7
+ data.tar.gz: 750e1b4d42ca5433041c654d5a417f3c4408241387f4af13e1464af9f1eca20f4085c163ee2657fd7129af45405ca15ffd82a89d721fa65eb02680b0de4bd789
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Complete, fast and testable actions for Rack
4
4
 
5
+ ## v2.1.0.rc1 - 2023-11-01
6
+
7
+ ### Fixed
8
+
9
+ - [Luca Guidi] Ensure Rack compatibility of `Hanami::Action::Response#send_file` (#431)
10
+
5
11
  ## v2.1.0.beta2 - 2023-10-04
6
12
 
7
13
  ### Fixed
@@ -73,8 +73,7 @@ module Hanami
73
73
  @length = 0
74
74
  @body = EMPTY_BODY.dup
75
75
 
76
- # FIXME: there could be a bug that prevents Content-Length to be sent for files
77
- if str.is_a?(::Rack::File::Iterator)
76
+ if str.is_a?(::Rack::Files::BaseIterator)
78
77
  @body = str
79
78
  else
80
79
  write(str) unless str.nil? || str == EMPTY_BODY
@@ -275,24 +274,26 @@ module Hanami
275
274
  #
276
275
  # @return [void]
277
276
  #
278
- # @see Config#public_directory
277
+ # @see Hanami::Action::Config#public_directory
278
+ # @see Hanami::Action::Rack::File
279
279
  #
280
280
  # @since 2.0.0
281
281
  # @api public
282
282
  def send_file(path)
283
283
  _send_file(
284
- Rack::File.new(path, @config.public_directory).call(env)
284
+ Action::Rack::File.new(path, @config.public_directory).call(env)
285
285
  )
286
286
  end
287
287
 
288
288
  # Send the file at the given path as the response, for a file anywhere in the file system.
289
289
  #
290
- # @see #send_file
291
- #
292
290
  # @param path [String, Pathname] path to the file to be sent
293
291
  #
294
292
  # @return [void]
295
293
  #
294
+ # @see #send_file
295
+ # @see Hanami::Action::Rack::File
296
+ #
296
297
  # @since 2.0.0
297
298
  # @api public
298
299
  def unsafe_send_file(path)
@@ -303,7 +304,7 @@ module Hanami
303
304
  end
304
305
 
305
306
  _send_file(
306
- Rack::File.new(path, directory).call(env)
307
+ Action::Rack::File.new(path, directory).call(env)
307
308
  )
308
309
  end
309
310
 
@@ -8,6 +8,6 @@ module Hanami
8
8
  #
9
9
  # @since 0.1.0
10
10
  # @api public
11
- VERSION = "2.1.0.beta2"
11
+ VERSION = "2.1.0.rc1"
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.beta2
4
+ version: 2.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-04 00:00:00.000000000 Z
11
+ date: 2023-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack