hamlit 3.0.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +50 -0
- data/.github/workflows/test.yml +4 -5
- data/CHANGELOG.md +4 -3
- data/Gemfile +3 -0
- data/README.md +2 -2
- data/hamlit.gemspec +1 -1
- data/lib/hamlit/attribute_builder.rb +1 -1
- data/lib/hamlit/engine.rb +2 -2
- data/lib/hamlit/version.rb +1 -1
- metadata +5 -8
- data/.github/workflows/bench.yml +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 270c4930bb7c770a986b5e60edeb7608af33aab66927bd4b415e75591cd738a4
|
|
4
|
+
data.tar.gz: e9b8422cb06c0e427650c40e28774805e543cbcf291dbe37ba4327f34b7336fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48e1d888420f14f434f9dde73d925bfbbd6727dc4ac2954b017bbd7f871b75225652ae4e8ac2f4163f17c2826fa7948a8d1a258b9adc0dbcec95fe6ea7cd577b
|
|
7
|
+
data.tar.gz: b2203d0c8c97956a5d3bf90b018aa5cda042d7621e56b3e6e7a2b122941bc8ec45a1dfed0826789aa77fb610bc2c407653226a704e3023b28523d2cca175333a
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
push:
|
|
13
|
+
if: github.repository_owner == 'k0kubun'
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
ruby: [ruby, jruby]
|
|
18
|
+
fail-fast: false
|
|
19
|
+
|
|
20
|
+
environment:
|
|
21
|
+
name: rubygems.org
|
|
22
|
+
url: https://rubygems.org/gems/hamlit
|
|
23
|
+
|
|
24
|
+
permissions:
|
|
25
|
+
contents: write
|
|
26
|
+
id-token: write
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Harden Runner
|
|
30
|
+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
|
31
|
+
with:
|
|
32
|
+
egress-policy: audit
|
|
33
|
+
|
|
34
|
+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
35
|
+
|
|
36
|
+
- name: Set up Ruby
|
|
37
|
+
uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
|
|
38
|
+
with:
|
|
39
|
+
bundler-cache: true
|
|
40
|
+
ruby-version: ${{ matrix.ruby }}
|
|
41
|
+
|
|
42
|
+
- name: Publish to RubyGems
|
|
43
|
+
uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
|
|
44
|
+
|
|
45
|
+
- name: Create GitHub release
|
|
46
|
+
run: |
|
|
47
|
+
tag_name="$(git describe --tags --abbrev=0)"
|
|
48
|
+
gh release create "${tag_name}" --verify-tag --generate-notes
|
|
49
|
+
env:
|
|
50
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.github/workflows/test.yml
CHANGED
|
@@ -17,12 +17,11 @@ jobs:
|
|
|
17
17
|
fail-fast: false
|
|
18
18
|
matrix:
|
|
19
19
|
ruby:
|
|
20
|
-
- '2
|
|
21
|
-
- '
|
|
22
|
-
- '
|
|
23
|
-
- '3.0'
|
|
20
|
+
- '3.2'
|
|
21
|
+
- '3.3'
|
|
22
|
+
- '3.4'
|
|
24
23
|
- jruby
|
|
25
|
-
- truffleruby
|
|
24
|
+
- truffleruby
|
|
26
25
|
steps:
|
|
27
26
|
- uses: actions/checkout@v2
|
|
28
27
|
- run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
- Change default `attr_quote` from `'` to `"`
|
|
6
|
+
- Bump required Ruby version to 3.2
|
|
6
7
|
|
|
7
8
|
## [3.0.3](https://github.com/k0kubun/hamlit/compare/v3.0.2...v3.0.3) - 2022-11-07
|
|
8
9
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Hamlit is a high performance [Haml](https://github.com/haml/haml) implementation
|
|
|
10
10
|
**Hamlit's implementation was copied to Haml 6.**
|
|
11
11
|
From Haml 6, you don't need to switch to Hamlit.
|
|
12
12
|
|
|
13
|
-
Both Haml 6 and Hamlit are still maintained by [
|
|
13
|
+
Both Haml 6 and Hamlit are still maintained by [k0kubun](https://github.com/k0kubun).
|
|
14
14
|
While you don't need to immediately deprecate Hamlit, Haml 6 has more maintainers
|
|
15
15
|
and you'd better start a new project with Haml rather than Hamlit,
|
|
16
16
|
given no performance difference between them.
|
|
@@ -21,7 +21,7 @@ given no performance difference between them.
|
|
|
21
21
|
Hamlit is another implementation of [Haml](https://github.com/haml/haml).
|
|
22
22
|
With some [Hamlit's characteristics](REFERENCE.md#hamlits-characteristics) for performance,
|
|
23
23
|
Hamlit is **1.94x times faster** than the original Haml 5 in [this benchmark](benchmark/run-benchmarks.rb),
|
|
24
|
-
which is an HTML-escaped version of [slim-template/slim's one](https://github.com/slim-template/slim/blob/4.1.0/benchmarks/run-benchmarks.rb) for fairness.
|
|
24
|
+
which is an HTML-escaped version of [slim-template/slim's one](https://github.com/slim-template/slim/blob/4.1.0/benchmarks/run-benchmarks.rb) for fairness.
|
|
25
25
|
|
|
26
26
|
<img src="https://raw.githubusercontent.com/k0kubun/hamlit/afcc2b36c4861c2f764baa09afd9530ca25eeafa/benchmark/graph/graph.png" width="600x" alt="Hamlit Benchmark" />
|
|
27
27
|
|
data/hamlit.gemspec
CHANGED
data/lib/hamlit/engine.rb
CHANGED
|
@@ -14,13 +14,13 @@ module Hamlit
|
|
|
14
14
|
:buffer_class,
|
|
15
15
|
generator: Temple::Generators::StringBuffer,
|
|
16
16
|
format: :html,
|
|
17
|
-
attr_quote: "'
|
|
17
|
+
attr_quote: '"',
|
|
18
18
|
escape_html: true,
|
|
19
19
|
escape_attrs: true,
|
|
20
20
|
autoclose: %w(area base basefont br col command embed frame
|
|
21
21
|
hr img input isindex keygen link menuitem meta
|
|
22
22
|
param source track wbr),
|
|
23
|
-
filename:
|
|
23
|
+
filename: '',
|
|
24
24
|
check_syntax: false,
|
|
25
25
|
disable_capture: false,
|
|
26
26
|
)
|
data/lib/hamlit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hamlit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takashi Kokubun
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: temple
|
|
@@ -244,7 +243,7 @@ extensions:
|
|
|
244
243
|
extra_rdoc_files: []
|
|
245
244
|
files:
|
|
246
245
|
- ".github/FUNDING.yml"
|
|
247
|
-
- ".github/workflows/
|
|
246
|
+
- ".github/workflows/release.yml"
|
|
248
247
|
- ".github/workflows/test.yml"
|
|
249
248
|
- ".gitignore"
|
|
250
249
|
- CHANGELOG.md
|
|
@@ -331,7 +330,6 @@ homepage: https://github.com/k0kubun/hamlit
|
|
|
331
330
|
licenses:
|
|
332
331
|
- MIT
|
|
333
332
|
metadata: {}
|
|
334
|
-
post_install_message:
|
|
335
333
|
rdoc_options: []
|
|
336
334
|
require_paths:
|
|
337
335
|
- lib
|
|
@@ -339,15 +337,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
339
337
|
requirements:
|
|
340
338
|
- - ">="
|
|
341
339
|
- !ruby/object:Gem::Version
|
|
342
|
-
version: 2.
|
|
340
|
+
version: 3.2.0
|
|
343
341
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
342
|
requirements:
|
|
345
343
|
- - ">="
|
|
346
344
|
- !ruby/object:Gem::Version
|
|
347
345
|
version: '0'
|
|
348
346
|
requirements: []
|
|
349
|
-
rubygems_version: 3.
|
|
350
|
-
signing_key:
|
|
347
|
+
rubygems_version: 3.6.7
|
|
351
348
|
specification_version: 4
|
|
352
349
|
summary: High Performance Haml Implementation
|
|
353
350
|
test_files: []
|
data/.github/workflows/bench.yml
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: bench
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- master
|
|
6
|
-
pull_request:
|
|
7
|
-
types:
|
|
8
|
-
- opened
|
|
9
|
-
- synchronize
|
|
10
|
-
- reopened
|
|
11
|
-
schedule:
|
|
12
|
-
- cron: "00 15 * * *" # 7:00 PST (-8), 8:00 PDT (-7)
|
|
13
|
-
jobs:
|
|
14
|
-
bench:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v2
|
|
18
|
-
- run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
|
|
19
|
-
- name: Set up Ruby
|
|
20
|
-
uses: ruby/setup-ruby@v1
|
|
21
|
-
with:
|
|
22
|
-
ruby-version: '3.0'
|
|
23
|
-
bundler-cache: true
|
|
24
|
-
- run: bundle exec rake bench
|