Skip to content

Commit

Permalink
Merge pull request #928 from DavyJonesLocker/chore/fix-new-offenses
Browse files Browse the repository at this point in the history
Fix safe performance offences
  • Loading branch information
tagliala authored Dec 24, 2023
2 parents c6ca746 + aeb56f0 commit a88662f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
rubygems: latest
bundler-cache: true
- name: Run tests
run: bundle exec rake test:ruby
Expand Down
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ Metrics/PerceivedComplexity:
Minitest/MultipleAssertions:
Enabled: false

# FIXME: DavyJonesLocker/client_side_validations#927
Minitest/NonExecutableTestMethod:
Enabled: false

Rails/ApplicationRecord:
Exclude:
- 'test/**/*'
Expand Down
2 changes: 1 addition & 1 deletion lib/client_side_validations/extender.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Extender
def extend(klass, validators)
validators.each do |validator|
require "client_side_validations/#{klass.underscore}/#{validator.downcase}"
const_get(klass)::Validations.const_get("#{validator}Validator").send :include, ClientSideValidations.const_get(klass).const_get(validator)
const_get(klass)::Validations.const_get(:"#{validator}Validator").send :include, ClientSideValidations.const_get(klass).const_get(validator)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Category

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Comment

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/format_thing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class FormatThing

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Post

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Tag

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down

0 comments on commit a88662f

Please sign in to comment.