Add end-to-end integration spec with the real tailwind CLI - #30
Merged
Conversation
Add the first non-mocked test: it builds a fixture Jekyll site through Jekyll::Site with the real tailwindcss-ruby executable and asserts the generated CSS contains compiled utilities. Runs in under a second, so it stays in the default rspec run. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The converter formatting changes contradict the stated scope and overlap with PR #28.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a real Tailwind CLI integration test for a fixture Jekyll site.
Changes:
- Builds a fixture site and verifies generated Tailwind utilities.
- Adds the fixture’s layout, content, configuration, and CSS entry points.
- Includes two unrelated converter formatting changes.
File summaries
| File | Description |
|---|---|
spec/integration/build_spec.rb |
Runs the end-to-end build assertion. |
spec/fixtures/site/index.md |
Provides fixture page content. |
spec/fixtures/site/assets/css/styles.tailwindcss |
Defines the converted stylesheet. |
spec/fixtures/site/_tailwind.css |
Imports Tailwind CSS. |
spec/fixtures/site/_layouts/default.html |
Supplies utility classes for compilation. |
spec/fixtures/site/_config.yml |
Configures the fixture site. |
lib/jekyll/converters/tailwindcss.rb |
Changes log-message interpolation. |
lib/jekyll/converters/css.rb |
Changes log-message interpolation. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The integration spec leaves Jekyll’s disk cache in the repository fixture directory.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
spec/integration/build_spec.rb:20
- Jekyll's default disk cache is
.jekyll-cacheunder the site source. Processingindex.mdtherefore leaves an untracked cache directory insidespec/fixtures/siteafter this spec, while only the destination is temporary and the repository does not ignore that path. Redirect the cache into the temporary destination so the test cleans up all of its build artifacts.
"destination" => destination,
"quiet" => true
- Files reviewed: 6/6 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Jekyll writes its disk cache under the site source, so building the fixture in place left spec/fixtures/site/.jekyll-cache behind after every run. It never showed up in git status because Jekyll drops a self-ignoring .gitignore inside the cache, but a stale cache could still affect later runs. Copy the fixture into the tmpdir and build from there so the spec cleans up everything it creates. Redirecting cache_dir instead does not work: Jekyll resolves it through in_source_dir, so an absolute path is re-rooted under the source. Also add the logger gem for Ruby 3.5+ compatibility and lock the arm64-darwin platform so the tailwindcss-ruby binary resolves on Apple Silicon. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kxK16Xgi7P4GeUfkmQNxr
The merge from main resolved Gemfile.lock in favor of this branch's copy, which had picked up sass-embedded 1.83.4 when I re-resolved to add the arm64-darwin platform. That version requires ruby >= 3.2 and so violates the "sass-embedded < 1.77.1" pin, breaking bundle install on the ruby 3.1 CI job. Take the lockfile from edfb22d (where the pins were resolved) and re-add only the arm64-darwin platform on top. Also drop the duplicate gem "logger" the merge left behind. Every locked gem version is installable on ruby 3.1.7. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kxK16Xgi7P4GeUfkmQNxr
The ruby 4.0 job failed on the precompiled binary gems: ffi 1.17.1 and google-protobuf 4.33.6 both cap their native variants at ruby < 3.5, even though the pure-ruby specs allow 4.0. My earlier compatibility check only looked at the ruby-platform entries, so it missed them. Bump ffi to 1.17.4 and google-protobuf to 4.35.1, and pin google-protobuf < 4.36 alongside the existing pins since 4.36 drops ruby 3.1. All 79 locked specs, platform variants included, now resolve on ruby 3.1, 3.2, 3.3, 3.4 and 4.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kxK16Xgi7P4GeUfkmQNxr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Jekyll::Sitewith the realtailwindcss-rubyexecutable and asserts the generated CSS contains compiled utilities.Finding
The plugin resolves the default
./_tailwind.csspath relative to the process cwd, not the site source, so the specchdirs into the fixture — possible future fix.Note
standardrb currently flags two pre-existing offenses in
lib/jekyll/converters/*.rbon this branch; they're fixed by the subprocess-robustness PR (#28), not here.Test plan
🤖 Generated with Claude Code