haml 5.2.2 → 7.2.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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +3 -0
  3. data/.github/workflows/release.yml +46 -0
  4. data/.github/workflows/test.yml +13 -15
  5. data/.gitignore +16 -16
  6. data/.yardopts +0 -3
  7. data/CHANGELOG.md +204 -4
  8. data/FAQ.md +1 -1
  9. data/Gemfile +20 -11
  10. data/MIT-LICENSE +1 -1
  11. data/README.md +23 -34
  12. data/REFERENCE.md +100 -171
  13. data/Rakefile +15 -82
  14. data/bin/bench +66 -0
  15. data/bin/console +10 -0
  16. data/bin/ruby +3 -0
  17. data/bin/setup +7 -0
  18. data/bin/stackprof +27 -0
  19. data/bin/test +24 -0
  20. data/exe/haml +6 -0
  21. data/haml.gemspec +39 -39
  22. data/lib/haml/ambles.rb +20 -0
  23. data/lib/haml/attribute_builder.rb +127 -184
  24. data/lib/haml/attribute_compiler.rb +90 -194
  25. data/lib/haml/attribute_parser.rb +92 -126
  26. data/lib/haml/cli.rb +154 -0
  27. data/lib/haml/compiler/children_compiler.rb +155 -0
  28. data/lib/haml/compiler/comment_compiler.rb +51 -0
  29. data/lib/haml/compiler/doctype_compiler.rb +52 -0
  30. data/lib/haml/compiler/script_compiler.rb +114 -0
  31. data/lib/haml/compiler/silent_script_compiler.rb +24 -0
  32. data/lib/haml/compiler/tag_compiler.rb +76 -0
  33. data/lib/haml/compiler.rb +63 -296
  34. data/lib/haml/dynamic_merger.rb +67 -0
  35. data/lib/haml/engine.rb +48 -227
  36. data/lib/haml/error.rb +5 -4
  37. data/lib/haml/escape.rb +13 -0
  38. data/lib/haml/escape_any.rb +21 -0
  39. data/lib/haml/filters/base.rb +12 -0
  40. data/lib/haml/filters/cdata.rb +20 -0
  41. data/lib/haml/filters/coffee.rb +17 -0
  42. data/lib/haml/filters/css.rb +33 -0
  43. data/lib/haml/filters/erb.rb +10 -0
  44. data/lib/haml/filters/escaped.rb +22 -0
  45. data/lib/haml/filters/javascript.rb +33 -0
  46. data/lib/haml/filters/less.rb +20 -0
  47. data/lib/haml/filters/markdown.rb +11 -0
  48. data/lib/haml/filters/plain.rb +29 -0
  49. data/lib/haml/filters/preserve.rb +22 -0
  50. data/lib/haml/filters/ruby.rb +10 -0
  51. data/lib/haml/filters/sass.rb +15 -0
  52. data/lib/haml/filters/scss.rb +15 -0
  53. data/lib/haml/filters/text_base.rb +25 -0
  54. data/lib/haml/filters/tilt_base.rb +59 -0
  55. data/lib/haml/filters.rb +54 -378
  56. data/lib/haml/force_escape.rb +29 -0
  57. data/lib/haml/helpers.rb +3 -697
  58. data/lib/haml/html.rb +22 -0
  59. data/lib/haml/identity.rb +13 -0
  60. data/lib/haml/object_ref.rb +35 -0
  61. data/lib/haml/parser.rb +168 -33
  62. data/lib/haml/rails_helpers.rb +53 -0
  63. data/lib/haml/rails_template.rb +62 -0
  64. data/lib/haml/railtie.rb +3 -46
  65. data/lib/haml/ruby_expression.rb +32 -0
  66. data/lib/haml/string_splitter.rb +140 -0
  67. data/lib/haml/template.rb +15 -34
  68. data/lib/haml/temple_line_counter.rb +2 -1
  69. data/lib/haml/util.rb +21 -17
  70. data/lib/haml/version.rb +1 -2
  71. data/lib/haml/whitespace.rb +8 -0
  72. data/lib/haml.rb +5 -21
  73. metadata +176 -52
  74. data/.gitmodules +0 -3
  75. data/TODO +0 -24
  76. data/benchmark.rb +0 -70
  77. data/bin/haml +0 -9
  78. data/lib/haml/.gitattributes +0 -1
  79. data/lib/haml/buffer.rb +0 -182
  80. data/lib/haml/escapable.rb +0 -77
  81. data/lib/haml/exec.rb +0 -347
  82. data/lib/haml/generator.rb +0 -42
  83. data/lib/haml/helpers/action_view_extensions.rb +0 -60
  84. data/lib/haml/helpers/action_view_mods.rb +0 -132
  85. data/lib/haml/helpers/action_view_xss_mods.rb +0 -60
  86. data/lib/haml/helpers/safe_erubi_template.rb +0 -20
  87. data/lib/haml/helpers/safe_erubis_template.rb +0 -33
  88. data/lib/haml/helpers/xss_mods.rb +0 -114
  89. data/lib/haml/options.rb +0 -273
  90. data/lib/haml/plugin.rb +0 -54
  91. data/lib/haml/sass_rails_filter.rb +0 -47
  92. data/lib/haml/template/options.rb +0 -27
  93. data/lib/haml/temple_engine.rb +0 -124
  94. data/yard/default/.gitignore +0 -1
  95. data/yard/default/fulldoc/html/css/common.sass +0 -15
  96. data/yard/default/layout/html/footer.erb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec6cbb2e4023f397f1d7b6d84f06d78ab492a61e88c3f16496f39d0baeb47a83
4
- data.tar.gz: 004c2dd34697cb61a8c12854bf4b99abb3cab5195f28922b813ee299225e7663
3
+ metadata.gz: 666a9c4513f3c1450ac36b92fefcff06d9a69aae9cc60840eb0182dbe53e2995
4
+ data.tar.gz: 709a5f0d8ad693be7bb7b2750d84fb1025d77ada780f045071e69bf16abfa76a
5
5
  SHA512:
6
- metadata.gz: a7430b4e42cf809f847448a9e04623b4b58878e44facedef5e43714820e8068f0bb853772564d5545936cdad8346f0c33abfc11642a3737d91c9a1f6242b3e41
7
- data.tar.gz: 8a91df0cb185014512ee473a21755ba41edb06e835b29740e8e46c76287a81405b2706d8a10ea148893a9429de306c67584ac1c286637c0812a5562cf149431b
6
+ metadata.gz: 5baeb23700d275b2a6c678b807756ff3536d638b782c4a26f44236fd3b9e9037d6b46c5c09b76b87e19f3cffaa668c5f221a395b8f2ba37a9a026c17ebc2fccc
7
+ data.tar.gz: cd428da5241f00f831080af924ef7fd2a066699c9805272727dbe32eb7672c90d6fbd1bbf6d3cae8dffc99f472d8dfb721b6558d78e64808b2a1319b7a78aa01
@@ -0,0 +1,3 @@
1
+ github:
2
+ - haml
3
+ - k0kubun
@@ -0,0 +1,46 @@
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 == 'haml'
14
+ runs-on: ubuntu-latest
15
+
16
+ environment:
17
+ name: rubygems.org
18
+ url: https://rubygems.org/gems/haml
19
+
20
+ permissions:
21
+ contents: write
22
+ id-token: write
23
+
24
+ steps:
25
+ - name: Harden Runner
26
+ uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
27
+ with:
28
+ egress-policy: audit
29
+
30
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31
+
32
+ - name: Set up Ruby
33
+ uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
34
+ with:
35
+ bundler-cache: true
36
+ ruby-version: ruby
37
+
38
+ - name: Publish to RubyGems
39
+ uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
40
+
41
+ - name: Create GitHub release
42
+ run: |
43
+ tag_name="$(git describe --tags --abbrev=0)"
44
+ gh release create "${tag_name}" --verify-tag --generate-notes
45
+ env:
46
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -8,29 +8,27 @@ on:
8
8
  - opened
9
9
  - synchronize
10
10
  - reopened
11
+ schedule:
12
+ - cron: "00 15 * * *"
11
13
  jobs:
12
14
  test:
13
- name: 'Ruby: ${{ matrix.ruby }}, Rails: ${{ matrix.rails }}'
14
15
  runs-on: ubuntu-latest
15
16
  strategy:
16
17
  fail-fast: false
17
18
  matrix:
18
- ruby: [2.6, 2.7, 3.0, jruby-9.2]
19
- rails: [5.2.x, 6.0.x, 6.1.x, rails-edge]
19
+ ruby:
20
+ - '3.2'
21
+ - '3.3'
22
+ - '3.4'
23
+ - ruby-head
24
+ - jruby
25
+ - truffleruby
20
26
  steps:
21
- - uses: actions/checkout@v2
27
+ - uses: actions/checkout@v4
28
+ - run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
22
29
  - name: Set up Ruby
23
30
  uses: ruby/setup-ruby@v1
24
31
  with:
25
32
  ruby-version: ${{ matrix.ruby }}
26
- - uses: actions/cache@v2
27
- with:
28
- path: vendor/bundle
29
- key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
30
- restore-keys: ${{ runner.os }}-gems-
31
- - name: bundle install --gemfile=test/gemfiles/Gemfile.rails-${{matrix.rails}}.x
32
- run: bundle config path vendor/bundle && bundle install -j$(nproc) --retry 3
33
- - name: rake test
34
- run: bundle exec rake test submodules
35
- env:
36
- RUBYOPT: "--enable-frozen-string-literal"
33
+ bundler-cache: true
34
+ - run: bundle exec rake test
data/.gitignore CHANGED
@@ -1,19 +1,19 @@
1
- /.idea
1
+ /.bundle/
2
2
  /.yardoc
3
- /coverage
4
- /doc
5
- /log
6
- /pkg
7
- /test/rails
8
- /test/gemfiles/*.lock
9
- /.haml
10
- /site
11
- *.rbc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /.idea
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
11
+ /haml/
12
12
  .sass-cache
13
- .rbenv-version
14
- .rbx
15
13
  .ruby-version
16
- .rvmrc
17
- Gemfile.lock
18
- tmp
19
- .bundle/
14
+ *.bundle
15
+ *.so
16
+ *.su
17
+ *.a
18
+ *.o
19
+ *.swp
data/.yardopts CHANGED
@@ -7,10 +7,7 @@
7
7
  --title "Haml Documentation"
8
8
  --query 'object.type != :classvariable'
9
9
  --query 'object.type != :constant || @api && @api.text == "public"'
10
- --exclude lib/haml/plugin.rb
11
10
  --exclude lib/haml/railtie.rb
12
- --exclude lib/haml/helpers/action_view_mods.rb
13
- --exclude lib/haml/helpers/xss_mods.rb
14
11
  --hide-void-return
15
12
  --protected
16
13
  --no-private
data/CHANGELOG.md CHANGED
@@ -1,12 +1,212 @@
1
1
  # Haml Changelog
2
2
 
3
+ ## 7.2.0
4
+
5
+ * Do not require rails when haml is required https://github.com/haml/haml/pull/1201
6
+ * Point `changelog_uri` to GitHub Releases https://github.com/haml/haml/pull/1202
7
+
8
+ ## 7.1.0
9
+
10
+ * Support xhtml format for boolean nested data attributes https://github.com/haml/haml/pull/1200
11
+
12
+ ## 7.0.2
13
+
14
+ * Replace usages of `=~` with `.match?` where possible https://github.com/haml/haml/pull/1196
15
+ * Add source code URI to gemspec metadata https://github.com/haml/haml/pull/1197
16
+
17
+ ## 7.0.1
18
+
19
+ * Use `Regexp#match?` predicate where possible https://github.com/haml/haml/pull/1194
20
+ * Fix the 'Changelog' link on rubygems.org/gems/haml https://github.com/haml/haml/pull/1192
21
+
22
+ ## 7.0.0
23
+
24
+ * Change the default `attr_quote` from `'` to `"` https://github.com/haml/haml/issues/1188
25
+ * Bump required Ruby version to 3.2 https://github.com/haml/haml/issues/1176
26
+
27
+ ## 6.4.0
28
+
29
+ * Authorize characters in attribute name for vuejs https://github.com/haml/haml/pull/1172
30
+ * Compile new-style attributes statically https://github.com/haml/haml/pull/1165
31
+ * Remove newlines from template annotation comments https://github.com/haml/haml/pull/1186
32
+ * Fix line numbers within a :ruby filter https://github.com/haml/haml/pull/1166
33
+ * Fix .class + nested class array bug https://github.com/haml/haml/pull/1191
34
+
35
+ ## 6.3.1
36
+
37
+ * Optimize string transformation using `String#tr` https://github.com/haml/haml/pull/1168
38
+ * Provide a Changelog link on rubygems.org https://github.com/haml/haml/pull/1157
39
+
40
+ ## 6.3.0
41
+
42
+ * Remove `Haml::RailsTemplate#default_format` that was added in v6.1.3 for Turbo [#1152](https://github.com/haml/haml/issues/1152), [#1154](https://github.com/haml/haml/issues/1154) ([discussion](https://github.com/haml/haml/pull/1144#issuecomment-1755088572))
43
+ * See [the reference](https://github.com/haml/haml/blob/v6.3.0/REFERENCE.md#turbo) for suggested alternatives.
44
+
45
+ ## 6.2.5
46
+
47
+ * Deprecate `Haml::RailsTemplate#default_format` that was added in v6.1.3 for Turbo ([discussion](https://github.com/haml/haml/pull/1144#issuecomment-1755088572))
48
+
49
+ ## 6.2.4
50
+
51
+ * Support case-in statement [#1155](https://github.com/haml/haml/issues/1155)
52
+
53
+ ## 6.2.3
54
+
55
+ * Resurrect RDFa doctype support [#1147](https://github.com/haml/haml/issues/1147)
56
+
57
+ ## 6.2.2
58
+
59
+ * Allow adding custom attributes to `Haml::BOOLEAN_ATTRIBUTES` [#1148](https://github.com/haml/haml/issues/1148)
60
+ * Consider `aria-xxx: false` as a boolean attribute
61
+
62
+ ## 6.2.1
63
+
64
+ * Fix v6.2.0's bug in rendering dynamic `aria` attributes [#1149](https://github.com/haml/haml/issues/1149)
65
+
66
+ ## 6.2.0
67
+
68
+ * Drop the C extension [#1146](https://github.com/haml/haml/issues/1146)
69
+
70
+ ## 6.1.4
71
+
72
+ * Let `Haml::Util.escape_html` use `ERB::Escape` if available [#1145](https://github.com/haml/haml/issues/1145)
73
+
74
+ ## 6.1.3
75
+
76
+ * Add `Haml::RailsTemplate#default_format` for Turbo compatibility [#1144](https://github.com/haml/haml/issues/1144)
77
+
78
+ ## 6.1.2
79
+
80
+ * Use the rails template path as `filename` [#1140](https://github.com/haml/haml/issues/1140)
81
+
82
+ ## 6.1.1
83
+
84
+ * Fix an empty output of Ruby 3.1's Hash shorthand syntax [#1083](https://github.com/haml/haml/issues/1083)
85
+
86
+ ## 6.1.0
87
+
88
+ * Optimize away a `to_s` call on `=` scripts
89
+ * Fix escaping for objects that return an `html_safe` string on `to_s` [#1117](https://github.com/haml/haml/issues/1117)
90
+
91
+ ## 6.0.12
92
+
93
+ * Fix a whitespace removal with `>` and an `if`-`else` statement [#1114](https://github.com/haml/haml/issues/1114)
94
+
95
+ ## 6.0.11
96
+
97
+ * Fix a whitespace removal with `>` and an `if` statement [#1114](https://github.com/haml/haml/issues/1114)
98
+
99
+ ## 6.0.10
100
+
101
+ * Evaluate :erb filter in the template context like Haml 5
102
+
103
+ ## 6.0.9
104
+
105
+ * Support sass-embedded [#1112](https://github.com/haml/haml/issues/1112)
106
+
107
+ ## 6.0.8
108
+
109
+ * Support interpolation in HTML comments, which has not been working since 6.0.0
110
+ [#1107](https://github.com/haml/haml/issues/1107)
111
+
112
+ ## 6.0.7
113
+
114
+ * `Haml::Engine` and `Haml::Template` use StringBuffer instead of ArrayBuffer
115
+ * It seems more performant in many cases with recent Ruby versions.
116
+ * `Haml::RailsTemplate` is not affected.
117
+
118
+ ## 6.0.6
119
+
120
+ * Prevent CRuby from accidentally using the Ruby implementation fallback
121
+ * Reversing what v6.0.3 and v6.0.4 did, but still supporting Wasm.
122
+
123
+ ## 6.0.5
124
+
125
+ * Resurrect `#haml_object_ref` support in an object reference [#1097](https://github.com/haml/haml/issues/1097)
126
+ * This was removed in 6.0.0, and added back in this version.
127
+ * Stop warning `remove_whitespace: true` option.
128
+
129
+ ## 6.0.4
130
+
131
+ Released on October 2, 2022
132
+ ([diff](https://github.com/haml/haml/compare/v6.0.3...v6.0.4)).
133
+
134
+ * Fix a parse failure of `%` in attributes [#1096](https://github.com/haml/haml/issues/1096)
135
+ * Add another fallback from C to Ruby for Wasm.
136
+
137
+ ## 6.0.3
138
+
139
+ Released on September 28, 2022
140
+ ([diff](https://github.com/haml/haml/compare/v6.0.2...v6.0.3)).
141
+
142
+ * For Wasm, fallback to Ruby when C extension is not available.
143
+
144
+ ## 6.0.2
145
+
146
+ Released on September 28, 2022
147
+ ([diff](https://github.com/haml/haml/compare/v6.0.1...v6.0.2)).
148
+
149
+ * Unescape HTML-safe arguments for `surround`, `succeed`, and `precede` on Rails
150
+ [#1088](https://github.com/haml/haml/issues/1088)
151
+
152
+ ## 6.0.1
153
+
154
+ Released on September 23, 2022
155
+ ([diff](https://github.com/haml/haml/compare/v6.0.0...v6.0.1)).
156
+
157
+ * Unescape HTML-safe interpolation on Rails [#1084](https://github.com/haml/haml/issues/1084)
158
+ * Resurrect Haml 5's `AttributeParser.available?` for syntax\_tree-haml [#1085](https://github.com/haml/haml/issues/1085)
159
+
160
+ ## 6.0.0
161
+
162
+ Released on September 21, 2022
163
+ ([diff](https://github.com/haml/haml/compare/v5.2.2...v6.0.0)).
164
+
165
+ * Replace the implementation with Hamlit
166
+ * Haml 6 is about 1.7x faster than Haml 5 in [this benchmark](benchmark/slim/run-benchmarks.rb).
167
+ * The parser is kept as is, but everything else is replaced.
168
+ * The `haml` CLI interface was also replaced.
169
+ * The interface of `Haml::Engine` is changed. `Haml::Template` is most likely what you need now.
170
+ * before: `Haml::Engine.new("%p Haml code!").render`
171
+ * after: `Haml::Template.new { "%p Haml code!" }.render`
172
+ * Most Haml helpers are removed.
173
+ * Rails:
174
+ * Kept: `find_and_reserve`, `preserve`, `surround`, `precede`, `succeed`, `capture_haml`
175
+ * Removed: `block_is_haml?`, `flatten`, `haml_concat`, `haml_indent`, `haml_tag`, `haml_tag_if`, `html_attrs`,
176
+ `html_escape`, `init_haml_helpers`, `is_haml?`, `list_of`, `non_haml`, `tab_down`, `tab_up`, `with_tabs`
177
+ * Tilt:
178
+ * Kept: `preserve`
179
+ * Removed: `block_is_haml?`, `capture_haml`, `escape_once`, `find_and_preserve`, `flatten`, `haml_concat`,
180
+ `haml_indent`, `haml_tag`, `haml_tag_if`, `html_attrs`, `html_escape`, `init_haml_helpers`, `is_haml?`,
181
+ `list_of`, `non_haml`, `precede`, `succeed`, `surround`, `tab_down`, `tab_up`, `with_tabs`
182
+ * `:ruby` filter
183
+ * Removed: `haml_io`
184
+ * Alternatives to the removed helpers:
185
+ * Some simple ones could work by copying [the original definition](https://github.com/haml/haml/blob/v5.2.2/lib/haml/helpers.rb).
186
+ * For helpers generating general HTML tags, also consider using what your framework provides, e.g. Rails `content_tag`.
187
+ Same applies to `capture_haml`, e.g. Rails `capture`.
188
+ * Ones that rely on `Haml::Buffer` have no direct alternative by design. They existed at the cost of performance.
189
+ You need to define a helper, instantiate a String buffer in it, append stuff to it, and call it inside `=`.
190
+ * Only the following attributes and `aria`/`data` attributes are considered boolean attributes:
191
+ * `allowfullscreen`, `async`, `autobuffer`, `autofocus`, `autoplay`, `checked`, `controls`, `default`,
192
+ `defer`, `disabled`, `download`, `formnovalidate`, `hidden`, `inert`, `ismap`, `itemscope`, `loop`,
193
+ `multiple`, `muted`, `novalidate`, `open`, `pubdate`, `readonly`, `required`, `reversed`, `scoped`,
194
+ `seamless`, `selected`, `sortable`, `truespeed`, `typemustmatch`
195
+ * Only `data` and `aria` attributes support using a nested Hash to render hyphenated attributes, e.g.
196
+ `data: { foo: 'bar' }` becomes `data-foo="bar"`, but this no longer works for non-`data`/`aria` attributes.
197
+ * Some legacy Rails integration is removed.
198
+ * The default value of `escape_html` option became true.
199
+ * `-` script lines no longer support capturing. Only `=` lines are supported to yield a nested block.
200
+ * Overriding `data` attributes with another falsy `data-*` attribute that has the same name
201
+ is no longer supported. [#1105](https://github.com/haml/haml/issues/1105)
202
+ * :erb filter is not executed in the template context (fixed in 6.0.10)
203
+
3
204
  ## 5.2.2
205
+
4
206
  Released on July 27, 2021
5
207
  ([diff](https://github.com/haml/haml/compare/v5.2.1...v5.2.2)).
6
208
 
7
- * Support for adding Annotations to Haml output (a Rails feature 6.1+)
8
- * Expanded test matrix to include Ruby 3.0 and Rails 6.1
9
- * Only testing Ruby 2.7+ and Rails 5.2+
209
+ * Support `config.action_view.annotate_rendered_view_with_filenames = true` of Rails 6.1
10
210
 
11
211
  ## 5.2.1
12
212
 
@@ -1311,7 +1511,7 @@ Haml 2.2 introduces a new syntax for attributes
1311
1511
  based on the HTML syntax.
1312
1512
  For example:
1313
1513
 
1314
- %a(href="http://haml.info" title="Haml's so cool!")
1514
+ %a(href="https://haml.info" title="Haml's so cool!")
1315
1515
  %img(src="/images/haml.png" alt="Haml")
1316
1516
 
1317
1517
  There are two main reasons for this.
data/FAQ.md CHANGED
@@ -141,7 +141,7 @@ For other plugins, a little searching will probably turn up a way to fix them as
141
141
 
142
142
  ## You still haven't answered my question!
143
143
 
144
- Sorry! Try looking at the [Haml](http://haml.info/docs/yardoc/file.REFERENCE.html) reference,
144
+ Sorry! Try looking at the [Haml](https://haml.info/docs/yardoc/file.REFERENCE.html) reference,
145
145
  If you can't find an answer there,
146
146
  feel free to ask in `#haml` on irc.freenode.net
147
147
  or send an email to the [mailing list](http://groups.google.com/group/haml).
data/Gemfile CHANGED
@@ -1,16 +1,25 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
+
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
8
+ # Specify your gem's dependencies in haml.gemspec
2
9
  gemspec
3
10
 
4
- gem "m"
5
- gem "pry"
6
- gem "simplecov"
11
+ gem 'benchmark-ips', '2.3.0'
12
+ gem 'maxitest'
13
+ gem 'base64'
14
+ gem 'bigdecimal'
15
+ gem 'mutex_m'
7
16
 
8
- group :docs do
9
- gem "yard"
10
- gem "kramdown"
11
- gem "sass"
12
- end
17
+ if /java/.match?(RUBY_PLATFORM) # JRuby
18
+ gem 'pandoc-ruby'
19
+ else
20
+ gem 'redcarpet'
13
21
 
14
- platform :mri do
15
- gem "ruby-prof"
22
+ if RUBY_PLATFORM !~ /mswin|mingw/ && RUBY_ENGINE != 'truffleruby'
23
+ gem 'stackprof'
24
+ end
16
25
  end
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2006-2019 Hampton Catlin and Natalie Weizenbaum
1
+ Copyright (c) 2006-2021 Hampton Catlin, Natalie Weizenbaum and Takashi Kokubun
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,22 +1,16 @@
1
1
  # Haml
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/haml.svg)](http://rubygems.org/gems/haml)
4
- [![Build Status](https://travis-ci.org/haml/haml.svg?branch=main)](http://travis-ci.org/haml/haml)
3
+ [![Gem Version](https://badge.fury.io/rb/haml.svg)](https://rubygems.org/gems/haml)
4
+ [![test](https://github.com/haml/haml/actions/workflows/test.yml/badge.svg)](https://github.com/haml/haml/actions/workflows/test.yml)
5
5
  [![Code Climate](https://codeclimate.com/github/haml/haml/badges/gpa.svg)](https://codeclimate.com/github/haml/haml)
6
- [![Inline docs](http://inch-ci.org/github/haml/haml.png)](http://inch-ci.org/github/haml/haml)
6
+ [![Inline docs](https://inch-ci.org/github/haml/haml.svg)](https://inch-ci.org/github/haml/haml)
7
+ [![Discord Server](https://dcbadge.limes.pink/api/server/https://discord.gg/G8dEAwvV2Y)](https://discord.gg/G8dEAwvV2Y)
7
8
 
8
9
  Haml is a templating engine for HTML. It's designed to make it both easier and
9
10
  more pleasant to write HTML documents, by eliminating redundancy, reflecting the
10
11
  underlying structure that the document represents, and providing an elegant syntax
11
12
  that's both powerful and easy to understand.
12
13
 
13
- ### Supported Versions
14
-
15
- * Ruby 2.6+
16
- * Rails 5.1+
17
-
18
- Other versions may likely work, but we don't test against them.
19
-
20
14
  ## Basic Usage
21
15
 
22
16
  Haml can be used from the command line or as part of a Ruby web framework. The
@@ -29,7 +23,7 @@ gem install haml
29
23
  After you write some Haml, you can run
30
24
 
31
25
  ~~~sh
32
- haml document.haml
26
+ haml render document.haml
33
27
  ~~~
34
28
 
35
29
  to compile it to HTML. For more information on these commands, check out
@@ -38,7 +32,7 @@ to compile it to HTML. For more information on these commands, check out
38
32
  haml --help
39
33
  ~~~
40
34
 
41
- To use Haml programmatically, check out the [YARD documentation](http://haml.info/docs/yardoc/).
35
+ To use Haml programmatically, check out the [YARD documentation](https://haml.info/docs/yardoc/).
42
36
 
43
37
  ## Using Haml with Rails
44
38
 
@@ -48,8 +42,8 @@ To use Haml with Rails, simply add Haml to your Gemfile and run `bundle`.
48
42
  gem 'haml'
49
43
  ~~~
50
44
 
51
- If you'd like to replace Rails's Erb-based generators with Haml, add
52
- [haml-rails](https://github.com/indirect/haml-rails) to your Gemfile as well.
45
+ If you'd like to replace Rails's ERB-based generators with Haml, add
46
+ [haml-rails](https://github.com/haml/haml-rails) to your Gemfile as well.
53
47
 
54
48
  ## Formatting
55
49
 
@@ -127,7 +121,7 @@ output the result. You can even use control statements like `if` and `while`:
127
121
  ~~~
128
122
 
129
123
  Haml provides far more tools than those presented here. Check out the [reference
130
- documentation](http://haml.info/docs/yardoc/file.REFERENCE.html)
124
+ documentation](https://haml.info/docs/yardoc/file.REFERENCE.html)
131
125
  for full details.
132
126
 
133
127
  ### Indentation
@@ -139,7 +133,7 @@ can't be mixed, and the same number of tabs or spaces must be used throughout.
139
133
  ## Contributing
140
134
 
141
135
  Contributions are welcomed, but before you get started please read the
142
- [guidelines](http://haml.info/development.html#contributing).
136
+ [guidelines](https://haml.info/development.html#contributing).
143
137
 
144
138
  After forking and then cloning the repo locally, install Bundler and then use it
145
139
  to install the development gem dependencies:
@@ -153,12 +147,6 @@ Once this is complete, you should be able to run the test suite:
153
147
  rake
154
148
  ~~~
155
149
 
156
- You'll get a warning that you need to install haml-spec, so run this:
157
-
158
- ~~~sh
159
- git submodule update --init
160
- ~~~
161
-
162
150
  At this point `rake` should run without error or warning and you are ready to
163
151
  start working on your patch!
164
152
 
@@ -169,34 +157,35 @@ on a specific area:
169
157
  ruby -Itest test/helper_test.rb -n test_buffer_access
170
158
  ~~~
171
159
 
172
- Haml currently supports Ruby 2.7.0 and higher, so please make sure your changes run on 2.7+.
160
+ Haml currently supports Ruby 3.2.0 and higher, so please make sure your changes run on 3.2+.
173
161
 
174
162
  ## Team
175
163
 
176
164
  ### Current Maintainers
177
165
 
178
- * [Hampton Catlin](https://github.com/hcatlin)
179
- * [Takashi Kokubun](https://github.com/k0kubun)
180
166
  * [Akira Matsuda](https://github.com/amatsuda)
167
+ * [Matt Wildig](https://github.com/mattwildig)
168
+ * [Tee Parham](https://github.com/teeparham)
169
+ * [Takashi Kokubun](https://github.com/k0kubun)
181
170
 
182
171
  ### Alumni
183
172
 
184
173
  Haml was created by [Hampton Catlin](http://hamptoncatlin.com), the author of
185
- the original implementation.
174
+ the original implementation. Hampton is no longer involved in day-to-day coding,
175
+ but still consults on language issues.
186
176
 
187
- [Natalie Weizenbaum](https://github.com/nex3) was for many years the primary developer
177
+ [Natalie Weizenbaum](http://nex-3.com) was for many years the primary developer
188
178
  and architect of the "modern" Ruby implementation of Haml.
189
179
 
190
- This project's been around for many years, and we have many amazing people who kept the project
191
- alive! as former maintainers like:
192
-
193
- [Norman Clarke](http://github.com/norman)
194
- [Matt Wildig](https://github.com/mattwildig)
195
- [Tee Parham](https://github.com/teeparham)
180
+ [Norman Clarke](https://github.com/norman) was the primary maintainer of Haml from 2012 to 2016.
196
181
 
197
182
  ## License
198
183
 
199
- Copyright (c) 2006-2021 Hampton Catlin, Natalie Weizenbaum and the Haml team
184
+ Some of Natalie's work on Haml was supported by Unspace Interactive.
185
+
186
+ Beyond that, the implementation is licensed under the MIT License.
187
+
188
+ Copyright (c) 2006-2019 Hampton Catlin, Natalie Weizenbaum and the Haml team
200
189
 
201
190
  Permission is hereby granted, free of charge, to any person obtaining a copy of
202
191
  this software and associated documentation files (the "Software"), to deal in