Skip to content

Commit

Permalink
Merge pull request #158 from open-sdg/ruby-3-support
Browse files Browse the repository at this point in the history
Ruby 3 support
  • Loading branch information
brockfanning authored May 17, 2023
2 parents 7b6d32a + 204387a commit 77c4601
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/jekyll-open-sdg-plugins/fetch_remote_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions tests/Gemfile
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 77c4601

Please sign in to comment.