Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 10, 2025

Bumps haml from 6.3.0 to 7.0.2.

Release notes

Sourced from haml's releases.

v7.0.2

What's Changed

New Contributors

Full Changelog: haml/haml@v7.0.1...v7.0.2

v7.0.1

What's Changed

New Contributors

Full Changelog: haml/haml@v7.0.0...v7.0.1

v7.0.0

What's Changed

Full Changelog: haml/haml@v6.4.0...v7.0.0

v6.4.0

What's Changed

New Contributors

Full Changelog: haml/haml@v6.3.1...v6.4.0

v6.3.1

What's Changed

... (truncated)

Changelog

Sourced from haml's changelog.

7.0.2

7.0.1

7.0.0

6.4.0

6.3.1

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [haml](https://github.com/haml/haml) from 6.3.0 to 7.0.2.
- [Release notes](https://github.com/haml/haml/releases)
- [Changelog](https://github.com/haml/haml/blob/main/CHANGELOG.md)
- [Commits](haml/haml@v6.3.0...v7.0.2)

---
updated-dependencies:
- dependency-name: haml
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Nov 10, 2025
@github-actions
Copy link

@github-actions
Copy link

gem compare haml 6.3.0 7.0.2

Compared versions: ["6.3.0", "7.0.2"]
  DIFFERENT date:
    6.3.0: 2023-12-10 00:00:00 UTC
    7.0.2: 1980-01-02 00:00:00 UTC
  DIFFERENT metadata:
    6.3.0: {"rubygems_mfa_required" => "true"}
    7.0.2: {"rubygems_mfa_required" => "true", "changelog_uri" => "https://haml.info/docs/yardoc/file.CHANGELOG.html", "source_code_uri" => "https://github.com/haml/haml"}
  DIFFERENT required_ruby_version:
    6.3.0: >= 2.1.0
    7.0.2: >= 3.2.0
  DIFFERENT rubygems_version:
    6.3.0: 3.4.10
    7.0.2: 3.6.7
  DIFFERENT version:
    6.3.0: 6.3.0
    7.0.2: 7.0.2
  DIFFERENT files:
    6.3.0->7.0.2:
      * Added:
            .github/workflows/release.yml +46/-0
      * Changed:
            .github/workflows/test.yml +5/-7
            CHANGELOG.md +28/-1
            Gemfile +4/-6
            README.md +2/-1
            REFERENCE.md +9/-16
            bin/console +3/-4
            bin/stackprof +2/-2
            haml.gemspec +4/-2
            lib/haml/attribute_builder.rb +2/-2
            lib/haml/attribute_compiler.rb +1/-1
            lib/haml/engine.rb +2/-2
            lib/haml/filters/plain.rb +1/-1
            lib/haml/filters/ruby.rb +1/-1
            lib/haml/parser.rb +10/-10
            lib/haml/rails_template.rb +2/-2
            lib/haml/string_splitter.rb +1/-1
            lib/haml/util.rb +2/-2
            lib/haml/version.rb +1/-1
  DIFFERENT development dependencies:
    6.3.0->7.0.2:
      * Deleted:
            haml [">= 5"] (development)
  DIFFERENT Gemfile dependencies
    6.3.0->7.0.2:
      * Added:
            base64 [">= 0"] (runtime)
            bigdecimal [">= 0"] (runtime)
            mutex_m [">= 0"] (runtime)
      * Deleted
            pry [">= 0"] (runtime)
            rake-compiler ["< 1.2.4"] (runtime)

@github-actions
Copy link

gem compare --diff haml 6.3.0 7.0.2

Compared versions: ["6.3.0", "7.0.2"]
  DIFFERENT files:
    6.3.0->7.0.2:
      * Added:
        .github/workflows/release.yml
                --- /tmp/20251110-2422-ylej1x	2025-11-10 03:01:56.603460306 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/.github/workflows/release.yml	2025-11-10 03:01:56.593460294 +0000
                @@ -0,0 +1,46 @@
                +name: Release
                +
                +on:
                +  push:
                +    tags:
                +      - 'v*'
                +
                +permissions:
                +  contents: read
                +
                +jobs:
                +  push:
                +    if: github.repository_owner == 'haml'
                +    runs-on: ubuntu-latest
                +
                +    environment:
                +      name: rubygems.org
                +      url: https://rubygems.org/gems/haml
                +
                +    permissions:
                +      contents: write
                +      id-token: write
                +
                +    steps:
                +      - name: Harden Runner
                +        uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
                +        with:
                +          egress-policy: audit
                +
                +      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
                +
                +      - name: Set up Ruby
                +        uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
                +        with:
                +          bundler-cache: true
                +          ruby-version: ruby
                +
                +      - name: Publish to RubyGems
                +        uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
                +
                +      - name: Create GitHub release
                +        run: |
                +          tag_name="$(git describe --tags --abbrev=0)"
                +          gh release create "${tag_name}" --verify-tag --generate-notes
                +        env:
                +          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      * Changed:
        .github/workflows/test.yml
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/.github/workflows/test.yml	2025-11-10 03:01:56.583460282 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/.github/workflows/test.yml	2025-11-10 03:01:56.593460294 +0000
                @@ -20,5 +19,0 @@
                -          - '2.5'
                -          - '2.6'
                -          - '2.7'
                -          - '3.0'
                -          - '3.1'
                @@ -25,0 +21,3 @@
                +          - '3.3'
                +          - '3.4'
                +          - ruby-head
                @@ -27 +25 @@
                -          - truffleruby-head
                +          - truffleruby
                @@ -29 +27 @@
                -      - uses: actions/checkout@v3
                +      - uses: actions/checkout@v4
        CHANGELOG.md
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/CHANGELOG.md	2025-11-10 03:01:56.584460283 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/CHANGELOG.md	2025-11-10 03:01:56.594460295 +0000
                @@ -2,0 +3,28 @@
                +## 7.0.2
                +
                +* Replace usages of `=~` with `.match?` where possible https://github.com/haml/haml/pull/1196
                +* Add source code URI to gemspec metadata https://github.com/haml/haml/pull/1197
                +
                +## 7.0.1
                +
                +* Use `Regexp#match?` predicate where possible https://github.com/haml/haml/pull/1194
                +* Fix the 'Changelog' link on rubygems.org/gems/haml https://github.com/haml/haml/pull/1192
                +
                +## 7.0.0
                +
                +* Change the default `attr_quote` from `'` to `"` https://github.com/haml/haml/issues/1188
                +* Bump required Ruby version to 3.2 https://github.com/haml/haml/issues/1176
                +
                +## 6.4.0
                +
                +* Authorize characters in attribute name for vuejs https://github.com/haml/haml/pull/1172
                +* Compile new-style attributes statically https://github.com/haml/haml/pull/1165
                +* Remove newlines from template annotation comments https://github.com/haml/haml/pull/1186
                +* Fix line numbers within a :ruby filter https://github.com/haml/haml/pull/1166
                +* Fix .class + nested class array bug https://github.com/haml/haml/pull/1191
                +
                +## 6.3.1
                +
                +* Optimize string transformation using `String#tr` https://github.com/haml/haml/pull/1168
                +* Provide a Changelog link on rubygems.org https://github.com/haml/haml/pull/1157
                +
                @@ -11 +38,0 @@
                -  * See [the reference](https://github.com/haml/haml/blob/v6.2.5/REFERENCE.md#turbo) for suggested alternatives.
        Gemfile
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/Gemfile	2025-11-10 03:01:56.584460283 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/Gemfile	2025-11-10 03:01:56.594460295 +0000
                @@ -13 +13,3 @@
                -gem 'pry'
                +gem 'base64'
                +gem 'bigdecimal'
                +gem 'mutex_m'
                @@ -15 +17 @@
                -if /java/ === RUBY_PLATFORM # JRuby
                +if /java/.match?(RUBY_PLATFORM) # JRuby
                @@ -23,4 +24,0 @@
                -end
                -
                -if RUBY_VERSION < '2.6'
                -  gem 'rake-compiler', '< 1.2.4'
        README.md
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/README.md	2025-11-10 03:01:56.584460283 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/README.md	2025-11-10 03:01:56.595460296 +0000
                @@ -6,0 +7 @@
                +[![Discord Server](https://dcbadge.limes.pink/api/server/https://discord.gg/G8dEAwvV2Y)](https://discord.gg/G8dEAwvV2Y)
                @@ -159 +160 @@
                -Haml currently supports Ruby 2.0.0 and higher, so please make sure your changes run on 2.0+.
                +Haml currently supports Ruby 3.2.0 and higher, so please make sure your changes run on 3.2+.
        REFERENCE.md
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/REFERENCE.md	2025-11-10 03:01:56.585460284 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/REFERENCE.md	2025-11-10 03:01:56.595460296 +0000
                @@ -108 +108 @@
                -For the complete list of available options, please see `Haml::Engine`.
                +For the complete list of available options, please see [`Haml::Engine`](https://github.com/haml/haml/blob/main/lib/haml/engine.rb).
                @@ -323 +323 @@
                -[`Haml::AttributeBuilder::BOOLEAN_ATTRIBUTES`](https://github.com/haml/haml/blob/main/lib/haml/attribute_builder.rb#L5),
                +[`Haml::BOOLEAN_ATTRIBUTES`](https://github.com/haml/haml/blob/main/lib/haml/attribute_compiler.rb#L8),
                @@ -363,7 +362,0 @@
                -Notice that the underscore in `author_id` was replaced with a hyphen. If you wish
                -to suppress this behavior, you can set Haml's
                -{Haml::Options#hyphenate_data_attrs `:hyphenate_data_attrs` option} to `false`,
                -and the output will be rendered as:
                -
                -    <a data-author_id='123' data-category='7' href='/posts'>Posts By Author</a>
                -
                @@ -571 +564 @@
                -      @user = CrazyUser.find(15)
                +      @user = FriendlyUser.find(15)
                @@ -582 +575 @@
                -    <div class='greeting_crazy_user' id='greeting_crazy_user_15'>
                +    <div class='greeting_friendly_user' id='greeting_friendly_user_15'>
                @@ -590 +583 @@
                -    # file: app/models/crazy_user.rb
                +    # file: app/models/friendly_user.rb
                @@ -592 +585 @@
                -    class CrazyUser < ActiveRecord::Base
                +    class FriendlyUser < ActiveRecord::Base
                @@ -594 +587 @@
                -        "a_crazy_user"
                +        "a_friendly_user"
                @@ -605 +598 @@
                -    <div class='a_crazy_user' id='a_crazy_user_15'>
                +    <div class='a_friendly_user' id='a_friendly_user_15'>
                @@ -1301 +1294 @@
                -For people using Turbo-rails and Haml 6+ need to either:
                +For people using Turbo-rails need to either:
        bin/console
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/bin/console	2025-11-10 03:01:56.585460284 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/bin/console	2025-11-10 03:01:56.595460296 +0000
                @@ -4 +4 @@
                -require 'hamlit'
                +require 'haml'
                @@ -9,3 +9,2 @@
                -# (If you use this, don't forget to add pry to your Gemfile!)
                -require 'pry'
                -Pry.start
                +require 'irb'
                +IRB.start
        bin/stackprof
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/bin/stackprof	2025-11-10 03:01:56.586460285 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/bin/stackprof	2025-11-10 03:01:56.596460298 +0000
                @@ -4 +4 @@
                -require 'hamlit'
                +require 'haml'
                @@ -23 +23 @@
                -Hamlit::Engine.new.call(haml)
                +Haml::Engine.new.call(haml)
        haml.gemspec
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/haml.gemspec	2025-11-10 03:01:56.586460285 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/haml.gemspec	2025-11-10 03:01:56.596460298 +0000
                @@ -24 +24,4 @@
                -  spec.required_ruby_version = '>= 2.1.0'
                +  spec.metadata["changelog_uri"] = spec.homepage + "/docs/yardoc/file.CHANGELOG.html"
                +  spec.metadata["source_code_uri"] = "https://github.com/haml/haml"
                +
                +  spec.required_ruby_version = '>= 3.2.0'
                @@ -34 +36,0 @@
                -  spec.add_development_dependency 'haml', '>= 5'
        lib/haml/attribute_builder.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/attribute_builder.rb	2025-11-10 03:01:56.586460285 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/attribute_builder.rb	2025-11-10 03:01:56.597460299 +0000
                @@ -57 +57 @@
                -          classes += value.select { |v| v }
                +          classes += value.flatten.select { |v| v }
                @@ -108 +108 @@
                -              flattened["#{key}-#{k.to_s.gsub(/_/, '-')}"] = v
                +              flattened["#{key}-#{k.to_s.tr('_', '-')}"] = v
        lib/haml/attribute_compiler.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/attribute_compiler.rb	2025-11-10 03:01:56.587460287 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/attribute_compiler.rb	2025-11-10 03:01:56.597460299 +0000
                @@ -101 +101 @@
                -      if Temple::StaticAnalyzer.static?(exp)
                +      if values.last.first == :static || Temple::StaticAnalyzer.static?(exp)
        lib/haml/engine.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/engine.rb	2025-11-10 03:01:56.588460288 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/engine.rb	2025-11-10 03:01:56.598460300 +0000
                @@ -20 +20 @@
                -      attr_quote:   "'",
                +      attr_quote:   '"',
                @@ -26 +26 @@
                -      filename:     "",
                +      filename:     '',
        lib/haml/filters/plain.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/filters/plain.rb	2025-11-10 03:01:56.590460290 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/filters/plain.rb	2025-11-10 03:01:56.600460303 +0000
                @@ -10 +10 @@
                -        [:multi, *compile_plain(text)]
                +        [:multi, [:newline], *compile_plain(text)]
        lib/haml/filters/ruby.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/filters/ruby.rb	2025-11-10 03:01:56.590460290 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/filters/ruby.rb	2025-11-10 03:01:56.600460303 +0000
                @@ -6 +6 @@
                -        [:code, node.value[:text]]
                +        [:multi, [:newline], [:code, node.value[:text]]]
        lib/haml/parser.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/parser.rb	2025-11-10 03:01:56.591460292 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/parser.rb	2025-11-10 03:01:56.602460305 +0000
                @@ -185 +185 @@
                -      return @template_tabs + 1 if flat? && line.whitespace =~ /^#{@flat_spaces}/
                +      return @template_tabs + 1 if flat? && /^#{@flat_spaces}/.match?(line.whitespace)
                @@ -239 +239 @@
                -        unless value =~ /\A{.*}\z/m
                +        unless /\A{.*}\z/m.match?(value)
                @@ -531 +531 @@
                -      raise Error.new(Error.message(:invalid_filter_name, name)) unless name =~ /^\w+$/
                +      raise Error.new(Error.message(:invalid_filter_name, name)) unless /^\w+$/.match?(name)
                @@ -633 +633 @@
                -      if !attributes.empty? && (attributes =~ /[.#](\.|#|\z)/)
                +      if !attributes.empty? && /[.#](\.|#|\z)/.match?(attributes)
                @@ -752 +752 @@
                -      unless (name = scanner.scan(/[-:\w]+/))
                +      unless (name = scanner.scan(/[-:@#\w\.]+/))
                @@ -789 +789 @@
                -          (line_defined && @line.text[0] == ?: && line.full =~ %r[^#{@line.full[/^\s+/]}\s])
                +          (line_defined && @line.text[0] == ?: && %r[^#{@line.full[/^\s+/]}\s].match?(line.full))
                @@ -799 +799 @@
                -      line && !line.text.empty? && line.full !~ /^#{@flat_spaces}/
                +      line && !line.text.empty? && !(/^#{@flat_spaces}/.match?(line.full))
                @@ -817 +817 @@
                -      text && text.length > 1 && text[-1] == MULTILINE_CHAR_VALUE && text[-2] == ?\s && text !~ BLOCK_WITH_SPACES
                +      text && text.length > 1 && text[-1] == MULTILINE_CHAR_VALUE && text[-2] == ?\s && !BLOCK_WITH_SPACES.match?(text)
                @@ -841 +841 @@
                -        !((text[-3, 2] =~ /\W\?/) || text[-3, 2] == "?\\")
                +        !(/\W\?/.match?(text[-3, 2]) || text[-3, 2] == "?\\")
                @@ -874 +874 @@
                -      @next_line.full =~ (@indentation ? /^#{@indentation * (@template_tabs + 1)}/ : /^\s/)
                +      (@indentation ? /^#{@indentation * (@template_tabs + 1)}/ : /^\s/).match?(@next_line.full)
        lib/haml/rails_template.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/rails_template.rb	2025-11-10 03:01:56.592460293 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/rails_template.rb	2025-11-10 03:01:56.602460305 +0000
                @@ -43,2 +43,2 @@
                -          preamble: "<!-- BEGIN #{template.short_identifier} -->\n",
                -          postamble: "<!-- END #{template.short_identifier} -->\n",
                +          preamble: "<!-- BEGIN #{template.short_identifier} -->",
                +          postamble: "<!-- END #{template.short_identifier} -->",
        lib/haml/string_splitter.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/string_splitter.rb	2025-11-10 03:01:56.592460293 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/string_splitter.rb	2025-11-10 03:01:56.603460306 +0000
                @@ -10 +10 @@
                -    if defined?(Ripper) && RUBY_VERSION >= "2.0.0" && Ripper.respond_to?(:lex)
                +    if defined?(Ripper) && Ripper.respond_to?(:lex)
        lib/haml/util.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/util.rb	2025-11-10 03:01:56.593460294 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/util.rb	2025-11-10 03:01:56.603460306 +0000
                @@ -72 +72 @@
                -        elsif str.encoding.name =~ /^UTF-(16|32)(BE|LE)?$/
                +        elsif /^UTF-(16|32)(BE|LE)?$/.match?(str.encoding.name)
                @@ -255 +255 @@
                -      return unless name =~ /(en)?coding/in
                +      return unless /(en)?coding/in.match?(name)
        lib/haml/version.rb
                --- /tmp/d20251110-2422-4x5fa9/haml-6.3.0/lib/haml/version.rb	2025-11-10 03:01:56.593460294 +0000
                +++ /tmp/d20251110-2422-4x5fa9/haml-7.0.2/lib/haml/version.rb	2025-11-10 03:01:56.603460306 +0000
                @@ -3 +3 @@
                -  VERSION = '6.3.0'
                +  VERSION = '7.0.2'

@github-actions
Copy link

gem compare temple 0.10.3 0.10.4

Compared versions: ["0.10.3", "0.10.4"]
  DIFFERENT date:
    0.10.3: 2023-10-03 00:00:00 UTC
    0.10.4: 2025-07-24 00:00:00 UTC
  DIFFERENT rubygems_version:
    0.10.3: 3.4.10
    0.10.4: 3.6.7
  DIFFERENT version:
    0.10.3: 0.10.3
    0.10.4: 0.10.4
  DIFFERENT files:
    0.10.3->0.10.4:
      * Changed:
            .github/workflows/test.yml +3/-1
            CHANGES +4/-0
            lib/temple/filters/encoding.rb +1/-1
            lib/temple/version.rb +1/-1

@github-actions
Copy link

gem compare --diff temple 0.10.3 0.10.4

Compared versions: ["0.10.3", "0.10.4"]
  DIFFERENT files:
    0.10.3->0.10.4:
      * Changed:
        .github/workflows/test.yml
                --- /tmp/d20251110-2993-3pplap/temple-0.10.3/.github/workflows/test.yml	2025-11-10 03:02:19.623458638 +0000
                +++ /tmp/d20251110-2993-3pplap/temple-0.10.4/.github/workflows/test.yml	2025-11-10 03:02:19.631458636 +0000
                @@ -25,0 +26,2 @@
                +          - '3.3'
                +          - '3.4'
                @@ -29 +31 @@
                -      - uses: actions/checkout@v3
                +      - uses: actions/checkout@v4
        CHANGES
                --- /tmp/d20251110-2993-3pplap/temple-0.10.3/CHANGES	2025-11-10 03:02:19.623458638 +0000
                +++ /tmp/d20251110-2993-3pplap/temple-0.10.4/CHANGES	2025-11-10 03:02:19.632458636 +0000
                @@ -0,0 +1,4 @@
                +0.10.4
                +
                +  * Fix Ruby 3.4 compatibility (#152)
                +
        lib/temple/filters/encoding.rb
                --- /tmp/d20251110-2993-3pplap/temple-0.10.3/lib/temple/filters/encoding.rb	2025-11-10 03:02:19.626458637 +0000
                +++ /tmp/d20251110-2993-3pplap/temple-0.10.4/lib/temple/filters/encoding.rb	2025-11-10 03:02:19.634458636 +0000
                @@ -13 +13 @@
                -          s = s.dup if s.frozen?
                +          s = +s
        lib/temple/version.rb
                --- /tmp/d20251110-2993-3pplap/temple-0.10.3/lib/temple/version.rb	2025-11-10 03:02:19.631458636 +0000
                +++ /tmp/d20251110-2993-3pplap/temple-0.10.4/lib/temple/version.rb	2025-11-10 03:02:19.639458635 +0000
                @@ -3 +3 @@
                -  VERSION = '0.10.3'
                +  VERSION = '0.10.4'

@github-actions
Copy link

gem compare tilt 2.4.0 2.6.1

Compared versions: ["2.4.0", "2.6.1"]
  DIFFERENT date:
    2.4.0: 2024-06-27 00:00:00 UTC
    2.6.1: 1980-01-02 00:00:00 UTC
  DIFFERENT rubygems_version:
    2.4.0: 3.5.9
    2.6.1: 3.6.7
  DIFFERENT version:
    2.4.0: 2.4.0
    2.6.1: 2.6.1
  DIFFERENT files:
    2.4.0->2.6.1:
      * Deleted:
            lib/tilt/erubis.rb
            lib/tilt/maruku.rb
            lib/tilt/wikicloth.rb
      * Changed:
            lib/tilt.rb +9/-4
            lib/tilt/creole.rb +2/-0
            lib/tilt/liquid.rb +0/-3
            lib/tilt/mapping.rb +3/-3
            lib/tilt/rdoc.rb +0/-8
            lib/tilt/template.rb +184/-28

@github-actions
Copy link

gem compare --diff tilt 2.4.0 2.6.1

Compared versions: ["2.4.0", "2.6.1"]
  DIFFERENT files:
    2.4.0->2.6.1:
      * Deleted:
            lib/tilt/erubis.rb
            lib/tilt/maruku.rb
            lib/tilt/wikicloth.rb
      * Changed:
        lib/tilt.rb
                --- /tmp/d20251110-3440-823pik/tilt-2.4.0/lib/tilt.rb	2025-11-10 03:02:42.145459657 +0000
                +++ /tmp/d20251110-3440-823pik/tilt-2.6.1/lib/tilt.rb	2025-11-10 03:02:42.151459663 +0000
                @@ -8 +8,4 @@
                -  VERSION = '2.4.0'
                +  VERSION = '2.6.1'
                +
                +  EMPTY_ARRAY = [].freeze
                +  private_constant :EMPTY_ARRAY
                @@ -13,0 +17 @@
                +  @extract_fixed_locals = false
                @@ -88,0 +93,4 @@
                +    # Whether to extract fixed locals from templates by scanning the
                +    # template content.
                +    attr_accessor :extract_fixed_locals
                +
                @@ -142 +149,0 @@
                -  register_lazy :ErubisTemplate, 'tilt/erubis', 'erb', 'rhtml', 'erubis'
                @@ -146 +152,0 @@
                -  register_lazy :MarukuTemplate,       'tilt/maruku',       'markdown', 'mkd', 'md'
                @@ -178 +183,0 @@
                -  register_lazy :WikiClothTemplate,    'tilt/wikicloth', 'wiki', 'mediawiki', 'mw'
        lib/tilt/creole.rb
                --- /tmp/d20251110-3440-823pik/tilt-2.4.0/lib/tilt/creole.rb	2025-11-10 03:02:42.146459658 +0000
                +++ /tmp/d20251110-3440-823pik/tilt-2.6.1/lib/tilt/creole.rb	2025-11-10 03:02:42.152459665 +0000
                @@ -4,0 +5,2 @@
                +warn 'tilt/creole is deprecated, as creole requires modifying string literals', uplevel: 1
                +
        lib/tilt/liquid.rb
                --- /tmp/d20251110-3440-823pik/tilt-2.4.0/lib/tilt/liquid.rb	2025-11-10 03:02:42.147459659 +0000
                +++ /tmp/d20251110-3440-823pik/tilt-2.6.1/lib/tilt/liquid.rb	2025-11-10 03:02:42.153459666 +0000
                @@ -16,3 +15,0 @@
                -  #
                -  # It's suggested that your program require 'liquid' at load
                -  # time when using this template engine.
        lib/tilt/mapping.rb
                --- /tmp/d20251110-3440-823pik/tilt-2.4.0/lib/tilt/mapping.rb	2025-11-10 03:02:42.147459659 +0000
                +++ /tmp/d20251110-3440-823pik/tilt-2.6.1/lib/tilt/mapping.rb	2025-11-10 03:02:42.153459666 +0000
                @@ -116 +116 @@
                -  #     mapping.register_lazy('Maruku::Template', 'maruku/template', 'md')
                +  #     mapping.register_lazy('Kramdown::Template', 'kramdown/template', 'md')
                @@ -122,2 +122,2 @@
                -  # Maruku. Tilt will first try to `require "rdiscount/template"`, falling
                -  # back to `require "maruku/template"`. If none of these are successful,
                +  # Kramdown. Tilt will first try to `require "rdiscount/template"`, falling
                +  # back to `require "kramdown/template"`. If none of these are successful,
        lib/tilt/rdoc.rb
                --- /tmp/d20251110-3440-823pik/tilt-2.4.0/lib/tilt/rdoc.rb	2025-11-10 03:02:42.149459661 +0000
                +++ /tmp/d20251110-3440-823pik/tilt-2.6.1/lib/tilt/rdoc.rb	2025-11-10 03:02:42.154459667 +0000
                @@ -9,8 +8,0 @@
                -#
                -# It's suggested that your program run the following at load time when
                -# using this templae engine in a threaded environment:
                -#
                -#   require 'rdoc'
                -#   require 'rdoc/markup'
                -#   require 'rdoc/markup/to_html'
                -#   require 'rdoc/options'
        lib/tilt/template.rb
                --- /tmp/d20251110-3440-823pik/tilt-2.4.0/lib/tilt/template.rb	2025-11-10 03:02:42.150459662 +0000
                +++ /tmp/d20251110-3440-823pik/tilt-2.6.1/lib/tilt/template.rb	2025-11-10 03:02:42.155459668 +0000
                @@ -60 +60,22 @@
                -    # All arguments are optional.
                +    # All arguments are optional. The following options are respected and
                +    # are used by Tilt::Template itself and not the underlying template
                +    # libraries:
                +    #
                +    # :default_encoding :: Force the encoding of the template to the given
                +    #                      encoding.
                +    # :skip_compiled_encoding_detection :: Do not scan template code for
                +    #                                      an encoding magic comment.
                +    # :fixed_locals :: Force a specific method parameter signature, and call
                +    #                  the method with a splat of locals, instead of passing
                +    #                  the locals hash as a positional argument, and
                +    #                  extracting locals from that. Should be a string
                +    #                  containing the parameters for the compiled method,
                +    #                  surrounded by parentheses.  Can be set to false to
                +    #                  disable the scan for embedded fixed locals.
                +    # :extract_fixed_locals :: Whether embedded fixed locals should be scanned for
                +    #                          and extracted from the template code.
                +    # :default_fixed_locals :: Similar to fixed_locals, but lowest priority,
                +    #                          only used if :fixed_locals is not provided
                +    #                          and no embedded locals are found (or scanned for).
                +    # :scope_class :: Force the scope class used for the method.  By default,
                +    #                 uses the class of the scope provided to render.
                @@ -72 +93,3 @@
                -      set_compiled_method_cache
                +      # Force a specific scope class, instead of using the class of the provided
                +      # scope as the scope class.
                +      @scope_class = @options.delete :scope_class
                @@ -80,0 +104,7 @@
                +      # Compiled path to use.  This must be specified as an option if
                +      # providing the :scope_class option and using fixed locals,
                +      # since template compilation occurs during initialization in that case.
                +      if compiled_path = @options.delete(:compiled_path)
                +        self.compiled_path = compiled_path
                +      end
                +
                @@ -86 +116 @@
                -          @data = @data.dup if @data.frozen?
                +          @data = _dup_string_if_frozen(@data)
                @@ -94,0 +125 @@
                +      set_fixed_locals
                @@ -95,0 +127 @@
                +      set_compiled_method_cache
                @@ -121,0 +154,5 @@
                +    # Whether the template uses fixed locals.
                +    def fixed_locals?
                +      @fixed_locals ? true : false
                +    end
                +
                @@ -132 +169,8 @@
                -    # Set the prefix to use for compiled paths.
                +    # Set the prefix to use for compiled paths, similar to using the
                +    # :compiled_path template option. Note that this only
                +    # has affect for future template compilations.  When using the
                +    # :scope_class template option, and using fixed_locals, calling
                +    # this after the template is created has no effect, since the
                +    # template is compiled during initialization in that case. It
                +    # is recommended to use the :compiled_path template option
                +    # instead of this method in new code.
                @@ -148 +192,12 @@
                -      key = [scope_class, locals_keys].freeze
                +      if @fixed_locals
                +        if @scope_class
                +          return @compiled_method
                +        else
                +          key = scope_class
                +        end
                +      elsif @scope_class
                +        key = locals_keys.dup.freeze
                +      else
                +        key = [scope_class, locals_keys].freeze
                +      end
                +
                @@ -184 +239 @@
                -    USE_BIND_CALL = RUBY_VERSION >= '2.7'
                +    USE_BIND_CALL = RUBY_VERSION >= '3'
                @@ -193,6 +248,2 @@
                -      locals_keys = locals.keys
                -      locals_keys.sort!{|x, y| x.to_s <=> y.to_s}
                -
                -      case scope
                -      when Object
                -        scope_class = Module === scope ? scope : scope.class
                +      if @fixed_locals
                +        locals_keys = EMPTY_ARRAY
                @@ -200,3 +251,2 @@
                -        # :nocov:
                -        scope_class = USE_BIND_CALL ? CLASS_METHOD.bind_call(scope) : CLASS_METHOD.bind(scope).call
                -        # :nocov:
                +        locals_keys = locals.keys
                +        locals_keys.sort!{|x, y| x.to_s <=> y.to_s}
                @@ -204 +253,0 @@
                -      method = compiled_method(locals_keys, scope_class)
                @@ -206,6 +255,9 @@
                -      if USE_BIND_CALL
                -        method.bind_call(scope, locals, &block)
                -      # :nocov:
                -      else
                -        method.bind(scope).call(locals, &block)
                -      # :nocov:
                +      unless scope_class = @scope_class
                +        scope_class = case scope
                +        when Object
                +          Module === scope ? scope : scope.class
                +        else
                +          # :nocov:
                +          USE_BIND_CALL ? CLASS_METHOD.bind_call(scope) : CLASS_METHOD.bind(scope).call
                +          # :nocov:
                +        end
                @@ -212,0 +265,2 @@
                +
                +      evaluate_method(compiled_method(locals_keys, scope_class), scope, locals, &block)
                @@ -269,0 +324,12 @@
                +    if RUBY_VERSION >= '2.3'
                +      def _dup_string_if_frozen(string)
                +        +string
                +      end
                +    # :nocov:
                +    else
                +      def _dup_string_if_frozen(string)
                +        string.frozen? ? string.dup : string
                +      end
                +    end
                +    # :nocov:
                +
                @@ -294 +360,6 @@
                -      @compiled_method = {}
                +      @compiled_method = if @fixed_locals && @scope_class
                +        # No hash needed, only a single compiled method per template.
                +        compile_template_method(EMPTY_ARRAY, @scope_class)
                +      else
                +        {}
                +      end
                @@ -317,0 +389,25 @@
                +    if USE_BIND_CALL
                +      def evaluate_method(method, scope, locals, &block)
                +        if @fixed_locals
                +          method.bind_call(scope, **locals, &block)
                +        else
                +          method.bind_call(scope, locals, &block)
                +        end
                +      end
                +    # :nocov:
                +    else
                +      def evaluate_method(method, scope, locals, &block)
                +        if @fixed_locals
                +          if locals.empty?
                +            # Empty keyword splat on Ruby 2.0-2.6 passes empty hash
                +            method.bind(scope).call(&block)
                +          else
                +            method.bind(scope).call(**locals, &block)
                +          end
                +        else
                +          method.bind(scope).call(locals, &block)
                +        end
                +      end
                +    end
                +    # :nocov:
                +
                @@ -320 +416,6 @@
                -      local_code = local_extraction(local_keys)
                +      if @fixed_locals
                +        method_args = @fixed_locals
                +      else
                +        method_args = "(locals)"
                +        local_code = local_extraction(local_keys)
                +      end
                @@ -331 +432 @@
                -      method_source << "::Tilt::TOPOBJECT.class_eval do\ndef #{method_name}(locals)\n#{local_code}\n"
                +      method_source << "::Tilt::TOPOBJECT.class_eval do\ndef #{method_name}#{method_args}\n#{local_code}\n"
                @@ -375 +476,6 @@
                -      File.binwrite(path, method_source)
                +      # Write to a temporary path specific to the current process, and
                +      # rename after writing. This prevents issues during parallel
                +      # coverage testing.
                +      tmp_path = "#{path}-#{$$}"
                +      File.binwrite(tmp_path, method_source)
                +      File.rename(tmp_path, path)
                @@ -387,0 +494,34 @@
                +    # Set the fixed locals for the template, which may be nil if no fixed locals can
                +    # be determined.
                +    def set_fixed_locals
                +      fixed_locals = @options.delete(:fixed_locals)
                +      extract_fixed_locals = @options.delete(:extract_fixed_locals)
                +      default_fixed_locals = @options.delete(:default_fixed_locals)
                +
                +      if fixed_locals.nil?
                +        if extract_fixed_locals.nil?
                +          extract_fixed_locals = Tilt.extract_fixed_locals
                +        end
                +
                +        if extract_fixed_locals
                +          fixed_locals = extract_fixed_locals()
                +        end
                +
                +        if fixed_locals.nil?
                +          fixed_locals = default_fixed_locals
                +        end
                +      end
                +
                +      @fixed_locals = fixed_locals
                +    end
                +
                +    # Extract fixed locals from the template code string. Should return nil
                +    # if there are no fixed locals specified, or a method argument string
                +    # surrounded by parentheses if there are fixed locals.  The method
                +    # argument string will be used when defining the template method if given.
                +    def extract_fixed_locals
                +      if @data.is_a?(String) && (match = /\#\s*locals:\s*(\(.*\))/.match(@data))
                +        match[1]
                +      end
                +    end
                +
                @@ -393,2 +533,4 @@
                -      if script.frozen?
                -        script = script.dup
                +      was_frozen = script.frozen?
                +      script = _dup_string_if_frozen(script)
                +
                +      if was_frozen
                @@ -415,0 +558,10 @@
                +  # Static templates are templates that return the same output for every render
                +  #
                +  # Instead of inheriting from the StaticTemplate class, you will use the .subclass
                +  # method with a block which processes @data and returns the transformed value.
                +  #
                +  # Basic example which transforms the template to uppercase:
                +  #
                +  #   UppercaseTemplate = Tilt::StaticTemplate.subclass do
                +  #     @data.upcase
                +  #   end
                @@ -452,0 +605,4 @@
                +    end
                +
                +    # Do nothing, since fixed locals are not used.
                +    def set_fixed_locals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant