Skip to content
Snippets Groups Projects
Unverified Commit 3a2abc1d authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Enable the Layout/ExtraSpacing cop


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 16ab0050
No related branches found
No related tags found
No related merge requests found
Showing
with 27 additions and 27 deletions
Loading
Loading
@@ -111,7 +111,7 @@ module Gitlab
 
def project_for_paths(paths, request)
project = Project.where_full_path_in(paths).first
return unless Ability.allowed?(current_user(request, project), :read_project, project)
return unless Ability.allowed?(current_user(request, project), :read_project, project)
 
project
end
Loading
Loading
Loading
Loading
@@ -103,7 +103,7 @@ module Gitlab
end
 
def write_token(new_token)
Tempfile.open(File.basename(token_path), File.dirname(token_path), encoding: 'ascii-8bit') do |f|
Tempfile.open(File.basename(token_path), File.dirname(token_path), encoding: 'ascii-8bit') do |f|
f.write(new_token)
f.close
File.link(f.path, token_path)
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ namespace :gitlab do
end
 
desc "GitLab | Add a specific user to all projects (as a developer)"
task :user_to_projects, [:email] => :environment do |t, args|
task :user_to_projects, [:email] => :environment do |t, args|
user = User.find_by(email: args.email)
project_ids = Project.pluck(:id)
puts "Importing #{user.email} users into #{project_ids.size} projects"
Loading
Loading
@@ -22,7 +22,7 @@ namespace :gitlab do
end
 
desc "GitLab | Add all users to all groups (admin users are added as owners)"
task all_users_to_all_groups: :environment do |t, args|
task all_users_to_all_groups: :environment do |t, args|
user_ids = User.where(admin: false).pluck(:id)
admin_ids = User.where(admin: true).pluck(:id)
groups = Group.all
Loading
Loading
@@ -36,7 +36,7 @@ namespace :gitlab do
end
 
desc "GitLab | Add a specific user to all groups (as a developer)"
task :user_to_groups, [:email] => :environment do |t, args|
task :user_to_groups, [:email] => :environment do |t, args|
user = User.find_by_email args.email
groups = Group.all
puts "Importing #{user.email} users into #{groups.size} groups"
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module QA
context 'Create' do
describe 'Merge request creation' do
it 'user creates a new merge request' do
it 'user creates a new merge request' do
gitlab_account_username = "@#{Runtime::User.username}"
 
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Loading
Loading
@@ -49,7 +49,7 @@ module QA
end
 
describe 'creates a merge request', :smoke do
it 'user creates a new merge request' do
it 'user creates a new merge request' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
 
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module QA
context 'Create' do
describe 'Merge request rebasing' do
it 'user rebases source branch of merge request' do
it 'user rebases source branch of merge request' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
 
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module QA
context 'Create' do
describe 'Merge request squashing' do
it 'user squashes commits while merging' do
it 'user squashes commits while merging' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
 
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module QA
context 'Create' do
describe 'Git push over HTTP', :ldap_no_tls do
it 'user using a personal access token pushes code to the repository' do
it 'user using a personal access token pushes code to the repository' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
 
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module QA
context 'Create' do
describe 'Push mirror a repository over HTTP' do
it 'configures and syncs a (push) mirrored repository' do
it 'configures and syncs a (push) mirrored repository' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
 
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
module QA
context 'Create' do
describe 'Git push over HTTP', :ldap_no_tls do
it 'user pushes code to the repository' do
it 'user pushes code to the repository' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
 
Loading
Loading
Loading
Loading
@@ -80,7 +80,7 @@ describe 'bin/changelog' do
end
end
 
describe '.read_type' do
describe '.read_type' do
let(:type) { '1' }
 
it 'reads type from $stdin' do
Loading
Loading
Loading
Loading
@@ -423,7 +423,7 @@ describe ApplicationController do
enforce_terms
end
 
it 'redirects if the user did not accept the terms' do
it 'redirects if the user did not accept the terms' do
get :index
 
expect(response).to have_gitlab_http_status(302)
Loading
Loading
Loading
Loading
@@ -229,7 +229,7 @@ describe Boards::IssuesController do
post :create, params: {
board_id: board.to_param,
list_id: list.to_param,
issue: { title: title, project_id: project.id }
issue: { title: title, project_id: project.id }
},
format: :json
end
Loading
Loading
Loading
Loading
@@ -22,7 +22,7 @@ describe ChecksCollaboration do
end
end
 
it 'is true if the user can push to the project' do
it 'is true if the user can push to the project' do
project.add_developer(user)
 
expect(helper.can_collaborate_with_project?(project)).to be_truthy
Loading
Loading
Loading
Loading
@@ -110,7 +110,7 @@ describe Groups::ChildrenController do
matched_project_1 = create(:project, :public, namespace: shared_subgroup, name: 'mobile-soc')
 
l2_subgroup = create(:group, :public, parent: shared_subgroup, path: 'broadcom')
l3_subgroup = create(:group, :public, parent: l2_subgroup, path: 'wifi-group')
l3_subgroup = create(:group, :public, parent: l2_subgroup, path: 'wifi-group')
matched_project_2 = create(:project, :public, namespace: l3_subgroup, name: 'mobile')
 
get :index, params: { group_id: group.to_param, filter: 'mobile' }, format: :json
Loading
Loading
@@ -289,7 +289,7 @@ describe Groups::ChildrenController do
end
 
context 'with subgroups and projects', :nested_groups do
let!(:first_page_subgroups) { create_list(:group, per_page, :public, parent: group) }
let!(:first_page_subgroups) { create_list(:group, per_page, :public, parent: group) }
let!(:other_subgroup) { create(:group, :public, parent: group) }
let!(:next_page_projects) { create_list(:project, per_page, :public, namespace: group) }
 
Loading
Loading
@@ -306,7 +306,7 @@ describe Groups::ChildrenController do
end
 
context 'with a mixed first page' do
let!(:first_page_subgroups) { [create(:group, :public, parent: group)] }
let!(:first_page_subgroups) { [create(:group, :public, parent: group)] }
let!(:first_page_projects) { create_list(:project, per_page, :public, namespace: group) }
 
it 'correctly calculates the counts' do
Loading
Loading
require 'spec_helper'
 
describe Profiles::AvatarsController do
let(:user) { create(:user, avatar: fixture_file_upload("spec/fixtures/dk.png")) }
let(:user) { create(:user, avatar: fixture_file_upload("spec/fixtures/dk.png")) }
 
before do
sign_in(user)
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ describe Projects::CommitController do
set(:user) { create(:user) }
let(:commit) { project.commit("master") }
let(:master_pickable_sha) { '7d3b0f7cff5f37573aea97cebfd5692ea1689924' }
let(:master_pickable_commit) { project.commit(master_pickable_sha) }
let(:master_pickable_commit) { project.commit(master_pickable_sha) }
 
before do
sign_in(user)
Loading
Loading
Loading
Loading
@@ -253,8 +253,8 @@ describe Projects::MergeRequestsController do
end
 
context 'there is no source project' do
let(:project) { create(:project, :repository) }
let(:forked_project) { fork_project_with_submodules(project) }
let(:project) { create(:project, :repository) }
let(:forked_project) { fork_project_with_submodules(project) }
let!(:merge_request) { create(:merge_request, source_project: forked_project, source_branch: 'add-submodule-version-bump', target_branch: 'master', target_project: project) }
 
before do
Loading
Loading
@@ -884,7 +884,7 @@ describe Projects::MergeRequestsController do
end
 
describe 'POST #rebase' do
let(:viewer) { user }
let(:viewer) { user }
 
def post_rebase
post :rebase, params: { namespace_id: project.namespace, project_id: project, id: merge_request }
Loading
Loading
Loading
Loading
@@ -50,7 +50,7 @@ describe Projects::PipelinesController do
end
end
 
context 'when using legacy stages', :request_store do
context 'when using legacy stages', :request_store do
before do
stub_feature_flags(ci_pipeline_persisted_stages: false)
end
Loading
Loading
Loading
Loading
@@ -87,7 +87,7 @@ describe Projects::Serverless::FunctionsController do
end
 
it 'has data' do
get :index, params: params({ format: :json })
get :index, params: params({ format: :json })
 
expect(response).to have_gitlab_http_status(200)
 
Loading
Loading
Loading
Loading
@@ -456,7 +456,7 @@ describe ProjectsController do
end
 
context "when the project is forked" do
let(:project) { create(:project, :repository) }
let(:project) { create(:project, :repository) }
let(:forked_project) { fork_project(project, nil, repository: true) }
let(:merge_request) do
create(:merge_request,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment