From dfede90117715904a47a52490ac3ce5e34f486a9 Mon Sep 17 00:00:00 2001 From: Brett Chalupa Date: Mon, 9 Dec 2024 20:30:14 -0500 Subject: [PATCH 1/4] Output CLI errors in test assertions So there's more info about what failed to help with debugging --- test/cli_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/cli_test.rb b/test/cli_test.rb index 897771e..70a21d5 100644 --- a/test/cli_test.rb +++ b/test/cli_test.rb @@ -32,7 +32,7 @@ def test_cli_help assert cmd("--help") end assert_match /Usage/, out - assert err.empty?, "errors not empty" + assert err.empty?, "errors not empty: #{err}" end def test_cli_verbose @@ -41,14 +41,14 @@ def test_cli_verbose end assert_match /Generating site/, out assert_match /Site successfully generated/, out - assert err.empty?, "errors not empty" + assert err.empty?, "errors not empty: #{err}" end def test_cli_base_url out, err = capture_subprocess_io do assert cmd("#{@schema} -b https://example.com") end - assert err.empty?, "errors not empty" + assert err.empty?, "errors not empty: #{err}" assert File.read(File.join("output", 'index.html')).include?("") end @@ -57,7 +57,7 @@ def test_cli_version assert cmd("--version") end assert_match /#{GraphQLDocs::VERSION}/, out - assert err.empty?, "errors not empty" + assert err.empty?, "errors not empty: #{err}" end private From ab1aea87b78a7a61ca9b8ce89e8dd8ca1f312d98 Mon Sep 17 00:00:00 2001 From: Brett Chalupa Date: Mon, 9 Dec 2024 20:38:30 -0500 Subject: [PATCH 2/4] Pin minitest to latest minor ver So that the mutex_m warning goes away, closes: https://github.com/brettchalupa/graphql-docs/issues/157 --- graphql-docs.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphql-docs.gemspec b/graphql-docs.gemspec index ef35abb..34af6e7 100644 --- a/graphql-docs.gemspec +++ b/graphql-docs.gemspec @@ -48,7 +48,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'logger', '~> 1.6' spec.add_development_dependency 'html-proofer', '~> 3.4' - spec.add_development_dependency 'minitest', '~> 5.0' + spec.add_development_dependency 'minitest', '~> 5.24' spec.add_development_dependency 'minitest-focus', '~> 1.1' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.37' From 15e0ff94010f9bbd7c8d5937e0094d9e9efa54be Mon Sep 17 00:00:00 2001 From: Brett Chalupa Date: Mon, 9 Dec 2024 20:42:21 -0500 Subject: [PATCH 3/4] Fix Sass `@import` deprecation I ran: ``` npm install -g sass-migrator sass-migrator module --migrate-deps lib/graphql-docs/layouts/assets/css/screen.scss ``` Everything looks good locally. Fixes https://github.com/brettchalupa/graphql-docs/issues/158 --- .../layouts/assets/css/screen.scss | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/graphql-docs/layouts/assets/css/screen.scss b/lib/graphql-docs/layouts/assets/css/screen.scss index 78e690c..9b53393 100644 --- a/lib/graphql-docs/layouts/assets/css/screen.scss +++ b/lib/graphql-docs/layouts/assets/css/screen.scss @@ -1,7 +1,8 @@ @charset "utf-8"; -@import "../_sass/_normalize.scss"; -@import "../_sass/_fonts"; +@use "sass:meta"; +@use "../_sass/_normalize.scss"; +@use "../_sass/_fonts"; body { font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; @@ -39,11 +40,11 @@ em { font-family: 'ProximaNova-Semibold'; } -@import '../_sass/_header'; -@import '../_sass/_sidebar'; -@import '../_sass/_content'; -@import '../_sass/_types'; -@import '../_sass/_mobile'; -@import '../_sass/_api-box'; -@import '../_sass/_syntax'; -@import '../_sass/_deprecations'; +@include meta.load-css('../_sass/_header'); +@include meta.load-css('../_sass/_sidebar'); +@include meta.load-css('../_sass/_content'); +@include meta.load-css('../_sass/_types'); +@include meta.load-css('../_sass/_mobile'); +@include meta.load-css('../_sass/_api-box'); +@include meta.load-css('../_sass/_syntax'); +@include meta.load-css('../_sass/_deprecations'); From 915b51a3f716ac99ef36acf0c6a250e8845fd27b Mon Sep 17 00:00:00 2001 From: Brett Chalupa Date: Mon, 9 Dec 2024 20:44:40 -0500 Subject: [PATCH 4/4] Add Ruby 3.4-preview to build matrix --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bc9b9e9..30fb7dc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - ruby-version: [3.3, 3.2, 3.1] + ruby-version: [3.4.0-preview2, 3.3, 3.2, 3.1] steps: - uses: actions/checkout@v2