Skip to content

Remove github-pages gem dependency; declare explicit gems; commit Gemfile.lock#1380

Merged
mlinksva merged 7 commits into
gh-pagesfrom
copilot/remove-github-pages-dependency
Jul 13, 2026
Merged

Remove github-pages gem dependency; declare explicit gems; commit Gemfile.lock#1380
mlinksva merged 7 commits into
gh-pagesfrom
copilot/remove-github-pages-dependency

Conversation

Copilot AI commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

The repository was coupled to the GitHub Pages build image via a runtime fetch of pages.github.com/versions.json to pin the github-pages meta-gem. Now that the site deploys via a custom Actions workflow, that coupling is obsolete and actively harmful to reproducibility.

Gemfile

  • Removed the json/net/http versions-JSON fetch and gem 'github-pages'
  • Explicitly declared all direct runtime dependencies: jekyll ~> 4.3, jekyll-github-metadata, jekyll-redirect-from, jekyll-seo-tag, jekyll-sitemap, jekyll-polyglot, webrick
  • Added safe_yaml ~> 1.0 to the test group — directly used by spec/license_meta_spec.rb via SafeYAML.load_file, previously loaded incidentally through Jekyll's own dependency

Gemfile.lock

  • Removed Gemfile.lock from .gitignore and committed the generated lockfile
  • Resolves to Jekyll 4.4.1; licensee pinned to git revision c96beb17; no github-pages entry

Ruby version source of truth

  • Added .ruby-version (3.3.4) as the repository-controlled canonical version, removed from .gitignore
  • spec/spec_helper.rb: added explicit require 'safe_yaml'
  • spec/ci_ruby_version_spec.rb: rewritten to validate consistency among .ruby-version, the test.yml "Set up Ruby" step, and .rubocop.yml — without contacting pages.github.com. Step is located by name rather than array index.
  • .devcontainer/post-create.sh: replaced curl https://pages.github.com/versions.json Ruby version derivation with a read from .ruby-version

Copilot AI added 2 commits July 13, 2026 02:22
- Rewrite Gemfile to explicitly declare Jekyll 4.x and all direct plugins
  (jekyll-github-metadata, jekyll-redirect-from, jekyll-seo-tag,
  jekyll-sitemap, jekyll-polyglot, webrick) instead of using the
  github-pages meta-gem and fetching versions from pages.github.com
- Add safe_yaml to test group (referenced directly by the test suite)
- Add require 'safe_yaml' to spec/spec_helper.rb
- Generate and commit Gemfile.lock with pinned gem versions
- Create .ruby-version file with 3.3.4 as repository-controlled source of truth
- Remove .ruby-version and Gemfile.lock from .gitignore
- Rewrite spec/ci_ruby_version_spec.rb to check version consistency
  among .ruby-version, test.yml workflow, and .rubocop.yml without
  contacting pages.github.com
- Update .devcontainer/post-create.sh to read .ruby-version instead
  of fetching from pages.github.com/versions.json
Copilot AI changed the title [WIP] Remove dependency on github-pages gem and update Gemfile Remove github-pages gem dependency; declare explicit gems; commit Gemfile.lock Jul 13, 2026
Copilot AI requested a review from mlinksva July 13, 2026 02:24
@mlinksva mlinksva marked this pull request as ready for review July 13, 2026 02:26
Copilot AI review requested due to automatic review settings July 13, 2026 02:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request decouples the site’s Ruby/Jekyll dependency management from the GitHub Pages build image by removing the pages.github.com/versions.json runtime pinning approach, declaring explicit gem dependencies, and committing the lockfile for reproducible installs. It also introduces .ruby-version as the repository’s Ruby-version source of truth and updates tests/devcontainer setup to reference it.

Changes:

  • Replace github-pages meta-gem + remote versions fetch with explicit Jekyll/plugin gem declarations and commit Gemfile.lock.
  • Add .ruby-version (3.3.4) and update CI-version verification/spec helpers to use it (no network dependency).
  • Update devcontainer provisioning to read Ruby version from .ruby-version instead of fetching from GitHub Pages.
Show a summary per file
File Description
Gemfile Removes GitHub Pages coupling and declares explicit Jekyll/plugin dependencies; adds safe_yaml for tests.
Gemfile.lock Adds a committed lockfile to make gem resolution reproducible across environments.
.gitignore Stops ignoring .ruby-version and Gemfile.lock so they can be versioned.
.ruby-version Establishes the repo-controlled canonical Ruby version (3.3.4).
spec/spec_helper.rb Requires safe_yaml explicitly to avoid incidental dependency loading.
spec/ci_ruby_version_spec.rb Reworks Ruby version consistency checks to reference repo files rather than GitHub Pages.
.devcontainer/post-create.sh Uses .ruby-version to choose the Ruby version during devcontainer setup.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/7 changed files
  • Comments generated: 3
  • Review effort level: Low

Comment thread spec/ci_ruby_version_spec.rb Outdated
Comment thread spec/ci_ruby_version_spec.rb Outdated
Comment thread spec/ci_ruby_version_spec.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

Comments suppressed due to low confidence (1)

.devcontainer/post-create.sh:9

  • This script uses grep (for package checks) and tr (for parsing .ruby-version), but they’re not included in the required-command check. If they’re missing, the script will fail later with a less actionable error.
for cmd in git sed; do
  if ! command -v "${cmd}" >/dev/null 2>&1; then
    echo "${cmd} is required for .devcontainer/post-create.sh"
    exit 1
  fi
done
  • Files reviewed: 5/7 changed files
  • Comments generated: 4
  • Review effort level: Low

Comment thread spec/ci_ruby_version_spec.rb Outdated
Comment thread spec/ci_ruby_version_spec.rb
Comment thread spec/ci_ruby_version_spec.rb
Comment thread .devcontainer/post-create.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 5/7 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread spec/ci_ruby_version_spec.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 5/7 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread .devcontainer/post-create.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 5/7 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@mlinksva mlinksva merged commit 67a914c into gh-pages Jul 13, 2026
8 checks passed
@mlinksva mlinksva deleted the copilot/remove-github-pages-dependency branch July 13, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants