Skip to content

Commit

Permalink
Ensuring that the Jekyll site can be built for Ruby 3.2 releases (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii authored Aug 29, 2023
1 parent a53b861 commit d40ced1
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 69 deletions.
36 changes: 18 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
type: string
bundler_version:
type: string
default: 2.3.11
default: 2.3.26
executor:
name: 'samvera/ruby'
ruby_version: << parameters.ruby_version >>
environment:
WAIT_FOR_JEKYLL: 10
WAIT_FOR_JEKYLL: 1
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
steps:
- samvera/cached_checkout
Expand All @@ -27,6 +27,10 @@ jobs:
echo "$(git branch --all --list master */master)"
fi
[[ -z "$(git branch --all --list master */master)" ]]
- run:
name: Ensure that libxslt is installed for the nokogiri gem
command: |
sudo apt-get update && sudo apt-get install -y libxslt1.1 libxslt1-dev pkg-config
- samvera/bundle:
ruby_version: << parameters.ruby_version >>
bundler_version: << parameters.bundler_version >>
Expand All @@ -41,18 +45,16 @@ workflows:
version: 2
ci:
jobs:
- bundle_and_test:
name: ruby3-2
ruby_version: 3.2.2
bundler_version: 2.3.26
- bundle_and_test:
name: ruby3-1
ruby_version: 3.1.1
ruby_version: 3.1.4
- bundle_and_test:
name: ruby3-0
ruby_version: 3.0.3
- bundle_and_test:
name: ruby2-7
ruby_version: 2.7.5
- bundle_and_test:
name: ruby2-6
ruby_version: 2.6.9
ruby_version: 3.0.6

nightly:
triggers:
Expand All @@ -63,15 +65,13 @@ workflows:
only:
- main
jobs:
- bundle_and_test:
name: ruby3-2
ruby_version: 3.2.2
bundler_version: 2.3.26
- bundle_and_test:
name: ruby3-1
ruby_version: 3.1.1
ruby_version: 3.1.4
- bundle_and_test:
name: ruby3-0
ruby_version: 3.0.3
- bundle_and_test:
name: ruby2-7
ruby_version: 2.7.5
- bundle_and_test:
name: ruby2-6
ruby_version: 2.6.9
ruby_version: 3.0.6
19 changes: 8 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
source "https://rubygems.org"

# gem 'wdm'

# gem 'documentation-theme-jekyll', github: 'elrayle/documentation-theme-jekyll', branch: 'gh-pages'

# gem 'github-pages', group: :jekyll_plugins
gem 'ffi', '>= 1.9.24'
gem 'github-pages' # plugins will not run if group: :jekyll_plugins is used
gem 'html-proofer'
gem "jekyll", ">= 3.6.3"
gem "jekyll", ">= 3.6"
# Please see https://github.com/jekyll/jekyll/issues/9231#issuecomment-1379146408
gem "liquid", ">= 4.0.4"
gem 'nokogiri', '>= 1.12'
gem 'rake'
gem 'nokogiri', '>=1.8.2'
gem 'rubyzip', '>= 1.2.2'

group :development, :test do
gem "rspec"
gem "selenium-webdriver"
gem "chromedriver-helper"
gem "capybara"
gem "chromedriver-helper"
gem 'launchy'
gem "rack-jekyll"
gem "pry-byebug"
gem "rack-jekyll"
gem 'rspec_junit_formatter'
gem "rspec"
gem "selenium-webdriver"
end

if ENV['RAILS_VERSION']
Expand Down
10 changes: 0 additions & 10 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ defaults:
comments: true
search: true
sidebar: home_sidebar
-
scope:
path: ""
type: "tooltips"
values:
layout: "page"
comments: true
search: true
tooltip: true

-
scope:
path: ""
Expand Down
6 changes: 0 additions & 6 deletions _tooltips/baseball.html

This file was deleted.

6 changes: 0 additions & 6 deletions _tooltips/basketball.html

This file was deleted.

6 changes: 0 additions & 6 deletions _tooltips/football.html

This file was deleted.

6 changes: 0 additions & 6 deletions _tooltips/soccer.html

This file was deleted.

2 changes: 1 addition & 1 deletion pages/samvera/1_new_start_here/formalities.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Formalities
permalink: formalities.html
last_updated: February 2, 2022
keywords: ["Formalities", "Contributor"
keywords: ["Formalities", "Contributor"]
tags: getting_started
summary: "Membership in GitHub organizations and repositories"
folder: samvera/getting_started/
Expand Down
2 changes: 2 additions & 0 deletions spec/homepage_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'spec_helper'

describe "homepage", type: :feature, js: true do
it "is accessible" do
visit '/'
Expand Down
23 changes: 18 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
require 'capybara/session'
require 'rack/jekyll'

require 'logger'

logger = Logger.new(STDOUT)
logger.level = Logger::INFO

#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
Expand Down Expand Up @@ -109,20 +114,28 @@
# Configure Capybara to use Selenium.
Capybara.register_driver :selenium do |app|
# Configure selenium to use Chrome.
Capybara::Selenium::Driver.new(app, :browser => :chrome)
Capybara::Selenium::Driver.new(app, browser: :chrome)
end

logger = Logger.new(STDOUT)
logger.level = Logger::INFO

config.before :suite do
# Configure Capybara to load the website through rack-jekyll.
# (force_build: true) builds the site before the tests are run,
# so our tests are always running against the latest version
# of our jekyll site.
Capybara.app = Rack::Jekyll.new(force_build: true)
jekyll_site = Rack::Jekyll.new(force_build: true)
Capybara.app = jekyll_site

# Sleep a while to let the site build. Tell the user what you're doing.
@wait_for_jekyll = ENV['WAIT_FOR_JEKYLL'].to_i || 5
puts "\nWaiting #{@wait_for_jekyll} seconds for the site to build.\n\n"
@wait_for_jekyll.times { sleep 1 }
wait_for_jekyll = ENV.fetch('WAIT_FOR_JEKYLL', "1")
logger.info("Waiting for the Jekyll site to build...")

while jekyll_site.compiling?
build_delay = wait_for_jekyll.to_i
build_delay.times { sleep(1) }
end

# Run HTMLProofer
# require 'html-proofer'
Expand Down

0 comments on commit d40ced1

Please sign in to comment.