custom_tag 0.3.0 → 0.3.1

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: a68c2e4baf5565bf8e4dacaf83246217ee69e1e7ed17d906eabd7f68f9410832
4
- data.tar.gz: 7c51503bb18ec0d03a8f1c89b02fc1c61cc683ff59ef67469b2d688f7ef4aa66
3
+ metadata.gz: aba8f2f968ae1d62894e5aa84c4847e4402f8de6d3a5bec3b15b35fb80e06729
4
+ data.tar.gz: 5516364edb4df8a9da7797b31782182bfe52ef220c9c02bf251173223d45744b
5
5
  SHA512:
6
- metadata.gz: 7f1d41257b2e1401a9aae3d03a47cdba10c710993c06e97e35d2d0f9417fc89f36083fcc8e74ccf0bd3194fed7be734d69ec993996765ecfbdb48c9627314bef
7
- data.tar.gz: c9d43398388f799275dd4754146bda6ad5793d83e66c3fef85257753bc468c6e219329feaf7c55d34675c042b6ec913e9f4dbc8ac47cdb833a9b98e83dbadce8
6
+ metadata.gz: 134db783451bce7d6776782c27277e3a55007454339ef3576cb82027f299d8bd2c120c56fc76acbd1bff04f118e95c49403954731d70d9ed6831f1abd82494c5
7
+ data.tar.gz: 1f0636438ddd5296a9717eb1dd1a85e5dc5c777f6965b2d94f173b9d846299cebce0263aeb3e3e0a1a48de14dc2b6a0277d5858f8c230fee3939738d1b68ca7d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG for CustomTag
2
2
 
3
+ ## 0.3.1 - 16 August 2023
4
+
5
+ Handling `ActionDispatch::Response::RackBody` as well as array body responses.
6
+
3
7
  ## 0.3.0 - 16 August 2023
4
8
 
5
9
  Configured Railtie to correctly use Rack middleware.
@@ -7,9 +7,15 @@ module CustomTag
7
7
  def call(env)
8
8
  code, headers, response = @app.call(env)
9
9
 
10
- response[0] = CustomTag.parse_and_replace(response[0]) if headers["Content-Type"]&.include?("text/html")
10
+ response_body = if response.respond_to?(:body)
11
+ response.body
12
+ else
13
+ response[0]
14
+ end
11
15
 
12
- [code, headers, response]
16
+ response_body = CustomTag.parse_and_replace(response_body) if headers["Content-Type"]&.include?("text/html")
17
+
18
+ [code, headers, [response_body]]
13
19
  end
14
20
  end
15
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CustomTag
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: custom_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries