Skip to content

Commit

Permalink
Merge pull request #126 from zendesk/bquorning/standard
Browse files Browse the repository at this point in the history
Use StandardRb
  • Loading branch information
bquorning authored Feb 6, 2024
2 parents addef7e + e162af6 commit b48b4cd
Show file tree
Hide file tree
Showing 83 changed files with 681 additions and 579 deletions.
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bc6c274ba2ba0a60fcb0b95d9e483faae928e608
ddecab1191e897dfb1e3fceec774e2782495f261
eee1a5f87757938eb85bdca0a77df4ab81dadd87
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
bundler-cache: true
- name: linter
run: bundle exec rake rubocop
run: bundle exec rake standard

# This wrapper is used in the main branch protection rules as a required check.
# This way, we don’t need to update those rules when we add or remove a version in the test matrix.
Expand Down
115 changes: 0 additions & 115 deletions .rubocop.yml

This file was deleted.

1 change: 1 addition & 0 deletions .standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby_version: 2.7
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

eval_gemfile Dir["gemfiles/*.gemfile"].max
gem 'minitest-rails', '~> 7.1'
gem 'minitest', '~> 5.20'
gem "minitest-rails", "~> 7.1"
gem "minitest", "~> 5.20"
28 changes: 22 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ GEM
irb (1.8.3)
rdoc
reline (>= 0.3.8)
json (2.6.3)
json (2.7.1)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -138,7 +139,7 @@ GEM
parallel (1.23.0)
parallel_tests (4.3.0)
parallel
parser (3.2.2.4)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
psych (5.1.1.1)
Expand Down Expand Up @@ -185,26 +186,41 @@ GEM
rake (13.1.0)
rdoc (6.5.0)
psych (>= 4.0.0)
regexp_parser (2.8.2)
regexp_parser (2.9.0)
reline (0.3.9)
io-console (~> 0.5)
rexml (3.2.6)
rubocop (1.57.2)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
single_cov (1.11.0)
standard (1.33.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.59.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.3)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.3.1)
lint_roller (~> 1.1)
rubocop-performance (~> 1.20.2)
stringio (3.0.8)
thor (1.3.0)
timeout (0.4.0)
Expand All @@ -230,8 +246,8 @@ DEPENDENCIES
minitest-rails (~> 7.1)
rails (~> 7.1.0)
rake
rubocop
single_cov
standard
stronger_parameters!

BUNDLED WITH
Expand Down
17 changes: 7 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# frozen_string_literal: true
require 'bundler/setup'
require 'bump/tasks'

require "bundler/setup"
require "standard/rake"
require "bump/tasks"

# Pushing to rubygems is handled by a github workflow
require 'bundler/gem_tasks'
ENV['gem_push'] = 'false'
require "bundler/gem_tasks"
ENV["gem_push"] = "false"

task default: [:test, :rubocop]
task default: [:test, :standard]

task :test do
sh "forking-test-runner test --merge-coverage --quiet"
end

desc "Run rubocop"
task :rubocop do
sh "rubocop -a --fail-level A"
end

desc "Bundle all gemfiles [CMD=]"
task :bundle_all do
cmd = ENV["CMD"]
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/common.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec path: '..'
gemspec path: ".."
3 changes: 2 additions & 1 deletion gemfiles/rails5.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

gem "rails", "~> 5.0.0"

eval_gemfile 'common.rb'
eval_gemfile "common.rb"
43 changes: 31 additions & 12 deletions gemfiles/rails5.0.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ GEM
activesupport (>= 5.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.6.3)
json (2.7.1)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand Down Expand Up @@ -94,8 +96,9 @@ GEM
parallel (1.22.1)
parallel_tests (4.1.0)
parallel
parser (3.2.0.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
racc (1.6.2)
rack (2.2.6.2)
rack-test (0.6.3)
Expand Down Expand Up @@ -125,21 +128,25 @@ GEM
thor (>= 0.18.1, < 2.0)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.6.2)
rexml (3.2.5)
rubocop (1.44.1)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (1.13.0)
single_cov (1.8.0)
sprockets (4.2.0)
concurrent-ruby (~> 1.0)
Expand All @@ -148,12 +155,24 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
standard (1.33.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.59.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.3)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.3.1)
lint_roller (~> 1.1)
rubocop-performance (~> 1.20.2)
thor (1.2.1)
thread_safe (0.3.6)
timeout (0.3.1)
tzinfo (1.2.11)
thread_safe (~> 0.1)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -170,8 +189,8 @@ DEPENDENCIES
minitest-rails
rails (~> 5.0.0)
rake
rubocop
single_cov
standard
stronger_parameters!

BUNDLED WITH
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails5.1.gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

gem "rails", "~> 5.1.0"

eval_gemfile 'common.rb'
eval_gemfile "common.rb"
Loading

0 comments on commit b48b4cd

Please sign in to comment.