custom_tag 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +3 -0
- data/Rakefile +5 -0
- data/custom_tag.gemspec +1 -1
- data/lib/custom_tag/middleware.rb +8 -2
- data/lib/custom_tag/railties.rb +1 -1
- data/lib/custom_tag/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aba8f2f968ae1d62894e5aa84c4847e4402f8de6d3a5bec3b15b35fb80e06729
|
4
|
+
data.tar.gz: 5516364edb4df8a9da7797b31782182bfe52ef220c9c02bf251173223d45744b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 134db783451bce7d6776782c27277e3a55007454339ef3576cb82027f299d8bd2c120c56fc76acbd1bff04f118e95c49403954731d70d9ed6831f1abd82494c5
|
7
|
+
data.tar.gz: 1f0636438ddd5296a9717eb1dd1a85e5dc5c777f6965b2d94f173b9d846299cebce0263aeb3e3e0a1a48de14dc2b6a0277d5858f8c230fee3939738d1b68ca7d
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
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
|
+
|
7
|
+
## 0.3.0 - 16 August 2023
|
8
|
+
|
9
|
+
Configured Railtie to correctly use Rack middleware.
|
10
|
+
|
3
11
|
## 0.2.0 - 9 July 2023
|
4
12
|
|
5
13
|
Rack middleware implemented and documentation written.
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -51,6 +51,8 @@ GEM
|
|
51
51
|
rubocop-performance (1.18.0)
|
52
52
|
rubocop (>= 1.7.0, < 2.0)
|
53
53
|
rubocop-ast (>= 0.4.0)
|
54
|
+
rubocop-rake (0.6.0)
|
55
|
+
rubocop (~> 1.0)
|
54
56
|
ruby-progressbar (1.13.0)
|
55
57
|
unicode-display_width (2.4.2)
|
56
58
|
|
@@ -65,6 +67,7 @@ DEPENDENCIES
|
|
65
67
|
rspec (~> 3.0)
|
66
68
|
rubocop
|
67
69
|
rubocop-performance
|
70
|
+
rubocop-rake
|
68
71
|
|
69
72
|
BUNDLED WITH
|
70
73
|
2.4.6
|
data/Rakefile
CHANGED
data/custom_tag.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = "CustomTag allows you to use custom HTML tags in your Rails project and have them be replaced with standard HTML tags and attributes"
|
12
12
|
spec.description = "Jealous of custom <tags> in JS frameworks and want them in your Rails apps? CustomTag allows you to use custom HTML tags in your Rails project and have them be replaced with standard HTML tags and attributes."
|
13
13
|
spec.homepage = "https://github.com/andyjeffries/customtag"
|
14
|
-
spec.required_ruby_version = ">= 2.
|
14
|
+
spec.required_ruby_version = ">= 2.7.0"
|
15
15
|
|
16
16
|
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
17
17
|
|
@@ -7,9 +7,15 @@ module CustomTag
|
|
7
7
|
def call(env)
|
8
8
|
code, headers, response = @app.call(env)
|
9
9
|
|
10
|
-
|
10
|
+
response_body = if response.respond_to?(:body)
|
11
|
+
response.body
|
12
|
+
else
|
13
|
+
response[0]
|
14
|
+
end
|
11
15
|
|
12
|
-
|
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
|
data/lib/custom_tag/railties.rb
CHANGED
data/lib/custom_tag/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: custom_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -63,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements:
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: 2.
|
66
|
+
version: 2.7.0
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - ">="
|