From ec9bbeaeae5019a5f3a5b5abe43bca08b1abef6f Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Sun, 4 Apr 2021 23:02:13 -0700 Subject: [PATCH] Allow bundle updae and tests to be run under ruby 3 --- Gemfile | 4 ++-- spec/ci_ruby_version_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index afe5a46..fda964b 100644 --- a/Gemfile +++ b/Gemfile @@ -3,8 +3,8 @@ source 'https://rubygems.org' require 'json' -require 'open-uri' -versions = JSON.parse(open('https://pages.github.com/versions.json').read) +require 'net/http' +versions = JSON.parse(Net::HTTP.get(URI('https://pages.github.com/versions.json'))) gem 'github-pages', versions['github-pages'] diff --git a/spec/ci_ruby_version_spec.rb b/spec/ci_ruby_version_spec.rb index 472edce..714cf89 100644 --- a/spec/ci_ruby_version_spec.rb +++ b/spec/ci_ruby_version_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' require 'yaml' describe 'ruby version' do - pages_versions = JSON.parse(open('https://pages.github.com/versions.json').read) + pages_versions = JSON.parse(URI.open('https://pages.github.com/versions.json').read) pages_ruby_version = pages_versions['ruby'] ci_config_file = '.github/workflows/test.yml'