Skip to content

Commit

Permalink
Merge pull request #123 from zendesk/bquorning/standardrb
Browse files Browse the repository at this point in the history
Lint Ruby with StandardRb instead of RuboCop
  • Loading branch information
bquorning committed Oct 12, 2023
2 parents 393981d + eb96d02 commit e1fdaeb
Show file tree
Hide file tree
Showing 26 changed files with 248 additions and 318 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
ruby-version: 2.7
bundler-cache: true
- run: bundle exec rake rubocop
- run: bundle exec standardrb

tests:
runs-on: ubuntu-latest
Expand Down
81 changes: 0 additions & 81 deletions .rubocop.yml

This file was deleted.

76 changes: 0 additions & 76 deletions .rubocop_todo.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .standard_todo.yml
@@ -0,0 +1,12 @@
# Auto generated files with errors to ignore.
# Remove from this list as you refactor files.
---
ignore:
- lib/active_record_host_pool/connection_adapter_mixin.rb:
- Style/EmptyMethod
- Style/SingleLineMethods
- Style/ArgumentsForwarding
- lib/active_record_host_pool/connection_proxy.rb:
- Style/ArgumentsForwarding
- lib/active_record_host_pool/pool_proxy.rb:
- Style/ArgumentsForwarding
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,3 +1,3 @@
# frozen_string_literal: true

eval_gemfile 'gemfiles/rails6.1.gemfile'
eval_gemfile "gemfiles/rails6.1.gemfile"
17 changes: 8 additions & 9 deletions Rakefile
@@ -1,17 +1,16 @@
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rubocop/rake_task'
require "bundler/setup"
require "bundler/gem_tasks"
require "rake/testtask"
require "rubocop/rake_task"
require "standard/rake"

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

Rake::TestTask.new do |test|
test.pattern = 'test/test_*.rb'
test.pattern = "test/test_*.rb"
test.verbose = true
test.warning = true
end

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

RuboCop::RakeTask.new
task default: ["test", "standard:fix"]
5 changes: 2 additions & 3 deletions active_record_host_pool.gemspec
@@ -1,10 +1,10 @@
require './lib/active_record_host_pool/version'
require "./lib/active_record_host_pool/version"

Gem::Specification.new do |s|
s.name = "active_record_host_pool"
s.version = ActiveRecordHostPool::VERSION
s.authors = ["Benjamin Quorning", "Gabe Martin-Dempesy", "Pierre Schambacher", "Ben Osheroff"]
s.email = ["bquorning@zendesk.com", "gabe@zendesk.com", "pschambacher@zendesk.com"]
s.email = ["bquorning@zendesk.com", "gabe@zendesk.com", "pschambacher@zendesk.com"]
s.summary = "Allow ActiveRecord to share a connection to multiple databases on the same host"
s.description = ""
s.extra_rdoc_files = [
Expand All @@ -23,7 +23,6 @@ Gem::Specification.new do |s|
"lib/active_record_host_pool/version.rb"
]
s.homepage = "https://github.com/zendesk/active_record_host_pool"
s.test_files = ["test/database.yml", "test/helper.rb", "test/schema.rb", "test/test_arhp.rb"]
s.license = "MIT"

s.required_ruby_version = ">= 2.7.0"
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/common.rb
Expand Up @@ -7,5 +7,5 @@
gem "minitest-mock_expectations", "~> 1.1.3"
gem "phenix", ">= 1.0.1"
gem "pry-byebug", "~> 3.9"
gem "rake", '>= 12.0.0'
gem 'rubocop', '~> 0.80.0'
gem "rake", ">= 12.0.0"
gem "standard"
10 changes: 5 additions & 5 deletions gemfiles/rails6.1.gemfile
@@ -1,10 +1,10 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

gemspec path: '../'
gemspec path: "../"

gem 'activerecord', '~> 6.1.0'
gem 'mysql2', '~> 0.5'
gem "activerecord", "~> 6.1.0"
gem "mysql2", "~> 0.5"

eval_gemfile 'common.rb'
eval_gemfile "common.rb"
51 changes: 39 additions & 12 deletions gemfiles/rails6.1.gemfile.lock
Expand Up @@ -19,12 +19,15 @@ GEM
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.2)
base64 (0.1.1)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.1.10)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
json (2.6.3)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
method_source (1.0.0)
minitest (5.16.3)
minitest-fail-fast (0.1.0)
Expand All @@ -33,9 +36,10 @@ GEM
minitest (~> 5.0)
minitest-mock_expectations (1.1.3)
mysql2 (0.5.5)
parallel (1.22.1)
parser (3.1.2.1)
parallel (1.23.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
phenix (1.0.1)
activerecord (>= 4.2, < 7.1)
bundler
Expand All @@ -45,21 +49,44 @@ GEM
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
rexml (3.2.5)
rubocop (0.80.1)
jaro_winkler (~> 1.5.1)
regexp_parser (2.8.2)
rexml (3.2.6)
rubocop (1.56.4)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
rexml
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.11.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
standard (1.31.2)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.56.4)
standard-custom (~> 1.0.0)
standard-performance (~> 1.2)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.2.1)
lint_roller (~> 1.1)
rubocop-performance (~> 1.19.1)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (1.6.1)
unicode-display_width (2.5.0)
zeitwerk (2.6.0)

PLATFORMS
Expand All @@ -77,7 +104,7 @@ DEPENDENCIES
phenix (>= 1.0.1)
pry-byebug (~> 3.9)
rake (>= 12.0.0)
rubocop (~> 0.80.0)
standard

BUNDLED WITH
2.4.15
10 changes: 5 additions & 5 deletions gemfiles/rails7.0_mysql2.gemfile
@@ -1,10 +1,10 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

gemspec path: '../'
gemspec path: "../"

gem 'activerecord', '~> 7.0.0'
gem 'mysql2', '~> 0.5'
gem "activerecord", "~> 7.0.0"
gem "mysql2", "~> 0.5"

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

0 comments on commit e1fdaeb

Please sign in to comment.