Commit e9cefd1e authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'frozen-string-ee-app-helpers' into 'master'

Enable some frozen string in ee/app

See merge request gitlab-org/gitlab-ee!8667
parents 18bfce52 579e9768
# frozen_string_literal: true
module AuditEventsHelper
def human_text(details)
details.map { |key, value| select_keys(key, value) }.join(" ").humanize
......
# frozen_string_literal: true
module AuditLogsHelper
def event_type_options
[
......
# frozen_string_literal: true
module AuditorUserHelper
include ::Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
module BatchCommentsHelper
def batch_comments_enabled?
current_user.present? && @project.feature_available?(:batch_comments, current_user)
......
# frozen_string_literal: true
module BillingPlansHelper
def subscription_plan_info(plans_data, current_plan_code)
plans_data.find { |plan| plan.code == current_plan_code }
......
# frozen_string_literal: true
module EE
module AppearancesHelper
def header_message
......@@ -26,10 +28,10 @@ module EE
end
def message_style
style = ''
style = []
style << "background-color: #{current_appearance.message_background_color};"
style << "color: #{current_appearance.message_font_color}"
style
style.join
end
end
end
# frozen_string_literal: true
module EE
module ApplicationHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module ApplicationSettingsHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module AuthHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module AwardEmojiHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module BoardsHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module BranchesHelper
# Returns a hash were keys are types of access levels (user, role), and
......
# frozen_string_literal: true
module EE
module ButtonHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module DashboardHelper
def controller_action_to_child_dashboards(controller = controller_name, action = action_name)
......
# frozen_string_literal: true
module EE
module EmailsHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module EnvironmentsHelper
def metrics_data(project, environment)
......
# frozen_string_literal: true
module EE
module FormHelper
def issue_assignees_dropdown_options
......
# frozen_string_literal: true
module EE
module GitlabRoutingHelper
include ::ProjectsHelper
......
# frozen_string_literal: true
module EE
module GroupsHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module ImportHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module IssuablesHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module IssuesHelper
def weight_dropdown_tag(issuable, opts = {}, &block)
......
# frozen_string_literal: true
module EE
module LockHelper
def lock_file_link(project = @project, path = @path, html_options: {})
......
# frozen_string_literal: true
module EE
module MergeRequestsHelper
def render_items_list(items, separator = "and")
......
# frozen_string_literal: true
module EE
module MilestonesHelper
def burndown_chart(milestone)
......@@ -32,9 +34,9 @@ module EE
end
if message
message += link_to "About burndown charts", help_page_path('user/project/milestones/index', anchor: 'burndown-charts'), class: 'burndown-docs-link'
link = link_to "About burndown charts", help_page_path('user/project/milestones/index', anchor: 'burndown-charts'), class: 'burndown-docs-link'
content_tag(:div, message.html_safe, id: "data-warning", class: "settings-message prepend-top-20")
content_tag(:div, (message + link).html_safe, id: "data-warning", class: "settings-message prepend-top-20")
end
end
......
# frozen_string_literal: true
module EE
module NamespacesHelper
def namespace_shared_runner_limits_quota(namespace)
......
# frozen_string_literal: true
module EE
module NavHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module NotesHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module ProjectsHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module SamlProvidersHelper
def group_saml_configured?
......
# frozen_string_literal: true
module EE
module ServicesHelper
def add_to_slack_link(project, slack_app_id)
......
# frozen_string_literal: true
module EE
module SystemNoteHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module TodosHelper
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module UserCalloutsHelper
GOLD_TRIAL = 'gold_trial'.freeze
......
# frozen_string_literal: true
module EpicsHelper
def epic_show_app_data(epic, opts)
group = epic.group
......
# frozen_string_literal: true
module GroupMembersHelper
def clear_ldap_permission_cache_message
markdown(
......
# frozen_string_literal: true
module LicenseHelper
include ActionView::Helpers::AssetTagHelper
include ActionView::Helpers::UrlHelper
......
# frozen_string_literal: true
module MirrorHelper
def render_mirror_failed_message(raw_message:)
mirror_last_update_at = @project.import_state.last_update_at
......@@ -15,14 +17,14 @@ module MirrorHelper
end
def branch_diverged_tooltip_message
message = s_('Branches|The branch could not be updated automatically because it has diverged from its upstream counterpart.')
message = [s_('Branches|The branch could not be updated automatically because it has diverged from its upstream counterpart.')]
if can?(current_user, :push_code, @project)
message << '<br>'
message << s_("Branches|To discard the local changes and overwrite the branch with the upstream version, delete it here and choose 'Update Now' above.")
end
message
message.join
end
def options_for_mirror_user
......
# frozen_string_literal: true
module PathLocksHelper
def can_unlock?(path_lock, current_user = @current_user, project = @project)
can?(current_user, :admin_path_locks, project) || path_lock.user == current_user
......
# frozen_string_literal: true
module ProtectedEnvironmentsHelper
def protected_environments_enabled?(project)
project.protected_environments_feature_available?
......
# frozen_string_literal: true
module PushRulesHelper
def reject_unsigned_commits_description(push_rule)
message = s_("ProjectSettings|Only signed commits can be pushed to this repository.")
......
# frozen_string_literal: true
module EE
module Notify
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
module Preview
module NotifyPreview
......
# frozen_string_literal: true
module Emails
module AdminNotification
def send_admin_notification(user_id, subject, body)
......
# frozen_string_literal: true
module Emails
module CsvExport
def issues_csv_email(user, project, csv_data, export_status)
......
# frozen_string_literal: true
module Emails
module EE
module Notes
......
# frozen_string_literal: true
module Emails
module EE
module Projects
......
# frozen_string_literal: true
module Emails
module ServiceDesk
extend ActiveSupport::Concern
......
# frozen_string_literal: true
class Approval < ActiveRecord::Base
belongs_to :user
belongs_to :merge_request
......
# frozen_string_literal: true
class Approver < ActiveRecord::Base
belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
belongs_to :user
......
# frozen_string_literal: true
class ApproverGroup < ActiveRecord::Base
belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
belongs_to :group
......
# frozen_string_literal: true
class BoardAssignee < ActiveRecord::Base
belongs_to :board
belongs_to :assignee, class_name: 'User'
......
# frozen_string_literal: true
class BoardLabel < ActiveRecord::Base
belongs_to :board
belongs_to :label
......
# frozen_string_literal: true
class Burndown
include Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
module Ci
class PipelineChatData < ActiveRecord::Base
self.table_name = 'ci_pipeline_chat_data'
......
# frozen_string_literal: true
module Ci
module Sources
class Pipeline < ActiveRecord::Base
......
# frozen_string_literal: true
module Approvable
# A method related to approvers that is user facing
# should be moved to VisibleApprovable because
......
# frozen_string_literal: true
module CustomModelNaming
# Extracted from: https://github.com/stevenbarragan/spree_random_subscriptions/blob/5426ccaf8a2084c495b2cac9dfbd27e30ade0cec/lib/custom_model_naming.rb
......
# frozen_string_literal: true
module EE
module DeploymentPlatform
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module KubernetesService
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
module Participable
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module PrometheusAdapter
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module ProtectedBranch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
module ProtectedRef
def protected_ref_access_levels(*types)
......
# frozen_string_literal: true
# EE-specific code related to protected branch/tag access levels.
#
# Note: Don't directly include this concern into a model class.
......
# frozen_string_literal: true
module EE
# Issue position on list boards should be relative to all group projects
module RelativePositioning
......
# frozen_string_literal: true
module Elastic
module IssuesSearch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Elastic
module MergeRequestsSearch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Elastic
module MilestonesSearch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Elastic
module NotesSearch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Elastic
module ProjectsSearch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Elastic
module RepositoriesSearch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Elastic
module SnippetsSearch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Elastic
module WikiRepositoriesSearch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Geo
module Model
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Geo::Syncable
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module HasEnvironmentScope
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module ObjectStorable
extend ActiveSupport::Concern
......
# frozen_string_literal: true
# This module may only be used by presenters or modules
# that include the Approvable concern
module VisibleApprovable
......
# frozen_string_literal: true
module EE
module Appearance
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
# ApplicationSetting EE mixin
#
......
# frozen_string_literal: true
module EE
module AuditEvent
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
module Board
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
# BroadcastMessage EE mixin
#
......
# frozen_string_literal: true
module EE
module Ci
# Build EE mixin
......
# frozen_string_literal: true
module EE
# CI::JobArtifact EE mixin
#
......
# frozen_string_literal: true
module EE
module Ci
module Pipeline
......
# frozen_string_literal: true
module EE
module Ci
module Runner
......
# frozen_string_literal: true
module EE
module Clusters
module Applications
......
# frozen_string_literal: true
module EE
module Clusters
module Cluster
......
# frozen_string_literal: true
module EE
module Environment
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
module Epic
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
module GlobalMilestone
def supports_weight?
......
# frozen_string_literal: true
module EE
# Group EE mixin
#
......
# frozen_string_literal: true
module EE
module GroupMilestone
def supports_weight?
......
# frozen_string_literal: true
module EE
module Identity
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
module Issue
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EE
# LFS Object EE mixin
#
......
# frozen_string_literal: true
module EE
module List
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
module EE
module MergeRequest
extend ActiveSupport::Concern
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment