diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 813b0e8a..aa9009cf 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -6,12 +6,16 @@ jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ '2.6', '2.7', '3.2' ] + name: Ruby ${{ matrix.ruby }} test steps: - uses: actions/checkout@v1 - name: Set up Ruby 2.6 uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6' + ruby-version: ${{ matrix.ruby }} - name: Run all tests run: make test diff --git a/lib/jekyll-open-sdg-plugins/fetch_remote_data.rb b/lib/jekyll-open-sdg-plugins/fetch_remote_data.rb index f578e6f7..3d065577 100644 --- a/lib/jekyll-open-sdg-plugins/fetch_remote_data.rb +++ b/lib/jekyll-open-sdg-plugins/fetch_remote_data.rb @@ -39,7 +39,7 @@ def fetch_build(path) endpoint = is_remote ? path + '/' + value : File.join(path, fix_path(value)) begin - json_file = is_remote ? open(endpoint) : File.open(endpoint) + json_file = is_remote ? URI.open(endpoint) : File.open(endpoint) build[key] = JSON.load(json_file) rescue StandardError => e # For backwards compatibility, forego the exception in some cases. diff --git a/tests/Gemfile b/tests/Gemfile index 544a65ff..5cf1d1e8 100644 --- a/tests/Gemfile +++ b/tests/Gemfile @@ -1,7 +1,9 @@ source "https://rubygems.org" -gem "jekyll", "3.8.4" -gem "html-proofer" +gem "jekyll", "3.9.3" +gem "html-proofer", "3.19.4" gem "jekyll-remote-theme" gem "deep_merge" gem "json_schemer" +gem "kramdown-parser-gfm" +gem "webrick"