diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9edcf605f..54a3f650f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -557,15 +557,6 @@ Style/RescueModifier: - 'app/controllers/concerns/commentable_actions.rb' - 'app/controllers/verification/sms_controller.rb' -# Offense count: 8 -# Cop supports --auto-correct. -Layout/SpaceInsideParens: - Exclude: - - 'app/models/user.rb' - - 'lib/manager_authenticator.rb' - - 'spec/features/proposals_spec.rb' - - 'spec/models/abilities/moderator_spec.rb' - # Offense count: 9 # Cop supports --auto-correct. # Configuration parameters: IgnoredMethods. diff --git a/app/models/user.rb b/app/models/user.rb index 9f629009d..9df08c014 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -156,7 +156,7 @@ class User < ActiveRecord::Base def has_official_email? domain = Setting['email_domain_for_officials'] - email.present? && ( (email.end_with? "@#{domain}") || (email.end_with? ".#{domain}") ) + email.present? && ((email.end_with? "@#{domain}") || (email.end_with? ".#{domain}")) end def display_official_position_badge? diff --git a/lib/manager_authenticator.rb b/lib/manager_authenticator.rb index 8f8d453f7..11928e737 100644 --- a/lib/manager_authenticator.rb +++ b/lib/manager_authenticator.rb @@ -25,7 +25,7 @@ class ManagerAuthenticator parsed_response = parser.parse((response[:get_applications_user_list_response][:get_applications_user_list_return])) aplication_value = parsed_response["APLICACIONES"]["APLICACION"] # aplication_value from UWEB can be an array of hashes or a hash - aplication_value.include?( {"CLAVE_APLICACION" => application_key}) || aplication_value["CLAVE_APLICACION"] == application_key + aplication_value.include?({"CLAVE_APLICACION" => application_key}) || aplication_value["CLAVE_APLICACION"] == application_key rescue false end diff --git a/spec/features/proposals_spec.rb b/spec/features/proposals_spec.rb index 9d8584839..cfe9cc918 100644 --- a/spec/features/proposals_spec.rb +++ b/spec/features/proposals_spec.rb @@ -99,7 +99,7 @@ feature 'Proposals' do end scenario "Show Vimeo video" do - proposal = create(:proposal, video_url: "https://vimeo.com/7232823" ) + proposal = create(:proposal, video_url: "https://vimeo.com/7232823") visit proposal_path(proposal) expect(page).to have_selector("div[id='js-embedded-video']") expect(page.html).to include 'https://player.vimeo.com/video/7232823' diff --git a/spec/models/abilities/moderator_spec.rb b/spec/models/abilities/moderator_spec.rb index 6fab62d73..f3135c8d9 100644 --- a/spec/models/abilities/moderator_spec.rb +++ b/spec/models/abilities/moderator_spec.rb @@ -35,14 +35,14 @@ describe "Abilities::Moderator" do let(:rejected_organization) { create(:organization, :rejected) } let(:verified_organization) { create(:organization, :verified) } - it { should be_able_to( :verify, pending_organization) } - it { should be_able_to( :reject, pending_organization) } + it { should be_able_to(:verify, pending_organization) } + it { should be_able_to(:reject, pending_organization) } it { should_not be_able_to(:verify, verified_organization) } - it { should be_able_to( :reject, verified_organization) } + it { should be_able_to(:reject, verified_organization) } it { should_not be_able_to(:reject, rejected_organization) } - it { should be_able_to( :verify, rejected_organization) } + it { should be_able_to(:verify, rejected_organization) } end describe "hiding, reviewing and restoring" do