Skip to content

Commit

Permalink
Crystal and ci updates (#1862)
Browse files Browse the repository at this point in the history
* Update CI and min Crystal version required to 1.10

* fixing new deprecation warnings
  • Loading branch information
jwoertink committed Apr 10, 2024
1 parent 3c5c296 commit b5dfa0a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
env:
SKIP_LUCKY_TASK_PRECOMPILATION: "1"
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: crystal-lang/install-crystal@v1
with:
crystal: latest
Expand All @@ -32,7 +32,7 @@ jobs:
shard_file:
- shard.yml
crystal_version:
- 1.9.0
- 1.10.0
- latest
experimental:
- false
Expand All @@ -48,7 +48,7 @@ jobs:
env:
SKIP_LUCKY_TASK_PRECOMPILATION: "1"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: crystal-lang/install-crystal@v1
with:
crystal: ${{matrix.crystal_version}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: crystal-lang/install-crystal@v1
Expand All @@ -19,7 +19,7 @@ jobs:
- name: "Generate docs"
run: crystal docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lucky
version: 1.1.0

crystal: ">=1.9.0"
crystal: ">= 1.10.0"

authors:
- Paul Smith <paulcsmith0218@gmail.com>
Expand Down
6 changes: 3 additions & 3 deletions src/lucky/renderable.cr
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ module Lucky::Renderable
# enum for more available http status codes.
macro html_with_status(page_class, status, **assigns)
{% if status.is_a?(SymbolLiteral) %}
html {{ page_class }}, _with_status_code: HTTP::Status::{{ status.upcase.id }}.value, {{ **assigns }}
html {{ page_class }}, _with_status_code: HTTP::Status::{{ status.upcase.id }}.value, {{ assigns.double_splat }}
{% elsif status.is_a?(Path) && status.names.join("::").starts_with?("HTTP::Status::") %}
html {{ page_class }}, _with_status_code: {{ status.resolve }}, {{ **assigns }}
html {{ page_class }}, _with_status_code: {{ status.resolve }}, {{ assigns.double_splat }}
{% else %}
html {{ page_class }}, _with_status_code: {{ status }}, {{ **assigns }}
html {{ page_class }}, _with_status_code: {{ status }}, {{ assigns.double_splat }}
{% end %}
end

Expand Down

0 comments on commit b5dfa0a

Please sign in to comment.