Skip to content

Commit

Permalink
Modernize Stage I (#5)
Browse files Browse the repository at this point in the history
- Drop Ruby < 3.0 support
- Replace RestClient with Faraday
- Introduce RuboCop
- Drop dependency from Hashugar (didn't look to be used)

Close #1, close #3
  • Loading branch information
tagliala authored Jan 16, 2025
1 parent f449d7f commit 1651e5f
Show file tree
Hide file tree
Showing 15 changed files with 628 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.rubocop_todo.yml linguist-generated
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
30 changes: 30 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: RuboCop

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
test:
name: RuboCop
runs-on: ubuntu-latest

steps:
- name: Install libmagic-dev
run: |
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install libmagic-dev
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
rubygems: latest
bundler-cache: true
- name: RuboCop
run: bundle exec rubocop -f github
6 changes: 5 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ jobs:

strategy:
matrix:
ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7']
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
channel: [stable]

include:
- ruby-version: 'ruby-head'
channel: experimental

continue-on-error: ${{ matrix.channel != 'stable' }}

steps:
Expand Down
30 changes: 30 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-packaging
- rubocop-performance
- rubocop-rake
- rubocop-rspec

AllCops:
NewCops: enable
TargetRubyVersion: 3.0
Exclude:
- .git/**/*
- .github/**/*
- gemfiles/**/*
- node_modules/**/*
- tmp/**/*
- vendor/**/*

Layout/LineLength:
Enabled: false

RSpec/ExampleLength:
Enabled: false

RSpec/MultipleExpectations:
Enabled: false

Style/ArgumentsForwarding:
Enabled: false
Loading

0 comments on commit 1651e5f

Please sign in to comment.