Skip to content
Snippets Groups Projects
Commit 206953a4 authored by Douwe Maan's avatar Douwe Maan
Browse files

Prefer leading style for Style/DotPosition

parent f72a6560
No related branches found
No related tags found
No related merge requests found
Showing
with 64 additions and 64 deletions
Loading
@@ -138,7 +138,7 @@ Style/Documentation:
Loading
@@ -138,7 +138,7 @@ Style/Documentation:
   
Style/DotPosition: Style/DotPosition:
Enabled: true Enabled: true
EnforcedStyle: trailing EnforcedStyle: leading
   
# Align elses and elsifs correctly. # Align elses and elsifs correctly.
Style/ElseAlignment: Style/ElseAlignment:
Loading
Loading
Loading
@@ -5,9 +5,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
Loading
@@ -5,9 +5,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
end end
   
def update def update
successful = ApplicationSettings::UpdateService. successful = ApplicationSettings::UpdateService
new(@application_setting, current_user, application_setting_params). .new(@application_setting, current_user, application_setting_params)
execute .execute
   
if successful if successful
redirect_to admin_application_settings_path, redirect_to admin_application_settings_path,
Loading
Loading
Loading
@@ -83,8 +83,8 @@ module CreatesCommit
Loading
@@ -83,8 +83,8 @@ module CreatesCommit
def merge_request_exists? def merge_request_exists?
return @merge_request if defined?(@merge_request) return @merge_request if defined?(@merge_request)
   
@merge_request = MergeRequestsFinder.new(current_user, project_id: @mr_target_project.id).execute.opened. @merge_request = MergeRequestsFinder.new(current_user, project_id: @mr_target_project.id).execute.opened
find_by(source_branch: @mr_source_branch, target_branch: @mr_target_branch, source_project_id: @mr_source_project) .find_by(source_branch: @mr_source_branch, target_branch: @mr_target_branch, source_project_id: @mr_source_project)
end end
   
def different_project? def different_project?
Loading
Loading
Loading
@@ -5,9 +5,9 @@ module IssuesAction
Loading
@@ -5,9 +5,9 @@ module IssuesAction
def issues def issues
@label = issues_finder.labels.first @label = issues_finder.labels.first
   
@issues = issues_collection. @issues = issues_collection
non_archived. .non_archived
page(params[:page]) .page(params[:page])
   
@collection_type = "Issue" @collection_type = "Issue"
@issuable_meta_data = issuable_meta_data(@issues, @collection_type) @issuable_meta_data = issuable_meta_data(@issues, @collection_type)
Loading
Loading
Loading
@@ -15,8 +15,8 @@ module MembershipActions
Loading
@@ -15,8 +15,8 @@ module MembershipActions
end end
   
def leave def leave
member = Members::DestroyService.new(membershipable, current_user, user_id: current_user.id). member = Members::DestroyService.new(membershipable, current_user, user_id: current_user.id)
execute(:all) .execute(:all)
   
source_type = membershipable.class.to_s.humanize(capitalize: false) source_type = membershipable.class.to_s.humanize(capitalize: false)
notice = notice =
Loading
Loading
Loading
@@ -5,8 +5,8 @@ module MergeRequestsAction
Loading
@@ -5,8 +5,8 @@ module MergeRequestsAction
def merge_requests def merge_requests
@label = merge_requests_finder.labels.first @label = merge_requests_finder.labels.first
   
@merge_requests = merge_requests_collection. @merge_requests = merge_requests_collection
page(params[:page]) .page(params[:page])
   
@collection_type = "MergeRequest" @collection_type = "MergeRequest"
@issuable_meta_data = issuable_meta_data(@merge_requests, @collection_type) @issuable_meta_data = issuable_meta_data(@merge_requests, @collection_type)
Loading
Loading
Loading
@@ -29,9 +29,9 @@ class Import::BitbucketController < Import::BaseController
Loading
@@ -29,9 +29,9 @@ class Import::BitbucketController < Import::BaseController
end end
   
def jobs def jobs
render json: current_user.created_projects. render json: current_user.created_projects
where(import_type: 'bitbucket'). .where(import_type: 'bitbucket')
to_json(only: [:id, :import_status]) .to_json(only: [:id, :import_status])
end end
   
def create def create
Loading
Loading
Loading
@@ -11,8 +11,8 @@ class JwtController < ApplicationController
Loading
@@ -11,8 +11,8 @@ class JwtController < ApplicationController
service = SERVICES[params[:service]] service = SERVICES[params[:service]]
return head :not_found unless service return head :not_found unless service
   
result = service.new(@authentication_result.project, @authentication_result.actor, auth_params). result = service.new(@authentication_result.project, @authentication_result.actor, auth_params)
execute(authentication_abilities: @authentication_result.authentication_abilities) .execute(authentication_abilities: @authentication_result.authentication_abilities)
   
render json: result, status: result[:http_status] render json: result, status: result[:http_status]
end end
Loading
Loading
Loading
@@ -144,7 +144,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
Loading
@@ -144,7 +144,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end end
   
def log_audit_event(user, options = {}) def log_audit_event(user, options = {})
AuditEventService.new(user, user, options). AuditEventService.new(user, user, options)
for_authentication.security_event .for_authentication.security_event
end end
end end
Loading
@@ -41,9 +41,9 @@ class ProfilesController < Profiles::ApplicationController
Loading
@@ -41,9 +41,9 @@ class ProfilesController < Profiles::ApplicationController
end end
   
def audit_log def audit_log
@events = AuditEvent.where(entity_type: "User", entity_id: current_user.id). @events = AuditEvent.where(entity_type: "User", entity_id: current_user.id)
order("created_at DESC"). .order("created_at DESC")
page(params[:page]) .page(params[:page])
end end
   
def update_username def update_username
Loading
Loading
Loading
@@ -4,15 +4,15 @@ class Projects::BadgesController < Projects::ApplicationController
Loading
@@ -4,15 +4,15 @@ class Projects::BadgesController < Projects::ApplicationController
before_action :no_cache_headers, except: [:index] before_action :no_cache_headers, except: [:index]
   
def build def build
build_status = Gitlab::Badge::Build::Status. build_status = Gitlab::Badge::Build::Status
new(project, params[:ref]) .new(project, params[:ref])
   
render_badge build_status render_badge build_status
end end
   
def coverage def coverage
coverage_report = Gitlab::Badge::Coverage::Report. coverage_report = Gitlab::Badge::Coverage::Report
new(project, params[:ref], params[:job]) .new(project, params[:ref], params[:job])
   
render_badge coverage_report render_badge coverage_report
end end
Loading
Loading
Loading
@@ -164,7 +164,7 @@ class Projects::BlobController < Projects::ApplicationController
Loading
@@ -164,7 +164,7 @@ class Projects::BlobController < Projects::ApplicationController
end end
   
def set_last_commit_sha def set_last_commit_sha
@last_commit_sha = Gitlab::Git::Commit. @last_commit_sha = Gitlab::Git::Commit
last_for_path(@repository, @ref, @path).sha .last_for_path(@repository, @ref, @path).sha
end end
end end
Loading
@@ -40,10 +40,10 @@ module Projects
Loading
@@ -40,10 +40,10 @@ module Projects
   
def issue def issue
@issue ||= @issue ||=
IssuesFinder.new(current_user, project_id: project.id). IssuesFinder.new(current_user, project_id: project.id)
execute. .execute
where(iid: params[:id]). .where(iid: params[:id])
first! .first!
end end
   
def authorize_read_issue! def authorize_read_issue!
Loading
Loading
Loading
@@ -32,8 +32,8 @@ class Projects::BranchesController < Projects::ApplicationController
Loading
@@ -32,8 +32,8 @@ class Projects::BranchesController < Projects::ApplicationController
branch_name = sanitize(strip_tags(params[:branch_name])) branch_name = sanitize(strip_tags(params[:branch_name]))
branch_name = Addressable::URI.unescape(branch_name) branch_name = Addressable::URI.unescape(branch_name)
   
result = CreateBranchService.new(project, current_user). result = CreateBranchService.new(project, current_user)
execute(branch_name, ref) .execute(branch_name, ref)
   
if params[:issue_iid] if params[:issue_iid]
issue = IssuesFinder.new(current_user, project_id: @project.id).find_by(iid: params[:issue_iid]) issue = IssuesFinder.new(current_user, project_id: @project.id).find_by(iid: params[:issue_iid])
Loading
Loading
Loading
@@ -48,8 +48,8 @@ class Projects::BuildsController < Projects::ApplicationController
Loading
@@ -48,8 +48,8 @@ class Projects::BuildsController < Projects::ApplicationController
respond_to do |format| respond_to do |format|
format.json do format.json do
state = params[:state].presence state = params[:state].presence
render json: @build.trace_with_state(state: state). render json: @build.trace_with_state(state: state)
merge!(id: @build.id, status: @build.status) .merge!(id: @build.id, status: @build.status)
end end
end end
end end
Loading
Loading
Loading
@@ -35,9 +35,9 @@ class Projects::CommitController < Projects::ApplicationController
Loading
@@ -35,9 +35,9 @@ class Projects::CommitController < Projects::ApplicationController
respond_to do |format| respond_to do |format|
format.html format.html
format.json do format.json do
render json: PipelineSerializer. render json: PipelineSerializer
new(project: @project, user: @current_user). .new(project: @project, user: @current_user)
represent(@pipelines) .represent(@pipelines)
end end
end end
end end
Loading
Loading
Loading
@@ -18,11 +18,11 @@ class Projects::CommitsController < Projects::ApplicationController
Loading
@@ -18,11 +18,11 @@ class Projects::CommitsController < Projects::ApplicationController
@repository.commits(@ref, path: @path, limit: @limit, offset: @offset) @repository.commits(@ref, path: @path, limit: @limit, offset: @offset)
end end
   
@note_counts = project.notes.where(commit_id: @commits.map(&:id)). @note_counts = project.notes.where(commit_id: @commits.map(&:id))
group(:commit_id).count .group(:commit_id).count
   
@merge_request = MergeRequestsFinder.new(current_user, project_id: @project.id).execute.opened. @merge_request = MergeRequestsFinder.new(current_user, project_id: @project.id).execute.opened
find_by(source_project: @project, source_branch: @ref, target_branch: @repository.root_ref) .find_by(source_project: @project, source_branch: @ref, target_branch: @repository.root_ref)
   
respond_to do |format| respond_to do |format|
format.html format.html
Loading
Loading
Loading
@@ -46,8 +46,8 @@ class Projects::CompareController < Projects::ApplicationController
Loading
@@ -46,8 +46,8 @@ class Projects::CompareController < Projects::ApplicationController
end end
   
def define_diff_vars def define_diff_vars
@compare = CompareService.new(@project, @head_ref). @compare = CompareService.new(@project, @head_ref)
execute(@project, @start_ref) .execute(@project, @start_ref)
   
if @compare if @compare
@commits = @compare.commits @commits = @compare.commits
Loading
@@ -66,7 +66,7 @@ class Projects::CompareController < Projects::ApplicationController
Loading
@@ -66,7 +66,7 @@ class Projects::CompareController < Projects::ApplicationController
end end
   
def merge_request def merge_request
@merge_request ||= MergeRequestsFinder.new(current_user, project_id: @project.id).execute.opened. @merge_request ||= MergeRequestsFinder.new(current_user, project_id: @project.id).execute.opened
find_by(source_project: @project, source_branch: @head_ref, target_branch: @start_ref) .find_by(source_project: @project, source_branch: @head_ref, target_branch: @start_ref)
end end
end end
Loading
@@ -9,18 +9,18 @@ class Projects::EnvironmentsController < Projects::ApplicationController
Loading
@@ -9,18 +9,18 @@ class Projects::EnvironmentsController < Projects::ApplicationController
before_action :verify_api_request!, only: :terminal_websocket_authorize before_action :verify_api_request!, only: :terminal_websocket_authorize
   
def index def index
@environments = project.environments. @environments = project.environments
with_state(params[:scope] || :available) .with_state(params[:scope] || :available)
   
respond_to do |format| respond_to do |format|
format.html format.html
format.json do format.json do
render json: { render json: {
environments: EnvironmentSerializer. environments: EnvironmentSerializer
new(project: @project, user: @current_user). .new(project: @project, user: @current_user)
with_pagination(request, response). .with_pagination(request, response)
within_folders. .within_folders
represent(@environments), .represent(@environments),
available_count: project.environments.available.count, available_count: project.environments.available.count,
stopped_count: project.environments.stopped.count stopped_count: project.environments.stopped.count
} }
Loading
@@ -36,10 +36,10 @@ class Projects::EnvironmentsController < Projects::ApplicationController
Loading
@@ -36,10 +36,10 @@ class Projects::EnvironmentsController < Projects::ApplicationController
format.html format.html
format.json do format.json do
render json: { render json: {
environments: EnvironmentSerializer. environments: EnvironmentSerializer
new(project: @project, user: @current_user). .new(project: @project, user: @current_user)
with_pagination(request, response). .with_pagination(request, response)
represent(@environments), .represent(@environments),
available_count: folder_environments.available.count, available_count: folder_environments.available.count,
stopped_count: folder_environments.stopped.count stopped_count: folder_environments.stopped.count
} }
Loading
Loading
Loading
@@ -77,8 +77,8 @@ class Projects::IssuesController < Projects::ApplicationController
Loading
@@ -77,8 +77,8 @@ class Projects::IssuesController < Projects::ApplicationController
def show def show
raw_notes = @issue.notes.inc_relations_for_view.fresh raw_notes = @issue.notes.inc_relations_for_view.fresh
   
@notes = Banzai::NoteRenderer. @notes = Banzai::NoteRenderer
render(raw_notes, @project, current_user, @path, @project_wiki, @ref) .render(raw_notes, @project, current_user, @path, @project_wiki, @ref)
   
@note = @project.notes.new(noteable: @issue) @note = @project.notes.new(noteable: @issue)
@noteable = @issue @noteable = @issue
Loading
@@ -189,9 +189,9 @@ class Projects::IssuesController < Projects::ApplicationController
Loading
@@ -189,9 +189,9 @@ class Projects::IssuesController < Projects::ApplicationController
def merge_request_for_resolving_discussions def merge_request_for_resolving_discussions
return unless merge_request_iid = params[:merge_request_for_resolving_discussions] return unless merge_request_iid = params[:merge_request_for_resolving_discussions]
   
@merge_request_for_resolving_discussions ||= MergeRequestsFinder.new(current_user, project_id: project.id). @merge_request_for_resolving_discussions ||= MergeRequestsFinder.new(current_user, project_id: project.id)
execute. .execute
find_by(iid: merge_request_iid) .find_by(iid: merge_request_iid)
end end
   
def authorize_read_issue! def authorize_read_issue!
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