hamlit 2.14.4 → 2.14.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/CHANGELOG.md +7 -0
- data/lib/hamlit/ambles.rb +20 -0
- data/lib/hamlit/engine.rb +2 -0
- data/lib/hamlit/rails_template.rb +5 -0
- data/lib/hamlit/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c58f9be7c1f06eb9104542ca749b10a2833a23d5db7b12bf9f16744461b3e83
|
4
|
+
data.tar.gz: 6130138aa3ecf4cafd996b89b3442b8c354d3085da8045a627e04f72dd0aa3fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffd47c2339cbbb0f9c9bb84ab1dc5d41edeb91e05a4cc6b1a5d79fe71d72ee67ef881ac9816f474ec2376e8dcc2416e65caeeb72fc6094c4e7844626ab126117
|
7
|
+
data.tar.gz: d2292193a05d671053022da852b9456622d23214d73d785d079f0eabeacd12fdbd2eabcacfc94496be59f55e5cf7e905223d7afab042cc5361bdb227230c7f99
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
github: k0kubun
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. This
|
|
4
4
|
project adheres to [Semantic Versioning](http://semver.org/). This change log is based upon
|
5
5
|
[keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog).
|
6
6
|
|
7
|
+
## [2.14.5](https://github.com/k0kubun/hamlit/compare/v2.14.4...v2.14.5) - 2021-03-23
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- Support `config.action_view.annotate_template_file_names = true` of Rails 6.1
|
12
|
+
*Thanks to @kirin121*
|
13
|
+
|
7
14
|
## [2.14.4](https://github.com/k0kubun/hamlit/compare/v2.14.3...v2.14.4) - 2021-02-01
|
8
15
|
|
9
16
|
### Fixed
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Hamlit
|
3
|
+
class Ambles < Temple::Filter
|
4
|
+
define_options :preamble, :postamble
|
5
|
+
|
6
|
+
def initialize(*)
|
7
|
+
super
|
8
|
+
@preamble = options[:preamble]
|
9
|
+
@postamble = options[:postamble]
|
10
|
+
end
|
11
|
+
|
12
|
+
def call(ast)
|
13
|
+
ret = [:multi]
|
14
|
+
ret << [:static, @preamble] if @preamble
|
15
|
+
ret << ast
|
16
|
+
ret << [:static, @postamble] if @postamble
|
17
|
+
ret
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/hamlit/engine.rb
CHANGED
@@ -6,6 +6,7 @@ require 'hamlit/html'
|
|
6
6
|
require 'hamlit/escapable'
|
7
7
|
require 'hamlit/force_escapable'
|
8
8
|
require 'hamlit/dynamic_merger'
|
9
|
+
require 'hamlit/ambles'
|
9
10
|
|
10
11
|
module Hamlit
|
11
12
|
class Engine < Temple::Engine
|
@@ -33,6 +34,7 @@ module Hamlit
|
|
33
34
|
filter :MultiFlattener
|
34
35
|
filter :StaticMerger
|
35
36
|
use DynamicMerger
|
37
|
+
use Ambles
|
36
38
|
use :Generator, -> { options[:generator] }
|
37
39
|
end
|
38
40
|
end
|
@@ -33,6 +33,11 @@ module Hamlit
|
|
33
33
|
options = options.merge(format: :xhtml)
|
34
34
|
end
|
35
35
|
|
36
|
+
if ActionView::Base.try(:annotate_rendered_view_with_filenames) && template.format == :html
|
37
|
+
options[:preamble] = "<!-- BEGIN #{template.short_identifier} -->\n"
|
38
|
+
options[:postamble] = "<!-- END #{template.short_identifier} -->\n"
|
39
|
+
end
|
40
|
+
|
36
41
|
Engine.new(options).call(source)
|
37
42
|
end
|
38
43
|
|
data/lib/hamlit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hamlit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.14.
|
4
|
+
version: 2.14.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: temple
|
@@ -257,6 +257,7 @@ extensions:
|
|
257
257
|
- ext/hamlit/extconf.rb
|
258
258
|
extra_rdoc_files: []
|
259
259
|
files:
|
260
|
+
- ".github/FUNDING.yml"
|
260
261
|
- ".github/workflows/test.yml"
|
261
262
|
- ".gitignore"
|
262
263
|
- CHANGELOG.md
|
@@ -313,6 +314,7 @@ files:
|
|
313
314
|
- ext/hamlit/hescape.h
|
314
315
|
- hamlit.gemspec
|
315
316
|
- lib/hamlit.rb
|
317
|
+
- lib/hamlit/ambles.rb
|
316
318
|
- lib/hamlit/attribute_builder.rb
|
317
319
|
- lib/hamlit/attribute_compiler.rb
|
318
320
|
- lib/hamlit/attribute_parser.rb
|
@@ -391,7 +393,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
391
393
|
- !ruby/object:Gem::Version
|
392
394
|
version: '0'
|
393
395
|
requirements: []
|
394
|
-
rubygems_version: 3.
|
396
|
+
rubygems_version: 3.2.3
|
395
397
|
signing_key:
|
396
398
|
specification_version: 4
|
397
399
|
summary: High Performance Haml Implementation
|