Fix all Layout/SpaceInsideParens rubocop issues and remove files from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-26 18:06:01 +02:00
parent c4d90691b1
commit 1c8e039862
5 changed files with 7 additions and 16 deletions

View File

@@ -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.

View File

@@ -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?

View File

@@ -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

View File

@@ -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'

View File

@@ -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