Skip to content

Commit

Permalink
Merge pull request #152 from ZeusWPI/dependabot/bundler/rubocop-rails…
Browse files Browse the repository at this point in the history
…-2.21.0

Bump rubocop-rails from 2.20.2 to 2.21.0
  • Loading branch information
chvp authored Sep 9, 2023
2 parents ff735ff + fd88576 commit 6c95615
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.1.2'
ruby '~> 3.1.2'

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem 'rails', '~> 7.0.7'
Expand Down Expand Up @@ -60,7 +60,7 @@ end
group :development do
gem 'annotate', '~> 3.2'
gem 'rubocop-minitest', '~> 0.31.1'
gem 'rubocop-rails', '~> 2.20'
gem 'rubocop-rails', '~> 2.21'
gem 'web-console'
end

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ GEM
parser (>= 3.2.1.0)
rubocop-minitest (0.31.1)
rubocop (>= 1.39, < 2.0)
rubocop-rails (2.20.2)
rubocop-rails (2.21.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
Expand Down Expand Up @@ -313,7 +313,7 @@ DEPENDENCIES
rack-cors
rails (~> 7.0.7)
rubocop-minitest (~> 0.31.1)
rubocop-rails (~> 2.20)
rubocop-rails (~> 2.21)
rugged
selenium-webdriver
sentry-rails
Expand Down
2 changes: 1 addition & 1 deletion app/models/coder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Coder < ApplicationRecord

validates :github_name, uniqueness: true

default_scope -> { where(github_name: OrganisationMember.all.select(:github_name)) }
default_scope -> { where(github_name: OrganisationMember.select(:github_name)) }

def self.from_github(rc, repo)
commit = Rails.application.config.github.repos.commits.get(repo.organisation, repo.name, rc.oid)
Expand Down
2 changes: 1 addition & 1 deletion app/models/commit_stats.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CommitStats
def commit_stats_base
scope = from('repositories INNER JOIN commits ON repositories.id = commits.repository_id INNER JOIN coders ON coders.id = commits.coder_id').group(:id).where(coders: { github_name: OrganisationMember.all.select(:github_name) })
scope = from('repositories INNER JOIN commits ON repositories.id = commits.repository_id INNER JOIN coders ON coders.id = commits.coder_id').group(:id).where(coders: { github_name: OrganisationMember.select(:github_name) })
scope = scope.select("#{scope.table_name}.*") unless scope.select_values.any?
scope
end
Expand Down

0 comments on commit 6c95615

Please sign in to comment.