Skip to content

Commit

Permalink
Bump minimum Ruby version to 3.0
Browse files Browse the repository at this point in the history
This bumps the Ruby version in the devcontainer, removes 2.7 from the
CI, and updates the gemspec.

This also fixes a style issue that was detected in version 3.0.
  • Loading branch information
spenserblack authored Jan 10, 2023
1 parent 0a70b38 commit 61dfb27
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ARG VARIANT="2.7-buster"
ARG VARIANT="3.0-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"dockerfile": "Dockerfile",
"args": { "VARIANT": "2.7-buster" }
"args": { "VARIANT": "3.0-bullseye" }
},
"extensions": [
"EditorConfig.EditorConfig",
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ jobs:
- macos-latest
- windows-latest
ruby-version:
- '2.7'
- '3.0'
- '3.1'
exclude:
# TODO: Figure out why Windows breaks on these
- os: windows-latest
ruby-version: '2.7'
- os: windows-latest
ruby-version: '3.0'

Expand Down Expand Up @@ -53,7 +50,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.0'
bundler-cache: true

- name: Check Style
Expand All @@ -68,7 +65,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.0'
bundler-cache: true

- name: Check Docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.0'
bundler-cache: true
- name: Build Docs
run: bundle exec yardoc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.0'
- run: bundle install
- name: Set Up Credentials
env:
Expand Down
4 changes: 2 additions & 2 deletions lib/repofetch/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class Repofetch
class Github < Repofetch::Plugin
include ActionView::Helpers::NumberHelper

HTTP_REMOTE_REGEX = %r{https?://github\.com/(?<owner>[\w.\-]+)/(?<repository>[\w.\-]+)}.freeze
SSH_REMOTE_REGEX = %r{git@github\.com:(?<owner>[\w.\-]+)/(?<repository>[\w.\-]+)}.freeze
HTTP_REMOTE_REGEX = %r{https?://github\.com/(?<owner>[\w.\-]+)/(?<repository>[\w.\-]+)}
SSH_REMOTE_REGEX = %r{git@github\.com:(?<owner>[\w.\-]+)/(?<repository>[\w.\-]+)}
ASCII = File.read(File.expand_path('github/ASCII', __dir__))

attr_reader :owner, :repository
Expand Down
4 changes: 2 additions & 2 deletions lib/repofetch/gitlab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
class Repofetch
# Adds support for GitLab repositories.
class Gitlab < Repofetch::Plugin
HTTP_REMOTE_REGEX = %r{https?://gitlab\.com/(?<path>[\w.\-][\w.\-/]+)}.freeze
SSH_REMOTE_REGEX = %r{git@gitlab\.com:(?<path>[\w.\-][\w.\-/]+)}.freeze
HTTP_REMOTE_REGEX = %r{https?://gitlab\.com/(?<path>[\w.\-][\w.\-/]+)}
SSH_REMOTE_REGEX = %r{git@gitlab\.com:(?<path>[\w.\-][\w.\-/]+)}
ASCII = File.read(File.expand_path('gitlab/ASCII', __dir__))

attr_reader :repo_identifier
Expand Down
2 changes: 1 addition & 1 deletion repofetch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/spenserblack/repofetch'
spec.license = 'MIT'

spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
spec.required_ruby_version = Gem::Requirement.new('>= 3.0.0')

spec.files = Dir['lib/**/*'] + Dir['exe/*'] + Dir['[A-Z]*']

Expand Down

0 comments on commit 61dfb27

Please sign in to comment.