Skip to content

Commit

Permalink
ci: add stanardrb linting
Browse files Browse the repository at this point in the history
  • Loading branch information
thde committed Oct 22, 2024
1 parent a0da498 commit b9e9176
Show file tree
Hide file tree
Showing 10 changed files with 212 additions and 120 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pronto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Pronto
on: [pull_request_target]

jobs:
pronto:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: |
git fetch --no-tags --prune --depth=10 origin +refs/heads/*:refs/remotes/origin/*
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: gem install pronto pronto-rubocop
- run: pronto run -f github_status github_pr -c origin/${{ github.base_ref }}
env:
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
PRONTO_GITHUB_ACCESS_TOKEN: "${{ github.token }}"
BUNDLE_PATH: "vendor/bundle"
11 changes: 2 additions & 9 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: RSpec

name: Ruby CI

on: [push, pull_request]
on: [pull_request]
jobs:
test:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
quickstart.rb
*.gz

/vendor/
vendor/
17 changes: 17 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require:
- standard
- standard-custom
- standard-performance
- rubocop-performance

inherit_gem:
standard: config/base.yml
standard-custom: config/base.yml
standard-performance: config/base.yml

AllCops:
NewCops: enable
Exclude:
- node_modules/**/*
- public/**/*
- vendor/**/*
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
source "https://rubygems.org"

gem "faraday", "~> 1.10"
gem "faraday_middleware"
Expand Down
58 changes: 36 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
netbox-client-ruby (0.10.0)
netbox-client-ruby (0.10.1)
dry-configurable (~> 1)
faraday (>= 0.11.0, < 3)
faraday-detailed_logger (~> 2.1)
Expand Down Expand Up @@ -49,22 +49,23 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
ipaddress (0.8.3)
json (2.7.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
method_source (1.0.0)
multipart-post (2.3.0)
openssl (3.2.0)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.7.1)
racc (1.8.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.3.6)
strscan
regexp_parser (2.9.2)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand All @@ -78,28 +79,41 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (0.93.1)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.1.5)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.6.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-rspec (1.44.1)
rubocop (~> 0.87)
rubocop-ast (>= 0.7.1)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-performance (1.22.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
strscan (3.1.0)
unicode-display_width (1.8.0)
standard (1.41.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.66.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.5)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.5.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.22.0)
unicode-display_width (2.6.0)
zeitwerk (2.6.12)

PLATFORMS
arm64-darwin-22
arm64-darwin-23
x86_64-linux

DEPENDENCIES
Expand All @@ -110,8 +124,8 @@ DEPENDENCIES
pry (~> 0.10)
rake (~> 13)
rspec (~> 3.5)
rubocop (~> 0.48)
rubocop-rspec (~> 1.15)
standard (~> 1.31)
standard-performance (~> 1.2)

BUNDLED WITH
2.4.10
56 changes: 36 additions & 20 deletions gemfiles/faraday0.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
netbox-client-ruby (0.10.0)
netbox-client-ruby (0.10.1)
dry-configurable (~> 1)
faraday (>= 0.11.0, < 3)
faraday-detailed_logger (~> 2.1)
Expand Down Expand Up @@ -29,21 +29,23 @@ GEM
faraday_middleware (0.14.0)
faraday (>= 0.7.4, < 1.0)
ipaddress (0.8.3)
json (2.7.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
method_source (1.0.0)
multipart-post (2.3.0)
openssl (3.2.0)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.7.1)
racc (1.8.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.6)
regexp_parser (2.9.2)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand All @@ -57,26 +59,40 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (0.93.1)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.1.5)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.6.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-rspec (1.44.1)
rubocop (~> 0.87)
rubocop-ast (>= 0.7.1)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-performance (1.22.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
unicode-display_width (1.8.0)
standard (1.41.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.66.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.5)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.5.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.22.0)
unicode-display_width (2.6.0)
zeitwerk (2.6.12)

PLATFORMS
arm64-darwin-22
arm64-darwin-23
x86_64-linux

DEPENDENCIES
Expand All @@ -87,8 +103,8 @@ DEPENDENCIES
pry (~> 0.10)
rake (~> 13)
rspec (~> 3.5)
rubocop (~> 0.48)
rubocop-rspec (~> 1.15)
standard (~> 1.31)
standard-performance (~> 1.2)

BUNDLED WITH
2.4.10
56 changes: 36 additions & 20 deletions gemfiles/faraday1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
netbox-client-ruby (0.10.0)
netbox-client-ruby (0.10.1)
dry-configurable (~> 1)
faraday (>= 0.11.0, < 3)
faraday-detailed_logger (~> 2.1)
Expand All @@ -28,21 +28,23 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
ipaddress (0.8.3)
json (2.7.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
method_source (1.0.0)
multipart-post (2.3.0)
openssl (3.2.0)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.7.1)
racc (1.8.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.6)
regexp_parser (2.9.2)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand All @@ -56,26 +58,40 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (0.93.1)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.1.5)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.6.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-rspec (1.44.1)
rubocop (~> 0.87)
rubocop-ast (>= 0.7.1)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-performance (1.22.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
unicode-display_width (1.8.0)
standard (1.41.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.66.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.5)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.5.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.22.0)
unicode-display_width (2.6.0)
zeitwerk (2.6.12)

PLATFORMS
arm64-darwin-22
arm64-darwin-23
x86_64-linux

DEPENDENCIES
Expand All @@ -86,8 +102,8 @@ DEPENDENCIES
pry (~> 0.10)
rake (~> 13)
rspec (~> 3.5)
rubocop (~> 0.48)
rubocop-rspec (~> 1.15)
standard (~> 1.31)
standard-performance (~> 1.2)

BUNDLED WITH
2.4.10
Loading

0 comments on commit b9e9176

Please sign in to comment.