haml 6.1.1-java → 6.1.3-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c49120585ee72f608f19985f8429c363574fff21929b9bec48fe6d487673e5e4
4
- data.tar.gz: 8b5b3c80441f882ff293fa61ed24db3de70c0c074c851f35f7054475cf1e714f
3
+ metadata.gz: a7da897e6ef824a17684d84279f66aa5a21323899f34225bdc0851b99c14c76e
4
+ data.tar.gz: 9af0a48cd7c535df7828c2143cd2efa0b14b8b9c97a46412b28043735c9e251e
5
5
  SHA512:
6
- metadata.gz: 5dfb717d211afae611d67cfdcbdb79f4e952c82eb9058dec7fc7c10d7c85811e81832f80ae53b6a88b9d0c1f8ec511918b7afd4bebd47c7c0128b258117b2f12
7
- data.tar.gz: 9d885cb2997cab4bdb80a3c2263c52397126d02de71073b985d283a5971004bd3c3ebde8f7e26d543610c00558d71566525e792ca87035fea276375f67515b6d
6
+ metadata.gz: 579bb896c3393bc7622168aca11c52859c0e4c412d38b00bdecc6741cefe91d25d9d2477956893cc6b039bb46bac4c1170cc0f7cfe435d89beebc766619225e7
7
+ data.tar.gz: 89aa428f24ebbc96b95ffb4ef17e51db31930fa397e3e7b7d9730c6a62b4b27b5a22548431a6e82ebd3a93c1594221d8f13b5a9360119784f2a72f3221be355a
@@ -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
@@ -1,5 +1,13 @@
1
1
  # Haml Changelog
2
2
 
3
+ ## 6.1.3
4
+
5
+ * Add `Haml::RailsTemplate#default_format` for Turbo compatibility [#1144](https://github.com/haml/haml/issues/1144)
6
+
7
+ ## 6.1.2
8
+
9
+ * Use the rails template path as `filename` [#1140](https://github.com/haml/haml/issues/1140)
10
+
3
11
  ## 6.1.1
4
12
 
5
13
  * Fix an empty output of Ruby 3.1's Hash shorthand syntax [#1083](https://github.com/haml/haml/issues/1083)
@@ -100,6 +108,14 @@ Released on September 21, 2022
100
108
  * Removed: `block_is_haml?`, `capture_haml`, `escape_once`, `find_and_preserve`, `flatten`, `haml_concat`,
101
109
  `haml_indent`, `haml_tag`, `haml_tag_if`, `html_attrs`, `html_escape`, `init_haml_helpers`, `is_haml?`,
102
110
  `list_of`, `non_haml`, `precede`, `succeed`, `surround`, `tab_down`, `tab_up`, `with_tabs`
111
+ * `:ruby` filter
112
+ * Removed: `haml_io`
113
+ * Alternatives to the removed helpers:
114
+ * Some simple ones could work by copying [the original definition](https://github.com/haml/haml/blob/v5.2.2/lib/haml/helpers.rb).
115
+ * For helpers generating general HTML tags, also consider using what your framework provides, e.g. Rails `content_tag`.
116
+ Same applies to `capture_haml`, e.g. Rails `capture`.
117
+ * Ones that rely on `Haml::Buffer` have no direct alternative by design. They existed at the cost of performance.
118
+ You need to define a helper, instantiate a String buffer in it, append stuff to it, and call it inside `=`.
103
119
  * Only the following attributes and `aria`/`data` attributes are considered boolean attributes:
104
120
  * `allowfullscreen`, `async`, `autobuffer`, `autofocus`, `autoplay`, `checked`, `controls`, `default`,
105
121
  `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'
@@ -43,6 +48,11 @@ module Haml
43
48
  Engine.new(options).call(source)
44
49
  end
45
50
 
51
+ # Rails Turbo looks for this
52
+ def default_format
53
+ :html
54
+ end
55
+
46
56
  def supports_streaming?
47
57
  RailsTemplate.options[:streaming]
48
58
  end
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.3'
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.3
5
5
  platform: java
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-09-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  requirement: !ruby/object:Gem::Requirement
@@ -338,7 +338,8 @@ files:
338
338
  homepage: https://haml.info
339
339
  licenses:
340
340
  - MIT
341
- metadata: {}
341
+ metadata:
342
+ rubygems_mfa_required: 'true'
342
343
  post_install_message:
343
344
  rdoc_options: []
344
345
  require_paths:
@@ -354,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
354
355
  - !ruby/object:Gem::Version
355
356
  version: '0'
356
357
  requirements: []
357
- rubygems_version: 3.2.33
358
+ rubygems_version: 3.3.26
358
359
  signing_key:
359
360
  specification_version: 4
360
361
  summary: An elegant, structured (X)HTML/XML templating engine.