refactor: rewrite from Ruby/Sinatra to Python/FastAPI
This commit is contained in:
@@ -1,48 +1,25 @@
|
||||
set dotenv-load := false
|
||||
set positional-arguments := false
|
||||
|
||||
default:
|
||||
@just --list
|
||||
@just --list
|
||||
|
||||
# Install Ruby dependencies
|
||||
install:
|
||||
@echo "→ Installing Ruby dependencies…"
|
||||
bundle install
|
||||
uv sync
|
||||
|
||||
# Run the development server
|
||||
run:
|
||||
@echo "→ Starting volumen…"
|
||||
bundle exec exe/volumen serve
|
||||
uv run volumen serve
|
||||
|
||||
# Run the development server against ./posts and ./config.toml
|
||||
dev:
|
||||
@echo "→ Starting volumen (dev) on http://localhost:9090 …"
|
||||
bundle exec exe/volumen serve --config ./config.toml --content ./posts
|
||||
uv run volumen serve --config ./config.toml --content ./posts
|
||||
|
||||
# Lint the codebase (RuboCop, zero offenses)
|
||||
lint:
|
||||
@echo "→ Linting…"
|
||||
bundle exec rubocop
|
||||
|
||||
# Auto-fix lint issues
|
||||
fmt:
|
||||
@echo "→ Auto-fixing…"
|
||||
bundle exec rubocop -A
|
||||
|
||||
# Lint and package the gem (must pass with zero warnings)
|
||||
build:
|
||||
@echo "→ Linting…"
|
||||
bundle exec rubocop
|
||||
@echo "→ Building gem…"
|
||||
@mkdir -p pkg
|
||||
gem build volumen.gemspec --output pkg/volumen.gem
|
||||
uv run ruff check src/ tests/
|
||||
uv run ruff format --check src/ tests/
|
||||
|
||||
# Run the test suite
|
||||
test:
|
||||
@echo "→ Running tests…"
|
||||
bundle exec rake test
|
||||
uv run pytest
|
||||
|
||||
fmt:
|
||||
uv run ruff format src/ tests/
|
||||
uv run ruff check --fix src/ tests/
|
||||
|
||||
# Remove build artifacts
|
||||
uninstall:
|
||||
@echo "→ Removing build artifacts…"
|
||||
rm -rf pkg *.gem
|
||||
rm -rf dist/ __pycache__ .pytest_cache .ruff_cache
|
||||
|
||||
Reference in New Issue
Block a user