haml 6.1.1 → 6.1.2

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: 1c6e33698052b2d1823959741be8219446b8b3257f5124449daa8cd8deb70e4a
4
- data.tar.gz: d2a168766babc32a3f83b065e6d158e5b937995cdd5a46552fb95d4035ad5924
3
+ metadata.gz: f721367f32b443559aa0aa20e75bd7b9d179fffbfff06873cca328f26ae70689
4
+ data.tar.gz: dc52332427ab542277bb52374e6c20ba696180caad8a86cd04eee247c6c0f9bb
5
5
  SHA512:
6
- metadata.gz: c6d71bcdb86f5281b34c9f56684263db88e947b17c8d79eb764b6ecb8f17945ad7fc374b2ad8032066b0c7ae52e3c0045de3658b76fc073e5ee8ab73e3c7eae3
7
- data.tar.gz: 408d9dd0b14378515d175778a9d9b472b70819c2371189aa145d2e787590213f453bba60e6dec2aee5aadf9e7bc0fd6c4b077f96676c9b6e899896ce60eb07cc
6
+ metadata.gz: 13197f48f55be37cec0eb76bc6b9c2e32d37cc1b3e430a509bb9c362fbb1e8f44fb858f1d39b22a0b2c654dfb6b2c237756a08a4495cf31c42eae59a6ea15c77
7
+ data.tar.gz: 073bc4c02899dea76c285bb8561df5631e3553fc3d939e30f94fe1671814ca5c3c812c3bcec251b3f0a562c03a2db606ef9b7e37b3014c50638cf2e29c44c465
@@ -22,10 +22,11 @@ jobs:
22
22
  - '2.7'
23
23
  - '3.0'
24
24
  - '3.1'
25
+ - '3.2'
25
26
  - jruby
26
27
  - truffleruby-head
27
28
  steps:
28
- - uses: actions/checkout@v2
29
+ - uses: actions/checkout@v3
29
30
  - run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
30
31
  - name: Set up Ruby
31
32
  uses: ruby/setup-ruby@v1
data/CHANGELOG.md CHANGED
@@ -100,6 +100,8 @@ Released on September 21, 2022
100
100
  * Removed: `block_is_haml?`, `capture_haml`, `escape_once`, `find_and_preserve`, `flatten`, `haml_concat`,
101
101
  `haml_indent`, `haml_tag`, `haml_tag_if`, `html_attrs`, `html_escape`, `init_haml_helpers`, `is_haml?`,
102
102
  `list_of`, `non_haml`, `precede`, `succeed`, `surround`, `tab_down`, `tab_up`, `with_tabs`
103
+ * `:ruby` filter
104
+ * Removed: `haml_io`
103
105
  * Only the following attributes and `aria`/`data` attributes are considered boolean attributes:
104
106
  * `allowfullscreen`, `async`, `autobuffer`, `autofocus`, `autoplay`, `checked`, `controls`, `default`,
105
107
  `defer`, `disabled`, `download`, `formnovalidate`, `hidden`, `inert`, `ismap`, `itemscope`, `loop`,
data/Gemfile CHANGED
@@ -21,3 +21,7 @@ else
21
21
  gem 'stackprof'
22
22
  end
23
23
  end
24
+
25
+ if RUBY_VERSION < '2.6'
26
+ gem 'rake-compiler', '< 1.2.4'
27
+ end
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/haml.svg)](http://rubygems.org/gems/haml)
4
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
7
 
8
8
  Haml is a templating engine for HTML. It's designed to make it both easier and
9
9
  more pleasant to write HTML documents, by eliminating redundancy, reflecting the
data/REFERENCE.md CHANGED
@@ -180,10 +180,10 @@ closing tags for any element.
180
180
 
181
181
  ### Attributes: `{}` or `()` {#attributes}
182
182
 
183
- Brackets represent a Ruby hash that is used for specifying the attributes of an
183
+ Braces represent a Ruby hash that is used for specifying the attributes of an
184
184
  element. It is literally evaluated as a Ruby hash, so logic will work in it and
185
185
  local variables may be used. Quote characters within the attribute will be
186
- replaced by appropriate escape sequences. The hash is placed after the tag is
186
+ replaced with appropriate escape sequences. The hash is placed after the tag is
187
187
  defined. For example:
188
188
 
189
189
  %html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}
@@ -247,7 +247,7 @@ could render as either of:
247
247
  #### HTML-style Attributes: `()`
248
248
 
249
249
  Haml also supports a terser, less Ruby-specific attribute syntax based on HTML's
250
- attributes. These are used with parentheses instead of brackets, like so:
250
+ attributes. These are used with parentheses instead of braces, like so:
251
251
 
252
252
  %html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en")
253
253
 
@@ -320,7 +320,7 @@ or using `true` and `false`:
320
320
  %input(selected=true)
321
321
 
322
322
  This feature works only for attributes that are included in
323
- [`Haml::AttributeBuilder::BOOLEAN_ATTRIBUTES`](lib/haml/attribute_builder.rb),
323
+ [`Haml::AttributeBuilder::BOOLEAN_ATTRIBUTES`](https://github.com/haml/haml/blob/main/lib/haml/attribute_builder.rb#L5),
324
324
  as well as `data-` and `aria-` attributes.
325
325
 
326
326
  %input{'data-hidden' => false}
@@ -360,7 +360,7 @@ will render as:
360
360
 
361
361
  <a data-author-id='123' data-category='7' href='/posts'>Posts By Author</a>
362
362
 
363
- Notice that the underscore in `author_id` was replaced by a hyphen. If you wish
363
+ Notice that the underscore in `author_id` was replaced with a hyphen. If you wish
364
364
  to suppress this behavior, you can set Haml's
365
365
  {Haml::Options#hyphenate_data_attrs `:hyphenate_data_attrs` option} to `false`,
366
366
  and the output will be rendered as:
@@ -992,7 +992,7 @@ most code but you may have errors with code like the following:
992
992
 
993
993
  %span #{'{'}
994
994
 
995
- This code will generate a syntax error, complaining about unbalanced brackets.
995
+ This code will generate a syntax error, complaining about unbalanced braces.
996
996
  In cases like this, the recommended workaround is output the code as a Ruby
997
997
  string to force Haml to parse the code with Ruby.
998
998
 
@@ -1093,7 +1093,7 @@ uses to implement many of its filters:
1093
1093
 
1094
1094
  Tilt.prefer Tilt::RedCarpetTemplate
1095
1095
 
1096
- See the [Tilt documentation](https://github.com/rtomayko/tilt#fallback-mode) for
1096
+ See the [Tilt documentation](https://github.com/rtomayko/tilt) for
1097
1097
  more info.
1098
1098
 
1099
1099
  Haml comes with the following filters defined:
@@ -1145,7 +1145,7 @@ implemented using Tilt.
1145
1145
 
1146
1146
  ### `:maruku` {#maruku-filter}
1147
1147
 
1148
- Parses the filtered text with [Maruku](https://github.com/nex3/maruku), which
1148
+ Parses the filtered text with [Maruku](https://github.com/bhollis/maruku), which
1149
1149
  has some non-standard extensions to Markdown.
1150
1150
 
1151
1151
  As of Haml 4.0, this filter is defined in [Haml
@@ -1168,11 +1168,8 @@ HTML escape code for newlines, to preserve nice-looking output. See also
1168
1168
 
1169
1169
  ### `:ruby` {#ruby-filter}
1170
1170
 
1171
- Parses the filtered text with the normal Ruby interpreter. Creates an `IO`
1172
- object named `haml_io`, anything written to it is output into the Haml document.
1173
- Not available if the {Haml::Options#suppress_eval `:suppress_eval`} option is
1174
- set to true. The Ruby code is evaluated in the same context as the Haml
1175
- template.
1171
+ Parses the filtered text with the normal Ruby interpreter.
1172
+ The Ruby code is evaluated in the same context as the Haml template.
1176
1173
 
1177
1174
  ### `:sass` {#sass-filter}
1178
1175
 
@@ -1213,7 +1210,7 @@ end
1213
1210
  Haml::Filters.registered[:hello] ||= HelloFilter
1214
1211
  ```
1215
1212
 
1216
- A more complex complex example
1213
+ A more complex example:
1217
1214
 
1218
1215
  ```ruby
1219
1216
  class BetterFilter < Haml::Filters::Base
@@ -1285,7 +1282,7 @@ can be wrapped over multiple lines,
1285
1282
  as long as each line but the last ends in a comma
1286
1283
  (see [Inserting Ruby](#inserting_ruby)).
1287
1284
 
1288
- ## Whitespace Preservation
1285
+ ## Whitespace Preservation {#whitespace_preservation}
1289
1286
 
1290
1287
  Sometimes you don't want Haml to indent all your text.
1291
1288
  For example, tags like `pre` and `textarea` are whitespace-sensitive;
data/haml.gemspec CHANGED
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
+ spec.metadata = { 'rubygems_mfa_required' => 'true' }
23
+
22
24
  if /java/ === RUBY_PLATFORM
23
25
  spec.platform = 'java'
24
26
  else
@@ -27,6 +27,11 @@ module Haml
27
27
  source ||= template.source
28
28
  options = RailsTemplate.options
29
29
 
30
+ # Make the filename available in parser etc.
31
+ if template.respond_to?(:identifier)
32
+ options = options.merge(filename: template.identifier)
33
+ end
34
+
30
35
  # https://github.com/haml/haml/blob/4.0.7/lib/haml/template/plugin.rb#L19-L20
31
36
  # https://github.com/haml/haml/blob/4.0.7/lib/haml/options.rb#L228
32
37
  if template.respond_to?(:type) && template.type == 'text/xml'
data/lib/haml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Haml
3
- VERSION = '6.1.1'
3
+ VERSION = '6.1.2'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.1
4
+ version: 6.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2022-12-10 00:00:00.000000000 Z
15
+ date: 2023-08-12 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: temple
@@ -339,7 +339,8 @@ files:
339
339
  homepage: https://haml.info
340
340
  licenses:
341
341
  - MIT
342
- metadata: {}
342
+ metadata:
343
+ rubygems_mfa_required: 'true'
343
344
  post_install_message:
344
345
  rdoc_options: []
345
346
  require_paths:
@@ -355,7 +356,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
355
356
  - !ruby/object:Gem::Version
356
357
  version: '0'
357
358
  requirements: []
358
- rubygems_version: 3.4.0.dev
359
+ rubygems_version: 3.4.1
359
360
  signing_key:
360
361
  specification_version: 4
361
362
  summary: An elegant, structured (X)HTML/XML templating engine.