haml 6.2.3 → 6.3.0

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: e0e28e40ec5137482caae5c2fb466d21976027139b3f39d428035dbd35914774
4
- data.tar.gz: c906550bd147f7e6a2961ebd07bc59fcc69b3433c454141cb2ae29e1ccd64e2b
3
+ metadata.gz: b8754d03da194f9c74e620887cbc29d3aa95d93651129ca33aa60dc72be08dd1
4
+ data.tar.gz: f4d26ea914200ac345926641d0d0d8ba36fb4b62a47600f63015d5c2d1dc8a11
5
5
  SHA512:
6
- metadata.gz: '0583d8a879f6c7eda656d6c956a9e5573eedd5f94d14b28d378af85bbab73f220499b9c8021af0bad5946c95073cd1201d2d2765556e138696462bf2d28a4304'
7
- data.tar.gz: 2847f03720469d3eaabcc689f628198569f668b1c87c70f67422c70ed1af25103998cc004a86d9f430d57fb12f88078ef2fa27d544dad69ad9df95cc9241bfdd
6
+ metadata.gz: eccf9fb6676267281b3c918425e93f07e8771c2f41e8481a08f327cb2ddbd5b53e07f3c9025f37c1abc977ad732d3b2f67d3023c4e1f356897bed03e3572ca20
7
+ data.tar.gz: 5ecd4d17716d5b0b4be7b57ebcfd28457f1b803cd376e37d4bcece2f30632e4e46d988eba1048e0c303a3599db5049b464e31854dda7f538bfe30565169769e9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Haml Changelog
2
2
 
3
+ ## 6.3.0
4
+
5
+ * 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))
6
+ * See [the reference](https://github.com/haml/haml/blob/v6.3.0/REFERENCE.md#turbo) for suggested alternatives.
7
+
8
+ ## 6.2.5
9
+
10
+ * Deprecate `Haml::RailsTemplate#default_format` that was added in v6.1.3 for Turbo ([discussion](https://github.com/haml/haml/pull/1144#issuecomment-1755088572))
11
+ * See [the reference](https://github.com/haml/haml/blob/v6.2.5/REFERENCE.md#turbo) for suggested alternatives.
12
+
13
+ ## 6.2.4
14
+
15
+ * Support case-in statement [#1155](https://github.com/haml/haml/issues/1155)
16
+
3
17
  ## 6.2.3
4
18
 
5
19
  * Resurrect RDFa doctype support [#1147](https://github.com/haml/haml/issues/1147)
data/README.md CHANGED
@@ -146,12 +146,6 @@ Once this is complete, you should be able to run the test suite:
146
146
  rake
147
147
  ~~~
148
148
 
149
- You'll get a warning that you need to install haml-spec, so run this:
150
-
151
- ~~~sh
152
- git submodule update --init
153
- ~~~
154
-
155
149
  At this point `rake` should run without error or warning and you are ready to
156
150
  start working on your patch!
157
151
 
data/REFERENCE.md CHANGED
@@ -1295,3 +1295,22 @@ automatically, and so should be passed through
1295
1295
  same effect.
1296
1296
 
1297
1297
  Blocks of literal text can be preserved using the [`:preserve` filter](#preserve-filter).
1298
+
1299
+ ## Turbo
1300
+
1301
+ For people using Turbo-rails and Haml 6+ need to either:
1302
+ * follow the naming convention with the html format (ie. ensure any `.haml` files end `.html.haml`), or
1303
+ * add a monkey patch as follows:
1304
+
1305
+ ```rb
1306
+ # config/initializers/haml.rb
1307
+ require "haml/rails_template"
1308
+
1309
+ module Haml
1310
+ class RailsTemplate
1311
+ def default_format
1312
+ :html
1313
+ end
1314
+ end
1315
+ end
1316
+ ```
data/lib/haml/parser.rb CHANGED
@@ -78,7 +78,7 @@ module Haml
78
78
  #
79
79
  BLOCK_WITH_SPACES = /do\s*\|\s*[^\|]*\s+\|\z/
80
80
 
81
- MID_BLOCK_KEYWORDS = %w[else elsif rescue ensure end when].freeze
81
+ MID_BLOCK_KEYWORDS = %w[else elsif rescue ensure end when in].freeze
82
82
  START_BLOCK_KEYWORDS = %w[if begin case unless].freeze
83
83
  # Try to parse assignments to block starters as best as possible
84
84
  START_BLOCK_KEYWORD_REGEX = /(?:\w+(?:,\s*\w+)*\s*=\s*)?(#{START_BLOCK_KEYWORDS.join('|')})/
@@ -48,11 +48,6 @@ module Haml
48
48
  Engine.new(options).call(source)
49
49
  end
50
50
 
51
- # Rails Turbo looks for this
52
- def default_format
53
- :html
54
- end
55
-
56
51
  def supports_streaming?
57
52
  RailsTemplate.options[:streaming]
58
53
  end
data/lib/haml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Haml
3
- VERSION = '6.2.3'
3
+ VERSION = '6.3.0'
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.2.3
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum
@@ -9,10 +9,10 @@ authors:
9
9
  - Norman Clarke
10
10
  - Akira Matsuda
11
11
  - Takashi Kokubun
12
- autorequire:
12
+ autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2023-10-04 00:00:00.000000000 Z
15
+ date: 2023-12-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: temple
@@ -322,7 +322,7 @@ licenses:
322
322
  - MIT
323
323
  metadata:
324
324
  rubygems_mfa_required: 'true'
325
- post_install_message:
325
+ post_install_message:
326
326
  rdoc_options: []
327
327
  require_paths:
328
328
  - lib
@@ -337,8 +337,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
337
337
  - !ruby/object:Gem::Version
338
338
  version: '0'
339
339
  requirements: []
340
- rubygems_version: 3.3.26
341
- signing_key:
340
+ rubygems_version: 3.4.10
341
+ signing_key:
342
342
  specification_version: 4
343
343
  summary: An elegant, structured (X)HTML/XML templating engine.
344
344
  test_files: []