From e249ab2e65f7024a620bab6392e93a4b8ee234db Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Thu, 25 Apr 2024 08:56:56 -0400 Subject: [PATCH 1/7] Fix warning about excerpt separator By default, the excerpt separator in Jekyll is a double newline. This is mainly for blogs that want to list the latest posts, but only show an excerpt. To determine how much of the beginning of the post to show in the excerpt, you define the stopping point by adding a double newline after it. Or you can specify your own custom separator. In a couple of our posts, namely `user-info.md` and `certificates.md`, the post content starts with a Liquid tag, and the content between the Liquid tags contains double newlines (i.e. an empty line between paragraphs). If excerpts were used, this would result in invalid Liquid syntax because the excerpt output would be missing the end Liquid tag. To overcome this, Jekyll inserts the closing tag to appease Liquid, but the output might be missing content, hence the warning. To get rid of this warning, I defined a custom excerpt separator in `_config.yml` References: https://jekyllrb.com/docs/posts/#post-excerpts https://talk.jekyllrb.com/t/whats-the-deal-with-found-a-liquid-block-containing-the-excerpt-separator-n-n/5289/4 --- _config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_config.yml b/_config.yml index da0d3678..ef5dbd4e 100644 --- a/_config.yml +++ b/_config.yml @@ -59,3 +59,5 @@ defaults: path: '' values: layout: documentation + +excerpt_separator: From efa6218951e46724d7be787400e58f40dbc25144 Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Thu, 25 Apr 2024 10:22:46 -0400 Subject: [PATCH 2/7] Update Ruby from 3.1.2 to 3.2.4 --- .circleci/config.yml | 2 +- .ruby-version | 2 +- Gemfile | 2 ++ Gemfile.lock | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 45f87283..0f17f7b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ jobs: build: docker: # Specify the Ruby version you desire here - - image: cimg/ruby:3.1-browsers + - image: cimg/ruby:3.2-browsers working_directory: ~/identity-dev-docs steps: diff --git a/.ruby-version b/.ruby-version index ef538c28..351227fc 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.2 +3.2.4 diff --git a/Gemfile b/Gemfile index 60b2d487..c39ba9e9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,7 @@ source 'https://rubygems.org' +ruby File.read('.ruby-version').strip + gem 'jekyll', '~> 4.3.0' gem 'jekyll-sass-converter', '~> 3.0.0' gem 'kramdown-parser-gfm', '~> 1.0' diff --git a/Gemfile.lock b/Gemfile.lock index c0224e2e..dcafbe67 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -115,5 +115,8 @@ DEPENDENCIES nokogiri (>= 1.10.5) rspec +RUBY VERSION + ruby 3.2.4p170 + BUNDLED WITH 2.4.10 From a4bd886ef146e795222fa8ee04974e7bd971bf2d Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Thu, 25 Apr 2024 10:25:19 -0400 Subject: [PATCH 3/7] Update jekyll from 4.3.2 to 4.3.3 --- Gemfile.lock | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index dcafbe67..67492948 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ GEM addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) colorator (1.1.0) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) diff-lcs (1.4.4) em-websocket (0.5.3) eventmachine (>= 0.12.9) @@ -14,7 +14,8 @@ GEM eventmachine (1.2.7) ffi (1.16.3) forwardable-extended (2.6.0) - google-protobuf (3.22.2) + google-protobuf (4.26.1) + rake (>= 13) html-proofer (4.4.3) addressable (~> 2.3) mercenary (~> 0.3) @@ -25,9 +26,9 @@ GEM yell (~> 2.0) zeitwerk (~> 2.5) http_parser.rb (0.8.0) - i18n (1.12.0) + i18n (1.14.4) concurrent-ruby (~> 1.0) - jekyll (4.3.2) + jekyll (4.3.3) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -56,7 +57,7 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.4) - listen (3.8.0) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) @@ -67,15 +68,15 @@ GEM parallel (1.24.0) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (5.0.4) + public_suffix (5.0.5) racc (1.7.3) rainbow (3.1.1) - rake (13.0.6) + rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rexml (3.2.5) - rouge (4.1.0) + rexml (3.2.6) + rouge (4.2.1) rspec (3.10.0) rspec-core (~> 3.10.0) rspec-expectations (~> 3.10.0) @@ -90,14 +91,14 @@ GEM rspec-support (~> 3.10.0) rspec-support (3.10.2) safe_yaml (1.0.5) - sass-embedded (1.60.0) - google-protobuf (~> 3.21) - rake (>= 10.0.0) + sass-embedded (1.75.0) + google-protobuf (>= 3.25, < 5.0) + rake (>= 13.0.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) typhoeus (1.4.1) ethon (>= 0.9.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) webrick (1.8.1) yell (2.2.2) zeitwerk (2.6.12) From dbc13d6c60cd3cd92d3edae6497b56d1aa700089 Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Thu, 25 Apr 2024 10:26:07 -0400 Subject: [PATCH 4/7] Update nokogiri from 1.16.2 to 1.16.4 --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 67492948..1c2187d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -61,8 +61,8 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) - mini_portile2 (2.8.5) - nokogiri (1.16.2) + mini_portile2 (2.8.6) + nokogiri (1.16.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.24.0) From 89c258a6de5fa4727401bfb3fd0ec30fc7794d19 Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Thu, 25 Apr 2024 10:27:57 -0400 Subject: [PATCH 5/7] Update rspec from 3.10.0 to 3.13.0 --- Gemfile.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1c2187d4..f676f1dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,7 +5,7 @@ GEM public_suffix (>= 2.0.2, < 6.0) colorator (1.1.0) concurrent-ruby (1.2.3) - diff-lcs (1.4.4) + diff-lcs (1.5.1) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) @@ -77,19 +77,19 @@ GEM ffi (~> 1.0) rexml (3.2.6) rouge (4.2.1) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-support (3.10.2) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) safe_yaml (1.0.5) sass-embedded (1.75.0) google-protobuf (>= 3.25, < 5.0) From 95709c19ff2d1ebf63cb88e91d1c2d9474600a06 Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Thu, 25 Apr 2024 11:03:31 -0400 Subject: [PATCH 6/7] Update bundler from 2.4.10 to 2.5.9 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f676f1dd..d2c6d897 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,4 +120,4 @@ RUBY VERSION ruby 3.2.4p170 BUNDLED WITH - 2.4.10 + 2.5.9 From 8d0235587f7e78d7fedb50794591fd0dfaafa807 Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Thu, 25 Apr 2024 11:24:39 -0400 Subject: [PATCH 7/7] Update CircleCI config With the new orbs that CircleCI provides, the config can be simplified. References: https://circleci.com/developer/orbs/orb/circleci/node https://circleci.com/developer/orbs/orb/circleci/ruby https://circleci.com/orbs/ --- .circleci/config.yml | 60 ++++++++++++++------------------------------ Gemfile | 1 + Gemfile.lock | 3 +++ package.json | 3 ++- 4 files changed, 25 insertions(+), 42 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0f17f7b3..a1f5230a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,61 +1,39 @@ # Ruby CircleCI 2.0 configuration file # Check https://circleci.com/docs/2.0/language-ruby/ for more details -version: 2 +version: 2.1 +orbs: + browser-tools: circleci/browser-tools@1.4.8 + node: circleci/node@5.2.0 + ruby: circleci/ruby@2.1.2 jobs: build: docker: # Specify the Ruby version you desire here - image: cimg/ruby:3.2-browsers - - working_directory: ~/identity-dev-docs + environment: + BUNDLE_JOBS: '3' + BUNDLE_RETRY: '3' steps: - - checkout - - - run: - name: Switch Node.js version - command: | - wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash - export NVM_DIR="$HOME/.nvm" - . "$NVM_DIR/nvm.sh" --install --latest-npm - echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV; - echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV; - + - node/install - run: name: Print Node.js version command: node -v - - - restore_cache: - key: v2-identity-dev-docs-{{ checksum "package-lock.json" }}-{{ checksum "Gemfile.lock" }} - - - run: - name: Install dependencies - command: | - gem install bundler - bundle install --jobs=4 --retry=3 --path vendor/bundle - npm ci - - # Store bundle cache - - save_cache: - key: v2-identity-dev-docs-{{ checksum "package-lock.json" }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - ~/.npm - + - checkout + - browser-tools/install-chromedriver + - node/install-packages + - ruby/install-deps - run: - name: Run Tests + name: Test Setup command: | make clean - make test + make build + - ruby/rspec-test: + include: spec/*_spec.rb + - run: npm run test + - run: name: Run htmlproofer (no external links) command: bundle exec scripts/htmlproofer --internal - run: name: Lint JavaScript command: make lint-js - - # collect reports - - store_test_results: - path: /tmp/test-results - - store_artifacts: - path: /tmp/test-results - destination: test-results diff --git a/Gemfile b/Gemfile index c39ba9e9..26dc7d60 100644 --- a/Gemfile +++ b/Gemfile @@ -11,5 +11,6 @@ gem 'jekyll-sitemap' group :test do gem 'html-proofer', '~> 4.0' gem 'rspec' + gem 'rspec_junit_formatter', require: false gem 'nokogiri', '>= 1.10.5' end diff --git a/Gemfile.lock b/Gemfile.lock index d2c6d897..176a5db0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -90,6 +90,8 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) + rspec_junit_formatter (0.6.0) + rspec-core (>= 2, < 4, != 2.12.0) safe_yaml (1.0.5) sass-embedded (1.75.0) google-protobuf (>= 3.25, < 5.0) @@ -115,6 +117,7 @@ DEPENDENCIES kramdown-parser-gfm (~> 1.0) nokogiri (>= 1.10.5) rspec + rspec_junit_formatter RUBY VERSION ruby 3.2.4p170 diff --git a/package.json b/package.json index fde16726..d19bddda 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "build:css": "build-sass assets/scss/*.scss --out-dir=_site/assets/css", "watch:css": "npm run build:css -- --watch", "pages": "npm run build:css", - "lint": "eslint ." + "lint": "eslint .", + "test": "node --test spec/e2e/**" }, "repository": { "type": "git",