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 37 additions and 37 deletions
Loading
Loading
@@ -62,7 +62,7 @@ scope format: false do
resources :protected_tags, only: [:index, :show, :create, :update, :destroy]
end
 
scope constraints: { id: /.+/ } do
scope constraints: { id: /.+/ } do
scope controller: :blob do
get '/new/*id', action: :new, as: :new_blob
post '/create/*id', action: :create, as: :create_blob
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ class AddCiBuildsIndexForJobscontroller < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
 
def up
add_concurrent_index :ci_builds, [:project_id, :id] unless index_exists? :ci_builds, [:project_id, :id]
add_concurrent_index :ci_builds, [:project_id, :id] unless index_exists? :ci_builds, [:project_id, :id]
remove_concurrent_index :ci_builds, :project_id if index_exists? :ci_builds, :project_id
end
 
Loading
Loading
Loading
Loading
@@ -48,7 +48,7 @@ class UpdateUploadPathsToSystem < ActiveRecord::Migration[4.2]
end
 
def new_upload_dir
File.join(base_directory, "-", "system")
File.join(base_directory, "-", "system")
end
 
def arel_table
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ module API
success Entities::Deployment
end
params do
requires :deployment_id, type: Integer, desc: 'The deployment ID'
requires :deployment_id, type: Integer, desc: 'The deployment ID'
end
get ':id/deployments/:deployment_id' do
authorize! :read_deployment, user_project
Loading
Loading
Loading
Loading
@@ -190,7 +190,7 @@ module API
expose :custom_attributes, using: 'API::Entities::CustomAttribute', if: :with_custom_attributes
 
# rubocop: disable CodeReuse/ActiveRecord
def self.preload_relation(projects_relation, options = {})
def self.preload_relation(projects_relation, options = {})
# Preloading tags, should be done with using only `:tags`,
# as `:tags` are defined as: `has_many :tags, through: :taggings`
# N+1 is solved then by using `subject.tags.map(&:name)`
Loading
Loading
@@ -274,7 +274,7 @@ module API
expose :statistics, using: 'API::Entities::ProjectStatistics', if: :statistics
 
# rubocop: disable CodeReuse/ActiveRecord
def self.preload_relation(projects_relation, options = {})
def self.preload_relation(projects_relation, options = {})
# Preloading tags, should be done with using only `:tags`,
# as `:tags` are defined as: `has_many :tags, through: :taggings`
# N+1 is solved then by using `subject.tags.map(&:name)`
Loading
Loading
Loading
Loading
@@ -74,7 +74,7 @@ module API
success Entities::Environment
end
params do
requires :environment_id, type: Integer, desc: 'The environment ID'
requires :environment_id, type: Integer, desc: 'The environment ID'
end
delete ':id/environments/:environment_id' do
authorize! :update_environment, user_project
Loading
Loading
@@ -88,7 +88,7 @@ module API
success Entities::Environment
end
params do
requires :environment_id, type: Integer, desc: 'The environment ID'
requires :environment_id, type: Integer, desc: 'The environment ID'
end
post ':id/environments/:environment_id/stop' do
authorize! :read_environment, user_project
Loading
Loading
Loading
Loading
@@ -146,7 +146,7 @@ module API
end
 
def add_default_pagination_headers
header 'X-Per-Page', per_page.to_s
header 'X-Per-Page', per_page.to_s
end
 
def add_navigation_links(next_page_params)
Loading
Loading
Loading
Loading
@@ -294,7 +294,7 @@ module API
end
# rubocop: enable CodeReuse/ActiveRecord
 
desc 'List merge requests that are related to the issue' do
desc 'List merge requests that are related to the issue' do
success Entities::MergeRequestBasic
end
params do
Loading
Loading
@@ -318,7 +318,7 @@ module API
present paginate(merge_requests), with: Entities::MergeRequestBasic, current_user: current_user, project: user_project
end
 
desc 'List merge requests closing issue' do
desc 'List merge requests closing issue' do
success Entities::MergeRequestBasic
end
params do
Loading
Loading
@@ -335,7 +335,7 @@ module API
end
# rubocop: enable CodeReuse/ActiveRecord
 
desc 'List participants for an issue' do
desc 'List participants for an issue' do
success Entities::UserBasic
end
params do
Loading
Loading
Loading
Loading
@@ -52,7 +52,7 @@ module API
success Entities::Job
end
params do
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
use :optional_scope
use :pagination
end
Loading
Loading
Loading
Loading
@@ -69,7 +69,7 @@ module API
success Entities::Label
end
params do
requires :name, type: String, desc: 'The name of the label to be updated'
requires :name, type: String, desc: 'The name of the label to be updated'
optional :new_name, type: String, desc: 'The new name of the label'
optional :color, type: String, desc: "The new color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the allowed CSS color names"
optional :description, type: String, desc: 'The new description of label'
Loading
Loading
Loading
Loading
@@ -32,7 +32,7 @@ module API
success Entities::PipelineScheduleDetails
end
params do
requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
end
get ':id/pipeline_schedules/:pipeline_schedule_id' do
present pipeline_schedule, with: Entities::PipelineScheduleDetails
Loading
Loading
@@ -87,7 +87,7 @@ module API
success Entities::PipelineScheduleDetails
end
params do
requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
end
post ':id/pipeline_schedules/:pipeline_schedule_id/take_ownership' do
authorize! :update_pipeline_schedule, pipeline_schedule
Loading
Loading
@@ -103,7 +103,7 @@ module API
success Entities::PipelineScheduleDetails
end
params do
requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
end
delete ':id/pipeline_schedules/:pipeline_schedule_id' do
authorize! :admin_pipeline_schedule, pipeline_schedule
Loading
Loading
Loading
Loading
@@ -42,7 +42,7 @@ module API
success Entities::Pipeline
end
params do
requires :ref, type: String, desc: 'Reference'
requires :ref, type: String, desc: 'Reference'
optional :variables, Array, desc: 'Array of variables available in the pipeline'
end
# rubocop: disable CodeReuse/ActiveRecord
Loading
Loading
@@ -101,7 +101,7 @@ module API
success Entities::Pipeline
end
params do
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
end
post ':id/pipelines/:pipeline_id/retry' do
authorize! :update_pipeline, user_project
Loading
Loading
@@ -116,7 +116,7 @@ module API
success Entities::Pipeline
end
params do
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
end
post ':id/pipelines/:pipeline_id/cancel' do
authorize! :update_pipeline, user_project
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@ module API
projects_relation
end
 
def preload_relation(projects_relation, options = {})
def preload_relation(projects_relation, options = {})
projects_relation
end
 
Loading
Loading
Loading
Loading
@@ -97,7 +97,7 @@ module API
success Entities::Release
end
params do
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
end
delete ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do
authorize_destroy_release!
Loading
Loading
Loading
Loading
@@ -763,7 +763,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
before { authenticate! }
before { authorize_admin_project }
 
Loading
Loading
@@ -842,7 +842,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc "Trigger a slash command for #{service_slug}" do
detail 'Added in GitLab 8.13'
end
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
ISSUABLE_TYPES.each do |type, finder|
type_id_str = "#{type.singularize}_iid".to_sym
 
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Trigger a GitLab project pipeline' do
success Entities::Pipeline
end
Loading
Loading
@@ -59,7 +59,7 @@ module API
success Entities::Trigger
end
params do
requires :trigger_id, type: Integer, desc: 'The trigger ID'
requires :trigger_id, type: Integer, desc: 'The trigger ID'
end
get ':id/triggers/:trigger_id' do
authenticate!
Loading
Loading
@@ -75,7 +75,7 @@ module API
success Entities::Trigger
end
params do
requires :description, type: String, desc: 'The trigger description'
requires :description, type: String, desc: 'The trigger description'
end
post ':id/triggers' do
authenticate!
Loading
Loading
@@ -116,7 +116,7 @@ module API
success Entities::Trigger
end
params do
requires :trigger_id, type: Integer, desc: 'The trigger ID'
requires :trigger_id, type: Integer, desc: 'The trigger ID'
end
post ':id/triggers/:trigger_id/take_ownership' do
authenticate!
Loading
Loading
@@ -137,7 +137,7 @@ module API
success Entities::Trigger
end
params do
requires :trigger_id, type: Integer, desc: 'The trigger ID'
requires :trigger_id, type: Integer, desc: 'The trigger ID'
end
delete ':id/triggers/:trigger_id' do
authenticate!
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@ module API
requires :id, type: String, desc: 'The ID of a project'
end
 
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Get project variables' do
success Entities::Variable
end
Loading
Loading
Loading
Loading
@@ -16,10 +16,10 @@ module Gitlab
scope :running, -> { where(status: 'running') }
scope :pending, -> { where(status: 'pending') }
scope :success, -> { where(status: 'success') }
scope :failed, -> { where(status: 'failed') }
scope :canceled, -> { where(status: 'canceled') }
scope :skipped, -> { where(status: 'skipped') }
scope :manual, -> { where(status: 'manual') }
scope :failed, -> { where(status: 'failed') }
scope :canceled, -> { where(status: 'canceled') }
scope :skipped, -> { where(status: 'skipped') }
scope :manual, -> { where(status: 'manual') }
 
scope :failed_but_allowed, -> do
where(allow_failure: true, status: [:failed, :canceled])
Loading
Loading
Loading
Loading
@@ -47,7 +47,7 @@ module Gitlab
user? ? :lfs_token : :lfs_deploy_token
end
 
private # rubocop:disable Lint/UselessAccessModifier
private # rubocop:disable Lint/UselessAccessModifier
 
class HMACToken
include LfsTokenHelper
Loading
Loading
@@ -100,7 +100,7 @@ module Gitlab
#
class LegacyRedisDeviseToken
TOKEN_LENGTH = 50
DEFAULT_EXPIRY_TIME = 1800 * 1000 # 30 mins
DEFAULT_EXPIRY_TIME = 1800 * 1000 # 30 mins
 
def initialize(actor)
@actor = actor
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