diff --git a/.rubocop.yml b/.rubocop.yml index 0ff2d3154..f697dab0f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -73,9 +73,6 @@ Performance/FixedSize: Performance/FlatMap: Enabled: true -Performance/HashEachMethods: - Enabled: true - Performance/LstripRstrip: Enabled: true @@ -373,6 +370,9 @@ RSpec/OverwritingSetup: RSpec/PredicateMatcher: Enabled: true +Rails/HttpStatus: + Enabled: true + RSpec/RepeatedDescription: Enabled: true @@ -403,6 +403,12 @@ RSpec/VerifiedDoubles: RSpec/VoidExpect: Enabled: true +FactoryBot/StaticAttributeDefinedDynamically: + Enabled: true + +FactoryBot/DynamicAttributeDefinedStatically: + Enabled: false + Security/Eval: Enabled: true diff --git a/Gemfile b/Gemfile index d9298f710..85f8a1c33 100644 --- a/Gemfile +++ b/Gemfile @@ -86,8 +86,8 @@ group :development do gem 'capistrano-rails', '~> 1.3.1', require: false gem 'capistrano3-delayed-job', '~> 1.7.3' gem 'mdl', '~> 0.4.0', require: false - gem 'rubocop', '~> 0.52.1', require: false - gem 'rubocop-rspec', '~> 1.22.1', require: false + gem 'rubocop', '~> 0.53.0', require: false + gem 'rubocop-rspec', '~> 1.24.0', require: false gem 'rvm1-capistrano3', '~> 1.4.0', require: false gem 'scss_lint', '~> 0.54.0', require: false gem 'web-console', '~> 3.3.0' diff --git a/Gemfile.lock b/Gemfile.lock index db16889db..8d206f2d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,7 @@ GEM ancestry (3.0.1) activerecord (>= 3.2.0) arel (6.0.4) - ast (2.3.0) + ast (2.4.0) babel-source (5.8.35) babel-transpiler (0.7.0) babel-source (>= 4.0, < 6) @@ -305,8 +305,8 @@ GEM parallel (1.12.1) paranoia (2.4.0) activerecord (>= 4.0, < 5.2) - parser (2.4.0.2) - ast (~> 2.3) + parser (2.5.0.5) + ast (~> 2.4.0) pg (0.21.0) pg_search (2.0.1) activerecord (>= 4.2) @@ -352,7 +352,7 @@ GEM rainbow (2.2.2) rake raindrops (0.19.0) - rake (12.3.0) + rake (12.3.1) redcarpet (3.4.0) referer-parser (0.3.0) request_store (1.3.2) @@ -379,15 +379,15 @@ GEM rspec-mocks (~> 3.7.0) rspec-support (~> 3.7.0) rspec-support (3.7.0) - rubocop (0.52.1) + rubocop (0.53.0) parallel (~> 1.10) - parser (>= 2.4.0.2, < 3.0) + parser (>= 2.5) powerpack (~> 0.1) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-rspec (1.22.1) - rubocop (>= 0.52.1) + rubocop-rspec (1.24.0) + rubocop (>= 0.53.0) ruby-progressbar (1.9.0) rubyzip (1.2.1) rvm1-capistrano3 (1.4.0) @@ -550,8 +550,8 @@ DEPENDENCIES rinku (~> 2.0.2) rollbar (~> 2.15.5) rspec-rails (~> 3.6) - rubocop (~> 0.52.1) - rubocop-rspec (~> 1.22.1) + rubocop (~> 0.53.0) + rubocop-rspec (~> 1.24.0) rvm1-capistrano3 (~> 1.4.0) sass-rails (~> 5.0, >= 5.0.4) savon (~> 2.11.1) diff --git a/spec/factories.rb b/spec/factories.rb index 4e8ff1d65..e9f79242c 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -638,13 +638,13 @@ FactoryBot.define do factory :poll_partial_result, class: 'Poll::PartialResult' do association :question, factory: [:poll_question, :with_answers] association :author, factory: :user - origin { 'web' } + origin 'web' answer { question.question_answers.sample.title } end factory :poll_recount, class: 'Poll::Recount' do association :author, factory: :user - origin { 'web' } + origin 'web' end factory :officing_residence, class: 'Officing::Residence' do