Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Naming/BlockParameterName:
Enabled: false
5 changes: 5 additions & 0 deletions .changes/unreleased/internal-20250201-163846.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: internal
body: Build against Crystal 1.15
time: 2025-02-01T16:38:46.086665+01:00
custom:
Issue: ""
5 changes: 5 additions & 0 deletions .changes/unreleased/internal-20250201-163935.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: internal
body: Use Ameba to lint codebase
time: 2025-02-01T16:39:35.22518+01:00
custom:
Issue: ""
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@ jobs:
- uses: crystal-lang/install-crystal@v1
- run: crystal tool format --check

lint:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: crystal-ameba/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crystal-lang/install-crystal@v1
- run: shards install
- run: shards install --skip-executables --skip-postinstall
- run: crystal spec
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
app:
image: ghcr.io/luislavena/hydrofoil-crystal:1.11
image: ghcr.io/luislavena/hydrofoil-crystal:1.15
command: overmind start -f Procfile.dev
working_dir: /app

Expand Down
7 changes: 7 additions & 0 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ authors:
targets:
drift:
main: src/cli.cr
# FIXME: workaround due lack of pre-compiled CLI version
ameba:
main: lib/ameba/src/cli.cr
dependencies:
db:
github: crystal-lang/crystal-db
version: ~> 0.13.1
sqlite3:
github: crystal-lang/crystal-sqlite3
version: ~> 0.21.0
development_dependencies:
ameba:
github: crystal-ameba/ameba
version: ~> 1.6.4
2 changes: 1 addition & 1 deletion src/drift/commands/command.cr
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module Drift
"#{minutes}m #{seconds}s"
end

private def with_migrator
private def with_migrator(&)
if uri = options.db_url
DB.open(uri) do |db|
yield Drift::Migrator.from_path(db, options.migrations_path)
Expand Down