haml 6.3.0 → 6.3.1
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 +4 -4
- data/.github/workflows/release.yml +46 -0
- data/.github/workflows/test.yml +4 -1
- data/CHANGELOG.md +5 -1
- data/Gemfile +7 -0
- data/README.md +1 -0
- data/REFERENCE.md +9 -9
- data/haml.gemspec +2 -0
- data/lib/haml/attribute_builder.rb +1 -1
- data/lib/haml/version.rb +1 -1
- metadata +5 -6
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 7fe81126a81cb26d93f23c930d55244ee89654bdfc188f8cf3e64b69475b5472
         | 
| 4 | 
            +
              data.tar.gz: 7862cc5427e62e96ec1851f6265522b619d5f2fdf15a55ca6aef8ee2f641b0ed
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ccf3c62f1b319265ceaec6987888b17f0a2b1599d56e3f625d973ecc3c920b7efbd17e86a949c9081e82b084f554978e52c91d0452e8ef02c6e21d6d4a4e6d0e
         | 
| 7 | 
            +
              data.tar.gz: 01f7a62d43f8a9929bfc42dfb8677f0641650064565c4a2f0ea6fe53a3e11da819b6f9c5c6aa79f67102a0b0197cd282feebcb9116d6bf1f242efc241f7e37f3
         | 
| @@ -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 }}
         | 
    
        data/.github/workflows/test.yml
    CHANGED
    
    | @@ -23,10 +23,13 @@ jobs: | |
| 23 23 | 
             
                      - '3.0'
         | 
| 24 24 | 
             
                      - '3.1'
         | 
| 25 25 | 
             
                      - '3.2'
         | 
| 26 | 
            +
                      - '3.3'
         | 
| 27 | 
            +
                      - '3.4'
         | 
| 28 | 
            +
                      - ruby-head
         | 
| 26 29 | 
             
                      - jruby
         | 
| 27 30 | 
             
                      - truffleruby-head
         | 
| 28 31 | 
             
                steps:
         | 
| 29 | 
            -
                  - uses: actions/checkout@ | 
| 32 | 
            +
                  - uses: actions/checkout@v4
         | 
| 30 33 | 
             
                  - run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
         | 
| 31 34 | 
             
                  - name: Set up Ruby
         | 
| 32 35 | 
             
                    uses: ruby/setup-ruby@v1
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,5 +1,10 @@ | |
| 1 1 | 
             
            # Haml Changelog
         | 
| 2 2 |  | 
| 3 | 
            +
            ## 6.3.1
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            * Optimize string transformation using `String#tr` https://github.com/haml/haml/pull/1168
         | 
| 6 | 
            +
            * Provide a Changelog link on rubygems.org https://github.com/haml/haml/pull/1157
         | 
| 7 | 
            +
             | 
| 3 8 | 
             
            ## 6.3.0
         | 
| 4 9 |  | 
| 5 10 | 
             
            * 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))
         | 
| @@ -8,7 +13,6 @@ | |
| 8 13 | 
             
            ## 6.2.5
         | 
| 9 14 |  | 
| 10 15 | 
             
            * 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 16 |  | 
| 13 17 | 
             
            ## 6.2.4
         | 
| 14 18 |  | 
    
        data/Gemfile
    CHANGED
    
    | @@ -25,3 +25,10 @@ end | |
| 25 25 | 
             
            if RUBY_VERSION < '2.6'
         | 
| 26 26 | 
             
              gem 'rake-compiler', '< 1.2.4'
         | 
| 27 27 | 
             
            end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            # Temporary workaround to ensure Ruby 2.5 and 2.6 can pass tests with Rails 6.1
         | 
| 30 | 
            +
            # Reference: https://github.com/rails/rails/issues/54260
         | 
| 31 | 
            +
            # TODO: Remove this workaround when dropping support for Rails versions below 7.1
         | 
| 32 | 
            +
            if RUBY_VERSION < '2.7'
         | 
| 33 | 
            +
              gem 'concurrent-ruby', '< 1.3.5'
         | 
| 34 | 
            +
            end
         | 
    
        data/README.md
    CHANGED
    
    | @@ -4,6 +4,7 @@ | |
| 4 4 | 
             
            [](https://github.com/haml/haml/actions/workflows/test.yml)
         | 
| 5 5 | 
             
            [](https://codeclimate.com/github/haml/haml)
         | 
| 6 6 | 
             
            [](https://inch-ci.org/github/haml/haml)
         | 
| 7 | 
            +
            [](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
         | 
    
        data/REFERENCE.md
    CHANGED
    
    | @@ -105,7 +105,7 @@ set :haml, { escape_html: false } | |
| 105 105 | 
             
            ```
         | 
| 106 106 |  | 
| 107 107 | 
             
            Finally, you can also set them by passing an options hash to `Haml::Engine.new` or `Haml::Template.new`.
         | 
| 108 | 
            -
            For the complete list of available options, please see `Haml::Engine | 
| 108 | 
            +
            For the complete list of available options, please see [`Haml::Engine`](https://github.com/haml/haml/blob/main/lib/haml/engine.rb).
         | 
| 109 109 |  | 
| 110 110 | 
             
            ## Plain Text
         | 
| 111 111 |  | 
| @@ -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:: | 
| 323 | 
            +
            [`Haml::BOOLEAN_ATTRIBUTES`](https://github.com/haml/haml/blob/main/lib/haml/attribute_compiler.rb#L8),
         | 
| 324 324 | 
             
            as well as `data-` and `aria-` attributes.
         | 
| 325 325 |  | 
| 326 326 | 
             
                %input{'data-hidden' => false}
         | 
| @@ -568,7 +568,7 @@ prefix for both the id and class attributes. For example: | |
| 568 568 | 
             
                # file: app/controllers/users_controller.rb
         | 
| 569 569 |  | 
| 570 570 | 
             
                def show
         | 
| 571 | 
            -
                  @user =  | 
| 571 | 
            +
                  @user = FriendlyUser.find(15)
         | 
| 572 572 | 
             
                end
         | 
| 573 573 |  | 
| 574 574 | 
             
                -# file: app/views/users/show.haml
         | 
| @@ -579,7 +579,7 @@ prefix for both the id and class attributes. For example: | |
| 579 579 |  | 
| 580 580 | 
             
            is compiled to:
         | 
| 581 581 |  | 
| 582 | 
            -
                <div class=' | 
| 582 | 
            +
                <div class='greeting_friendly_user' id='greeting_friendly_user_15'>
         | 
| 583 583 | 
             
                  <bar class='fixnum' id='fixnum_581' />
         | 
| 584 584 | 
             
                  Hello!
         | 
| 585 585 | 
             
                </div>
         | 
| @@ -587,11 +587,11 @@ is compiled to: | |
| 587 587 | 
             
            If you require that the class be something other than the underscored object's
         | 
| 588 588 | 
             
            class, you can implement the `haml_object_ref` method on the object.
         | 
| 589 589 |  | 
| 590 | 
            -
                # file: app/models/ | 
| 590 | 
            +
                # file: app/models/friendly_user.rb
         | 
| 591 591 |  | 
| 592 | 
            -
                class  | 
| 592 | 
            +
                class FriendlyUser < ActiveRecord::Base
         | 
| 593 593 | 
             
                  def haml_object_ref
         | 
| 594 | 
            -
                    " | 
| 594 | 
            +
                    "a_friendly_user"
         | 
| 595 595 | 
             
                  end
         | 
| 596 596 | 
             
                end
         | 
| 597 597 |  | 
| @@ -602,7 +602,7 @@ class, you can implement the `haml_object_ref` method on the object. | |
| 602 602 |  | 
| 603 603 | 
             
            is compiled to:
         | 
| 604 604 |  | 
| 605 | 
            -
                <div class=' | 
| 605 | 
            +
                <div class='a_friendly_user' id='a_friendly_user_15'>
         | 
| 606 606 | 
             
                  Hello!
         | 
| 607 607 | 
             
                </div>
         | 
| 608 608 |  | 
| @@ -1298,7 +1298,7 @@ Blocks of literal text can be preserved using the [`:preserve` filter](#preserve | |
| 1298 1298 |  | 
| 1299 1299 | 
             
            ## Turbo
         | 
| 1300 1300 |  | 
| 1301 | 
            -
            For people using Turbo-rails  | 
| 1301 | 
            +
            For people using Turbo-rails need to either:
         | 
| 1302 1302 | 
             
            *  follow the naming convention with the html format (ie. ensure any `.haml` files end `.html.haml`), or
         | 
| 1303 1303 | 
             
            *  add a monkey patch as follows:
         | 
| 1304 1304 |  | 
    
        data/haml.gemspec
    CHANGED
    
    | @@ -21,6 +21,8 @@ Gem::Specification.new do |spec| | |
| 21 21 |  | 
| 22 22 | 
             
              spec.metadata      = { 'rubygems_mfa_required' => 'true' }
         | 
| 23 23 |  | 
| 24 | 
            +
              spec.metadata["changelog_uri"] = spec.homepage + "/blob/main/CHANGELOG.md"
         | 
| 25 | 
            +
             | 
| 24 26 | 
             
              spec.required_ruby_version = '>= 2.1.0'
         | 
| 25 27 |  | 
| 26 28 | 
             
              spec.add_dependency 'temple', '>= 0.8.2'
         | 
    
        data/lib/haml/version.rb
    CHANGED
    
    
    
        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.3. | 
| 4 | 
            +
              version: 6.3.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Natalie Weizenbaum
         | 
| @@ -9,10 +9,9 @@ authors: | |
| 9 9 | 
             
            - Norman Clarke
         | 
| 10 10 | 
             
            - Akira Matsuda
         | 
| 11 11 | 
             
            - Takashi Kokubun
         | 
| 12 | 
            -
            autorequire:
         | 
| 13 12 | 
             
            bindir: exe
         | 
| 14 13 | 
             
            cert_chain: []
         | 
| 15 | 
            -
            date:  | 
| 14 | 
            +
            date: 1980-01-02 00:00:00.000000000 Z
         | 
| 16 15 | 
             
            dependencies:
         | 
| 17 16 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 18 17 | 
             
              name: temple
         | 
| @@ -248,6 +247,7 @@ extensions: [] | |
| 248 247 | 
             
            extra_rdoc_files: []
         | 
| 249 248 | 
             
            files:
         | 
| 250 249 | 
             
            - ".github/FUNDING.yml"
         | 
| 250 | 
            +
            - ".github/workflows/release.yml"
         | 
| 251 251 | 
             
            - ".github/workflows/test.yml"
         | 
| 252 252 | 
             
            - ".gitignore"
         | 
| 253 253 | 
             
            - ".yardopts"
         | 
| @@ -322,7 +322,7 @@ licenses: | |
| 322 322 | 
             
            - MIT
         | 
| 323 323 | 
             
            metadata:
         | 
| 324 324 | 
             
              rubygems_mfa_required: 'true'
         | 
| 325 | 
            -
             | 
| 325 | 
            +
              changelog_uri: https://haml.info/blob/main/CHANGELOG.md
         | 
| 326 326 | 
             
            rdoc_options: []
         | 
| 327 327 | 
             
            require_paths:
         | 
| 328 328 | 
             
            - lib
         | 
| @@ -337,8 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 337 337 | 
             
                - !ruby/object:Gem::Version
         | 
| 338 338 | 
             
                  version: '0'
         | 
| 339 339 | 
             
            requirements: []
         | 
| 340 | 
            -
            rubygems_version: 3. | 
| 341 | 
            -
            signing_key:
         | 
| 340 | 
            +
            rubygems_version: 3.6.7
         | 
| 342 341 | 
             
            specification_version: 4
         | 
| 343 342 | 
             
            summary: An elegant, structured (X)HTML/XML templating engine.
         | 
| 344 343 | 
             
            test_files: []
         |