diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f2ba9fdb174..91810d84c50 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -15,12 +15,6 @@ Capybara/CurrentPathExpectation: Layout/EmptyLinesAroundArguments: Enabled: false -# Offense count: 253 -# Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. -Layout/ExtraSpacing: - Enabled: false - # Offense count: 83 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb index 2912a22411e..28f113b5cbe 100644 --- a/app/controllers/passwords_controller.rb +++ b/app/controllers/passwords_controller.rb @@ -5,7 +5,7 @@ class PasswordsController < Devise::PasswordsController before_action :resource_from_email, only: [:create] before_action :check_password_authentication_available, only: [:create] - before_action :throttle_reset, only: [:create] + before_action :throttle_reset, only: [:create] # rubocop: disable CodeReuse/ActiveRecord def edit diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 32fc5140366..b13c0ae3967 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -24,10 +24,10 @@ class Projects::CommitController < Projects::ApplicationController apply_diff_view_cookie! respond_to do |format| - format.html do + format.html do render end - format.diff do + format.diff do send_git_diff(@project.repository, @commit.diff_refs) end format.patch do diff --git a/app/controllers/projects/discussions_controller.rb b/app/controllers/projects/discussions_controller.rb index b62606067c0..028390c7e2a 100644 --- a/app/controllers/projects/discussions_controller.rb +++ b/app/controllers/projects/discussions_controller.rb @@ -40,7 +40,7 @@ class Projects::DiscussionsController < Projects::ApplicationController def render_json_with_discussions_serializer render json: - DiscussionSerializer.new(project: project, noteable: discussion.noteable, current_user: current_user, note_entity: ProjectNoteEntity) + DiscussionSerializer.new(project: project, noteable: discussion.noteable, current_user: current_user, note_entity: ProjectNoteEntity) .represent(discussion, context: self, render_truncated_diff_lines: true) end diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 162c2636641..accc37557b0 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -55,7 +55,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo render json: serializer.represent(@merge_request, serializer: params[:serializer]) end - format.patch do + format.patch do break render_404 unless @merge_request.diff_refs send_git_patch @project.repository, @merge_request.diff_refs diff --git a/app/controllers/projects/pages_controller.rb b/app/controllers/projects/pages_controller.rb index c1ad6707c97..d0e35bee986 100644 --- a/app/controllers/projects/pages_controller.rb +++ b/app/controllers/projects/pages_controller.rb @@ -18,7 +18,7 @@ class Projects::PagesController < Projects::ApplicationController project.pages_domains.destroy_all # rubocop: disable DestroyAll respond_to do |format| - format.html do + format.html do redirect_to project_pages_path(@project), status: 302, notice: 'Pages were removed' diff --git a/app/graphql/types/permission_types/project.rb b/app/graphql/types/permission_types/project.rb index ab37c282fe5..e9a4ea9157b 100644 --- a/app/graphql/types/permission_types/project.rb +++ b/app/graphql/types/permission_types/project.rb @@ -8,7 +8,7 @@ module Types abilities :change_namespace, :change_visibility_level, :rename_project, :remove_project, :archive_project, :remove_fork_project, :remove_pages, :read_project, :create_merge_request_in, - :read_wiki, :read_project_member, :create_issue, :upload_file, + :read_wiki, :read_project_member, :create_issue, :upload_file, :read_cycle_analytics, :download_code, :download_wiki_code, :fork_project, :create_project_snippet, :read_commit_status, :request_access, :create_pipeline, :create_pipeline_schedule, diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb index 654fb9d9987..01a0fb34484 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -31,7 +31,7 @@ module AuthHelper def form_based_provider_with_highest_priority @form_based_provider_with_highest_priority ||= begin form_based_provider_priority.each do |provider_regexp| - highest_priority = form_based_providers.find { |provider| provider.match?(provider_regexp) } + highest_priority = form_based_providers.find { |provider| provider.match?(provider_regexp) } break highest_priority unless highest_priority.nil? end end diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 5f7147508c7..f8176facce9 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -209,7 +209,7 @@ module IssuablesHelper end def issuable_labels_tooltip(labels, limit: 5) - first, last = labels.partition.with_index { |_, i| i < limit } + first, last = labels.partition.with_index { |_, i| i < limit } if labels && labels.any? label_names = first.collect { |label| label.fetch(:title) } diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index 1cc170c8c4d..8f3424db295 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -154,7 +154,7 @@ module Clusters def build_kube_client! raise "Incomplete settings" unless api_url - raise "No namespace" if cluster.project_type? && actual_namespace.empty? # can probably remove this line once we remove #actual_namespace + raise "No namespace" if cluster.project_type? && actual_namespace.empty? # can probably remove this line once we remove #actual_namespace unless (username && password) || token raise "Either username/password or token is required to access API" diff --git a/app/models/concerns/has_status.rb b/app/models/concerns/has_status.rb index b92643f87f8..0d2be4c61ab 100644 --- a/app/models/concerns/has_status.rb +++ b/app/models/concerns/has_status.rb @@ -85,11 +85,11 @@ module HasStatus 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 :scheduled, -> { where(status: 'scheduled') } + scope :failed, -> { where(status: 'failed') } + scope :canceled, -> { where(status: 'canceled') } + scope :skipped, -> { where(status: 'skipped') } + scope :manual, -> { where(status: 'manual') } + scope :scheduled, -> { where(status: 'scheduled') } scope :alive, -> { where(status: [:created, :pending, :running]) } scope :created_or_pending, -> { where(status: [:created, :pending]) } scope :running_or_pending, -> { where(status: [:running, :pending]) } diff --git a/app/models/email.rb b/app/models/email.rb index b6a977dfa22..3ce6e792fa8 100644 --- a/app/models/email.rb +++ b/app/models/email.rb @@ -15,7 +15,7 @@ class Email < ActiveRecord::Base after_commit :update_invalid_gpg_signatures, if: -> { previous_changes.key?('confirmed_at') } devise :confirmable - self.reconfirmable = false # currently email can't be changed, no need to reconfirm + self.reconfirmable = false # currently email can't be changed, no need to reconfirm delegate :username, to: :user diff --git a/app/models/group.rb b/app/models/group.rb index 22814e35ca8..52f503404af 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -98,7 +98,7 @@ class Group < Namespace def select_for_project_authorization if current_scope.joins_values.include?(:shared_projects) joins('INNER JOIN namespaces project_namespace ON project_namespace.id = projects.namespace_id') - .where('project_namespace.share_with_group_lock = ?', false) + .where('project_namespace.share_with_group_lock = ?', false) .select("projects.id AS project_id, LEAST(project_group_links.group_access, members.access_level) AS access_level") else super diff --git a/app/models/member.rb b/app/models/member.rb index 9fc95ea00c3..b0f049438eb 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -76,7 +76,7 @@ class Member < ActiveRecord::Base scope :maintainers, -> { active.where(access_level: MAINTAINER) } scope :masters, -> { maintainers } # @deprecated scope :owners, -> { active.where(access_level: OWNER) } - scope :owners_and_maintainers, -> { active.where(access_level: [OWNER, MAINTAINER]) } + scope :owners_and_maintainers, -> { active.where(access_level: [OWNER, MAINTAINER]) } scope :owners_and_masters, -> { owners_and_maintainers } # @deprecated scope :order_name_asc, -> { left_join_users.reorder(Gitlab::Database.nulls_last_order('users.name', 'ASC')) } diff --git a/app/models/milestone.rb b/app/models/milestone.rb index b21edce3aad..8efaf87ca3a 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -28,7 +28,7 @@ class Milestone < ActiveRecord::Base has_internal_id :iid, scope: :group, init: ->(s) { s&.group&.milestones&.maximum(:iid) } has_many :issues - has_many :labels, -> { distinct.reorder('labels.title') }, through: :issues + has_many :labels, -> { distinct.reorder('labels.title') }, through: :issues has_many :merge_requests has_many :events, as: :target, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent diff --git a/app/models/project_services/irker_service.rb b/app/models/project_services/irker_service.rb index a15780c14f9..83fd9a34438 100644 --- a/app/models/project_services/irker_service.rb +++ b/app/models/project_services/irker_service.rb @@ -59,7 +59,7 @@ class IrkerService < Service ' append "?key=secretpassword" to the URI (Note that due to a bug, if you ' \ ' want to use a password, you have to omit the "#" on the channel). If you ' \ ' specify a default IRC URI to prepend before each recipient, you can just ' \ - ' give a channel name.' }, + ' give a channel name.' }, { type: 'checkbox', name: 'colorize_messages' } ] end diff --git a/app/models/snippet.rb b/app/models/snippet.rb index f9b23bbbf6c..f23ddd64fe3 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -50,11 +50,11 @@ class Snippet < ActiveRecord::Base validates :visibility_level, inclusion: { in: Gitlab::VisibilityLevel.values } # Scopes - scope :are_internal, -> { where(visibility_level: Snippet::INTERNAL) } + scope :are_internal, -> { where(visibility_level: Snippet::INTERNAL) } scope :are_private, -> { where(visibility_level: Snippet::PRIVATE) } scope :are_public, -> { where(visibility_level: Snippet::PUBLIC) } scope :public_and_internal, -> { where(visibility_level: [Snippet::PUBLIC, Snippet::INTERNAL]) } - scope :fresh, -> { order("created_at DESC") } + scope :fresh, -> { order("created_at DESC") } scope :inc_relations_for_view, -> { includes(author: :status) } participant :author diff --git a/app/models/user.rb b/app/models/user.rb index 26fd2d903a1..4ef5bdc2d12 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -145,7 +145,7 @@ class User < ActiveRecord::Base has_many :issue_assignees has_many :assigned_issues, class_name: "Issue", through: :issue_assignees, source: :issue - has_many :assigned_merge_requests, dependent: :nullify, foreign_key: :assignee_id, class_name: "MergeRequest" # rubocop:disable Cop/ActiveRecordDependent + has_many :assigned_merge_requests, dependent: :nullify, foreign_key: :assignee_id, class_name: "MergeRequest" # rubocop:disable Cop/ActiveRecordDependent has_many :custom_attributes, class_name: 'UserCustomAttribute' has_many :callouts, class_name: 'UserCallout' diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb index c9669e59199..29b1a6c244b 100644 --- a/app/serializers/pipeline_entity.rb +++ b/app/serializers/pipeline_entity.rb @@ -59,7 +59,7 @@ class PipelineEntity < Grape::Entity pipeline.present.failure_reason end - expose :retry_path, if: -> (*) { can_retry? } do |pipeline| + expose :retry_path, if: -> (*) { can_retry? } do |pipeline| retry_project_pipeline_path(pipeline.project, pipeline) end diff --git a/app/services/boards/issues/move_service.rb b/app/services/boards/issues/move_service.rb index 43a26f4264e..834baeb9643 100644 --- a/app/services/boards/issues/move_service.rb +++ b/app/services/boards/issues/move_service.rb @@ -50,7 +50,7 @@ module Boards if move_between_ids attrs[:move_between_ids] = move_between_ids - attrs[:board_group_id] = board.group&.id + attrs[:board_group_id] = board.group&.id end attrs diff --git a/app/services/boards/lists/destroy_service.rb b/app/services/boards/lists/destroy_service.rb index 609c430caed..e20805d0405 100644 --- a/app/services/boards/lists/destroy_service.rb +++ b/app/services/boards/lists/destroy_service.rb @@ -20,7 +20,7 @@ module Boards # rubocop: disable CodeReuse/ActiveRecord def decrement_higher_lists(list) - board.lists.movable.where('position > ?', list.position) + board.lists.movable.where('position > ?', list.position) .update_all('position = position - 1') end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/services/labels/promote_service.rb b/app/services/labels/promote_service.rb index 3c0e6196d4f..e73e6476c12 100644 --- a/app/services/labels/promote_service.rb +++ b/app/services/labels/promote_service.rb @@ -49,7 +49,7 @@ module Labels .new(current_user, title: new_label.title, group_id: project.group.id) .execute(skip_authorization: true) .where.not(id: new_label) - .select(:id) # Can't use pluck() to avoid object-creation because of the batching + .select(:id) # Can't use pluck() to avoid object-creation because of the batching end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index da2ebb08405..93da87538bc 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -104,7 +104,7 @@ - link_to_help = link_to(_("here"), help_page_path("user/permissions")) = _('Read more about project permissions %{link_to_help}').html_safe % { link_to_help: link_to_help } - = form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put do + = form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put do %div = users_select_tag(:user_ids, multiple: true, email_user: true, skip_ldap: @group.ldap_synced?, scope: :all) .prepend-top-10 diff --git a/app/views/ci/status/_dropdown_graph_badge.html.haml b/app/views/ci/status/_dropdown_graph_badge.html.haml index 9de9143e8b1..c787d7420b7 100644 --- a/app/views/ci/status/_dropdown_graph_badge.html.haml +++ b/app/views/ci/status/_dropdown_graph_badge.html.haml @@ -6,7 +6,7 @@ - tooltip = "#{subject.name} - #{status.status_tooltip}" - if status.has_details? - = link_to status.details_path, class: 'mini-pipeline-graph-dropdown-item', data: { toggle: 'tooltip', title: tooltip, container: 'body' } do + = link_to status.details_path, class: 'mini-pipeline-graph-dropdown-item', data: { toggle: 'tooltip', title: tooltip, container: 'body' } do %span{ class: klass }= sprite_icon(status.icon) %span.ci-build-text= subject.name @@ -16,5 +16,5 @@ %span.ci-build-text= subject.name - if status.has_action? - = link_to status.action_path, class: "ci-action-icon-container ci-action-icon-wrapper js-ci-action-icon", method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do + = link_to status.action_path, class: "ci-action-icon-container ci-action-icon-wrapper js-ci-action-icon", method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do = sprite_icon(status.action_icon, css_class: "icon-action-#{status.action_icon}") diff --git a/app/views/dashboard/groups/index.html.haml b/app/views/dashboard/groups/index.html.haml index 2f7add600e4..19b06ba5cdd 100644 --- a/app/views/dashboard/groups/index.html.haml +++ b/app/views/dashboard/groups/index.html.haml @@ -1,6 +1,6 @@ - @hide_top_links = true - page_title "Groups" -- header_title "Groups", dashboard_groups_path +- header_title "Groups", dashboard_groups_path = render_if_exists "shared/gold_trial_callout" = render 'dashboard/groups_head' diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index 4b8ad5acd5b..dd1edb5fdc9 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -7,7 +7,7 @@ = f.hidden_field :reset_password_token .form-group = f.label 'New password', for: "user_password" - = f.password_field :password, class: "form-control top qa-password-field", required: true, title: 'This field is required' + = f.password_field :password, class: "form-control top qa-password-field", required: true, title: 'This field is required' .form-group = f.label 'Confirm new password', for: "user_password_confirmation" = f.password_field :password_confirmation, class: "form-control bottom qa-password-confirmation", title: 'This field is required', required: true diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml index fefdf5f9531..f49cdfbf8da 100644 --- a/app/views/devise/sessions/two_factor.html.haml +++ b/app/views/devise/sessions/two_factor.html.haml @@ -7,7 +7,7 @@ - resource_params = params[resource_name].presence || params = f.hidden_field :remember_me, value: resource_params.fetch(:remember_me, 0) %div - = f.label 'Two-Factor Authentication code', name: :otp_attempt + = f.label 'Two-Factor Authentication code', name: :otp_attempt = f.text_field :otp_attempt, class: 'form-control', required: true, autofocus: true, autocomplete: 'off', title: 'This field is required.' %p.form-text.text-muted.hint Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes. .prepend-top-20 diff --git a/app/views/doorkeeper/authorizations/new.html.haml b/app/views/doorkeeper/authorizations/new.html.haml index 74791b81ccd..dae9a7acf6b 100644 --- a/app/views/doorkeeper/authorizations/new.html.haml +++ b/app/views/doorkeeper/authorizations/new.html.haml @@ -31,7 +31,7 @@ %strong= t scope, scope: [:doorkeeper, :scopes] .text-secondary= t scope, scope: [:doorkeeper, :scope_desc] .form-actions.text-right - = form_tag oauth_authorization_path, method: :delete, class: 'inline' do + = form_tag oauth_authorization_path, method: :delete, class: 'inline' do = hidden_field_tag :client_id, @pre_auth.client.uid = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri = hidden_field_tag :state, @pre_auth.state diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index fb0d2c3b8b0..90ed8e41d32 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -21,6 +21,6 @@ = link_to note.attachment.url, target: '_blank' do = image_tag note.attachment.url, class: 'note-image-attach' - else - = link_to note.attachment.url, target: '_blank', class: 'note-file-attach' do + = link_to note.attachment.url, target: '_blank', class: 'note-file-attach' do %i.fa.fa-paperclip = note.attachment_identifier diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 13d584f5f1d..2af3e861587 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -23,7 +23,7 @@ Members with access to %strong= @group.name %span.badge= @members.total_count - = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form flex-project-members-form' do + = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form flex-project-members-form' do .form-group .position-relative.append-right-8 = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml index a9ce2fe5ab0..808bb1309b1 100644 --- a/app/views/groups/merge_requests.html.haml +++ b/app/views/groups/merge_requests.html.haml @@ -7,7 +7,7 @@ = render 'shared/issuable/nav', type: :merge_requests - if current_user .nav-controls - = render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New merge request", type: :merge_requests, with_feature_enabled: 'merge_requests', with_shared: false, include_projects_in_subgroups: true + = render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New merge request", type: :merge_requests, with_feature_enabled: 'merge_requests', with_shared: false, include_projects_in_subgroups: true = render 'shared/issuable/search_bar', type: :merge_requests diff --git a/app/views/groups/milestones/_form.html.haml b/app/views/groups/milestones/_form.html.haml index 39e3af5f6d2..b3d13a2dc43 100644 --- a/app/views/groups/milestones/_form.html.haml +++ b/app/views/groups/milestones/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@group, @milestone], html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f| += form_for [@group, @milestone], html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f| .row = form_errors(@milestone) @@ -24,4 +24,3 @@ - else = f.submit 'Update milestone', class: "btn-success btn" = link_to "Cancel", group_milestone_path(@group, @milestone), class: "btn btn-cancel" - diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 08a6359f777..0bb2363f65a 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -11,20 +11,20 @@ %meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge' } -# Open Graph - http://ogp.me/ - %meta{ property: 'og:type', content: "object" } - %meta{ property: 'og:site_name', content: site_name } - %meta{ property: 'og:title', content: page_title } + %meta{ property: 'og:type', content: "object" } + %meta{ property: 'og:site_name', content: site_name } + %meta{ property: 'og:title', content: page_title } %meta{ property: 'og:description', content: page_description } - %meta{ property: 'og:image', content: page_image } + %meta{ property: 'og:image', content: page_image } %meta{ property: 'og:image:width', content: '64' } %meta{ property: 'og:image:height', content: '64' } - %meta{ property: 'og:url', content: request.base_url + request.fullpath } + %meta{ property: 'og:url', content: request.base_url + request.fullpath } -# Twitter Card - https://dev.twitter.com/cards/types/summary - %meta{ property: 'twitter:card', content: "summary" } - %meta{ property: 'twitter:title', content: page_title } - %meta{ property: 'twitter:description', content: page_description } - %meta{ property: 'twitter:image', content: page_image } + %meta{ property: 'twitter:card', content: "summary" } + %meta{ property: 'twitter:title', content: page_title } + %meta{ property: 'twitter:description', content: page_description } + %meta{ property: 'twitter:image', content: page_image } = page_card_meta_tags %title= page_title(site_name) @@ -33,8 +33,8 @@ = favicon_link_tag favicon, id: 'favicon', data: { original_href: favicon }, type: 'image/png' = stylesheet_link_tag "application", media: "all" - = stylesheet_link_tag "print", media: "print" - = stylesheet_link_tag "test", media: "all" if Rails.env.test? + = stylesheet_link_tag "print", media: "print" + = stylesheet_link_tag "test", media: "all" if Rails.env.test? = stylesheet_link_tag 'performance_bar' if performance_bar_enabled? = stylesheet_link_tag 'csslab' if Feature.enabled?(:csslab) @@ -61,10 +61,10 @@ %meta{ name: 'theme-color', content: '#474D57' } -# Apple Safari/iOS home screen icons - = favicon_link_tag 'touch-icon-iphone.png', rel: 'apple-touch-icon' - = favicon_link_tag 'touch-icon-ipad.png', rel: 'apple-touch-icon', sizes: '76x76' + = favicon_link_tag 'touch-icon-iphone.png', rel: 'apple-touch-icon' + = favicon_link_tag 'touch-icon-ipad.png', rel: 'apple-touch-icon', sizes: '76x76' = favicon_link_tag 'touch-icon-iphone-retina.png', rel: 'apple-touch-icon', sizes: '120x120' - = favicon_link_tag 'touch-icon-ipad-retina.png', rel: 'apple-touch-icon', sizes: '152x152' + = favicon_link_tag 'touch-icon-ipad-retina.png', rel: 'apple-touch-icon', sizes: '152x152' %link{ rel: 'mask-icon', href: image_path('logo.svg'), color: 'rgb(226, 67, 41)' } -# Windows 8 pinned site tile diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml index bfbfeee7c4b..1d40b78fa83 100644 --- a/app/views/layouts/group.html.haml +++ b/app/views/layouts/group.html.haml @@ -1,7 +1,7 @@ - page_title @group.name - page_description @group.description unless page_description - header_title group_title(@group) unless header_title -- nav "group" +- nav "group" - @left_sidebar = true - content_for :page_specific_javascripts do diff --git a/app/views/layouts/header/_new_dropdown.haml b/app/views/layouts/header/_new_dropdown.haml index e42251f9ec8..5a66b02c048 100644 --- a/app/views/layouts/header/_new_dropdown.haml +++ b/app/views/layouts/header/_new_dropdown.haml @@ -1,4 +1,4 @@ -%li.header-new.dropdown{ data: { track_label: "new_dropdown", track_event: "click_dropdown" } } +%li.header-new.dropdown{ data: { track_label: "new_dropdown", track_event: "click_dropdown" } } = link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", title: _("New..."), ref: 'tooltip', aria: { label: _("New...") }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body', display: 'static' } do = sprite_icon('plus-square', size: 16) = sprite_icon('angle-down', css_class: 'caret-down') diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index ddd30efe062..f659c89dd30 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -10,7 +10,7 @@ = render "layouts/nav/projects_dropdown/show" - if dashboard_nav_link?(:groups) - = nav_link(controller: ['dashboard/groups', 'explore/groups'], html_options: { id: 'nav-groups-dropdown', class: "home dropdown header-groups qa-groups-dropdown", data: { track_label: "groups_dropdown", track_event: "click_dropdown" } }) do + = nav_link(controller: ['dashboard/groups', 'explore/groups'], html_options: { id: 'nav-groups-dropdown', class: "home dropdown header-groups qa-groups-dropdown", data: { track_label: "groups_dropdown", track_event: "click_dropdown" } }) do %button{ type: 'button', data: { toggle: "dropdown" } } = _('Groups') = sprite_icon('angle-down', css_class: 'caret-down') diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 1eab7813865..6442e61da0d 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -170,7 +170,7 @@ = _('CI / CD') %ul.sidebar-sub-level-items - = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], html_options: { class: "fly-out-top-item" }) do = link_to project_pipelines_path(@project) do %strong.fly-out-top-item-name = _('CI / CD') diff --git a/app/views/layouts/snippets.html.haml b/app/views/layouts/snippets.html.haml index 6418500d5d1..5f986c81ff4 100644 --- a/app/views/layouts/snippets.html.haml +++ b/app/views/layouts/snippets.html.haml @@ -1,4 +1,4 @@ -- header_title _("Snippets"), snippets_path +- header_title _("Snippets"), snippets_path - content_for :page_specific_javascripts do - if @snippet && current_user diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index 91deffe07c1..409b6dba9ca 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -33,9 +33,9 @@ %p Once the exported file is ready, you will receive a notification email with a download link, or you can download it from this page. - if project.export_status == :finished - = link_to 'Download export', download_export_project_path(project), + = link_to 'Download export', download_export_project_path(project), rel: 'nofollow', download: '', method: :get, class: "btn btn-default" - = link_to 'Generate new export', generate_new_export_project_path(project), + = link_to 'Generate new export', generate_new_export_project_path(project), method: :post, class: "btn btn-default" - else = link_to 'Export project', export_project_path(project), diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index e8cc3d6bcf0..65537cf56de 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -23,7 +23,7 @@ = sprite_icon('tag', size: 16, css_class: 'icon append-right-4') = @project.topics_to_show - if @project.has_extra_topics? - = _("+ %{count} more") % { count: @project.count_of_extra_topics_not_shown } + = _("+ %{count} more") % { count: @project.count_of_extra_topics_not_shown } .project-repo-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end diff --git a/app/views/projects/_issuable_by_email.html.haml b/app/views/projects/_issuable_by_email.html.haml index 147e73f047f..0b2d179456d 100644 --- a/app/views/projects/_issuable_by_email.html.haml +++ b/app/views/projects/_issuable_by_email.html.haml @@ -21,7 +21,7 @@ = clipboard_button(target: '#issuable_email', class: 'btn btn-clipboard input-group-text btn-transparent d-none d-sm-block') - if issuable_type == 'issue' - - enter_title_text = _('Enter the issue title') + - enter_title_text = _('Enter the issue title') - enter_description_text = _('Enter the issue description') - else - enter_title_text = _('Enter the merge request title') diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index ba7d3154326..276363df7da 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -43,7 +43,7 @@ = f.label :description, class: 'label-bold' do Project description %span (optional) - = f.text_area :description, placeholder: 'Description format', class: "form-control", rows: 3, maxlength: 250, data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "project_description", track_value: "" } + = f.text_area :description, placeholder: 'Description format', class: "form-control", rows: 3, maxlength: 250, data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "project_description", track_value: "" } = f.label :visibility_level, class: 'label-bold' do Visibility Level diff --git a/app/views/projects/buttons/_dropdown.html.haml b/app/views/projects/buttons/_dropdown.html.haml index 45515fb492f..bbe0a2c97fd 100644 --- a/app/views/projects/buttons/_dropdown.html.haml +++ b/app/views/projects/buttons/_dropdown.html.haml @@ -35,8 +35,8 @@ - elsif can_collaborate_with_project?(@project) %li= link_to _('New file'), project_new_blob_path(@project, @project.default_branch || 'master') - elsif create_mr_from_new_fork - - continue_params = { to: project_new_blob_path(@project, @project.default_branch || 'master'), - notice: edit_in_new_fork_notice, + - continue_params = { to: project_new_blob_path(@project, @project.default_branch || 'master'), + notice: edit_in_new_fork_notice, notice_now: edit_in_new_fork_notice_now } - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params) %li= link_to _('New file'), fork_path, method: :post diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 2a919a767c0..a389261136a 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -49,7 +49,7 @@ #{ _('Download') } - unless @commit.parents.length > 1 %li= link_to s_("DownloadCommit|Email Patches"), project_commit_path(@project, @commit, format: :patch), class: "qa-email-patches" - %li= link_to s_("DownloadCommit|Plain Diff"), project_commit_path(@project, @commit, format: :diff), class: "qa-plain-diff" + %li= link_to s_("DownloadCommit|Plain Diff"), project_commit_path(@project, @commit, format: :diff), class: "qa-plain-diff" .commit-box{ data: { project_path: project_path(@project) } } %h3.commit-title diff --git a/app/views/projects/issues/_merge_requests.html.haml b/app/views/projects/issues/_merge_requests.html.haml index eb46bf5c6a3..c73d167303f 100644 --- a/app/views/projects/issues/_merge_requests.html.haml +++ b/app/views/projects/issues/_merge_requests.html.haml @@ -19,7 +19,7 @@ = render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-none d-xl-block append-right-8' } = link_to merge_request.title, merge_request_path(merge_request), { class: 'mr-title-link'} .item-meta - = render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-xl-none d-lg-block append-right-5' } + = render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-xl-none d-lg-block append-right-5' } %span.d-flex.align-items-center.append-right-8.mr-item-path.item-path-id.mt-0 %span.path-id-text.bold.text-truncate{ data: { toggle: 'tooltip'}, title: merge_request.target_project.full_path } = merge_request.target_project.full_path diff --git a/app/views/projects/issues/_merge_requests_status.html.haml b/app/views/projects/issues/_merge_requests_status.html.haml index 38126d6f0c6..43e4c8db93f 100644 --- a/app/views/projects/issues/_merge_requests_status.html.haml +++ b/app/views/projects/issues/_merge_requests_status.html.haml @@ -18,5 +18,5 @@ - mr_status_tooltip = "
#{mr_status_title} #{time_ago_in_words(mr_status_date)} ago
#{l(mr_status_date.to_time, format: time_format)}" -%span.mr-status-wrapper.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } } +%span.mr-status-wrapper.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } } = sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}") diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml index 5374f4a1de0..fbd70cd1906 100644 --- a/app/views/projects/issues/_new_branch.html.haml +++ b/app/views/projects/issues/_new_branch.html.haml @@ -30,7 +30,7 @@ = icon('check', class: 'icon') = _('Create merge request and branch') - %li{ class: [!can_create_merge_request && 'droplab-item-selected'], role: 'button', data: { value: 'create-branch', text: _('Create branch') } } + %li{ class: [!can_create_merge_request && 'droplab-item-selected'], role: 'button', data: { value: 'create-branch', text: _('Create branch') } } .menu-item = icon('check', class: 'icon') = _('Create branch') diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index ebd3229e42b..56c043b2b3d 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -1,6 +1,6 @@ = form_for [@project.namespace.becomes(Namespace), @project, @milestone], - html: {class: 'milestone-form common-note-form js-quick-submit js-requires-input'}, - data: { markdown_version: @milestone.cached_markdown_version } do |f| + html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' }, + data: { markdown_version: @milestone.cached_markdown_version } do |f| = form_errors(@milestone) .row .col-md-6 diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml index 259979417e0..1121cf06b5c 100644 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ b/app/views/projects/pipeline_schedules/_form.html.haml @@ -34,7 +34,7 @@ = n_('Reveal value', 'Reveal values', @schedule.variables.size) .form-group.row .col-md-9 - = f.label :active, s_('PipelineSchedules|Activated'), class: 'label-bold' + = f.label :active, s_('PipelineSchedules|Activated'), class: 'label-bold' %div = f.check_box :active, required: false, value: @schedule.active? = _('Active') diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml index b92ecf4412f..e0dd386fc5d 100644 --- a/app/views/projects/project_members/_team.html.haml +++ b/app/views/projects/project_members/_team.html.haml @@ -6,7 +6,7 @@ %span.flex-project-title = _("Members of %{project_name}").html_safe % { project_name: sanitize_project_name(project.name) } %span.badge.badge-pill= members.total_count - = form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do + = form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do .form-group .position-relative = search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false } diff --git a/app/views/projects/project_templates/_built_in_templates.html.haml b/app/views/projects/project_templates/_built_in_templates.html.haml index 5b4d8927045..2a0ce4bd16b 100644 --- a/app/views/projects/project_templates/_built_in_templates.html.haml +++ b/app/views/projects/project_templates/_built_in_templates.html.haml @@ -12,6 +12,6 @@ %a.btn.btn-default.append-right-10{ href: template.preview, rel: 'noopener noreferrer', target: '_blank', data: { track_label: "create_from_template", track_property: "template_preview", track_event: "click_button", track_value: template.name } } = _("Preview") %label.btn.btn-success.template-button.choose-template.append-bottom-0{ for: template.name } - %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name, data: { track_label: "create_from_template", track_property: "template_use", track_event: "click_button" } } + %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name, data: { track_label: "create_from_template", track_property: "template_use", track_event: "click_button" } } %span = _("Use template") diff --git a/app/views/projects/serverless/functions/index.html.haml b/app/views/projects/serverless/functions/index.html.haml index f650fa0f38f..635580eac5c 100644 --- a/app/views/projects/serverless/functions/index.html.haml +++ b/app/views/projects/serverless/functions/index.html.haml @@ -5,7 +5,7 @@ - status_path = project_serverless_functions_path(@project, format: :json) - clusters_path = project_clusters_path(@project) -.serverless-functions-page.js-serverless-functions-page{ data: { status_path: status_path, installed: @installed, clusters_path: clusters_path, help_path: help_page_path('user/project/clusters/serverless/index') } } +.serverless-functions-page.js-serverless-functions-page{ data: { status_path: status_path, installed: @installed, clusters_path: clusters_path, help_path: help_page_path('user/project/clusters/serverless/index') } } %div{ class: [container_class, ('limit-container-width' unless fluid_layout)] } .js-serverless-functions-notice diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index 4e9a119ac66..ec8e5234bd4 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -40,27 +40,24 @@ #{ _('New directory') } - elsif can?(current_user, :fork_project, @project) && can?(current_user, :create_merge_request_in, @project) %li - - continue_params = { to: project_new_blob_path(@project, @id), - notice: edit_in_new_fork_notice, + - continue_params = { to: project_new_blob_path(@project, @id), + notice: edit_in_new_fork_notice, notice_now: edit_in_new_fork_notice_now } - - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, - continue: continue_params) + - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params) = link_to fork_path, method: :post do #{ _('New file') } %li - - continue_params = { to: request.fullpath, - notice: edit_in_new_fork_notice + " Try to upload a file again.", + - continue_params = { to: request.fullpath, + notice: edit_in_new_fork_notice + " Try to upload a file again.", notice_now: edit_in_new_fork_notice_now } - - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, - continue: continue_params) + - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params) = link_to fork_path, method: :post do #{ _('Upload file') } %li - - continue_params = { to: request.fullpath, - notice: edit_in_new_fork_notice + " Try to create a new directory again.", + - continue_params = { to: request.fullpath, + notice: edit_in_new_fork_notice + " Try to create a new directory again.", notice_now: edit_in_new_fork_notice_now } - - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, - continue: continue_params) + - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params) = link_to fork_path, method: :post do #{ _('New directory') } diff --git a/app/views/shared/boards/components/_sidebar.html.haml b/app/views/shared/boards/components/_sidebar.html.haml index 1ff956649ed..c9ff63f8c45 100644 --- a/app/views/shared/boards/components/_sidebar.html.haml +++ b/app/views/shared/boards/components/_sidebar.html.haml @@ -1,4 +1,4 @@ -%board-sidebar{ "inline-template" => true, ":current-user" => (UserSerializer.new.represent(current_user) || {}).to_json } +%board-sidebar{ "inline-template" => true, ":current-user" => (UserSerializer.new.represent(current_user) || {}).to_json } %transition{ name: "boards-sidebar-slide" } %aside.right-sidebar.right-sidebar-expanded.issue-boards-sidebar{ "v-show" => "showSidebar" } .issuable-sidebar diff --git a/app/views/shared/issuable/_bulk_update_sidebar.html.haml b/app/views/shared/issuable/_bulk_update_sidebar.html.haml index ca02424215c..909eb738f95 100644 --- a/app/views/shared/issuable/_bulk_update_sidebar.html.haml +++ b/app/views/shared/issuable/_bulk_update_sidebar.html.haml @@ -2,7 +2,7 @@ %aside.issues-bulk-update.js-right-sidebar.right-sidebar{ "aria-live" => "polite", data: { 'signed-in': current_user.present? } } .issuable-sidebar.hidden - = form_tag [:bulk_update, @project.namespace.becomes(Namespace), @project, type], method: :post, class: "bulk-update" do + = form_tag [:bulk_update, @project.namespace.becomes(Namespace), @project, type], method: :post, class: "bulk-update" do .block.issuable-sidebar-header .filter-item.inline.update-issues-btn.float-left = button_tag "Update all", class: "btn update-selected-issues btn-info", disabled: true @@ -50,4 +50,3 @@ = hidden_field_tag "update[issuable_ids]", [] = hidden_field_tag :state_event, params[:state_event] - diff --git a/app/workers/namespaceless_project_destroy_worker.rb b/app/workers/namespaceless_project_destroy_worker.rb index 2965f3b1150..f6e98746055 100644 --- a/app/workers/namespaceless_project_destroy_worker.rb +++ b/app/workers/namespaceless_project_destroy_worker.rb @@ -17,7 +17,7 @@ class NamespacelessProjectDestroyWorker return end - return if project.namespace # Reject doing anything for projects that *do* have a namespace + return if project.namespace # Reject doing anything for projects that *do* have a namespace project.team.truncate diff --git a/config.ru b/config.ru index a5d055334dd..5cd79870d54 100644 --- a/config.ru +++ b/config.ru @@ -19,7 +19,7 @@ if defined?(Unicorn) Unicorn::StreamInput.send(:public, :eof?) # rubocop:disable GitlabSecurity/PublicSend end -require ::File.expand_path('../config/environment', __FILE__) +require ::File.expand_path('../config/environment', __FILE__) warmup do |app| client = Rack::MockRequest.new(app) diff --git a/config/initializers/8_devise.rb b/config/initializers/8_devise.rb index 67eabb0b4fc..4683b02f300 100644 --- a/config/initializers/8_devise.rb +++ b/config/initializers/8_devise.rb @@ -178,7 +178,7 @@ Devise.setup do |config| # Configure the default scope given to Warden. By default it's the first # devise role declared in your routes (usually :user). - config.default_scope = :user # now have an :email scope as well, so set the default + config.default_scope = :user # now have an :email scope as well, so set the default # Configure sign_out behavior. # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope). diff --git a/config/initializers/doorkeeper_openid_connect.rb b/config/initializers/doorkeeper_openid_connect.rb index ae5d834a02c..e97c0fcbd6b 100644 --- a/config/initializers/doorkeeper_openid_connect.rb +++ b/config/initializers/doorkeeper_openid_connect.rb @@ -31,7 +31,7 @@ Doorkeeper::OpenidConnect.configure do o.claim(:name) { |user| user.name } o.claim(:nickname) { |user| user.username } - o.claim(:email) { |user| user.public_email } + o.claim(:email) { |user| user.public_email } o.claim(:email_verified) { |user| true if user.public_email? } o.claim(:website) { |user| user.full_website_url if user.website_url? } o.claim(:profile) { |user| Gitlab::Routing.url_helpers.user_url user } diff --git a/config/initializers/postgresql_cte.rb b/config/initializers/postgresql_cte.rb index 38a9cd68d57..56689bc8e74 100644 --- a/config/initializers/postgresql_cte.rb +++ b/config/initializers/postgresql_cte.rb @@ -108,7 +108,7 @@ module ActiveRecord when String with_value when Hash - with_value.map do |name, expression| + with_value.map do |name, expression| case expression when String select = Arel::Nodes::SqlLiteral.new "(#{expression})" diff --git a/config/routes/repository.rb b/config/routes/repository.rb index 96975759709..f5201b9ddbb 100644 --- a/config/routes/repository.rb +++ b/config/routes/repository.rb @@ -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 diff --git a/db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb b/db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb index 85aa78006db..3ee9c959fca 100644 --- a/db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb +++ b/db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb @@ -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 diff --git a/db/post_migrate/20170317162059_update_upload_paths_to_system.rb b/db/post_migrate/20170317162059_update_upload_paths_to_system.rb index a5a6f043e10..99cdca465e2 100644 --- a/db/post_migrate/20170317162059_update_upload_paths_to_system.rb +++ b/db/post_migrate/20170317162059_update_upload_paths_to_system.rb @@ -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 diff --git a/lib/api/deployments.rb b/lib/api/deployments.rb index 8706a971a1a..eb45df31ff9 100644 --- a/lib/api/deployments.rb +++ b/lib/api/deployments.rb @@ -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 diff --git a/lib/api/entities.rb b/lib/api/entities.rb index e0a48908122..4edec631e8d 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -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)` @@ -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)` diff --git a/lib/api/environments.rb b/lib/api/environments.rb index 633f24d3c9a..0278c6c54a5 100644 --- a/lib/api/environments.rb +++ b/lib/api/environments.rb @@ -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 @@ -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 diff --git a/lib/api/helpers/pagination.rb b/lib/api/helpers/pagination.rb index cfcce6b66ad..de59c915d66 100644 --- a/lib/api/helpers/pagination.rb +++ b/lib/api/helpers/pagination.rb @@ -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) diff --git a/lib/api/issues.rb b/lib/api/issues.rb index dac700482b4..afa3ac80121 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -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 @@ -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 @@ -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 diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb index 45c694b6448..59f0dbe8a9b 100644 --- a/lib/api/jobs.rb +++ b/lib/api/jobs.rb @@ -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 diff --git a/lib/api/labels.rb b/lib/api/labels.rb index 2e676b0aa6b..d5eb2b94669 100644 --- a/lib/api/labels.rb +++ b/lib/api/labels.rb @@ -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' diff --git a/lib/api/pipeline_schedules.rb b/lib/api/pipeline_schedules.rb index 47b711917e2..c86b50d3736 100644 --- a/lib/api/pipeline_schedules.rb +++ b/lib/api/pipeline_schedules.rb @@ -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 @@ -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 @@ -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 diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb index 7a7b23d2bbb..1f59b27f685 100644 --- a/lib/api/pipelines.rb +++ b/lib/api/pipelines.rb @@ -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 @@ -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 @@ -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 diff --git a/lib/api/projects_relation_builder.rb b/lib/api/projects_relation_builder.rb index 8edcfea7c93..263468c9aa6 100644 --- a/lib/api/projects_relation_builder.rb +++ b/lib/api/projects_relation_builder.rb @@ -11,7 +11,7 @@ module API projects_relation end - def preload_relation(projects_relation, options = {}) + def preload_relation(projects_relation, options = {}) projects_relation end diff --git a/lib/api/releases.rb b/lib/api/releases.rb index 576fee51db0..cb85028f22c 100644 --- a/lib/api/releases.rb +++ b/lib/api/releases.rb @@ -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! diff --git a/lib/api/services.rb b/lib/api/services.rb index d60f0f5f08d..637b5a8a89a 100644 --- a/lib/api/services.rb +++ b/lib/api/services.rb @@ -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 } @@ -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 diff --git a/lib/api/todos.rb b/lib/api/todos.rb index d2c8cf7c1aa..64ac8ece56c 100644 --- a/lib/api/todos.rb +++ b/lib/api/todos.rb @@ -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 diff --git a/lib/api/triggers.rb b/lib/api/triggers.rb index 3ce1529f259..604f989d8b3 100644 --- a/lib/api/triggers.rb +++ b/lib/api/triggers.rb @@ -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 @@ -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! @@ -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! @@ -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! @@ -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! diff --git a/lib/api/variables.rb b/lib/api/variables.rb index f7cae2251c2..148deb86c4c 100644 --- a/lib/api/variables.rb +++ b/lib/api/variables.rb @@ -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 diff --git a/lib/gitlab/background_migration/migrate_stage_status.rb b/lib/gitlab/background_migration/migrate_stage_status.rb index 0e5c7f092f2..6a29a632577 100644 --- a/lib/gitlab/background_migration/migrate_stage_status.rb +++ b/lib/gitlab/background_migration/migrate_stage_status.rb @@ -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]) diff --git a/lib/gitlab/lfs_token.rb b/lib/gitlab/lfs_token.rb index c09d3ebc7be..26b81847d37 100644 --- a/lib/gitlab/lfs_token.rb +++ b/lib/gitlab/lfs_token.rb @@ -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 @@ -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 diff --git a/lib/gitlab/middleware/go.rb b/lib/gitlab/middleware/go.rb index 72a788022ef..f9efef38825 100644 --- a/lib/gitlab/middleware/go.rb +++ b/lib/gitlab/middleware/go.rb @@ -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 diff --git a/lib/gitlab/pages_client.rb b/lib/gitlab/pages_client.rb index 3626e53f84c..d74fdba2241 100644 --- a/lib/gitlab/pages_client.rb +++ b/lib/gitlab/pages_client.rb @@ -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) diff --git a/lib/tasks/gitlab/bulk_add_permission.rake b/lib/tasks/gitlab/bulk_add_permission.rake index 26cbf0740b6..c0d6cc8ca8e 100644 --- a/lib/tasks/gitlab/bulk_add_permission.rake +++ b/lib/tasks/gitlab/bulk_add_permission.rake @@ -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" @@ -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 @@ -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" diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb index 6ddd7dde2cf..c06f13ee204 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb @@ -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) @@ -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 } diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb index e2d639fd150..43cc737bfb1 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb @@ -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 } diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb index 4126f967ee2..10cc0480794 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb @@ -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) diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb index a63b7dce8d6..3310a873a60 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb @@ -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) diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb index 2d0e281ab59..9d31a25ab35 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb @@ -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) diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb index ad6426df420..d10ad896b3b 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb @@ -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 } diff --git a/spec/bin/changelog_spec.rb b/spec/bin/changelog_spec.rb index c59add88a82..b2c2fb810e8 100644 --- a/spec/bin/changelog_spec.rb +++ b/spec/bin/changelog_spec.rb @@ -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 diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index c290acb72aa..c9e520317e8 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -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) diff --git a/spec/controllers/boards/issues_controller_spec.rb b/spec/controllers/boards/issues_controller_spec.rb index 725ea2bf1ab..5eb05f01b8d 100644 --- a/spec/controllers/boards/issues_controller_spec.rb +++ b/spec/controllers/boards/issues_controller_spec.rb @@ -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 diff --git a/spec/controllers/concerns/checks_collaboration_spec.rb b/spec/controllers/concerns/checks_collaboration_spec.rb index 1bd764290ae..d7f110e11f3 100644 --- a/spec/controllers/concerns/checks_collaboration_spec.rb +++ b/spec/controllers/concerns/checks_collaboration_spec.rb @@ -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 diff --git a/spec/controllers/groups/children_controller_spec.rb b/spec/controllers/groups/children_controller_spec.rb index 4d5bb1488ab..e1b97013408 100644 --- a/spec/controllers/groups/children_controller_spec.rb +++ b/spec/controllers/groups/children_controller_spec.rb @@ -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 @@ -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) } @@ -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 diff --git a/spec/controllers/profiles/avatars_controller_spec.rb b/spec/controllers/profiles/avatars_controller_spec.rb index 909709e1103..1ee0bf44e92 100644 --- a/spec/controllers/profiles/avatars_controller_spec.rb +++ b/spec/controllers/profiles/avatars_controller_spec.rb @@ -1,7 +1,7 @@ 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) diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb index 26eec90da06..19cac47325c 100644 --- a/spec/controllers/projects/commit_controller_spec.rb +++ b/spec/controllers/projects/commit_controller_spec.rb @@ -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) diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 4451fd227e8..53d5bf752ef 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -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 @@ -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 } diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb index 0bb3ef76a3b..97e04a63d4a 100644 --- a/spec/controllers/projects/pipelines_controller_spec.rb +++ b/spec/controllers/projects/pipelines_controller_spec.rb @@ -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 diff --git a/spec/controllers/projects/serverless/functions_controller_spec.rb b/spec/controllers/projects/serverless/functions_controller_spec.rb index 87114d44bce..276cf340962 100644 --- a/spec/controllers/projects/serverless/functions_controller_spec.rb +++ b/spec/controllers/projects/serverless/functions_controller_spec.rb @@ -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) diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 9801ed19957..a1662658ade 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -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, diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb index c9b53336fd1..02a0cfe0272 100644 --- a/spec/controllers/search_controller_spec.rb +++ b/spec/controllers/search_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe SearchController do - let(:user) { create(:user) } + let(:user) { create(:user) } before do sign_in(user) diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb index 5fbb71eca96..e52a5fe42f2 100644 --- a/spec/controllers/uploads_controller_spec.rb +++ b/spec/controllers/uploads_controller_spec.rb @@ -327,7 +327,7 @@ describe UploadsController do end context "when viewing a group avatar" do - let!(:group) { create(:group, avatar: fixture_file_upload("spec/fixtures/dk.png", "image/png")) } + let!(:group) { create(:group, avatar: fixture_file_upload("spec/fixtures/dk.png", "image/png")) } context "when the group is public" do context "when not signed in" do diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index bb3c0d6537d..0b3e67b4987 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -78,7 +78,7 @@ FactoryBot.define do trait :scheduled do schedulable status 'scheduled' - scheduled_at { 1.minute.since } + scheduled_at { 1.minute.since } end trait :expired_scheduled do diff --git a/spec/factories/group_members.rb b/spec/factories/group_members.rb index 12be63e5d92..077c6ddc5ae 100644 --- a/spec/factories/group_members.rb +++ b/spec/factories/group_members.rb @@ -8,7 +8,7 @@ FactoryBot.define do trait(:reporter) { access_level GroupMember::REPORTER } trait(:developer) { access_level GroupMember::DEVELOPER } trait(:maintainer) { access_level GroupMember::MAINTAINER } - trait(:owner) { access_level GroupMember::OWNER } + trait(:owner) { access_level GroupMember::OWNER } trait(:access_request) { requested_at { Time.now } } trait(:invited) do diff --git a/spec/features/admin/admin_abuse_reports_spec.rb b/spec/features/admin/admin_abuse_reports_spec.rb index d8fcdebfc6d..3ff1a66b0b2 100644 --- a/spec/features/admin/admin_abuse_reports_spec.rb +++ b/spec/features/admin/admin_abuse_reports_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Admin::AbuseReports", :js do +describe "Admin::AbuseReports", :js do let(:user) { create(:user) } context 'as an admin' do diff --git a/spec/features/admin/admin_projects_spec.rb b/spec/features/admin/admin_projects_spec.rb index d6ee256f5b5..2b6bfa40beb 100644 --- a/spec/features/admin/admin_projects_spec.rb +++ b/spec/features/admin/admin_projects_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Admin::Projects" do +describe "Admin::Projects" do include Select2Helper let(:user) { create :user } diff --git a/spec/features/atom/dashboard_issues_spec.rb b/spec/features/atom/dashboard_issues_spec.rb index 5fa1a26f1a6..dfa1c92ea49 100644 --- a/spec/features/atom/dashboard_issues_spec.rb +++ b/spec/features/atom/dashboard_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Dashboard Issues Feed" do +describe "Dashboard Issues Feed" do describe "GET /issues" do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/atom/dashboard_spec.rb b/spec/features/atom/dashboard_spec.rb index 86b3f88298f..947587220a9 100644 --- a/spec/features/atom/dashboard_spec.rb +++ b/spec/features/atom/dashboard_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Dashboard Feed" do +describe "Dashboard Feed" do describe "GET /" do let!(:user) { create(:user, name: "Jonh") } diff --git a/spec/features/atom/issues_spec.rb b/spec/features/atom/issues_spec.rb index ee3570a5b2b..714a9885caa 100644 --- a/spec/features/atom/issues_spec.rb +++ b/spec/features/atom/issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Issues Feed' do +describe 'Issues Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/atom/users_spec.rb b/spec/features/atom/users_spec.rb index 8d7df346abb..7de8bea5049 100644 --- a/spec/features/atom/users_spec.rb +++ b/spec/features/atom/users_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "User Feed" do +describe "User Feed" do describe "GET /" do let!(:user) { create(:user) } diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index 08c27354bd2..ea69ec0319b 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -68,7 +68,7 @@ describe 'Issue Boards', :js do let(:bug) { create(:label, project: project, name: 'Bug') } let!(:backlog) { create(:label, project: project, name: 'Backlog') } let!(:closed) { create(:label, project: project, name: 'Closed') } - let!(:accepting) { create(:label, project: project, name: 'Accepting Merge Requests') } + let!(:accepting) { create(:label, project: project, name: 'Accepting Merge Requests') } let!(:a_plus) { create(:label, project: project, name: 'A+') } let!(:list1) { create(:list, board: board, label: planning, position: 0) } diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb index 32c75cae0a1..f4b2b9033ab 100644 --- a/spec/features/cycle_analytics_spec.rb +++ b/spec/features/cycle_analytics_spec.rb @@ -11,7 +11,7 @@ describe 'Cycle Analytics', :js do context 'as an allowed user' do context 'when project is new' do - before do + before do project.add_maintainer(user) sign_in(user) diff --git a/spec/features/dashboard/todos/todos_spec.rb b/spec/features/dashboard/todos/todos_spec.rb index 2284ee925a0..51f158d3045 100644 --- a/spec/features/dashboard/todos/todos_spec.rb +++ b/spec/features/dashboard/todos/todos_spec.rb @@ -112,7 +112,7 @@ describe 'Dashboard Todos' do end it 'shows issue assigned to yourself message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You assigned issue #{issue.to_reference(full: true)} to yourself") end end @@ -125,7 +125,7 @@ describe 'Dashboard Todos' do end it 'shows you added a todo message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You added a todo for issue #{issue.to_reference(full: true)}") expect(page).not_to have_content('to yourself') end @@ -139,7 +139,7 @@ describe 'Dashboard Todos' do end it 'shows you mentioned yourself message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You mentioned yourself on issue #{issue.to_reference(full: true)}") expect(page).not_to have_content('to yourself') end @@ -153,7 +153,7 @@ describe 'Dashboard Todos' do end it 'shows you directly addressed yourself message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You directly addressed yourself on issue #{issue.to_reference(full: true)}") expect(page).not_to have_content('to yourself') end @@ -169,7 +169,7 @@ describe 'Dashboard Todos' do end it 'shows you set yourself as an approver message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You set yourself as an approver for merge request #{merge_request.to_reference(full: true)}") expect(page).not_to have_content('to yourself') end diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index 00d81b26ce2..f3e573ccbc4 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -235,7 +235,7 @@ describe 'Group' do let!(:group) { create(:group) } let!(:nested_group) { create(:group, parent: group) } let!(:project) { create(:project, namespace: group) } - let!(:path) { group_path(group) } + let!(:path) { group_path(group) } it 'it renders projects and groups on the page' do visit path diff --git a/spec/features/ics/dashboard_issues_spec.rb b/spec/features/ics/dashboard_issues_spec.rb index ea714934ae7..debae0ea930 100644 --- a/spec/features/ics/dashboard_issues_spec.rb +++ b/spec/features/ics/dashboard_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Dashboard Issues Calendar Feed' do +describe 'Dashboard Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/ics/group_issues_spec.rb b/spec/features/ics/group_issues_spec.rb index 24de5b4b7c6..4177c7f8704 100644 --- a/spec/features/ics/group_issues_spec.rb +++ b/spec/features/ics/group_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Group Issues Calendar Feed' do +describe 'Group Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/ics/project_issues_spec.rb b/spec/features/ics/project_issues_spec.rb index 54143595e6b..0d9844be099 100644 --- a/spec/features/ics/project_issues_spec.rb +++ b/spec/features/ics/project_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Project Issues Calendar Feed' do +describe 'Project Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/issues/resource_label_events_spec.rb b/spec/features/issues/resource_label_events_spec.rb index b0764db7751..3d380c183ec 100644 --- a/spec/features/issues/resource_label_events_spec.rb +++ b/spec/features/issues/resource_label_events_spec.rb @@ -6,7 +6,7 @@ describe 'List issue resource label events', :js do let(:user) { create(:user) } let(:project) { create(:project, :public) } let(:issue) { create(:issue, project: project, author: user) } - let!(:label) { create(:label, project: project, title: 'foo') } + let!(:label) { create(:label, project: project, title: 'foo') } let!(:user_status) { create(:user_status, user: user) } context 'when user displays the issue' do diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb index 09904cb907f..7c31e67a7fa 100644 --- a/spec/features/labels_hierarchy_spec.rb +++ b/spec/features/labels_hierarchy_spec.rb @@ -179,7 +179,7 @@ describe 'Labels Hierarchy', :js, :nested_groups do end context 'on project board issue sidebar' do - let(:board) { create(:board, project: project_1) } + let(:board) { create(:board, project: project_1) } before do project_1.add_developer(user) @@ -195,7 +195,7 @@ describe 'Labels Hierarchy', :js, :nested_groups do end context 'on group board issue sidebar' do - let(:board) { create(:board, group: parent) } + let(:board) { create(:board, group: parent) } before do parent.add_developer(user) diff --git a/spec/features/merge_request/user_creates_mr_spec.rb b/spec/features/merge_request/user_creates_mr_spec.rb index 9d2a94a4a41..c169a68cd1c 100644 --- a/spec/features/merge_request/user_creates_mr_spec.rb +++ b/spec/features/merge_request/user_creates_mr_spec.rb @@ -30,7 +30,7 @@ describe 'Merge request > User creates MR' do end context 'source project', :js do - let(:user) { create(:user) } + let(:user) { create(:user) } let(:target_project) { create(:project, :public, :repository) } let(:source_project) { target_project } diff --git a/spec/features/merge_requests/user_mass_updates_spec.rb b/spec/features/merge_requests/user_mass_updates_spec.rb index cb6603d3f50..e535c7e5811 100644 --- a/spec/features/merge_requests/user_mass_updates_spec.rb +++ b/spec/features/merge_requests/user_mass_updates_spec.rb @@ -68,7 +68,7 @@ describe 'Merge requests > User mass updates', :js do end context 'milestone' do - let(:milestone) { create(:milestone, project: project) } + let(:milestone) { create(:milestone, project: project) } describe 'set milestone' do before do diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb index a0673b12738..6e349395017 100644 --- a/spec/features/milestone_spec.rb +++ b/spec/features/milestone_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' describe 'Milestone' do let(:group) { create(:group, :public) } let(:project) { create(:project, :public, namespace: group) } - let(:user) { create(:user) } + let(:user) { create(:user) } before do create(:group_member, group: group, user: user) diff --git a/spec/features/projects/commit/builds_spec.rb b/spec/features/projects/commit/builds_spec.rb index caf69796d52..d72476f36a9 100644 --- a/spec/features/projects/commit/builds_spec.rb +++ b/spec/features/projects/commit/builds_spec.rb @@ -20,7 +20,7 @@ describe 'project commit pipelines', :js do visit pipelines_project_commit_path(project, project.commit.sha) page.within('.table-holder') do - expect(page).to have_content project.ci_pipelines[0].id # pipeline ids + expect(page).to have_content project.ci_pipelines[0].id # pipeline ids end end end diff --git a/spec/features/projects/commit/cherry_pick_spec.rb b/spec/features/projects/commit/cherry_pick_spec.rb index a61b614dbc8..acfb582dba9 100644 --- a/spec/features/projects/commit/cherry_pick_spec.rb +++ b/spec/features/projects/commit/cherry_pick_spec.rb @@ -4,8 +4,8 @@ describe 'Cherry-pick Commits' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, :repository, namespace: group) } - let(:master_pickable_commit) { project.commit('7d3b0f7cff5f37573aea97cebfd5692ea1689924') } - let(:master_pickable_merge) { project.commit('e56497bb5f03a90a51293fc6d516788730953899') } + let(:master_pickable_commit) { project.commit('7d3b0f7cff5f37573aea97cebfd5692ea1689924') } + let(:master_pickable_merge) { project.commit('e56497bb5f03a90a51293fc6d516788730953899') } before do sign_in(user) diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index b75dee66592..ffa165c5440 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -465,7 +465,7 @@ describe 'Pipelines', :js do context 'with pagination' do before do allow(Ci::Pipeline).to receive(:default_per_page).and_return(1) - create(:ci_empty_pipeline, project: project) + create(:ci_empty_pipeline, project: project) end it 'should render pagination' do diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index eb70a3c41c1..4cb49ab02e2 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -5,7 +5,7 @@ describe 'Project' do include MobileHelpers describe 'creating from template' do - let(:user) { create(:user) } + let(:user) { create(:user) } let(:template) { Gitlab::ProjectTemplate.find(:rails) } before do @@ -170,7 +170,7 @@ describe 'Project' do describe 'showing information about source of a project fork' do let(:user) { create(:user) } - let(:base_project) { create(:project, :public, :repository) } + let(:base_project) { create(:project, :public, :repository) } let(:forked_project) { fork_project(base_project, user, repository: true) } before do diff --git a/spec/features/security/admin_access_spec.rb b/spec/features/security/admin_access_spec.rb index 3ca1303bda6..ff679034a36 100644 --- a/spec/features/security/admin_access_spec.rb +++ b/spec/features/security/admin_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Admin::Projects" do +describe "Admin::Projects" do include AccessMatchers describe "GET /admin/projects" do diff --git a/spec/features/security/dashboard_access_spec.rb b/spec/features/security/dashboard_access_spec.rb index 0c893e65d9c..07cddc92ac4 100644 --- a/spec/features/security/dashboard_access_spec.rb +++ b/spec/features/security/dashboard_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Dashboard access" do +describe "Dashboard access" do include AccessMatchers describe "GET /dashboard" do diff --git a/spec/features/security/profile_access_spec.rb b/spec/features/security/profile_access_spec.rb index 41eb7b26578..a198e65046f 100644 --- a/spec/features/security/profile_access_spec.rb +++ b/spec/features/security/profile_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Profile access" do +describe "Profile access" do include AccessMatchers describe "GET /profile/keys" do diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index 001e6c10eb2..843dbcd5b4d 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Internal Project Access" do +describe "Internal Project Access" do include AccessMatchers set(:project) { create(:project, :internal, :repository) } diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index c6618355eea..cf0837c1e67 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Private Project Access" do +describe "Private Project Access" do include AccessMatchers set(:project) { create(:project, :private, :repository, public_builds: false) } diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index 3717dc13f1e..7e1b735fd3d 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Public Project Access" do +describe "Public Project Access" do include AccessMatchers set(:project) { create(:project, :public, :repository) } diff --git a/spec/features/security/project/snippet/internal_access_spec.rb b/spec/features/security/project/snippet/internal_access_spec.rb index b87eb86b88b..0c58fdf2f12 100644 --- a/spec/features/security/project/snippet/internal_access_spec.rb +++ b/spec/features/security/project/snippet/internal_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Internal Project Snippets Access" do +describe "Internal Project Snippets Access" do include AccessMatchers let(:project) { create(:project, :internal) } diff --git a/spec/features/security/project/snippet/private_access_spec.rb b/spec/features/security/project/snippet/private_access_spec.rb index ead91d9a5fa..420f1938763 100644 --- a/spec/features/security/project/snippet/private_access_spec.rb +++ b/spec/features/security/project/snippet/private_access_spec.rb @@ -1,11 +1,11 @@ require 'spec_helper' -describe "Private Project Snippets Access" do +describe "Private Project Snippets Access" do include AccessMatchers let(:project) { create(:project, :private) } - let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) } + let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) } describe "GET /:project_path/snippets" do subject { project_snippets_path(project) } diff --git a/spec/features/security/project/snippet/public_access_spec.rb b/spec/features/security/project/snippet/public_access_spec.rb index 9bab3a474b8..6c75902c6e9 100644 --- a/spec/features/security/project/snippet/public_access_spec.rb +++ b/spec/features/security/project/snippet/public_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Public Project Snippets Access" do +describe "Public Project Snippets Access" do include AccessMatchers let(:project) { create(:project, :public) } diff --git a/spec/features/users/terms_spec.rb b/spec/features/users/terms_spec.rb index 5b2e7605c4d..84df1016594 100644 --- a/spec/features/users/terms_spec.rb +++ b/spec/features/users/terms_spec.rb @@ -76,7 +76,7 @@ describe 'Users > Terms' do project.add_developer(user) end - it 'redirects to terms and back to where the user was going' do + it 'redirects to terms and back to where the user was going' do visit project_path(project) enforce_terms diff --git a/spec/finders/groups_finder_spec.rb b/spec/finders/groups_finder_spec.rb index 16c0d418d98..367ca43bdfe 100644 --- a/spec/finders/groups_finder_spec.rb +++ b/spec/finders/groups_finder_spec.rb @@ -8,22 +8,22 @@ describe GroupsFinder do using RSpec::Parameterized::TableSyntax where(:user_type, :params, :results) do - nil | { all_available: true } | %i(public_group user_public_group) - nil | { all_available: false } | %i(public_group user_public_group) + nil | { all_available: true } | %i(public_group user_public_group) + nil | { all_available: false } | %i(public_group user_public_group) nil | {} | %i(public_group user_public_group) - :regular | { all_available: true } | %i(public_group internal_group user_public_group user_internal_group - user_private_group) - :regular | { all_available: false } | %i(user_public_group user_internal_group user_private_group) + :regular | { all_available: true } | %i(public_group internal_group user_public_group user_internal_group + user_private_group) + :regular | { all_available: false } | %i(user_public_group user_internal_group user_private_group) :regular | {} | %i(public_group internal_group user_public_group user_internal_group user_private_group) - :external | { all_available: true } | %i(public_group user_public_group user_internal_group user_private_group) - :external | { all_available: false } | %i(user_public_group user_internal_group user_private_group) + :external | { all_available: true } | %i(public_group user_public_group user_internal_group user_private_group) + :external | { all_available: false } | %i(user_public_group user_internal_group user_private_group) :external | {} | %i(public_group user_public_group user_internal_group user_private_group) - :admin | { all_available: true } | %i(public_group internal_group private_group user_public_group - user_internal_group user_private_group) - :admin | { all_available: false } | %i(user_public_group user_internal_group user_private_group) + :admin | { all_available: true } | %i(public_group internal_group private_group user_public_group + user_internal_group user_private_group) + :admin | { all_available: false } | %i(user_public_group user_internal_group user_private_group) :admin | {} | %i(public_group internal_group private_group user_public_group user_internal_group user_private_group) end diff --git a/spec/finders/merge_request_target_project_finder_spec.rb b/spec/finders/merge_request_target_project_finder_spec.rb index f302cf80ce8..d26a75179de 100644 --- a/spec/finders/merge_request_target_project_finder_spec.rb +++ b/spec/finders/merge_request_target_project_finder_spec.rb @@ -7,7 +7,7 @@ describe MergeRequestTargetProjectFinder do subject(:finder) { described_class.new(current_user: user, source_project: forked_project) } shared_examples 'finding related projects' do - it 'finds sibling projects and base project' do + it 'finds sibling projects and base project' do other_fork expect(finder.execute).to contain_exactly(base_project, other_fork, forked_project) diff --git a/spec/finders/notes_finder_spec.rb b/spec/finders/notes_finder_spec.rb index b51f1955ac4..0a685152cf9 100644 --- a/spec/finders/notes_finder_spec.rb +++ b/spec/finders/notes_finder_spec.rb @@ -121,7 +121,7 @@ describe NotesFinder do let(:note1) { create :note_on_commit, project: project } let(:note2) { create :note_on_commit, project: project } let(:commit) { note1.noteable } - let(:params) { { target_id: commit.id, target_type: 'commit', last_fetched_at: 1.hour.ago.to_i } } + let(:params) { { target_id: commit.id, target_type: 'commit', last_fetched_at: 1.hour.ago.to_i } } before do note1 diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index 590e838f13e..ac866e49fcd 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -137,7 +137,7 @@ describe ProjectsFinder do end describe 'filter by trending' do - let!(:trending_project) { create(:trending_project, project: public_project) } + let!(:trending_project) { create(:trending_project, project: public_project) } let(:params) { { trending: true } } it { is_expected.to eq([public_project]) } diff --git a/spec/finders/snippets_finder_spec.rb b/spec/finders/snippets_finder_spec.rb index dfeeb3040c6..134fb5f2c04 100644 --- a/spec/finders/snippets_finder_spec.rb +++ b/spec/finders/snippets_finder_spec.rb @@ -107,7 +107,7 @@ describe SnippetsFinder do context 'filter by project' do let(:user) { create :user } let(:group) { create :group, :public } - let(:project1) { create(:project, :public, group: group) } + let(:project1) { create(:project, :public, group: group) } before do @snippet1 = create(:project_snippet, :private, project: project1) diff --git a/spec/graphql/resolvers/project_pipelines_resolver_spec.rb b/spec/graphql/resolvers/project_pipelines_resolver_spec.rb index 407ca2f9d78..6862ae8a5ed 100644 --- a/spec/graphql/resolvers/project_pipelines_resolver_spec.rb +++ b/spec/graphql/resolvers/project_pipelines_resolver_spec.rb @@ -4,7 +4,7 @@ describe Resolvers::ProjectPipelinesResolver do include GraphqlHelpers set(:project) { create(:project) } - set(:pipeline) { create(:ci_pipeline, project: project) } + set(:pipeline) { create(:ci_pipeline, project: project) } set(:other_pipeline) { create(:ci_pipeline) } let(:current_user) { create(:user) } diff --git a/spec/graphql/types/permission_types/base_permission_type_spec.rb b/spec/graphql/types/permission_types/base_permission_type_spec.rb index a7e51797047..0ee8b883d51 100644 --- a/spec/graphql/types/permission_types/base_permission_type_spec.rb +++ b/spec/graphql/types/permission_types/base_permission_type_spec.rb @@ -8,7 +8,7 @@ describe Types::PermissionTypes::BasePermissionType do Class.new(described_class) do graphql_name 'TestClass' - permission_field :do_stuff, resolve: -> (_, _, _) { true } + permission_field :do_stuff, resolve: -> (_, _, _) { true } ability_field(:read_issue) abilities :admin_issue end diff --git a/spec/graphql/types/permission_types/project_spec.rb b/spec/graphql/types/permission_types/project_spec.rb index 927153adc5b..4288412eda3 100644 --- a/spec/graphql/types/permission_types/project_spec.rb +++ b/spec/graphql/types/permission_types/project_spec.rb @@ -5,7 +5,7 @@ describe Types::PermissionTypes::Project do expected_permissions = [ :change_namespace, :change_visibility_level, :rename_project, :remove_project, :archive_project, :remove_fork_project, :remove_pages, :read_project, :create_merge_request_in, - :read_wiki, :read_project_member, :create_issue, :upload_file, :read_cycle_analytics, + :read_wiki, :read_project_member, :create_issue, :upload_file, :read_cycle_analytics, :download_code, :download_wiki_code, :fork_project, :create_project_snippet, :read_commit_status, :request_access, :create_pipeline, :create_pipeline_schedule, :create_merge_request_from, :create_wiki, :push_code, :create_deployment, :push_to_delete_protected_branch, diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb index 61d4c42665a..01d71abfac9 100644 --- a/spec/graphql/types/project_type_spec.rb +++ b/spec/graphql/types/project_type_spec.rb @@ -10,7 +10,7 @@ describe GitlabSchema.types['Project'] do it 'authorizes the merge request' do expect(described_class.fields['mergeRequest']) - .to require_graphql_authorizations(:read_merge_request) + .to require_graphql_authorizations(:read_merge_request) end end diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb index 81231cca085..412ec910f3a 100644 --- a/spec/helpers/issuables_helper_spec.rb +++ b/spec/helpers/issuables_helper_spec.rb @@ -5,8 +5,8 @@ describe IssuablesHelper do let(:label2) { build_stubbed(:label) } describe '#users_dropdown_label' do - let(:user) { build_stubbed(:user) } - let(:user2) { build_stubbed(:user) } + let(:user) { build_stubbed(:user) } + let(:user2) { build_stubbed(:user) } it 'returns unassigned' do expect(users_dropdown_label([])).to eq('Unassigned') @@ -22,7 +22,7 @@ describe IssuablesHelper do end describe '#group_dropdown_label' do - let(:group) { create(:group) } + let(:group) { create(:group) } let(:default) { 'default label' } it 'returns default group label when group_id is nil' do diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index 8bb2e234e9a..039143eb8d7 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -148,7 +148,7 @@ describe IssuesHelper do end describe "when passing a discussion" do - let(:diff_note) { create(:diff_note_on_merge_request) } + let(:diff_note) { create(:diff_note_on_merge_request) } let(:merge_request) { diff_note.noteable } let(:discussion) { diff_note.to_discussion } diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb index 4945749f524..9cff0291250 100644 --- a/spec/helpers/search_helper_spec.rb +++ b/spec/helpers/search_helper_spec.rb @@ -18,7 +18,7 @@ describe SearchHelper do end context "with a standard user" do - let(:user) { create(:user) } + let(:user) { create(:user) } before do allow(self).to receive(:current_user).and_return(user) diff --git a/spec/lib/banzai/color_parser_spec.rb b/spec/lib/banzai/color_parser_spec.rb index a1cb0c07b06..af2a8f215c1 100644 --- a/spec/lib/banzai/color_parser_spec.rb +++ b/spec/lib/banzai/color_parser_spec.rb @@ -57,7 +57,7 @@ describe Banzai::ColorParser do context 'HSL format' do [ - 'hsl(0,0%,0%)', 'hsl(0,100%,100%)', + 'hsl(0,0%,0%)', 'hsl(0,100%,100%)', 'hsl(540,0%,0%)', 'hsl(-720,0%,0%)', 'hsl(0deg,0%,0%)', 'hsl(0DEG,0%,0%)', 'hsl(0, 0%, 0%)', 'HSL(0,0%,0%)', diff --git a/spec/lib/banzai/filter/commit_range_reference_filter_spec.rb b/spec/lib/banzai/filter/commit_range_reference_filter_spec.rb index cbff2fdab14..4daf6be1bb7 100644 --- a/spec/lib/banzai/filter/commit_range_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/commit_range_reference_filter_spec.rb @@ -205,7 +205,7 @@ describe Banzai::Filter::CommitRangeReferenceFilter do context 'cross-project URL reference' do let(:namespace) { create(:namespace) } let(:project2) { create(:project, :public, :repository, namespace: namespace) } - let(:range) { CommitRange.new("#{commit1.id}...master", project) } + let(:range) { CommitRange.new("#{commit1.id}...master", project) } let(:reference) { urls.project_compare_url(project2, from: commit1.id, to: 'master') } before do diff --git a/spec/lib/banzai/filter/issue_reference_filter_spec.rb b/spec/lib/banzai/filter/issue_reference_filter_spec.rb index 905fbb9434b..914c4e2d823 100644 --- a/spec/lib/banzai/filter/issue_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/issue_reference_filter_spec.rb @@ -445,7 +445,7 @@ describe Banzai::Filter::IssueReferenceFilter do end describe '.references_in' do - let(:merge_request) { create(:merge_request) } + let(:merge_request) { create(:merge_request) } it 'yields valid references' do expect do |b| diff --git a/spec/lib/banzai/filter/label_reference_filter_spec.rb b/spec/lib/banzai/filter/label_reference_filter_spec.rb index 9cfdb9e53a2..108d7b43a26 100644 --- a/spec/lib/banzai/filter/label_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/label_reference_filter_spec.rb @@ -237,7 +237,7 @@ describe Banzai::Filter::LabelReferenceFilter do end context 'References with html entities' do - let!(:label) { create(:label, name: '<html>', project: project) } + let!(:label) { create(:label, name: '<html>', project: project) } it 'links to a valid reference' do doc = reference_filter('See ~"<html>"') diff --git a/spec/lib/banzai/filter/project_reference_filter_spec.rb b/spec/lib/banzai/filter/project_reference_filter_spec.rb index 48140305e26..c68d49f9366 100644 --- a/spec/lib/banzai/filter/project_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/project_reference_filter_spec.rb @@ -13,7 +13,7 @@ describe Banzai::Filter::ProjectReferenceFilter do project.to_reference_with_postfix end - let(:project) { create(:project, :public) } + let(:project) { create(:project, :public) } subject { project } let(:subject_name) { "project" } let(:reference) { get_reference(project) } diff --git a/spec/lib/gitlab/auth/o_auth/identity_linker_spec.rb b/spec/lib/gitlab/auth/o_auth/identity_linker_spec.rb index 528f1b4ec57..bf810d72f0e 100644 --- a/spec/lib/gitlab/auth/o_auth/identity_linker_spec.rb +++ b/spec/lib/gitlab/auth/o_auth/identity_linker_spec.rb @@ -23,7 +23,7 @@ describe Gitlab::Auth::OAuth::IdentityLinker do end context 'identity already linked to different user' do - let!(:identity) { create(:identity, provider: provider, extern_uid: uid) } + let!(:identity) { create(:identity, provider: provider, extern_uid: uid) } it "#changed? returns false" do subject.link diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index 9ccd0b206cc..236808c0b69 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -380,7 +380,7 @@ describe Gitlab::Auth do password: password, password_confirmation: password) end - let(:username) { 'John' } # username isn't lowercase, test this + let(:username) { 'John' } # username isn't lowercase, test this let(:password) { 'my-secret' } it "finds user by valid login/password" do diff --git a/spec/lib/gitlab/background_migration/populate_import_state_spec.rb b/spec/lib/gitlab/background_migration/populate_import_state_spec.rb index f9952ee5163..fcb869022de 100644 --- a/spec/lib/gitlab/background_migration/populate_import_state_spec.rb +++ b/spec/lib/gitlab/background_migration/populate_import_state_spec.rb @@ -4,7 +4,7 @@ describe Gitlab::BackgroundMigration::PopulateImportState, :migration, schema: 2 let(:migration) { described_class.new } let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } - let(:import_state) { table(:project_mirror_data) } + let(:import_state) { table(:project_mirror_data) } before do namespaces.create(id: 1, name: 'gitlab-org', path: 'gitlab-org') diff --git a/spec/lib/gitlab/background_migration/rollback_import_state_data_spec.rb b/spec/lib/gitlab/background_migration/rollback_import_state_data_spec.rb index 9f8c3bc220f..cef3b6e4568 100644 --- a/spec/lib/gitlab/background_migration/rollback_import_state_data_spec.rb +++ b/spec/lib/gitlab/background_migration/rollback_import_state_data_spec.rb @@ -4,7 +4,7 @@ describe Gitlab::BackgroundMigration::RollbackImportStateData, :migration, schem let(:migration) { described_class.new } let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } - let(:import_state) { table(:project_mirror_data) } + let(:import_state) { table(:project_mirror_data) } before do namespaces.create(id: 1, name: 'gitlab-org', path: 'gitlab-org') diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb index 7a681bc6610..0def685f177 100644 --- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb +++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb @@ -15,7 +15,7 @@ describe Gitlab::BitbucketImport::Importer do "invalid", "duplicate", "wontfix", - "closed" # undocumented status + "closed" # undocumented status ] end diff --git a/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb index be9b2588c90..483c5ea9cff 100644 --- a/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb +++ b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb @@ -238,7 +238,7 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do end describe '#delete_from_cache' do - it 'deletes values from redis_cache' do + it 'deletes values from redis_cache' do pipeline_status.delete_from_cache key_exists = Gitlab::Redis::Cache.with { |redis| redis.exists(cache_key) } diff --git a/spec/lib/gitlab/ci/config_spec.rb b/spec/lib/gitlab/ci/config_spec.rb index cd6d2a2f343..18f255c1ab7 100644 --- a/spec/lib/gitlab/ci/config_spec.rb +++ b/spec/lib/gitlab/ci/config_spec.rb @@ -192,7 +192,7 @@ describe Gitlab::Ci::Config do end end - context "when gitlab_ci.yml has invalid 'include' defined" do + context "when gitlab_ci.yml has invalid 'include' defined" do let(:gitlab_ci_yml) do <<~HEREDOC include: invalid @@ -207,7 +207,7 @@ describe Gitlab::Ci::Config do end end - context "when gitlab_ci.yml has ambigious 'include' defined" do + context "when gitlab_ci.yml has ambigious 'include' defined" do let(:gitlab_ci_yml) do <<~HEREDOC include: diff --git a/spec/lib/gitlab/ci/yaml_processor_spec.rb b/spec/lib/gitlab/ci/yaml_processor_spec.rb index b6c3431728c..20c35573cfb 100644 --- a/spec/lib/gitlab/ci/yaml_processor_spec.rb +++ b/spec/lib/gitlab/ci/yaml_processor_spec.rb @@ -888,7 +888,7 @@ module Gitlab end context 'without matching job' do - let(:close_review) { nil } + let(:close_review) { nil } it 'raises error' do expect { builds }.to raise_error('review job: on_stop job close_review is not defined') diff --git a/spec/lib/gitlab/diff/position_tracer_spec.rb b/spec/lib/gitlab/diff/position_tracer_spec.rb index a2eed07ca55..866550753a8 100644 --- a/spec/lib/gitlab/diff/position_tracer_spec.rb +++ b/spec/lib/gitlab/diff/position_tracer_spec.rb @@ -1515,8 +1515,8 @@ describe Gitlab::Diff::PositionTracer do { new_path: file_name, new_line: 4, change: true }, { new_path: file_name, old_line: 3, change: true }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 5 }, - { new_path: file_name, old_line: 5, change: true }, - { new_path: file_name, new_line: 7 } + { new_path: file_name, old_line: 5, change: true }, + { new_path: file_name, new_line: 7 } ] expect_new_positions(old_position_attrs, new_position_attrs) @@ -1588,7 +1588,7 @@ describe Gitlab::Diff::PositionTracer do { new_path: file_name, new_line: 4, change: true }, { old_path: file_name, old_line: 3, change: true }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 5 }, - { old_path: file_name, old_line: 5, change: true }, + { old_path: file_name, old_line: 5, change: true }, { new_path: file_name, new_line: 7 } ] @@ -1638,13 +1638,13 @@ describe Gitlab::Diff::PositionTracer do new_position_attrs = [ { old_path: file_name, new_path: file_name, old_line: 1, new_line: 1 }, { old_path: file_name, old_line: 2 }, - { old_path: file_name, old_line: 2, change: true }, + { old_path: file_name, old_line: 2, change: true }, { old_path: file_name, new_path: file_name, old_line: 3, new_line: 2 }, - { old_path: file_name, old_line: 4, change: true }, + { old_path: file_name, old_line: 4, change: true }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 4 }, - { new_path: file_name, new_line: 5, change: true }, - { old_path: file_name, old_line: 6, change: true }, - { new_path: file_name, new_line: 6 } + { new_path: file_name, new_line: 5, change: true }, + { old_path: file_name, old_line: 6, change: true }, + { new_path: file_name, new_line: 6 } ] expect_new_positions(old_position_attrs, new_position_attrs) @@ -1880,7 +1880,7 @@ describe Gitlab::Diff::PositionTracer do new_position_attrs = [ { old_path: file_name, new_path: file_name, old_line: 1, new_line: 1 }, - { old_path: file_name, old_line: 2, change: true }, + { old_path: file_name, old_line: 2, change: true }, { new_path: file_name, new_line: 2 }, { old_path: file_name, new_path: file_name, old_line: 2, new_line: 3 }, { new_path: file_name, new_line: 4 }, diff --git a/spec/lib/gitlab/git/compare_spec.rb b/spec/lib/gitlab/git/compare_spec.rb index 7cc6f52f8ee..771c71a16a9 100644 --- a/spec/lib/gitlab/git/compare_spec.rb +++ b/spec/lib/gitlab/git/compare_spec.rb @@ -67,7 +67,7 @@ describe Gitlab::Git::Compare, :seed_helper do end end - describe '#same' do + describe '#same' do subject do compare.same end diff --git a/spec/lib/gitlab/git/merge_base_spec.rb b/spec/lib/gitlab/git/merge_base_spec.rb index 8d16d451730..dbb4e3d0b3e 100644 --- a/spec/lib/gitlab/git/merge_base_spec.rb +++ b/spec/lib/gitlab/git/merge_base_spec.rb @@ -62,7 +62,7 @@ describe Gitlab::Git::MergeBase do end describe '#commit' do - context 'for existing refs with a merge base', :existing_refs do + context 'for existing refs with a merge base', :existing_refs do it 'finds the commit for the merge base' do expect(merge_base.commit).to be_a(Commit) end diff --git a/spec/lib/gitlab/graphql/connections/keyset_connection_spec.rb b/spec/lib/gitlab/graphql/connections/keyset_connection_spec.rb index 96615ae80de..9bcc1e78a78 100644 --- a/spec/lib/gitlab/graphql/connections/keyset_connection_spec.rb +++ b/spec/lib/gitlab/graphql/connections/keyset_connection_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Gitlab::Graphql::Connections::KeysetConnection do let(:nodes) { Project.all.order(id: :asc) } - let(:arguments) { {} } + let(:arguments) { {} } subject(:connection) do described_class.new(nodes, arguments, max_page_size: 3) end diff --git a/spec/lib/gitlab/import_export/importer_spec.rb b/spec/lib/gitlab/import_export/importer_spec.rb index 11f98d782b1..898e4d07760 100644 --- a/spec/lib/gitlab/import_export/importer_spec.rb +++ b/spec/lib/gitlab/import_export/importer_spec.rb @@ -29,7 +29,7 @@ describe Gitlab::ImportExport::Importer do expect(shared.errors).to be_empty end - it 'extracts the archive' do + it 'extracts the archive' do expect(Gitlab::ImportExport::FileImporter).to receive(:import).and_call_original importer.execute diff --git a/spec/lib/gitlab/import_export/reader_spec.rb b/spec/lib/gitlab/import_export/reader_spec.rb index 1ef024d3078..f93ff074770 100644 --- a/spec/lib/gitlab/import_export/reader_spec.rb +++ b/spec/lib/gitlab/import_export/reader_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ImportExport::Reader do +describe Gitlab::ImportExport::Reader do let(:shared) { Gitlab::ImportExport::Shared.new(nil) } let(:test_config) { 'spec/support/import_export/import_export.yml' } let(:project_tree_hash) do diff --git a/spec/lib/gitlab/kubernetes/helm/pod_spec.rb b/spec/lib/gitlab/kubernetes/helm/pod_spec.rb index 9cb79148028..27c802f34ec 100644 --- a/spec/lib/gitlab/kubernetes/helm/pod_spec.rb +++ b/spec/lib/gitlab/kubernetes/helm/pod_spec.rb @@ -2,8 +2,8 @@ require 'rails_helper' describe Gitlab::Kubernetes::Helm::Pod do describe '#generate' do - let(:app) { create(:clusters_applications_prometheus) } - let(:command) { app.install_command } + let(:app) { create(:clusters_applications_prometheus) } + let(:command) { app.install_command } let(:namespace) { Gitlab::Kubernetes::Helm::NAMESPACE } let(:service_account_name) { nil } diff --git a/spec/lib/gitlab/slash_commands/issue_new_spec.rb b/spec/lib/gitlab/slash_commands/issue_new_spec.rb index 724c76ade6e..59de11766d8 100644 --- a/spec/lib/gitlab/slash_commands/issue_new_spec.rb +++ b/spec/lib/gitlab/slash_commands/issue_new_spec.rb @@ -44,7 +44,7 @@ describe Gitlab::SlashCommands::IssueNew do end context 'issue cannot be created' do - let!(:issue) { create(:issue, project: project, title: 'bird is the word') } + let!(:issue) { create(:issue, project: project, title: 'bird is the word') } let(:regex_match) { described_class.match("issue create #{'a' * 512}}") } it 'displays the errors' do diff --git a/spec/lib/gitlab/tree_summary_spec.rb b/spec/lib/gitlab/tree_summary_spec.rb index 7ffcef2baef..e22f898dc4c 100644 --- a/spec/lib/gitlab/tree_summary_spec.rb +++ b/spec/lib/gitlab/tree_summary_spec.rb @@ -180,7 +180,7 @@ describe Gitlab::TreeSummary do with_them do before do - create_file('dummy', path: 'other') if num_entries.zero? + create_file('dummy', path: 'other') if num_entries.zero? 1.upto(num_entries) { |n| create_file(n, path: path) } end diff --git a/spec/mailers/emails/pages_domains_spec.rb b/spec/mailers/emails/pages_domains_spec.rb index fe428ea657d..c74fd66ad22 100644 --- a/spec/mailers/emails/pages_domains_spec.rb +++ b/spec/mailers/emails/pages_domains_spec.rb @@ -6,7 +6,7 @@ describe Emails::PagesDomains do include_context 'gitlab email notification' set(:project) { create(:project) } - set(:domain) { create(:pages_domain, project: project) } + set(:domain) { create(:pages_domain, project: project) } set(:user) { project.owner } shared_examples 'a pages domain email' do diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index f2d99872401..1f5b4a8f908 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -887,7 +887,7 @@ describe Notify do allow(Note).to receive(:find).with(note.id).and_return(note) end - shared_examples 'an email for a note on a diff discussion' do |model| + shared_examples 'an email for a note on a diff discussion' do |model| let(:note) { create(model, author: note_author) } context 'when note is not on text' do diff --git a/spec/migrations/delete_inconsistent_internal_id_records_spec.rb b/spec/migrations/delete_inconsistent_internal_id_records_spec.rb index 51291cb362a..e2ce69a7bb1 100644 --- a/spec/migrations/delete_inconsistent_internal_id_records_spec.rb +++ b/spec/migrations/delete_inconsistent_internal_id_records_spec.rb @@ -102,7 +102,7 @@ describe DeleteInconsistentInternalIdRecords, :migration do context 'for milestones (by group)' do # milestones (by group) is a little different than most of the other models - let(:groups) { table(:namespaces) } + let(:groups) { table(:namespaces) } let(:group1) { groups.create(name: 'Group 1', type: 'Group', path: 'group_1') } let(:group2) { groups.create(name: 'Group 2', type: 'Group', path: 'group_2') } let(:group3) { groups.create(name: 'Group 2', type: 'Group', path: 'group_3') } diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 60d89313f07..8ba33ff9c04 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -2480,7 +2480,7 @@ describe Ci::Build do context 'when container registry is enabled' do let(:container_registry_enabled) { true } let(:ci_registry) do - { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } + { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } end let(:ci_registry_image) do { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_url, public: true } diff --git a/spec/models/clusters/kubernetes_namespace_spec.rb b/spec/models/clusters/kubernetes_namespace_spec.rb index 56c98d016c9..235e2ee4e69 100644 --- a/spec/models/clusters/kubernetes_namespace_spec.rb +++ b/spec/models/clusters/kubernetes_namespace_spec.rb @@ -28,7 +28,7 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do let(:cluster_project) { create(:cluster_project) } let(:kubernetes_namespace) { build(:cluster_kubernetes_namespace, namespace: 'my-namespace') } - subject { kubernetes_namespace } + subject { kubernetes_namespace } context 'when cluster is using the namespace' do before do diff --git a/spec/models/concerns/discussion_on_diff_spec.rb b/spec/models/concerns/discussion_on_diff_spec.rb index 4b16e6e3902..64bf04071e8 100644 --- a/spec/models/concerns/discussion_on_diff_spec.rb +++ b/spec/models/concerns/discussion_on_diff_spec.rb @@ -7,7 +7,7 @@ describe DiscussionOnDiff do let(:truncated_lines) { subject.truncated_diff_lines } context "when diff is greater than allowed number of truncated diff lines " do - it "returns fewer lines" do + it "returns fewer lines" do expect(subject.diff_lines.count).to be > DiffDiscussion::NUMBER_OF_TRUNCATED_DIFF_LINES expect(truncated_lines.count).to be <= DiffDiscussion::NUMBER_OF_TRUNCATED_DIFF_LINES diff --git a/spec/models/concerns/issuable_spec.rb b/spec/models/concerns/issuable_spec.rb index a4bf3e2350a..5753c646106 100644 --- a/spec/models/concerns/issuable_spec.rb +++ b/spec/models/concerns/issuable_spec.rb @@ -566,7 +566,7 @@ describe Issuable do end let(:merged_mr) { create(:merge_request, :merged, author: contributor, target_project: project, source_project: project) } - let(:open_mr) { create(:merge_request, author: first_time_contributor, target_project: project, source_project: project) } + let(:open_mr) { create(:merge_request, author: first_time_contributor, target_project: project, source_project: project) } let(:merged_mr_other_project) { create(:merge_request, :merged, author: first_time_contributor, target_project: other_project, source_project: other_project) } context "for merge requests" do diff --git a/spec/models/external_issue_spec.rb b/spec/models/external_issue_spec.rb index c8748daf46b..83ba22caa03 100644 --- a/spec/models/external_issue_spec.rb +++ b/spec/models/external_issue_spec.rb @@ -30,7 +30,7 @@ describe ExternalIssue do end context 'if issue id is a number' do - let(:issue) { described_class.new('1234', project) } + let(:issue) { described_class.new('1234', project) } it 'returns the issue ID prefixed by #' do expect(issue.reference_link_text).to eq '#1234' end diff --git a/spec/models/label_note_spec.rb b/spec/models/label_note_spec.rb index f69874d94aa..dd2c702a7a9 100644 --- a/spec/models/label_note_spec.rb +++ b/spec/models/label_note_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' describe LabelNote do - set(:project) { create(:project, :repository) } - set(:user) { create(:user) } + set(:project) { create(:project, :repository) } + set(:user) { create(:user) } set(:label) { create(:label, project: project) } set(:label2) { create(:label, project: project) } let(:resource_parent) { project } diff --git a/spec/models/lfs_file_lock_spec.rb b/spec/models/lfs_file_lock_spec.rb index e74f342d3eb..41ca1578b94 100644 --- a/spec/models/lfs_file_lock_spec.rb +++ b/spec/models/lfs_file_lock_spec.rb @@ -13,7 +13,7 @@ describe LfsFileLock do describe '#can_be_unlocked_by?' do let(:developer) { create(:user) } - let(:maintainer) { create(:user) } + let(:maintainer) { create(:user) } before do project = lfs_file_lock.project diff --git a/spec/models/members/project_member_spec.rb b/spec/models/members/project_member_spec.rb index 99d3ab41b97..36bfff2c339 100644 --- a/spec/models/members/project_member_spec.rb +++ b/spec/models/members/project_member_spec.rb @@ -39,7 +39,7 @@ describe ProjectMember do describe "#destroy" do let(:owner) { create(:project_member, access_level: ProjectMember::MAINTAINER) } let(:project) { owner.project } - let(:maintainer) { create(:project_member, project: project) } + let(:maintainer) { create(:project_member, project: project) } it "creates an expired event when left due to expiry" do expired = create(:project_member, project: project, expires_at: Time.now - 6.days) diff --git a/spec/models/merge_request_diff_commit_spec.rb b/spec/models/merge_request_diff_commit_spec.rb index 8c01a7ac18f..10487190a44 100644 --- a/spec/models/merge_request_diff_commit_spec.rb +++ b/spec/models/merge_request_diff_commit_spec.rb @@ -16,7 +16,7 @@ describe MergeRequestDiffCommit do end describe '.create_bulk' do - let(:sha_attribute) { Gitlab::Database::ShaAttribute.new } + let(:sha_attribute) { Gitlab::Database::ShaAttribute.new } let(:merge_request_diff_id) { merge_request.merge_request_diff.id } let(:commits) do [ diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index bfc9035cb56..b62f973ad1e 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -1032,7 +1032,7 @@ describe MergeRequest do end describe '#diverged_commits_count' do - let(:project) { create(:project, :repository) } + let(:project) { create(:project, :repository) } let(:forked_project) { fork_project(project, nil, repository: true) } context 'when the target branch does not exist anymore' do @@ -2298,9 +2298,9 @@ describe MergeRequest do end describe "#source_project_missing?" do - let(:project) { create(:project) } + let(:project) { create(:project) } let(:forked_project) { fork_project(project) } - let(:user) { create(:user) } + let(:user) { create(:user) } let(:unlink_project) { Projects::UnlinkForkService.new(forked_project, user) } context "when the fork exists" do @@ -2370,9 +2370,9 @@ describe MergeRequest do end describe "#closed_without_fork?" do - let(:project) { create(:project) } + let(:project) { create(:project) } let(:forked_project) { fork_project(project) } - let(:user) { create(:user) } + let(:user) { create(:user) } let(:unlink_project) { Projects::UnlinkForkService.new(forked_project, user) } context "when the merge request is closed" do @@ -2494,7 +2494,7 @@ describe MergeRequest do expect(merge_request.mergeable_with_quick_action?(user, last_diff_sha: mr_sha)).to be_falsey end - context 'closed MR' do + context 'closed MR' do before do merge_request.update_attribute(:state, :closed) end @@ -2504,7 +2504,7 @@ describe MergeRequest do end end - context 'MR with WIP' do + context 'MR with WIP' do before do merge_request.update_attribute(:title, 'WIP: some MR') end @@ -2514,19 +2514,19 @@ describe MergeRequest do end end - context 'sha differs from the MR diff_head_sha' do + context 'sha differs from the MR diff_head_sha' do it 'is not mergeable' do expect(merge_request.mergeable_with_quick_action?(developer, last_diff_sha: 'some other sha')).to be_falsey end end - context 'sha is not provided' do + context 'sha is not provided' do it 'is not mergeable' do expect(merge_request.mergeable_with_quick_action?(developer)).to be_falsey end end - context 'with pipeline ok' do + context 'with pipeline ok' do before do create_pipeline(:success) end @@ -2536,7 +2536,7 @@ describe MergeRequest do end end - context 'with failing pipeline' do + context 'with failing pipeline' do before do create_pipeline(:failed) end @@ -2546,7 +2546,7 @@ describe MergeRequest do end end - context 'with running pipeline' do + context 'with running pipeline' do before do create_pipeline(:running) end diff --git a/spec/models/project_services/drone_ci_service_spec.rb b/spec/models/project_services/drone_ci_service_spec.rb index d8972aff407..26597d9b83c 100644 --- a/spec/models/project_services/drone_ci_service_spec.rb +++ b/spec/models/project_services/drone_ci_service_spec.rb @@ -117,7 +117,7 @@ describe DroneCiService, :use_clean_rails_memory_store_caching do describe "execute" do include_context :drone_ci_service - let(:user) { create(:user, username: 'username') } + let(:user) { create(:user, username: 'username') } let(:push_sample_data) do Gitlab::DataBuilder::Push.build_sample(project, user) end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 7a8dc59039e..437f0066450 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -3926,7 +3926,7 @@ describe Project do describe '#badges' do let(:project_group) { create(:group) } - let(:project) { create(:project, path: 'avatar', namespace: project_group) } + let(:project) { create(:project, path: 'avatar', namespace: project_group) } before do create_list(:project_badge, 2, project: project) diff --git a/spec/models/resource_label_event_spec.rb b/spec/models/resource_label_event_spec.rb index e7e3f7376e6..3797960ac3d 100644 --- a/spec/models/resource_label_event_spec.rb +++ b/spec/models/resource_label_event_spec.rb @@ -88,7 +88,7 @@ RSpec.describe ResourceLabelEvent, type: :model do end it 'returns false if label and reference are set' do - subject.attributes = { reference: 'whatever', cached_markdown_version: CacheMarkdownField::CACHE_COMMONMARK_VERSION } + subject.attributes = { reference: 'whatever', cached_markdown_version: CacheMarkdownField::CACHE_COMMONMARK_VERSION } expect(subject.outdated_markdown?).to be false end diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb index 2a4030de998..7705704a07f 100644 --- a/spec/policies/project_policy_spec.rb +++ b/spec/policies/project_policy_spec.rb @@ -69,7 +69,7 @@ describe ProjectPolicy do end # Used in EE specs - let(:additional_guest_permissions) { [] } + let(:additional_guest_permissions) { [] } let(:additional_reporter_permissions) { [] } let(:additional_maintainer_permissions) { [] } @@ -236,7 +236,7 @@ describe ProjectPolicy do let(:group) { create(:group, :public) } let(:project) { create(:project, :public, namespace: group) } let(:user_permissions) { [:create_merge_request_in, :create_project, :create_issue, :create_note, :upload_file, :award_emoji] } - let(:anonymous_permissions) { guest_permissions - user_permissions } + let(:anonymous_permissions) { guest_permissions - user_permissions } subject { described_class.new(nil, project) } diff --git a/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb b/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb index 2cc0076d695..001545bb5df 100644 --- a/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb +++ b/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Projects::Settings::DeployKeysPresenter do let(:project) { create(:project) } let(:user) { create(:user) } - let(:deploy_key) { create(:deploy_key, public: true) } + let(:deploy_key) { create(:deploy_key, public: true) } let!(:deploy_keys_project) do create(:deploy_keys_project, project: project, deploy_key: deploy_key) diff --git a/spec/requests/api/avatar_spec.rb b/spec/requests/api/avatar_spec.rb index 17e66725dc9..9bc49bd5982 100644 --- a/spec/requests/api/avatar_spec.rb +++ b/spec/requests/api/avatar_spec.rb @@ -65,7 +65,7 @@ describe API::Avatar do expect(GravatarService).to receive(:new).and_return(gravatar_service) expect(gravatar_service).to( receive(:execute) - .with('private@example.com', nil, 2, { username: nil }) + .with('private@example.com', nil, 2, { username: nil }) .and_return('https://gravatar')) end diff --git a/spec/requests/api/award_emoji_spec.rb b/spec/requests/api/award_emoji_spec.rb index 22f6fcdc922..6c67d84b59b 100644 --- a/spec/requests/api/award_emoji_spec.rb +++ b/spec/requests/api/award_emoji_spec.rb @@ -7,7 +7,7 @@ describe API::AwardEmoji do set(:award_emoji) { create(:award_emoji, awardable: issue, user: user) } let!(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let!(:downvote) { create(:award_emoji, :downvote, awardable: merge_request, user: user) } - set(:note) { create(:note, project: project, noteable: issue) } + set(:note) { create(:note, project: project, noteable: issue) } before do project.add_maintainer(user) @@ -144,7 +144,7 @@ describe API::AwardEmoji do end describe "POST /projects/:id/awardable/:awardable_id/award_emoji" do - let(:issue2) { create(:issue, project: project, author: user) } + let(:issue2) { create(:issue, project: project, author: user) } context "on an issue" do it "creates a new award emoji" do diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb index ab4f42cad47..de79e8c4c5c 100644 --- a/spec/requests/api/boards_spec.rb +++ b/spec/requests/api/boards_spec.rb @@ -31,7 +31,7 @@ describe API::Boards do set(:board_label) { create(:label, project: board_parent) } set(:board) { create(:board, project: board_parent, lists: [dev_list, test_list]) } - it_behaves_like 'group and project boards', "/projects/:id/boards" + it_behaves_like 'group and project boards', "/projects/:id/boards" describe "POST /projects/:id/boards/lists" do let(:url) { "/projects/#{board_parent.id}/boards/#{board.id}/lists" } diff --git a/spec/requests/api/discussions_spec.rb b/spec/requests/api/discussions_spec.rb index ef34192f888..35c448d187d 100644 --- a/spec/requests/api/discussions_spec.rb +++ b/spec/requests/api/discussions_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe API::Discussions do let(:user) { create(:user) } let!(:project) { create(:project, :public, :repository, namespace: user.namespace) } - let(:private_user) { create(:user) } + let(:private_user) { create(:user) } before do project.add_developer(user) diff --git a/spec/requests/api/group_milestones_spec.rb b/spec/requests/api/group_milestones_spec.rb index 108721c6655..6980eb7f55d 100644 --- a/spec/requests/api/group_milestones_spec.rb +++ b/spec/requests/api/group_milestones_spec.rb @@ -8,7 +8,7 @@ describe API::GroupMilestones do let!(:closed_milestone) { create(:closed_milestone, group: group, title: 'version1', description: 'closed milestone') } let!(:milestone) { create(:milestone, group: group, title: 'version2', description: 'open milestone') } - it_behaves_like 'group and project milestones', "/groups/:id/milestones" do + it_behaves_like 'group and project milestones', "/groups/:id/milestones" do let(:route) { "/groups/#{group.id}/milestones" } end diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 0fe63e2e517..6a943b5237a 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -32,7 +32,7 @@ describe API::Internal do context 'broadcast message exists' do let!(:broadcast_message) { create(:broadcast_message, starts_at: 1.day.ago, ends_at: 1.day.from_now ) } - it 'returns one broadcast message' do + it 'returns one broadcast message' do get api('/internal/broadcast_message'), params: { secret_token: secret_token } expect(response).to have_gitlab_http_status(200) @@ -41,7 +41,7 @@ describe API::Internal do end context 'broadcast message does not exist' do - it 'returns nothing' do + it 'returns nothing' do get api('/internal/broadcast_message'), params: { secret_token: secret_token } expect(response).to have_gitlab_http_status(200) @@ -867,7 +867,7 @@ describe API::Internal do context 'broadcast message exists' do let!(:broadcast_message) { create(:broadcast_message, starts_at: 1.day.ago, ends_at: 1.day.from_now ) } - it 'returns one broadcast message' do + it 'returns one broadcast message' do post api("/internal/post_receive"), params: valid_params expect(response).to have_gitlab_http_status(200) @@ -876,7 +876,7 @@ describe API::Internal do end context 'broadcast message does not exist' do - it 'returns empty string' do + it 'returns empty string' do post api("/internal/post_receive"), params: valid_params expect(response).to have_gitlab_http_status(200) diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index ba7930f6c9d..e0f1e303e96 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -993,7 +993,7 @@ describe API::Issues do end context 'user does not have permissions to create issue' do - let(:not_member) { create(:user) } + let(:not_member) { create(:user) } before do project.project_feature.update(issues_access_level: ProjectFeature::PRIVATE) diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 79c0a1953dc..4d42bc39ac3 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -10,7 +10,7 @@ describe API::MergeRequests do let!(:project) { create(:project, :public, :repository, creator: user, namespace: user.namespace, only_allow_merge_if_pipeline_succeeds: false) } let(:milestone) { create(:milestone, title: '1.0.0', project: project) } let(:pipeline) { create(:ci_empty_pipeline) } - let(:milestone1) { create(:milestone, title: '0.9', project: project) } + let(:milestone1) { create(:milestone, title: '0.9', project: project) } let!(:merge_request) { create(:merge_request, :simple, milestone: milestone1, author: user, assignee: user, source_project: project, target_project: project, title: "Test", created_at: base_time) } let!(:merge_request_closed) { create(:merge_request, state: "closed", milestone: milestone1, author: user, assignee: user, source_project: project, target_project: project, title: "Closed test", created_at: base_time + 1.second) } let!(:merge_request_merged) { create(:merge_request, state: "merged", author: user, assignee: user, source_project: project, target_project: project, title: "Merged test", created_at: base_time + 2.seconds, merge_commit_sha: '9999999999999999999999999999999999999999') } @@ -698,7 +698,7 @@ describe API::MergeRequests do let!(:user2) { create(:user) } let(:project) { create(:project, :public, :repository) } let!(:forked_project) { fork_project(project, user2, repository: true) } - let!(:unrelated_project) { create(:project, namespace: create(:user).namespace, creator_id: user2.id) } + let!(:unrelated_project) { create(:project, namespace: create(:user).namespace, creator_id: user2.id) } before do forked_project.add_reporter(user2) diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb index 9bf753fe049..424f0a82e43 100644 --- a/spec/requests/api/notes_spec.rb +++ b/spec/requests/api/notes_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe API::Notes do let(:user) { create(:user) } let!(:project) { create(:project, :public, namespace: user.namespace) } - let(:private_user) { create(:user) } + let(:private_user) { create(:user) } before do project.add_reporter(user) @@ -46,7 +46,7 @@ describe API::Notes do create(:project, namespace: private_user.namespace) .tap { |p| p.add_maintainer(private_user) } end - let(:private_issue) { create(:issue, project: private_project) } + let(:private_issue) { create(:issue, project: private_project) } let(:ext_proj) { create(:project, :public) } let(:ext_issue) { create(:issue, project: ext_proj) } diff --git a/spec/requests/api/pages/private_access_spec.rb b/spec/requests/api/pages/private_access_spec.rb index d69c15b0477..c647537038e 100644 --- a/spec/requests/api/pages/private_access_spec.rb +++ b/spec/requests/api/pages/private_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Private Project Pages Access" do +describe "Private Project Pages Access" do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/pages/public_access_spec.rb b/spec/requests/api/pages/public_access_spec.rb index 882ca26ac51..16cc5697f30 100644 --- a/spec/requests/api/pages/public_access_spec.rb +++ b/spec/requests/api/pages/public_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Public Project Pages Access" do +describe "Public Project Pages Access" do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/project_milestones_spec.rb b/spec/requests/api/project_milestones_spec.rb index 0fa13dd71e2..49b5dfb0b33 100644 --- a/spec/requests/api/project_milestones_spec.rb +++ b/spec/requests/api/project_milestones_spec.rb @@ -10,7 +10,7 @@ describe API::ProjectMilestones do project.add_developer(user) end - it_behaves_like 'group and project milestones', "/projects/:id/milestones" do + it_behaves_like 'group and project milestones', "/projects/:id/milestones" do let(:route) { "/projects/#{project.id}/milestones" } end diff --git a/spec/requests/api/resource_label_events_spec.rb b/spec/requests/api/resource_label_events_spec.rb index b7d4a5152cc..37b46eaeb86 100644 --- a/spec/requests/api/resource_label_events_spec.rb +++ b/spec/requests/api/resource_label_events_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe API::ResourceLabelEvents do set(:user) { create(:user) } set(:project) { create(:project, :public, :repository, namespace: user.namespace) } - set(:private_user) { create(:user) } + set(:private_user) { create(:user) } before do project.add_developer(user) diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index f3431e0be3d..89151021f90 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -1785,7 +1785,7 @@ describe API::Users do end describe 'POST /users/:id/unblock' do - let(:blocked_user) { create(:user, state: 'blocked') } + let(:blocked_user) { create(:user, state: 'blocked') } before do admin diff --git a/spec/requests/lfs_locks_api_spec.rb b/spec/requests/lfs_locks_api_spec.rb index c63fbcdd84e..5b7b3d2fdd6 100644 --- a/spec/requests/lfs_locks_api_spec.rb +++ b/spec/requests/lfs_locks_api_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'Git LFS File Locking API' do include WorkhorseHelpers - let(:project) { create(:project) } + let(:project) { create(:project) } let(:maintainer) { create(:user) } let(:developer) { create(:user) } let(:guest) { create(:user) } @@ -160,7 +160,7 @@ describe 'Git LFS File Locking API' do post(url, params: body.try(:to_json), headers: (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE)) end - def do_get(url, params = nil, headers = nil) + def do_get(url, params = nil, headers = nil) get(url, params: (params || {}), headers: (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE)) end diff --git a/spec/requests/projects/cycle_analytics_events_spec.rb b/spec/requests/projects/cycle_analytics_events_spec.rb index bcc3e3a2678..49412b628b3 100644 --- a/spec/requests/projects/cycle_analytics_events_spec.rb +++ b/spec/requests/projects/cycle_analytics_events_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'cycle analytics events' do let(:user) { create(:user) } let(:project) { create(:project, :repository, public_builds: false) } - let(:issue) { create(:issue, project: project, created_at: 2.days.ago) } + let(:issue) { create(:issue, project: project, created_at: 2.days.ago) } describe 'GET /:namespace/:project/cycle_analytics/events/issues' do before do diff --git a/spec/requests/request_profiler_spec.rb b/spec/requests/request_profiler_spec.rb index 284a51fcc32..75b22b1879b 100644 --- a/spec/requests/request_profiler_spec.rb +++ b/spec/requests/request_profiler_spec.rb @@ -18,7 +18,7 @@ describe 'Request Profiler' do path = "/#{project.full_path}" Timecop.freeze(time) do - get path, params: {}, headers: { 'X-Profile-Token' => Gitlab::RequestProfiler.profile_token } + get path, params: {}, headers: { 'X-Profile-Token' => Gitlab::RequestProfiler.profile_token } end profile_path = "#{Gitlab.config.shared.path}/tmp/requests_profiles/#{path.tr('/', '|')}_#{time.to_i}.html" diff --git a/spec/serializers/container_repository_entity_spec.rb b/spec/serializers/container_repository_entity_spec.rb index c589cd18f77..15466bce514 100644 --- a/spec/serializers/container_repository_entity_spec.rb +++ b/spec/serializers/container_repository_entity_spec.rb @@ -19,7 +19,7 @@ describe ContainerRepositoryEntity do allow(request).to receive(:current_user).and_return(user) end - it 'exposes required informations' do + it 'exposes required informations' do expect(subject).to include(:id, :path, :location, :tags_path) end diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb index 8793a762f9d..cfa5414b40f 100644 --- a/spec/serializers/deployment_entity_spec.rb +++ b/spec/serializers/deployment_entity_spec.rb @@ -11,7 +11,7 @@ describe DeploymentEntity do allow(request).to receive(:current_user).and_return(user) end - it 'exposes internal deployment id' do + it 'exposes internal deployment id' do expect(subject).to include(:iid) end diff --git a/spec/services/application_settings/update_service_spec.rb b/spec/services/application_settings/update_service_spec.rb index daf5dfba6b1..a4a733eff77 100644 --- a/spec/services/application_settings/update_service_spec.rb +++ b/spec/services/application_settings/update_service_spec.rb @@ -17,7 +17,7 @@ describe ApplicationSettings::UpdateService do describe 'updating terms' do context 'when the passed terms are blank' do - let(:params) { { terms: '' } } + let(:params) { { terms: '' } } it 'does not create terms' do expect { subject.execute }.not_to change { ApplicationSetting::Term.count } @@ -25,7 +25,7 @@ describe ApplicationSettings::UpdateService do end context 'when passing terms' do - let(:params) { { terms: 'Be nice! ' } } + let(:params) { { terms: 'Be nice! ' } } it 'creates the terms' do expect { subject.execute }.to change { ApplicationSetting::Term.count }.by(1) diff --git a/spec/services/boards/issues/list_service_spec.rb b/spec/services/boards/issues/list_service_spec.rb index 010679b5360..aaad29536af 100644 --- a/spec/services/boards/issues/list_service_spec.rb +++ b/spec/services/boards/issues/list_service_spec.rb @@ -12,7 +12,7 @@ describe Boards::Issues::ListService do let(:bug) { create(:label, project: project, name: 'Bug') } let(:development) { create(:label, project: project, name: 'Development') } - let(:testing) { create(:label, project: project, name: 'Testing') } + let(:testing) { create(:label, project: project, name: 'Testing') } let(:p1) { create(:label, title: 'P1', project: project, priority: 1) } let(:p2) { create(:label, title: 'P2', project: project, priority: 2) } let(:p3) { create(:label, title: 'P3', project: project, priority: 3) } @@ -63,7 +63,7 @@ describe Boards::Issues::ListService do let(:bug) { create(:group_label, group: group, name: 'Bug') } let(:development) { create(:group_label, group: group, name: 'Development') } - let(:testing) { create(:group_label, group: group, name: 'Testing') } + let(:testing) { create(:group_label, group: group, name: 'Testing') } let(:p1) { create(:group_label, title: 'P1', group: group) } let(:p2) { create(:group_label, title: 'P2', group: group) } diff --git a/spec/services/boards/issues/move_service_spec.rb b/spec/services/boards/issues/move_service_spec.rb index dd0ad5f11bd..6020f0771e5 100644 --- a/spec/services/boards/issues/move_service_spec.rb +++ b/spec/services/boards/issues/move_service_spec.rb @@ -10,7 +10,7 @@ describe Boards::Issues::MoveService do let(:bug) { create(:label, project: project, name: 'Bug') } let(:development) { create(:label, project: project, name: 'Development') } - let(:testing) { create(:label, project: project, name: 'Testing') } + let(:testing) { create(:label, project: project, name: 'Testing') } let(:regression) { create(:label, project: project, name: 'Regression') } let!(:list1) { create(:list, board: board1, label: development, position: 0) } @@ -35,7 +35,7 @@ describe Boards::Issues::MoveService do let(:bug) { create(:group_label, group: group, name: 'Bug') } let(:development) { create(:group_label, group: group, name: 'Development') } - let(:testing) { create(:group_label, group: group, name: 'Testing') } + let(:testing) { create(:group_label, group: group, name: 'Testing') } let(:regression) { create(:group_label, group: group, name: 'Regression') } let!(:list1) { create(:list, board: board1, label: development, position: 0) } diff --git a/spec/services/event_create_service_spec.rb b/spec/services/event_create_service_spec.rb index 68e310b0506..443665c9959 100644 --- a/spec/services/event_create_service_spec.rb +++ b/spec/services/event_create_service_spec.rb @@ -144,7 +144,7 @@ describe EventCreateService do it 'updates user last activity' do expect { service.push(project, user, push_data) } - .to change { user.last_activity_on }.to(Date.today) + .to change { user.last_activity_on }.to(Date.today) end it 'caches the last push event for the user' do diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index 45ef26aebbd..e8fce951155 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -15,7 +15,7 @@ describe GitPushService, services: true do end describe 'with remote mirrors' do - let(:project) { create(:project, :repository, :remote_mirror) } + let(:project) { create(:project, :repository, :remote_mirror) } subject do described_class.new(project, user, oldrev: oldrev, newrev: newrev, ref: ref) @@ -547,7 +547,7 @@ describe GitPushService, services: true do end context "closing an issue" do - let(:message) { "this is some work.\n\ncloses JIRA-1" } + let(:message) { "this is some work.\n\ncloses JIRA-1" } let(:comment_body) do { body: "Issue solved with [#{closing_commit.id}|http://#{Gitlab.config.gitlab.host}/#{project.full_path}/commit/#{closing_commit.id}]." diff --git a/spec/services/issues/create_service_spec.rb b/spec/services/issues/create_service_spec.rb index c61c1ddcb3d..715b1168bfb 100644 --- a/spec/services/issues/create_service_spec.rb +++ b/spec/services/issues/create_service_spec.rb @@ -172,7 +172,7 @@ describe Issues::CreateService do end it 'removes assignee when user id is 0' do - opts = { title: 'Title', description: 'Description', assignee_ids: [0] } + opts = { title: 'Title', description: 'Description', assignee_ids: [0] } issue = described_class.new(project, user, opts).execute diff --git a/spec/services/labels/find_or_create_service_spec.rb b/spec/services/labels/find_or_create_service_spec.rb index 97ba2742392..7af514a5bea 100644 --- a/spec/services/labels/find_or_create_service_spec.rb +++ b/spec/services/labels/find_or_create_service_spec.rb @@ -46,7 +46,7 @@ describe Labels::FindOrCreateService do end context 'when include_ancestor_groups is true' do - let(:group) { create(:group, :nested) } + let(:group) { create(:group, :nested) } let(:params) do { title: 'Audit', diff --git a/spec/services/labels/promote_service_spec.rb b/spec/services/labels/promote_service_spec.rb index aa9aba6bdff..c4c7f33e36a 100644 --- a/spec/services/labels/promote_service_spec.rb +++ b/spec/services/labels/promote_service_spec.rb @@ -5,9 +5,9 @@ describe Labels::PromoteService do let!(:user) { create(:user) } context 'project without group' do - let!(:project_1) { create(:project) } + let!(:project_1) { create(:project) } - let!(:project_label_1_1) { create(:label, project: project_1) } + let!(:project_label_1_1) { create(:label, project: project_1) } subject(:service) { described_class.new(project_1, user) } diff --git a/spec/services/lfs/unlock_file_service_spec.rb b/spec/services/lfs/unlock_file_service_spec.rb index 539417644db..fe42ca41633 100644 --- a/spec/services/lfs/unlock_file_service_spec.rb +++ b/spec/services/lfs/unlock_file_service_spec.rb @@ -62,7 +62,7 @@ describe Lfs::UnlockFileService do context 'when forced' do let(:developer) { create(:user) } - let(:maintainer) { create(:user) } + let(:maintainer) { create(:user) } before do project.add_developer(developer) diff --git a/spec/services/merge_requests/create_service_spec.rb b/spec/services/merge_requests/create_service_spec.rb index 308f99dc0da..4e64b0c9414 100644 --- a/spec/services/merge_requests/create_service_spec.rb +++ b/spec/services/merge_requests/create_service_spec.rb @@ -301,7 +301,7 @@ describe MergeRequests::CreateService do end it 'removes assignee_id when user id is 0' do - opts = { title: 'Title', description: 'Description', assignee_id: 0 } + opts = { title: 'Title', description: 'Description', assignee_id: 0 } merge_request = described_class.new(project, user, opts).execute diff --git a/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb index 95c9b6e63b8..fcc87196d5a 100644 --- a/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb @@ -107,7 +107,7 @@ describe Projects::LfsPointers::LfsDownloadService do end end - context 'when an lfs object with the same oid already exists' do + context 'when an lfs object with the same oid already exists' do before do create(:lfs_object, oid: 'oid') end diff --git a/spec/services/resource_events/change_labels_service_spec.rb b/spec/services/resource_events/change_labels_service_spec.rb index 4c9138fb1ef..070964eb1ec 100644 --- a/spec/services/resource_events/change_labels_service_spec.rb +++ b/spec/services/resource_events/change_labels_service_spec.rb @@ -10,7 +10,7 @@ describe ResourceEvents::ChangeLabelsService do describe '.change_labels' do subject { described_class.new(resource, author).execute(added_labels: added, removed_labels: removed) } - let(:labels) { create_list(:label, 2, project: project) } + let(:labels) { create_list(:label, 2, project: project) } def expect_label_event(event, label, action) expect(event.user).to eq(author) diff --git a/spec/services/resource_events/merge_into_notes_service_spec.rb b/spec/services/resource_events/merge_into_notes_service_spec.rb index c76f6e6f77e..14c43b46c15 100644 --- a/spec/services/resource_events/merge_into_notes_service_spec.rb +++ b/spec/services/resource_events/merge_into_notes_service_spec.rb @@ -16,8 +16,8 @@ describe ResourceEvents::MergeIntoNotesService do create(:note_on_issue, opts.merge(params)) end - set(:project) { create(:project) } - set(:user) { create(:user) } + set(:project) { create(:project) } + set(:user) { create(:user) } set(:resource) { create(:issue, project: project) } set(:label) { create(:label, project: project) } set(:label2) { create(:label, project: project) } diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 0fbfcb34e50..82544ab0413 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -819,7 +819,7 @@ describe SystemNoteService do end context 'for issues' do - let(:issue) { create(:issue, project: project) } + let(:issue) { create(:issue, project: project) } it "creates comment" do result = described_class.cross_reference(jira_issue, issue, author) @@ -1131,7 +1131,7 @@ describe SystemNoteService do end context 'across different projects' do - let(:other_project) { create(:project) } + let(:other_project) { create(:project) } let(:canonical_issue) { create(:issue, project: other_project) } it_behaves_like 'a system note' do @@ -1156,7 +1156,7 @@ describe SystemNoteService do end context 'across different projects' do - let(:other_project) { create(:project) } + let(:other_project) { create(:project) } let(:duplicate_issue) { create(:issue, project: other_project) } it_behaves_like 'a system note' do @@ -1168,7 +1168,7 @@ describe SystemNoteService do end describe '.discussion_lock' do - subject { described_class.discussion_lock(noteable, author) } + subject { described_class.discussion_lock(noteable, author) } context 'discussion unlocked' do it_behaves_like 'a system note' do diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb index 253f2e44d10..8631f3f9a33 100644 --- a/spec/services/todo_service_spec.rb +++ b/spec/services/todo_service_spec.rb @@ -457,7 +457,7 @@ describe TodoService do end context 'on commit' do - let(:project) { create(:project, :repository) } + let(:project) { create(:project, :repository) } it 'creates a todo for each valid mentioned user when leaving a note on commit' do service.new_note(note_on_commit, john_doe) diff --git a/spec/services/todos/destroy/entity_leave_service_spec.rb b/spec/services/todos/destroy/entity_leave_service_spec.rb index 8cb91e7c1b9..4b238280848 100644 --- a/spec/services/todos/destroy/entity_leave_service_spec.rb +++ b/spec/services/todos/destroy/entity_leave_service_spec.rb @@ -173,10 +173,10 @@ describe Todos::Destroy::EntityLeaveService do let(:subproject) { create(:project, group: subgroup) } let(:subproject2) { create(:project, group: subgroup2) } - let!(:todo_subproject_user) { create(:todo, user: user, project: subproject) } - let!(:todo_subproject2_user) { create(:todo, user: user, project: subproject2) } - let!(:todo_subgroup_user) { create(:todo, user: user, group: subgroup) } - let!(:todo_subgroup2_user) { create(:todo, user: user, group: subgroup2) } + let!(:todo_subproject_user) { create(:todo, user: user, project: subproject) } + let!(:todo_subproject2_user) { create(:todo, user: user, project: subproject2) } + let!(:todo_subgroup_user) { create(:todo, user: user, group: subgroup) } + let!(:todo_subgroup2_user) { create(:todo, user: user, group: subgroup2) } let!(:todo_subproject_user2) { create(:todo, user: user2, project: subproject) } let!(:todo_subpgroup_user2) { create(:todo, user: user2, group: subgroup) } diff --git a/spec/services/todos/destroy/group_private_service_spec.rb b/spec/services/todos/destroy/group_private_service_spec.rb index 2f49b68f544..5cefbdd35ab 100644 --- a/spec/services/todos/destroy/group_private_service_spec.rb +++ b/spec/services/todos/destroy/group_private_service_spec.rb @@ -40,7 +40,7 @@ describe Todos::Destroy::GroupPrivateService do let(:parent_member) { create(:user) } let(:subgroup_member) { create(:user) } - let(:subgproject_member) { create(:user) } + let(:subgproject_member) { create(:user) } let!(:todo_parent_member) { create(:todo, user: parent_member, group: group) } let!(:todo_subgroup_member) { create(:todo, user: subgroup_member, group: group) } diff --git a/spec/services/users/migrate_to_ghost_user_service_spec.rb b/spec/services/users/migrate_to_ghost_user_service_spec.rb index ac3a8738cac..68b0f79c6d1 100644 --- a/spec/services/users/migrate_to_ghost_user_service_spec.rb +++ b/spec/services/users/migrate_to_ghost_user_service_spec.rb @@ -6,7 +6,7 @@ describe Users::MigrateToGhostUserService do let(:service) { described_class.new(user) } context "migrating a user's associated records to the ghost user" do - context 'issues' do + context 'issues' do context 'deleted user is present as both author and edited_user' do include_examples "migrating a deleted user's associated records to the ghost user", Issue, [:author, :last_edited_by] do let(:created_record) do diff --git a/spec/services/web_hook_service_spec.rb b/spec/services/web_hook_service_spec.rb index b1cc6d2eb83..5945a7dc0ad 100644 --- a/spec/services/web_hook_service_spec.rb +++ b/spec/services/web_hook_service_spec.rb @@ -61,7 +61,7 @@ describe WebHookService do end context 'when auth credentials are present' do - let(:url) {'https://example.org'} + let(:url) {'https://example.org'} let(:project_hook) { create(:project_hook, url: 'https://demo:demo@example.org/') } it 'uses the credentials' do @@ -76,7 +76,7 @@ describe WebHookService do end context 'when auth credentials are partial present' do - let(:url) {'https://example.org'} + let(:url) {'https://example.org'} let(:project_hook) { create(:project_hook, url: 'https://demo@example.org/') } it 'uses the credentials anyways' do diff --git a/spec/support/features/resolving_discussions_in_issues_shared_examples.rb b/spec/support/features/resolving_discussions_in_issues_shared_examples.rb index 4a946995f84..38e5fb155a4 100644 --- a/spec/support/features/resolving_discussions_in_issues_shared_examples.rb +++ b/spec/support/features/resolving_discussions_in_issues_shared_examples.rb @@ -5,7 +5,7 @@ shared_examples 'creating an issue for a discussion' do expect(title_field.value).to include(merge_request.title) end - it 'has a mention of the discussion in the description' do + it 'has a mention of the discussion in the description' do description_field = page.find_field('issue[description]') expect(description_field.value).to include(discussion.first_note.note) diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb index dd32ea3985f..ea3a03879c5 100644 --- a/spec/support/helpers/graphql_helpers.rb +++ b/spec/support/helpers/graphql_helpers.rb @@ -149,7 +149,7 @@ module GraphqlHelpers # - List # - String! # - String - field_type = field_type.of_type while field_type.respond_to?(:of_type) + field_type = field_type.of_type while field_type.respond_to?(:of_type) field_type end diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb index 87cfb6c04dc..3fee6872498 100644 --- a/spec/support/helpers/login_helpers.rb +++ b/spec/support/helpers/login_helpers.rb @@ -157,7 +157,7 @@ module LoginHelpers env['omniauth.error.strategy'] = strategy end - def stub_omniauth_saml_config(messages, context: Rails.application) + def stub_omniauth_saml_config(messages, context: Rails.application) set_devise_mapping(context: context) routes = Rails.application.routes routes.disable_clear_and_finalize = true diff --git a/spec/support/redis/redis_shared_examples.rb b/spec/support/redis/redis_shared_examples.rb index e650a176041..a8b00004fe7 100644 --- a/spec/support/redis/redis_shared_examples.rb +++ b/spec/support/redis/redis_shared_examples.rb @@ -1,7 +1,7 @@ RSpec.shared_examples "redis_shared_examples" do include StubENV - let(:test_redis_url) { "redis://redishost:#{redis_port}"} + let(:test_redis_url) { "redis://redishost:#{redis_port}"} before do stub_env(environment_config_file_name, Rails.root.join(config_file_name)) @@ -76,7 +76,7 @@ RSpec.shared_examples "redis_shared_examples" do context 'when yml file with env variable' do let(:config_file_name) { config_with_environment_variable_inside } - before do + before do stub_env(config_env_variable_url, test_redis_url) end diff --git a/spec/support/shared_examples/malicious_regexp_shared_examples.rb b/spec/support/shared_examples/malicious_regexp_shared_examples.rb index 65026f1d7c0..db69b75c0c8 100644 --- a/spec/support/shared_examples/malicious_regexp_shared_examples.rb +++ b/spec/support/shared_examples/malicious_regexp_shared_examples.rb @@ -1,7 +1,7 @@ require 'timeout' shared_examples 'malicious regexp' do - let(:malicious_text) { 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!' } + let(:malicious_text) { 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!' } let(:malicious_regexp) { '(?i)^(([a-z])+.)+[A-Z]([a-z])+$' } it 'takes under a second' do diff --git a/spec/support/shared_examples/mentionable_shared_examples.rb b/spec/support/shared_examples/mentionable_shared_examples.rb index 1685decbe94..1226841f24c 100644 --- a/spec/support/shared_examples/mentionable_shared_examples.rb +++ b/spec/support/shared_examples/mentionable_shared_examples.rb @@ -8,8 +8,8 @@ shared_context 'mentionable context' do let(:project) { subject.project } let(:author) { subject.author } - let(:mentioned_issue) { create(:issue, project: project) } - let!(:mentioned_mr) { create(:merge_request, source_project: project) } + let(:mentioned_issue) { create(:issue, project: project) } + let!(:mentioned_mr) { create(:merge_request, source_project: project) } let(:mentioned_commit) { project.commit("HEAD~1") } let(:ext_proj) { create(:project, :public, :repository) } diff --git a/spec/support/shared_examples/url_validator_examples.rb b/spec/support/shared_examples/url_validator_examples.rb index b4757a70984..1f7e2f7ff79 100644 --- a/spec/support/shared_examples/url_validator_examples.rb +++ b/spec/support/shared_examples/url_validator_examples.rb @@ -1,5 +1,5 @@ RSpec.shared_examples 'url validator examples' do |protocols| - let(:validator) { described_class.new(attributes: [:link_url], **options) } + let(:validator) { described_class.new(attributes: [:link_url], **options) } let!(:badge) { build(:badge, link_url: 'http://www.example.com') } subject { validator.validate_each(badge, :link_url, badge.link_url) } diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb index db9e5eb2ad6..185c62491ce 100644 --- a/spec/uploaders/file_uploader_spec.rb +++ b/spec/uploaders/file_uploader_spec.rb @@ -4,7 +4,7 @@ describe FileUploader do let(:group) { create(:group, name: 'awesome') } let(:project) { create(:project, :legacy_storage, namespace: group, name: 'project') } let(:uploader) { described_class.new(project) } - let(:upload) { double(model: project, path: 'secret/foo.jpg') } + let(:upload) { double(model: project, path: 'secret/foo.jpg') } subject { uploader } diff --git a/spec/uploaders/import_export_uploader_spec.rb b/spec/uploaders/import_export_uploader_spec.rb index 51b173b682d..825c1cabc14 100644 --- a/spec/uploaders/import_export_uploader_spec.rb +++ b/spec/uploaders/import_export_uploader_spec.rb @@ -4,7 +4,7 @@ describe ImportExportUploader do let(:model) { build_stubbed(:import_export_upload) } let(:upload) { create(:upload, model: model) } - subject { described_class.new(model, :import_file) } + subject { described_class.new(model, :import_file) } context "object_store is REMOTE" do before do diff --git a/spec/workers/prune_old_events_worker_spec.rb b/spec/workers/prune_old_events_worker_spec.rb index b999a6fd5b6..ea2b6ae229e 100644 --- a/spec/workers/prune_old_events_worker_spec.rb +++ b/spec/workers/prune_old_events_worker_spec.rb @@ -5,8 +5,8 @@ describe PruneOldEventsWorker do let(:user) { create(:user) } let!(:expired_event) { create(:event, :closed, author: user, created_at: 25.months.ago) } - let!(:not_expired_1_day_event) { create(:event, :closed, author: user, created_at: 1.day.ago) } - let!(:not_expired_13_month_event) { create(:event, :closed, author: user, created_at: 13.months.ago) } + let!(:not_expired_1_day_event) { create(:event, :closed, author: user, created_at: 1.day.ago) } + let!(:not_expired_13_month_event) { create(:event, :closed, author: user, created_at: 13.months.ago) } let!(:not_expired_2_years_event) { create(:event, :closed, author: user, created_at: 2.years.ago) } it 'prunes events older than 2 years' do