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
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- **Issue #41:** Makefile's `LANGUAGES` invocation of `yq` now uses `-r`
(raw output). yq v3 (kislyuk's Python wrapper, packaged as `yq` on
Debian/Ubuntu) returns JSON-formatted scalars by default — without
`-r`, `.languages[]` returned `"ruby"` (quoted) and `HAS_RUBY` never
matched. With `-r`, behaviour is identical between yq v3 and v4.
- **Issue #42:** Container no longer exports `BUNDLE_PATH=/usr/local/bundle`
at runtime. Bundler precedence rule (envvar beats project
`.bundle/config`) was silently overriding consumer projects with
`BUNDLE_PATH: vendor/bundle`, breaking `bundle exec` for
project-pinned gems with `Bundler::GemNotFound`. With the envvar
unset, the project's `.bundle/config` wins; direct gem invocations
(`rubocop`, `reek`, `rspec`) still resolve from `/usr/local/bundle`
via `GEM_HOME` and the `PATH` entry for `/usr/local/bundle/bin`.
- **Issue #43:** Makefile's `_format` no longer passes `--check` to
`rubocop` — it's not a valid rubocop flag and broke every Rails
project with rubocop in its Gemfile. Default rubocop behaviour is
already "report, don't autocorrect"; `--fail-level error` (still
passed) gates the exit code.

## [1.11.0] - 2026-05-05

### Added
Expand Down
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,15 @@ COPY --from=ruby-builder /usr/local/bundle /usr/local/bundle
RUN ln -sf libruby.so.3.4 /usr/local/lib/libruby.so.3.4.0 \
&& ln -sf libruby.so.3.4 /usr/local/lib/libruby.so \
&& ldconfig
# Bundler envvars. We DO NOT export BUNDLE_PATH at runtime — Bundler's
# precedence is envvar > project `.bundle/config`, which silently
# overrides a consumer's `BUNDLE_PATH: vendor/bundle` and breaks
# `bundle exec` for project-pinned gems (Issue #42). With BUNDLE_PATH
# unset, Bundler falls back to GEM_HOME — direct `rubocop` / `reek` /
# `rspec` invocations from `/usr/local/bundle/bin` (already on PATH)
# still resolve the container's bundled gems, and `bundle exec` in a
# consumer project honours the project's `.bundle/config`.
ENV GEM_HOME=/usr/local/bundle
ENV BUNDLE_PATH=/usr/local/bundle
ENV BUNDLE_SILENCE_ROOT_WARNING=1
ENV BUNDLE_APP_CONFIG=/usr/local/bundle

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ RUBY_EXEC_FOR = $(if $(and $(wildcard Gemfile.lock),$(shell grep -m1 -E "^[[:spa
# Computed before DOCKER_RUN so HAS_<LANG> can influence container env (e.g.
# BUNDLE_APP_CONFIG override for Ruby projects — issue #30).
# ---------------------------------------------------------------------------
LANGUAGES := $(shell yq '.languages[]' $(DEVRAIL_CONFIG) 2>/dev/null)
LANGUAGES := $(shell yq -r '.languages[]' $(DEVRAIL_CONFIG) 2>/dev/null)
HAS_PYTHON := $(filter python,$(LANGUAGES))
HAS_BASH := $(filter bash,$(LANGUAGES))
HAS_TERRAFORM := $(filter terraform,$(LANGUAGES))
Expand Down Expand Up @@ -656,7 +656,7 @@ _format: _plugins-load
for p in $(RUBY_PATHS); do [ -d "$$p" ] && ruby_paths="$$ruby_paths $$p"; done; \
ruby_paths=$${ruby_paths# }; \
if [ -n "$$ruby_paths" ]; then \
$(call RUBY_EXEC_FOR,rubocop)rubocop --check --fail-level error $$ruby_paths || { overall_exit=1; failed_languages="$${failed_languages}\"ruby\","; }; \
$(call RUBY_EXEC_FOR,rubocop)rubocop --fail-level error $$ruby_paths || { overall_exit=1; failed_languages="$${failed_languages}\"ruby\","; }; \
else \
echo '{"level":"info","msg":"skipping ruby format: none of RUBY_PATHS exist (override with RUBY_PATHS=...)","language":"ruby"}' >&2; \
fi; \
Expand Down
Loading